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 13, 2024
1 parent 5199fa5 commit 9b7104c
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions bbn_wave_freq_m5atomS3/bbn_wave_freq_m5atomS3.ino
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "MinMaxLemire.h"
#include "KalmanForWave.h"
#include "KalmanForWaveAlt.h"
#include "NmeaXDR.h"

// Strength of the calibration operation;
// 0: disables calibration.
Expand Down Expand Up @@ -221,14 +222,14 @@ void repeatMe() {
if (now - last_refresh >= (produce_serial_data ? serial_report_period_micros : 1000000)) {
if (produce_serial_data) {
if (report_nmea) {
Serial.printf("$BBXDR,D,%.5f,M,DRG1*00\r\n", wave_height);
Serial.printf("$BBXDR,D,%.5f,M,DRT1*00\r\n", heave);
Serial.printf("$BBXDR,D,%.5f,M,DRT2*00\r\n", waveAltState.heave);
Serial.printf("$BBXDR,D,%.5f,M,DAV1*00\r\n", heave_avg);
Serial.printf("$BBXDR,F,%.5f,H,FAV1*00\r\n", freq_adj);
Serial.printf("$BBXDR,F,%.5f,H,FRT1*00\r\n", freq);
Serial.printf("$BBXDR,F,%.5f,H,SRT1*00\r\n", got_samples / ((now - last_refresh) / 1000000.0) );
Serial.printf("$BBXDR,N,%.5f,P,ABI1*00\r\n", accel_bias * 100.0 / g_std);
gen_nmea0183_xdr("$BBXDR,D,%.5f,M,DRG1", wave_height);
gen_nmea0183_xdr("$BBXDR,D,%.5f,M,DRT1", heave);
gen_nmea0183_xdr("$BBXDR,D,%.5f,M,DRT2", waveAltState.heave);
gen_nmea0183_xdr("$BBXDR,D,%.5f,M,DAV1", heave_avg);
gen_nmea0183_xdr("$BBXDR,F,%.5f,H,FAV1", freq_adj);
gen_nmea0183_xdr("$BBXDR,F,%.5f,H,FRT1", freq);
gen_nmea0183_xdr("$BBXDR,F,%.5f,H,SRT1", got_samples / ((now - last_refresh) / 1000000.0) );
gen_nmea0183_xdr("$BBXDR,N,%.5f,P,ABI1", accel_bias * 100.0 / g_std);
}
else {
// report for Serial Plotter
Expand Down

0 comments on commit 9b7104c

Please sign in to comment.