mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-04-11 03:02:20 +02:00
Some fixes to GPS parsing
This commit is contained in:
parent
55ee568fe2
commit
96edea9d4b
@ -455,7 +455,7 @@ static bool nmeaProcessGPRMC(GPSPositionData * GpsData, bool* gpsDataUpdated, ch
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get speed in knots
|
// get speed in knots
|
||||||
GpsData->Groundspeed = NMEA_real_to_float(param[7]) * 0.51444; // to m/s
|
GpsData->Groundspeed = NMEA_real_to_float(param[7]) * 0.51444f; // to m/s
|
||||||
|
|
||||||
// get True course
|
// get True course
|
||||||
GpsData->Heading = NMEA_real_to_float(param[8]);
|
GpsData->Heading = NMEA_real_to_float(param[8]);
|
||||||
@ -492,7 +492,7 @@ static bool nmeaProcessGPVTG(GPSPositionData * GpsData, bool* gpsDataUpdated, ch
|
|||||||
*gpsDataUpdated = true;
|
*gpsDataUpdated = true;
|
||||||
|
|
||||||
GpsData->Heading = NMEA_real_to_float(param[1]);
|
GpsData->Heading = NMEA_real_to_float(param[1]);
|
||||||
GpsData->Groundspeed = NMEA_real_to_float(param[5]) * 0.51444; // to m/s
|
GpsData->Groundspeed = NMEA_real_to_float(param[5]) * 0.51444f; // to m/s
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user