]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/ATCProjection.hxx
If it's a struct, it's not a class
[flightgear.git] / src / ATC / ATCProjection.hxx
index 137b3989386a0c22657ca76b29dc7691ac53227f..faf8eb395b68f8e1e50043bb352029a208d05495 100644 (file)
@@ -16,7 +16,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 #ifndef _FG_ATC_PROJECTION_HXX
 #define _FG_ATC_PROJECTION_HXX
@@ -28,19 +28,20 @@ class FGATCProjection {
 
 public:
     FGATCProjection();
+    FGATCProjection(const Point3D& centre);
     ~FGATCProjection();
 
-    void Init(Point3D centre);
+    void Init(const Point3D& centre);
 
-    // Convert a lat/lon co-ordinate to the local projection
-    Point3D ConvertToLocal(Point3D pt);
+    // Convert a lat/lon co-ordinate (degrees) to the local projection (meters)
+    Point3D ConvertToLocal(const Point3D& pt);
 
-    // Convert a local projection co-ordinate to lat/lon
-    Point3D ConvertFromLocal(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.
+    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.
 
 };
 
@@ -51,20 +52,21 @@ class FGATCAlignedProjection {
 
 public:
     FGATCAlignedProjection();
+    FGATCAlignedProjection(const Point3D& centre, double heading);
     ~FGATCAlignedProjection();
 
-    void Init(Point3D centre, double heading);
+    void Init(const Point3D& centre, double heading);
 
-    // Convert a lat/lon co-ordinate to the local projection
-    Point3D ConvertToLocal(Point3D pt);
+    // Convert a lat/lon co-ordinate (degrees) to the local projection (meters)
+    Point3D ConvertToLocal(const Point3D& pt);
 
-    // Convert a local projection co-ordinate to lat/lon
-    Point3D ConvertFromLocal(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 (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.
+    Point3D _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.
 
 };