]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/ATCutils.hxx
Mathias Fröhlich:
[flightgear.git] / src / ATC / ATCutils.hxx
index b487390472f8619b7cb62d223128ee9f70b5ff6b..448099a672680686c55920845eb10aba06209594 100644 (file)
@@ -40,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);
 
@@ -53,6 +56,14 @@ string ConvertRwyNumToSpokenString(string s);
 // Return the phonetic letter of a letter represented as an integer 1->26
 string GetPhoneticIdent(int i);
 
+// Return the phonetic letter of a character in the range a-z or A-Z.
+// Currently always returns prefixed by lowercase.
+string GetPhoneticIdent(char c);
+
+// Get the compass direction associated with a heading in degrees
+// Currently returns 8 direction resolution (N, NE, E etc...)
+// Might be modified in future to return 4, 8 or 16 resolution but defaulting to 8. 
+string GetCompassDirection(double h);
 
 /*******************************
 *
@@ -77,6 +88,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);
+
 
 /*******************************
 *
@@ -90,9 +105,12 @@ void dclBoundHeading(double &hdg);
 // find basic airport location info from airport database
 bool dclFindAirportID( const string& id, FGAirport *a );
 
-// get airport elevation
+// get airport elevation IN METERS
 double dclGetAirportElev( const string& id );
 
+// get airport position (elev portion in FEET)
+Point3D dclGetAirportPos( const string& id );
+
 /****************
 *
 *   Runways