X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fmath%2FSGGeodesy.hxx;h=ef1be21f618185ea56405a94bed03eed49fc44eb;hb=f19e83dcf10d5fced3d799c884a4654d7ada6548;hp=476879fe7c0f594dbb4742b665ed18e79cf63a24;hpb=4e7fe460a5c5c1b64dd1d540bc197dbb89614b7f;p=simgear.git diff --git a/simgear/math/SGGeodesy.hxx b/simgear/math/SGGeodesy.hxx index 476879fe..ef1be21f 100644 --- a/simgear/math/SGGeodesy.hxx +++ b/simgear/math/SGGeodesy.hxx @@ -10,27 +10,21 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the -// Free Software Foundation, Inc., 59 Temple Place - Suite 330, -// Boston, MA 02111-1307, USA. +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // #ifndef SGGeodesy_H #define SGGeodesy_H -class SGGeoc; -class SGGeod; - -template -class SGVec3; - class SGGeodesy { public: // Hard numbers from the WGS84 standard. -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + static const double EQURAD; + static const double iFLATTENING; + static const double SQUASH; + static const double STRETCH; static const double POLRAD; /// Takes a cartesian coordinate data and returns the geodetic @@ -51,6 +45,24 @@ 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); + + 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); }; #endif