]> git.mxchange.org Git - simgear.git/blobdiff - simgear/math/SGGeod.hxx
Merge branch 'maint' into next
[simgear.git] / simgear / math / SGGeod.hxx
index 7124fdd1e870f844b157a84a121b7c5621cf2ea3..4fea57ac4e20fbbd1e2aae9f14eefb05bb68998e 100644 (file)
@@ -20,6 +20,8 @@
 
 #include <simgear/constants.h>
 
+#include <osg/Matrix>
+
 // #define SG_GEOD_NATIVE_DEGREE
 
 /// Class representing a geodetic location
@@ -27,14 +29,6 @@ class SGGeod {
 public:
   /// Default constructor, initializes the instance to lat = lon = elev = 0
   SGGeod(void);
-  /// Initialize from a cartesian vector assumed to be in meters
-  /// Note that this conversion is relatively expensive to compute
-  /// depricated
-  SGGeod(const SGVec3<double>& cart);
-  /// Initialize from a geocentric position
-  /// Note that this conversion is relatively expensive to compute
-  /// depricated
-  SGGeod(const SGGeoc& geoc);
 
   /// Factory from angular values in radians and elevation is 0
   static SGGeod fromRad(double lon, double lat);
@@ -86,6 +80,18 @@ public:
   /// Set the geodetic elevation from the argument given in feet
   void setElevationFt(double elevation);
 
+  // Create a local coordinate frame in the earth-centered frame of
+  // reference. X points north, Z points down.
+  // makeSimulationFrameRelative() only includes rotation.
+    
+  osg::Matrix makeSimulationFrameRelative();
+  osg::Matrix makeSimulationFrame();    
+
+  // Create a Z-up local coordinate frame in the earth-centered frame
+  // of reference. This is what scenery models, etc. expect.
+  // makeZUpFrameRelative() only includes rotation.
+  osg::Matrix makeZUpFrameRelative();
+  osg::Matrix makeZUpFrame();    
 private:
   /// This one is private since construction is not unique if you do
   /// not know the units of the arguments. Use the factory methods for
@@ -116,20 +122,6 @@ SGGeod::SGGeod(double lon, double lat, double elevation) :
 {
 }
 
-inline
-SGGeod::SGGeod(const SGVec3<double>& cart)
-{
-  SGGeodesy::SGCartToGeod(cart, *this);
-}
-
-inline
-SGGeod::SGGeod(const SGGeoc& geoc)
-{
-  SGVec3<double> cart;
-  SGGeodesy::SGGeocToCart(geoc, cart);
-  SGGeodesy::SGCartToGeod(cart, *this);
-}
-
 inline
 SGGeod
 SGGeod::fromRad(double lon, double lat)