Skip to content

Instantly share code, notes, and snippets.

#pragma once
#include <integrator.h>
template<typename T>
class PIDStd2 {
T Kp;
T Ti;
T Td;
T N;
T b;
T c;
#pragma once
#include <integrator.h>
template<typename T>
class PID2 {
T Kp;
T Ki;
T Kd;
T Tf;
T Ts;
T b;
#pragma once
#include <integrator.h>
template<typename T>
class PIDStd {
T Kp;
T Ti;
T Td;
T N;
T Ts;
T x;
#pragma once
#include <integrator.h>
template<typename T>
class PID {
T Kp;
T Ki;
T Kd;
T Tf;
T Ts;
T x;
@tanitanin
tanitanin / integrator.h
Last active June 10, 2019 16:27
Discrete-Time Integrator with Forward Eular Method
#pragma once
template<typename T>
class DescreteTimeIntegrator {
T x;
T y;
T Ts;
T K;
public:
DescreteTimeIntegrator(T k, T ts,T initial = T()) : K(k), Ts(ts) {
y = initial;
@tanitanin
tanitanin / ObservableSortedCollection.cs
Created November 12, 2018 15:54
ObservableSortedCollection<T>
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
public class ObservableSortedCollection<T> :
ObservableCollection<T>
where T: IComparable<T>, INotifyPropertyChanged
{
@tanitanin
tanitanin / インターフェースデザインの心理学.md
Last active June 11, 2018 14:00
インターフェースデザインの心理学の読書備忘録

インターフェースデザインの心理学の読書備忘録。 読み終えたところまでで随時更新していく予定。

1章 人はどう見るのか

錯視や顔の認識実験などから脳の処理をひも解く章。 脳科学の代表的な実験例をぎゅっとまとめて紹介する感じ。

ユーザーのミスリードになるような注意すべきデザインが詰まっていて参考になる。

2章 人はどう読むのか

@tanitanin
tanitanin / Observable.cs
Created September 16, 2017 08:43
Observable class to notify event which property changes.
public class Observable : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
public void Set<T>(ref T target, T value, [CallerMemberName] string propertyName = null)
{
if (target.Equals(value)) return;
target = value;
@tanitanin
tanitanin / MSYS2-packages-vim-PKGBUILD.patch
Last active April 14, 2017 15:27
patch to enable luainterp option
--- a/vim/PKGBUILD
+++ b/vim/PKGBUILD
@@ -75,13 +75,15 @@ build() {
# make distclean
./configure \
+ --enable-fail-if-missing \
--prefix=/usr \
--build=${CHOST} \
--with-features=huge \
@tanitanin
tanitanin / caps2ctrl_and_muhenan2esc.bat
Created March 6, 2017 14:08
CapsLock to Ctrl and Mu-Henkan to Escape
@reg add "HKLM\SYSTEM\CurrentControlSet\Control\Keyboard Layout" /v "Scancode Map" /t REG_BINARY /d 0000000000000000040000001d003a003a001d0001007b0000000000