11/*
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
33 generates binary-encoded lat/lon/alt values that are tilt-compensated. To get these values to the
44 GIS Data Collector software, we need to transmit corrected NMEA sentences over Bluetooth. The
55 Data Collector does not know anything is being tilt-compensated. To do this we must intercept
@@ -64,7 +64,7 @@ void tiltUpdate()
6464 break ;
6565
6666 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)
6868 tiltSensor->update (); // Check for the most recent incoming binary data
6969
7070 // Check IMU state at 1Hz
@@ -73,12 +73,12 @@ void tiltUpdate()
7373 lastTiltCheck = millis ();
7474
7575 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 );
7777
7878 if (settings.enableImuDebug == true )
7979 printTiltDebug ();
8080
81- // Check to see if tilt sensor has been shaken
81+ // Check to see if tilt sensor has been rocked
8282 if (tiltSensor->isInitialized ())
8383 {
8484 beepDurationMs (1000 ); // Audibly indicate the init of tilt
@@ -110,7 +110,7 @@ void tiltUpdate()
110110 lastTiltCheck = millis ();
111111
112112 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 );
114114
115115 if (settings.enableImuDebug == true )
116116 printTiltDebug ();
@@ -301,6 +301,10 @@ void beginTilt()
301301
302302 snprintf (clubVector, sizeof (clubVector), " CLUB_VECTOR=0,0,%0.3f" ,
303303 (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+
304308 result &= tiltSensor->sendCommand (clubVector);
305309
306310 // Configure interface type. This allows IM19 to receive Unicore-style binary messages
@@ -820,7 +824,7 @@ void applyCompensationGGA(char *nmeaSentence, int arraySize)
820824 uint8_t undulationStop = 0 ;
821825 uint8_t checksumStart = 0 ;
822826
823- if (settings.enableImuCompensationDebug == true )
827+ if (settings.enableImuCompensationDebug == true && !inMainMenu )
824828 systemPrintf (" Original GNGGA: %s\r\n " , nmeaSentence);
825829
826830 int commaCount = 0 ;
@@ -959,7 +963,7 @@ void applyCompensationGGA(char *nmeaSentence, int arraySize)
959963 // Overwrite the original NMEA
960964 strncpy (nmeaSentence, newSentence, arraySize);
961965
962- if (settings.enableImuCompensationDebug == true )
966+ if (settings.enableImuCompensationDebug == true && !inMainMenu )
963967 systemPrintf (" Compensated GNGGA: %s\r\n " , nmeaSentence);
964968}
965969
0 commit comments