|
|
|
@ -39,19 +39,6 @@ float get_bearing_cd(const Vector3f &origin, const Vector3f &destination)
@@ -39,19 +39,6 @@ float get_bearing_cd(const Vector3f &origin, const Vector3f &destination)
|
|
|
|
|
return bearing; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 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_passed_point(const struct Location &location, |
|
|
|
|
const struct Location &point1, |
|
|
|
|
const struct Location &point2) |
|
|
|
|
{ |
|
|
|
|
return location_path_proportion(location, point1, point2) >= 1.0f; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
return the proportion we are along the path from point1 to |
|
|
|
|
point2, along a line parallel to point1<->point2. |
|
|
|
@ -73,11 +60,6 @@ float location_path_proportion(const struct Location &location,
@@ -73,11 +60,6 @@ float location_path_proportion(const struct Location &location,
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// return true when lat and lng are within range
|
|
|
|
|
bool check_lat(float lat) |
|
|
|
|
{ |
|
|
|
|