From 07b6efafd8311f16abbec49cd4a70d707f4fbbf7 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Mon, 22 Apr 2013 21:03:46 +0900 Subject: [PATCH] Copter: use DEGX100 constant for position_vector calcs --- ArduCopter/position_vector.pde | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArduCopter/position_vector.pde b/ArduCopter/position_vector.pde index 031a2a55f8..092545e847 100644 --- a/ArduCopter/position_vector.pde +++ b/ArduCopter/position_vector.pde @@ -42,7 +42,7 @@ const float pv_get_horizontal_distance_cm(const Vector3f origin, const Vector3f // pv_get_bearing_cd - return bearing in centi-degrees between two positions const float pv_get_bearing_cd(const Vector3f origin, const Vector3f destination) { - float bearing = 9000 + atan2f(-(destination.x-origin.x), destination.y-origin.y) * 5729.57795f; + float bearing = 9000 + atan2f(-(destination.x-origin.x), destination.y-origin.y) * DEGX100; if (bearing < 0) { bearing += 36000; }