UKHAS Wiki

UK High Altitude Society

User Tools

Site Tools


code:kalman_filter

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
code:kalman_filter [2008/09/10 22:32] laurencebcode:kalman_filter [2008/10/20 13:38] (current) laurenceb
Line 18: Line 18:
  
  The simulated gyro output in red, and filter turn rate output in green.  The simulated gyro output in red, and filter turn rate output in green.
 +
 +
  
  
Line 68: Line 70:
 { {
  vector a=matrix_vector(&model->H,&state->state);  vector a=matrix_vector(&model->H,&state->state);
- a=vector_subtract(y,&state->state); //a is now the difference or residual+ a=vector_subtract(y,&a); //a is now the difference or residual 
 + if(a.t>PI) //need to make sure we stay in the correct range 
 +
 + a.t-=2*PI; 
 +
 + if(a.t<PI) 
 +
 + a.t+=2*PI; 
 + }
  a=matrix_vector(K,&a);  a=matrix_vector(K,&a);
  state->state = vector_add(&state->state,&a);  state->state = vector_add(&state->state,&a);
code/kalman_filter.1221085926.txt.gz · Last modified: 2008/09/10 22:32 by laurenceb

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki