From 9b7104c6720928280e903bf97ef51191d05e1982 Mon Sep 17 00:00:00 2001 From: Mikhail Grushinskiy Date: Fri, 13 Sep 2024 14:45:19 -0400 Subject: [PATCH] Update bbn_wave_freq_m5atomS3.ino --- .../bbn_wave_freq_m5atomS3.ino | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/bbn_wave_freq_m5atomS3/bbn_wave_freq_m5atomS3.ino b/bbn_wave_freq_m5atomS3/bbn_wave_freq_m5atomS3.ino index 45809eb..1a9f565 100644 --- a/bbn_wave_freq_m5atomS3/bbn_wave_freq_m5atomS3.ino +++ b/bbn_wave_freq_m5atomS3/bbn_wave_freq_m5atomS3.ino @@ -28,6 +28,7 @@ #include "MinMaxLemire.h" #include "KalmanForWave.h" #include "KalmanForWaveAlt.h" +#include "NmeaXDR.h" // Strength of the calibration operation; // 0: disables calibration. @@ -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