]> git.mxchange.org Git - simgear.git/blob - simgear/math/SGGeodesy.hxx
8f44504be63fec643d589d2c41600e5ee1f7b99b
[simgear.git] / simgear / math / SGGeodesy.hxx
1 #ifndef SGGeodesy_H
2 #define SGGeodesy_H
3
4 class SGGeoc;
5 class SGGeod;
6
7 template<typename T>
8 class SGVec3;
9
10 class SGGeodesy {
11 public:
12   // Hard numbers from the WGS84 standard.
13   static const double EQURAD;
14   static const double iFLATTENING;
15   static const double SQUASH;
16   static const double STRETCH;
17   static const double POLRAD;
18
19   /// Takes a cartesian coordinate data and returns the geodetic
20   /// coordinates.
21   static void SGCartToGeod(const SGVec3<double>& cart, SGGeod& geod);
22   
23   /// Takes a geodetic coordinate data and returns the cartesian
24   /// coordinates.
25   static void SGGeodToCart(const SGGeod& geod, SGVec3<double>& cart);
26   
27   /// Takes a geodetic coordinate data and returns the sea level radius.
28   static double SGGeodToSeaLevelRadius(const SGGeod& geod);
29
30   /// Takes a cartesian coordinate data and returns the geocentric
31   /// coordinates.
32   static void SGCartToGeoc(const SGVec3<double>& cart, SGGeoc& geoc);
33   
34   /// Takes a geocentric coordinate data and returns the cartesian
35   /// coordinates.
36   static void SGGeocToCart(const SGGeoc& geoc, SGVec3<double>& cart);
37 };
38
39 #endif