+// Copyright (C) 2006 Mathias Froehlich - Mathias.Froehlich@web.de
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// 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 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<typename T>
-class SGVec3;
-
class SGGeodesy {
public:
// Hard numbers from the WGS84 standard.
/// Takes a geocentric coordinate data and returns the cartesian
/// coordinates.
static void SGGeocToCart(const SGGeoc& geoc, SGVec3<double>& 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);
+
+ // 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 distanceM(const SGGeoc& from, const SGGeoc& to);
};
#endif