@@ -588,6 +588,11 @@ void tiltApplyCompensationGNS(char *nmeaSentence, int arraySize)
588588 // Add interstitial between end of lon and beginning of alt
589589 strncat (newSentence, nmeaSentence + longitudeStop, altitudeStart - longitudeStop);
590590
591+ // If outputTipAltitude is enabled, then we don't have to make any adjustments: the tilt compensation module outputs tip altitude
592+ // If outputTipAltitude is disabled, then we need to add back the pole length and ARP
593+ if (settings.outputTipAltitude == false )
594+ orthometricHeight = orthometricHeight + settings.tiltPoleLength + (present.antennaReferencePoint_mm / 1000.0 );
595+
591596 // Convert altitude double to string
592597 snprintf (coordinateStringDDMM, sizeof (coordinateStringDDMM), " %0.3f" , orthometricHeight);
593598
@@ -900,6 +905,11 @@ void tiltApplyCompensationGGA(char *nmeaSentence, int arraySize)
900905 // Add interstitial between end of lon and beginning of alt
901906 strncat (newSentence, nmeaSentence + longitudeStop, altitudeStart - longitudeStop);
902907
908+ // If outputTipAltitude is enabled, then we don't have to make any adjustments: the tilt compensation module outputs tip altitude
909+ // If outputTipAltitude is disabled, then we need to add back the pole length and ARP
910+ if (settings.outputTipAltitude == false )
911+ orthometricHeight = orthometricHeight + settings.tiltPoleLength + (present.antennaReferencePoint_mm / 1000.0 );
912+
903913 // Convert altitude double to string
904914 snprintf (coordinateStringDDMM, sizeof (coordinateStringDDMM), " %0.3f" , orthometricHeight);
905915
0 commit comments