From 9cd1be1d6f1e850f8d2b0e8156a90f67f78380bb Mon Sep 17 00:00:00 2001 From: Michael du Breuil Date: Tue, 18 Sep 2018 02:06:30 -0700 Subject: [PATCH] AP_Math: Speed up location calculations slightly --- libraries/AP_Math/location.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Math/location.cpp b/libraries/AP_Math/location.cpp index 0fcc81f57c..b5f6f92b95 100644 --- a/libraries/AP_Math/location.cpp +++ b/libraries/AP_Math/location.cpp @@ -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); }