Skip to content

Commit

Permalink
Update bbn_wave_freq_m5atomS3.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrouch authored Sep 1, 2024
1 parent 0e19440 commit c8bed38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bbn_wave_freq_m5atomS3/bbn_wave_freq_m5atomS3.ino
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ void repeatMe() {
float freq_adj = kalman_smoother_update(&kalman, state.f);

float a = y; // acceleration in fractions of g
float period = (state.f > 0 ? 1.0 / state.f : 9999.0); // or use freq_adj
float period = (freq_adj > 0 ? 1.0 / freq_adj : 9999.0);
float wave_length = trochoid_wave_length(period);
float heave = - a * wave_length / (2 * PI);

Expand Down

0 comments on commit c8bed38

Please sign in to comment.