1 #ifndef _FG_ATC_PROJECTION_HXX
2 #define _FG_ATC_PROJECTION_HXX
4 #include <simgear/math/point3d.hxx>
6 // FGATCProjection - a class to project an area local to an airport onto an orthogonal co-ordinate system
7 class FGATCProjection {
13 void Init(Point3D centre);
15 // Convert a lat/lon co-ordinate to the local projection
16 Point3D ConvertToLocal(Point3D pt);
18 // Convert a local projection co-ordinate to lat/lon
19 Point3D ConvertFromLocal(Point3D pt);
22 Point3D origin; // lat/lon of local area origin
23 double correction_factor; // Reduction in surface distance per degree of longitude due to latitude. Saves having to do a cos() every call.
28 // FGATCAlignedProjection - a class to project an area local to a runway onto an orthogonal co-ordinate system
29 // with the origin at the threshold and the runway aligned with the y axis.
30 class FGATCAlignedProjection {
33 FGATCAlignedProjection();
34 ~FGATCAlignedProjection();
36 void Init(Point3D centre, double heading);
38 // Convert a lat/lon co-ordinate to the local projection
39 Point3D ConvertToLocal(Point3D pt);
41 // Convert a local projection co-ordinate to lat/lon
42 Point3D ConvertFromLocal(Point3D pt);
45 Point3D origin; // lat/lon of local area origin (the threshold)
46 double theta; // the rotation angle for alignment in radians
47 double correction_factor; // Reduction in surface distance per degree of longitude due to latitude. Saves having to do a cos() every call.
51 #endif // _FG_ATC_PROJECTION_HXX