X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Froute%2Froute.hxx;h=6d2da1f765f03c357a2033cf46a89ba242387d47;hb=c16b9ed25b9c8d7229153787aa1492e4ea37b61e;hp=ead338d42de9cc4bb3b14c188772cddae0907de2;hpb=cd5765be1eb35f0608605de7a24f70a7bf5d0ba9;p=simgear.git diff --git a/simgear/route/route.hxx b/simgear/route/route.hxx index ead338d4..6d2da1f7 100644 --- a/simgear/route/route.hxx +++ b/simgear/route/route.hxx @@ -39,10 +39,10 @@ #include STL_STRING #include -FG_USING_STD(string); -FG_USING_STD(vector); +SG_USING_STD(string); +SG_USING_STD(vector); -#include "waypoint.hxx" +#include class SGRoute { @@ -127,6 +127,12 @@ public: route.erase( route.begin() ); } } + + // Calculate perpendicular distance from the current route segment + // This routine assumes all points are laying on a flat plane and + // ignores the altitude (or Z) dimension. For best results, use + // with CARTESIAN way points. + double distance_off_route( double x, double y ) const; };