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:
parent
c1342c7197
commit
719d50e8fb
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue