Browse Source

AP_Math: Speed up location calculations slightly

mission-4.1.18
Michael du Breuil 6 years ago committed by Andrew Tridgell
parent
commit
9cd1be1d6f
  1. 2
      libraries/AP_Math/location.cpp

2
libraries/AP_Math/location.cpp

@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
float longitude_scale(const struct Location &loc)
{
float scale = cosf(loc.lat * 1.0e-7f * DEG_TO_RAD);
float scale = cosf(loc.lat * (1.0e-7f * DEG_TO_RAD));
return constrain_float(scale, 0.01f, 1.0f);
}

Loading…
Cancel
Save