From 8ae35cae1c3bcd5ec19e593de6809ac45d822ca0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 7 Aug 2012 15:50:39 +1000 Subject: [PATCH] AP_Math: rename get_bearing() to get_bearing_cd() to make units obvious --- libraries/AP_Math/AP_Math.h | 2 +- libraries/AP_Math/location.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_Math/AP_Math.h b/libraries/AP_Math/AP_Math.h index a26ae6d606..466d3d6cbc 100644 --- a/libraries/AP_Math/AP_Math.h +++ b/libraries/AP_Math/AP_Math.h @@ -37,7 +37,7 @@ float get_distance(const struct Location *loc1, const struct Location *loc2); int32_t get_distance_cm(const struct Location *loc1, const struct Location *loc2); // return bearing in centi-degrees between two locations -int32_t get_bearing(const struct Location *loc1, const struct Location *loc2); +int32_t get_bearing_cd(const struct Location *loc1, const struct Location *loc2); // see if location is past a line perpendicular to // the line between point1 and point2. If point1 is diff --git a/libraries/AP_Math/location.cpp b/libraries/AP_Math/location.cpp index 9985c20965..480cda504c 100644 --- a/libraries/AP_Math/location.cpp +++ b/libraries/AP_Math/location.cpp @@ -61,7 +61,7 @@ int32_t get_distance_cm(const struct Location *loc1, const struct Location *loc2 } // return bearing in centi-degrees between two locations -int32_t get_bearing(const struct Location *loc1, const struct Location *loc2) +int32_t get_bearing_cd(const struct Location *loc1, const struct Location *loc2) { int32_t off_x = loc2->lng - loc1->lng; int32_t off_y = (loc2->lat - loc1->lat) / longitude_scale(loc2);