From 4a9484ac25cbcf56f3be9d0a57c26973f38f37d7 Mon Sep 17 00:00:00 2001 From: frohlich Date: Mon, 16 Mar 2009 11:43:19 +0000 Subject: [PATCH] Remove unsed code. Modified Files: ATCProjection.cxx ATCProjection.hxx --- src/ATCDCL/ATCProjection.cxx | 39 ------------------------------------ src/ATCDCL/ATCProjection.hxx | 23 --------------------- 2 files changed, 62 deletions(-) diff --git a/src/ATCDCL/ATCProjection.cxx b/src/ATCDCL/ATCProjection.cxx index 7028004c8..5914594bc 100644 --- a/src/ATCDCL/ATCProjection.cxx +++ b/src/ATCDCL/ATCProjection.cxx @@ -26,45 +26,6 @@ #include #include -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); diff --git a/src/ATCDCL/ATCProjection.hxx b/src/ATCDCL/ATCProjection.hxx index faf8eb395..d24e1eee5 100644 --- a/src/ATCDCL/ATCProjection.hxx +++ b/src/ATCDCL/ATCProjection.hxx @@ -23,29 +23,6 @@ #include -// 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 { -- 2.39.5