]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/ATCutils.hxx
Fix the nmea and garmin output to a) fake a GSA sentence, b) fix a y2k bug
[flightgear.git] / src / ATC / ATCutils.hxx
index de50b6e290b7ecd7ebc541fcdc0e62047ffa05c5..7dfa1569d90b098727fb21b405612d6beff6f4dd 100644 (file)
@@ -19,6 +19,7 @@
 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
 #include <Airports/simple.hxx>
+#include <Airports/runways.hxx>
 
 #include <math.h>
 #include <simgear/math/point3d.hxx>
@@ -39,6 +40,9 @@ SG_USING_STD(string);
 // Convert any number to spoken digits
 string ConvertNumToSpokenDigits(string n);
 
+// Convert an integer to spoken digits
+string ConvertNumToSpokenDigits(int n);
+
 // Convert a 2 digit rwy number to a spoken-style string
 string ConvertRwyNumToSpokenString(int n);
 
@@ -59,7 +63,7 @@ string GetPhoneticIdent(int i);
 *
 ********************************/
 
-// Given two positions, get the HORIZONTAL separation (in meters)
+// Given two positions (lat & lon in degrees), get the HORIZONTAL separation (in meters)
 double dclGetHorizontalSeparation(Point3D pos1, Point3D pos2);
 
 // Given a point and a line, get the HORIZONTAL shortest distance from the point to a point on the line.
@@ -76,6 +80,10 @@ double GetHeadingFromTo(Point3D A, Point3D B);
 // Given a heading (in degrees), bound it from 0 -> 360
 void dclBoundHeading(double &hdg);
 
+// smallest difference between two angles in degrees
+// difference is negative if a1 > a2 and positive if a2 > a1
+double GetAngleDiff_deg( const double &a1, const double &a2);
+
 
 /*******************************
 *
@@ -91,3 +99,13 @@ bool dclFindAirportID( const string& id, FGAirport *a );
 
 // get airport elevation
 double dclGetAirportElev( const string& id );
+
+/****************
+*
+*   Runways
+*
+****************/
+
+// Given a Point3D (lon/lat/elev) and an FGRunway struct, determine if the point lies on the runway
+bool OnRunway(Point3D pt, const FGRunway& rwy);
+