1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 17:25:20 +03:00

Merge pull request #11211 from TonyBlit/fix_gps_motion

wrong variable for heading
This commit is contained in:
haslinghuis 2022-01-03 14:15:49 +01:00 committed by GitHub
commit d593f08eff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1493,7 +1493,7 @@ static bool UBLOX_parse_gps(void)
gpsSol.hdop = _buffer.pvt.pDOP;
gpsSol.speed3d = (uint16_t) sqrtf(powf(_buffer.pvt.gSpeed / 10, 2.0f) + powf(_buffer.pvt.velD / 10, 2.0f));
gpsSol.groundSpeed = _buffer.pvt.gSpeed / 10; // cm/s
gpsSol.groundCourse = (uint16_t) (_buffer.pvt.headVeh / 10000); // Heading 2D deg * 100000 rescaled to deg * 10
gpsSol.groundCourse = (uint16_t) (_buffer.pvt.headMot / 10000); // Heading 2D deg * 100000 rescaled to deg * 10
_new_speed = true;
#ifdef USE_RTC_TIME
//set clock, when gps time is available