Skip to content

Commit

Permalink
Update KalmanSmoother.h
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrouch authored Sep 2, 2024
1 parent a8a8af5 commit 509d90d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bbn_wave_freq_m5atomS3/KalmanSmoother.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ float kalman_smoother_update(KalmanSmootherVars* s, float measurement) {
// measurement update
s->k = s->p / (s->p + s->r);
float current_estimate = s->x + s->k * (measurement - s->x);
s->p = (1.0 - s->k) * s->p + abs(s->x - current_estimate) * s->q;
s->p = (1.0 - s->k) * s->p + fabs(s->x - current_estimate) * s->q;
s->x = current_estimate;
return s->x;
}
Expand Down

0 comments on commit 509d90d

Please sign in to comment.