From d6309a3a1aa5f1e429dedac4d50721afe86e49a5 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Thu, 28 Apr 2016 19:56:58 +0900 Subject: [PATCH] Location: remove unused methods --- libraries/AP_Common/Location.cpp | 33 -------------------------------- libraries/AP_Common/Location.h | 19 ------------------ 2 files changed, 52 deletions(-) diff --git a/libraries/AP_Common/Location.cpp b/libraries/AP_Common/Location.cpp index 69686f9027..2ef8877843 100644 --- a/libraries/AP_Common/Location.cpp +++ b/libraries/AP_Common/Location.cpp @@ -228,33 +228,6 @@ float Location_Class::get_distance(const struct Location &loc2) const return pythagorous2(dlat, dlng) * LOCATION_SCALING_FACTOR; } -// return bearing in centi-degrees from this location to loc2 -int32_t Location_Class::get_bearing_cd(const struct Location &loc2) const -{ - return 0; -} - -// see if location is past a line perpendicular to the line between point1 and point2. -// if point1 is our previous waypoint and point2 is our target waypoint then this function -// returns true if we have flown past the target waypoint -bool Location_Class::passed_point(const struct Location & point1, const struct Location & point2) const -{ - return false; -} - -// return the proportion we are along the path from point1 to -// point2. This will be less than >1 if we have passed point2 -float Location_Class::path_proportion(const struct Location &point1, const struct Location &point2) const -{ - return 0; -} - -// extrapolate latitude/longitude given bearing and distance -// bearing in degrees, distance in meters -void Location_Class::extrapolate(float bearing, float distance) -{ -} - // extrapolate latitude/longitude given distances (in meters) north and east void Location_Class::offset(float ofs_north, float ofs_east) { @@ -265,9 +238,3 @@ void Location_Class::offset(float ofs_north, float ofs_east) lng += dlng; } } - -// return the distance in meters in North/East plane as a N/E vector from loc1 to loc2 -Vector2f Location_Class::diff_2D(const struct Location &loc2) const -{ - return Vector2f(0,0); -} diff --git a/libraries/AP_Common/Location.h b/libraries/AP_Common/Location.h index abd8ce3d54..8d0b1fa3b0 100644 --- a/libraries/AP_Common/Location.h +++ b/libraries/AP_Common/Location.h @@ -58,28 +58,9 @@ public: // return distance in meters between two locations float get_distance(const struct Location &loc2) const; - // return bearing in centi-degrees from this location to loc2 - int32_t get_bearing_cd(const struct Location &loc2) const; - - // see if location is past a line perpendicular to the line between point1 and point2. - // if point1 is our previous waypoint and point2 is our target waypoint then this function - // returns true if we have flown past the target waypoint - bool passed_point(const struct Location & point1, const struct Location & point2) const; - - // return the proportion we are along the path from point1 to - // point2. This will be less than >1 if we have passed point2 - float path_proportion(const struct Location &point1, const struct Location &point2) const; - - // extrapolate latitude/longitude given bearing and distance - // bearing in degrees, distance in meters - void extrapolate(float bearing, float distance); - // extrapolate latitude/longitude given distances (in meters) north and east void offset(float ofs_north, float ofs_east); - // return the distance in meters in North/East plane as a N/E vector from loc1 to loc2 - Vector2f diff_2D(const struct Location &loc2) const; - private: static const AP_AHRS_NavEKF *_ahrs; static AP_Terrain *_terrain;