1
1
/*
2
- Once RTK Fix is achieved, and the tilt sensor is activated (ie shaken ) the tilt sensor
2
+ Once RTK Fix is achieved, and the tilt sensor is activated (ie rocked back and forth ) the tilt sensor
3
3
generates binary-encoded lat/lon/alt values that are tilt-compensated. To get these values to the
4
4
GIS Data Collector software, we need to transmit corrected NMEA sentences over Bluetooth. The
5
5
Data Collector does not know anything is being tilt-compensated. To do this we must intercept
@@ -64,7 +64,7 @@ void tiltUpdate()
64
64
break ;
65
65
66
66
case TILT_STARTED:
67
- // Waiting for user to shake unit (RTK Fix required for isInitialized)
67
+ // Waiting for user to rock unit back and forth (RTK Fix required for isInitialized)
68
68
tiltSensor->update (); // Check for the most recent incoming binary data
69
69
70
70
// Check IMU state at 1Hz
@@ -73,12 +73,12 @@ void tiltUpdate()
73
73
lastTiltCheck = millis ();
74
74
75
75
if (settings.antennaHeight_mm < 500 )
76
- systemPrintf (" Warning: Short pole length detected: %0.3f \r\n " , settings.antennaHeight_mm );
76
+ systemPrintf (" Warning: Short pole length detected: %0.3fm \r\n " , settings.antennaHeight_mm / 1000.0 );
77
77
78
78
if (settings.enableImuDebug == true )
79
79
printTiltDebug ();
80
80
81
- // Check to see if tilt sensor has been shaken
81
+ // Check to see if tilt sensor has been rocked
82
82
if (tiltSensor->isInitialized ())
83
83
{
84
84
beepDurationMs (1000 ); // Audibly indicate the init of tilt
@@ -110,7 +110,7 @@ void tiltUpdate()
110
110
lastTiltCheck = millis ();
111
111
112
112
if (settings.antennaHeight_mm < 500 )
113
- systemPrintf (" Warning: Short pole length detected: %0.3f \r\n " , settings.antennaHeight_mm );
113
+ systemPrintf (" Warning: Short pole length detected: %0.3fm \r\n " , settings.antennaHeight_mm / 1000.0 );
114
114
115
115
if (settings.enableImuDebug == true )
116
116
printTiltDebug ();
@@ -301,6 +301,10 @@ void beginTilt()
301
301
302
302
snprintf (clubVector, sizeof (clubVector), " CLUB_VECTOR=0,0,%0.3f" ,
303
303
(settings.antennaHeight_mm + settings.antennaPhaseCenter_mm ) / 1000.0 );
304
+
305
+ if (settings.enableImuCompensationDebug == true )
306
+ systemPrintf (" Setting club vector to: %s\r\n " , clubVector);
307
+
304
308
result &= tiltSensor->sendCommand (clubVector);
305
309
306
310
// Configure interface type. This allows IM19 to receive Unicore-style binary messages
@@ -820,7 +824,7 @@ void applyCompensationGGA(char *nmeaSentence, int arraySize)
820
824
uint8_t undulationStop = 0 ;
821
825
uint8_t checksumStart = 0 ;
822
826
823
- if (settings.enableImuCompensationDebug == true )
827
+ if (settings.enableImuCompensationDebug == true && !inMainMenu )
824
828
systemPrintf (" Original GNGGA: %s\r\n " , nmeaSentence);
825
829
826
830
int commaCount = 0 ;
@@ -959,7 +963,7 @@ void applyCompensationGGA(char *nmeaSentence, int arraySize)
959
963
// Overwrite the original NMEA
960
964
strncpy (nmeaSentence, newSentence, arraySize);
961
965
962
- if (settings.enableImuCompensationDebug == true )
966
+ if (settings.enableImuCompensationDebug == true && !inMainMenu )
963
967
systemPrintf (" Compensated GNGGA: %s\r\n " , nmeaSentence);
964
968
}
965
969
0 commit comments