X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fmath%2FSGGeodesy.hxx;h=cce38199b6b252de56afde984f67c3cbaf6c988d;hb=584ee1364f25e5c3795f9ff4633a792cba39bfc7;hp=0c75a825bbacfac737032b8a09f0c3701629428a;hpb=607987def582820eb738b61d336d2a301df1c38d;p=simgear.git diff --git a/simgear/math/SGGeodesy.hxx b/simgear/math/SGGeodesy.hxx index 0c75a825..cce38199 100644 --- a/simgear/math/SGGeodesy.hxx +++ b/simgear/math/SGGeodesy.hxx @@ -45,6 +45,39 @@ public: /// Takes a geocentric coordinate data and returns the cartesian /// coordinates. static void SGGeocToCart(const SGGeoc& geoc, SGVec3& cart); + + // Geodetic course/distance computation + static bool direct(const SGGeod& p1, double course1, + double distance, SGGeod& p2, double& course2); + + /// overloaded version of above, returns new value directly, throws + /// an sg_exception on failure. + static SGGeod direct(const SGGeod& p1, double course1, + double distance); + + static bool inverse(const SGGeod& p1, const SGGeod& p2, double& course1, + double& course2, double& distance); + + static double courseDeg(const SGGeod& from, const SGGeod& to); + static double distanceM(const SGGeod& from, const SGGeod& to); + static double distanceNm(const SGGeod& from, const SGGeod& to); + + // Geocentric course/distance computation + static void advanceRadM(const SGGeoc& geoc, double course, double distance, + SGGeoc& result); + static double courseRad(const SGGeoc& from, const SGGeoc& to); + static double distanceRad(const SGGeoc& from, const SGGeoc& to); + static double distanceM(const SGGeoc& from, const SGGeoc& to); + + /** + * compute the intersection of two (true) radials (in degrees), or return false + * if no intersection culd be computed. + */ + static bool radialIntersection(const SGGeoc& a, double aRadial, + const SGGeoc& b, double bRadial, SGGeoc& result); + + static bool radialIntersection(const SGGeod& a, double aRadial, + const SGGeod& b, double bRadial, SGGeod& result); }; #endif