]> git.mxchange.org Git - flightgear.git/commitdiff
Remove unsed code.
authorfrohlich <frohlich>
Mon, 16 Mar 2009 11:43:19 +0000 (11:43 +0000)
committerTim Moore <timoore@redhat.com>
Wed, 18 Mar 2009 07:00:08 +0000 (08:00 +0100)
Modified Files:
ATCProjection.cxx ATCProjection.hxx

src/ATCDCL/ATCProjection.cxx
src/ATCDCL/ATCProjection.hxx

index 7028004c85a3c1816f8354b51fdb61f8c8fc04b5..5914594bcee6c8b3ac69857c24db60ba4af901b5 100644 (file)
 #include <math.h>
 #include <simgear/constants.h>
 
-FGATCProjection::FGATCProjection() {
-    _origin.setlat(0.0);
-    _origin.setlon(0.0);
-    _origin.setelev(0.0);
-    _correction_factor = cos(_origin.lat() * SG_DEGREES_TO_RADIANS);
-}
-
-FGATCProjection::FGATCProjection(const Point3D& centre) {
-    _origin = centre;
-    _correction_factor = cos(_origin.lat() * SG_DEGREES_TO_RADIANS);
-}
-
-FGATCProjection::~FGATCProjection() {
-}
-
-void FGATCProjection::Init(const Point3D& centre) {
-    _origin = centre;
-    _correction_factor = cos(_origin.lat() * SG_DEGREES_TO_RADIANS);
-}
-
-Point3D FGATCProjection::ConvertToLocal(const Point3D& pt) {
-    double delta_lat = pt.lat() - _origin.lat();
-    double delta_lon = pt.lon() - _origin.lon();
-
-    double y = sin(delta_lat * SG_DEGREES_TO_RADIANS) * SG_EQUATORIAL_RADIUS_M;
-    double x = sin(delta_lon * SG_DEGREES_TO_RADIANS) * SG_EQUATORIAL_RADIUS_M * _correction_factor;
-
-    return(Point3D(x,y,0.0));
-}
-
-Point3D FGATCProjection::ConvertFromLocal(const Point3D& pt) {
-    double delta_lat = asin(pt.y() / SG_EQUATORIAL_RADIUS_M) * SG_RADIANS_TO_DEGREES;
-    double delta_lon = (asin(pt.x() / SG_EQUATORIAL_RADIUS_M) * SG_RADIANS_TO_DEGREES) / _correction_factor;
-    
-    return(Point3D(_origin.lon()+delta_lon, _origin.lat()+delta_lat, 0.0));
-}
-
-/**********************************************************************************/
-
 FGATCAlignedProjection::FGATCAlignedProjection() {
     _origin.setlat(0.0);
     _origin.setlon(0.0);
index faf8eb395b68f8e1e50043bb352029a208d05495..d24e1eee5d55cd0cc0093970822505b1bd36548e 100644 (file)
 
 #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.
-
-};
-
-
 // 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.
 class FGATCAlignedProjection {