Skip to content

Commit

Permalink
Update AranovskiyFilter.h
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrouch authored Sep 10, 2024
1 parent bff1c8c commit 0197963
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bbn_wave_freq_m5atomS3/AranovskiyFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
unsigned long now = 0UL, last_update = 0UL;
double t = t_0;
last_update = millis();
while(1) {
delay(4);
Expand All @@ -46,6 +47,8 @@
aranovskiy_update(&params, &state, y, delta_t);
// state.f contains estimated frequency
t = t + delta_t;
}
Use double instead of float to avoid float overflows with higher Aranovskiy gain values
Expand Down

0 comments on commit 0197963

Please sign in to comment.