1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-12 19:10:32 +03:00

Added float specifier to literal to prevent compile error (#14396)

This commit is contained in:
Eric Katzfey 2025-05-21 04:48:36 -07:00 committed by GitHub
parent 6c127426bd
commit 51c8296f25
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -625,7 +625,7 @@ static void updateGpsHeadingUsable(float groundspeedGain, float imuCourseError,
gpsHeadingConfidence += fmaxf(groundspeedGain - fabsf(imuCourseError), 0.0f) * dt;
// recenter at 2.5s time constant
// TODO: intent is to match IMU time constant, approximately, but I don't exactly know how to do that
gpsHeadingConfidence -= 0.4 * dt * gpsHeadingConfidence;
gpsHeadingConfidence -= 0.4f * dt * gpsHeadingConfidence;
// if we accumulate enough 'points' over time, the IMU probably is OK
// will need to reaccumulate after a disarm (will be retained partly for very brief disarms)
canUseGPSHeading = gpsHeadingConfidence > 2.0f;