In [3]:
%pylab inline
import sympy as sp
sp.init_printing()
In [8]:
dt = sp.Symbol('dt')
psi_k1_k1 = sp.Symbol('\psi_{k-1 | k-1}') # roll prior
psi_k_k1 = sp.Symbol('\psi_{k | k-1}') # roll predicted
psi_k_k = sp.Symbol('\psi_{k | k }') # roll post
d_psi = sp.Symbol('\dot{\psi}_{k-1}') # roll rate
psi_m = sp.Symbol('\psi_m') # mesured roll
tau = sp.Symbol('\\tau') # filter response time
In [11]:
psi_k_k1 = psi_k1_k1 + d_psi * dt
psi_k_k1
Out[11]:
In [9]:
alpha = tau / (tau + dt)
alpha
Out[9]:
In [12]:
psi_k_k = alpha * psi_k_k1 + (1-alpha) * psi_m
psi_k_k
Out[12]:
In [ ]: