Harmonized altitude from NMEA with ublox data to centimeters (0.01m per lsb)

Before GPS_RESCUE it was decimeter (0.1m per lsb) from ublox but meter (1m per lsb) from NMEA, stored as unit16.
Now both protocols should deliver centimeters (0.01m per lsb), stored as int32 in order to cover negative and high altitudes too.
This commit is contained in:
AirBreak69 2018-06-14 00:18:42 +02:00 committed by GitHub
parent c1342c7197
commit 719d50e8fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -741,7 +741,7 @@ static bool gpsNewFrameNMEA(char c)
gps_Msg.hdop = grab_fields(string, 1) * 100; // hdop
break;
case 9:
gps_Msg.altitude = grab_fields(string, 0); // altitude in meters added by Mis
gps_Msg.altitude = grab_fields(string, 1) * 10; // altitude in centimeters. Note: NMEA delivers altitude with 1 or 3 decimals. It's safer to cut at 0.1m and multiply by 10
break;
}
break;