Telemetry simulator latitude and longitude were exchanged with each other
This commit is contained in:
@@ -496,11 +496,11 @@ TelemetrySimulator::GPSEmulator::GPSEmulator()
|
|||||||
uint32_t TelemetrySimulator::GPSEmulator::encodeLatLon(double latLon, bool isLat)
|
uint32_t TelemetrySimulator::GPSEmulator::encodeLatLon(double latLon, bool isLat)
|
||||||
{
|
{
|
||||||
uint32_t data = (uint32_t)((latLon < 0 ? -latLon : latLon) * 60 * 10000) & 0x3FFFFFFF;
|
uint32_t data = (uint32_t)((latLon < 0 ? -latLon : latLon) * 60 * 10000) & 0x3FFFFFFF;
|
||||||
if (isLat == false) {
|
if (isLat) {
|
||||||
data |= 0x80000000;
|
data |= (1 << 31);
|
||||||
}
|
}
|
||||||
if (latLon < 0) {
|
if (latLon < 0) {
|
||||||
data |= 0x40000000;
|
data |= (1 << 30);
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user