We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0b29754 commit 07b6efaCopy full SHA for 07b6efa
1 file changed
ArduCopter/position_vector.pde
@@ -42,7 +42,7 @@ const float pv_get_horizontal_distance_cm(const Vector3f origin, const Vector3f
42
// pv_get_bearing_cd - return bearing in centi-degrees between two positions
43
const float pv_get_bearing_cd(const Vector3f origin, const Vector3f destination)
44
{
45
- 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;
46
if (bearing < 0) {
47
bearing += 36000;
48
}
0 commit comments