Created
July 31, 2016 22:12
-
-
Save xaedes/d0bb13085a57b1c7c3a1bb363b7fea82 to your computer and use it in GitHub Desktop.
indirect_filter.pxd with flow chart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ins_stabilization.algorithms.matrix2 cimport Matrix2, Vector2 | |
# +----------------------------------------------------------------------------+ | |
# | Indirect Wiener Process Filter | | |
# | | | |
# | +--+ state (update_sensor1) | | |
# | | | | | |
# | +---v--+----- +-----+ | | |
# | | | | | | | |
# | dx/dt sensor1 +---> Integrate +--------> add +----------> estimate of x | | |
# | | | | | | | |
# | +-----+------ +--^--+ | | |
# | | | | | |
# | |negate | | | |
# | | | | | |
# | +--v--+ +---+----+ | | |
# | | | | +----+ state | | |
# | x sensor2 +------> add +----------> Kalman | | (update_sensor2) | | |
# | | | -error | <----+ | | |
# | +-----+ +--------+ | | |
# | | | |
# +----------------------------------------------------------------------------+ | |
cdef struct IndirectWienerFilterState: | |
double last_variance_update | |
double last_sensor1_value | |
double estimated | |
double error | |
double error_variance | |
double corrected | |
cdef struct IndirectWienerFilterState2: | |
double last_variance_update | |
Vector2 last_sensor1_value | |
Vector2 estimated | |
Vector2 error | |
Matrix2 error_variance | |
Vector2 corrected | |
cdef struct IndirectWienerFilterParams: | |
double bias1 | |
double bias2 | |
double sigma1 | |
double sigma2 | |
double scale1 | |
double scale2 | |
cdef struct IndirectWienerFilterParams2: | |
# bias and scale assumed to be 0 and 1 | |
# Vector2 bias1 | |
# Vector2 bias2 | |
# Vector2 scale1 | |
# Vector2 scale2 | |
Matrix2 covariance1 | |
Matrix2 covariance2 | |
cdef update_indirect_wiener( | |
IndirectWienerFilterParams* params, | |
double time, double sensor1, double sensor2, | |
IndirectWienerFilterState* state, | |
IndirectWienerFilterState* out) | |
cdef update_indirect_wiener_sensor1( | |
IndirectWienerFilterParams* params, | |
double time, double sensor1, | |
IndirectWienerFilterState* state, | |
IndirectWienerFilterState* out) | |
cdef update_indirect_wiener_sensor2( | |
IndirectWienerFilterParams* params, | |
double time, double sensor2, | |
IndirectWienerFilterState* state, | |
IndirectWienerFilterState* out) | |
cdef update_indirect_wiener2( | |
IndirectWienerFilterParams2* params, | |
double time, Vector2* sensor1, Vector2* sensor2, | |
IndirectWienerFilterState2* state, | |
IndirectWienerFilterState2* out) | |
cdef update_indirect_wiener2_sensor1( | |
IndirectWienerFilterParams2* params, | |
double time, Vector2* sensor1, | |
IndirectWienerFilterState2* state, | |
IndirectWienerFilterState2* out) | |
cdef update_indirect_wiener2_sensor2( | |
IndirectWienerFilterParams2* params, | |
double time, Vector2* sensor2, | |
IndirectWienerFilterState2* state, | |
IndirectWienerFilterState2* out) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment