]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATCDCL/ATCProjection.hxx
considering u,v,wbody-fps are the ECEF velocity expressed in body axis, change in...
[flightgear.git] / src / ATCDCL / ATCProjection.hxx
index faf8eb395b68f8e1e50043bb352029a208d05495..94dfb92b9afd0306dd9ffa055606220995e5a255 100644 (file)
@@ -1,4 +1,4 @@
-// ATCProjection.hxx - A convienience projection class for the ATC/AI system.
+// ATCProjection.hxx - A convenience projection class for the ATC/AI system.
 //
 // Written by David Luff, started 2002.
 //
 #ifndef _FG_ATC_PROJECTION_HXX
 #define _FG_ATC_PROJECTION_HXX
 
-#include <simgear/math/point3d.hxx>
-
-// FGATCProjection - a class to project an area local to an airport onto an orthogonal co-ordinate system
-class FGATCProjection {
-
-public:
-    FGATCProjection();
-    FGATCProjection(const Point3D& centre);
-    ~FGATCProjection();
-
-    void Init(const Point3D& centre);
-
-    // Convert a lat/lon co-ordinate (degrees) to the local projection (meters)
-    Point3D ConvertToLocal(const Point3D& pt);
-
-    // Convert a local projection co-ordinate (meters) to lat/lon (degrees)
-    Point3D ConvertFromLocal(const Point3D& pt);
-
-private:
-    Point3D _origin;   // lat/lon of local area origin
-    double _correction_factor; // Reduction in surface distance per degree of longitude due to latitude.  Saves having to do a cos() every call.
-
-};
-
+#include <simgear/math/SGMath.hxx>
 
 // FGATCAlignedProjection - a class to project an area local to a runway onto an orthogonal co-ordinate system
 // with the origin at the threshold and the runway aligned with the y axis.
@@ -52,19 +29,19 @@ class FGATCAlignedProjection {
 
 public:
     FGATCAlignedProjection();
-    FGATCAlignedProjection(const Point3D& centre, double heading);
+    FGATCAlignedProjection(const SGGeod& centre, double heading);
     ~FGATCAlignedProjection();
 
-    void Init(const Point3D& centre, double heading);
+    void Init(const SGGeod& centre, double heading);
 
     // Convert a lat/lon co-ordinate (degrees) to the local projection (meters)
-    Point3D ConvertToLocal(const Point3D& pt);
+    SGVec3d ConvertToLocal(const SGGeod& pt);
 
     // Convert a local projection co-ordinate (meters) to lat/lon (degrees)
-    Point3D ConvertFromLocal(const Point3D& pt);
+    SGGeod ConvertFromLocal(const SGVec3d& pt);
 
 private:
-    Point3D _origin;   // lat/lon of local area origin (the threshold)
+    SGGeod _origin;    // lat/lon of local area origin (the threshold)
     double _theta;     // the rotation angle for alignment in radians
     double _correction_factor; // Reduction in surface distance per degree of longitude due to latitude.  Saves having to do a cos() every call.