X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FATCDCL%2FATCutils.hxx;h=01f2e9e9d93ea0fade3c04a7ed86d33128c38b4e;hb=1c5eb0fb3e66c5c3bcc021310c97ea6d208c4b84;hp=b26a55cd0b0b01c22ed9be353e060a55e25ab0ce;hpb=a99ea1c7b5fb0ba69810bbad9b6aca8b4cdc116b;p=flightgear.git diff --git a/src/ATCDCL/ATCutils.hxx b/src/ATCDCL/ATCutils.hxx index b26a55cd0..01f2e9e9d 100644 --- a/src/ATCDCL/ATCutils.hxx +++ b/src/ATCDCL/ATCutils.hxx @@ -41,24 +41,22 @@ using std::string; string ConvertNumToSpokenDigits(const 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); +string ConvertNumToSpokenDigits(const int& n); +string decimalNumeral(const int& n); // Convert rwy number string to a spoken-style string -// eg "05L" to "zero five left" -// Assumes we get a two-digit string optionally appended with R, L, or C -// eg 01 07L 29R 36 -// Anything else is not guaranteed to be handled correctly! +// eg "15L" to "one five left" +// Assumes we get a string of digits optionally appended with R, L, or C +// eg 1 7L 29R 36 string ConvertRwyNumToSpokenString(const string &s); -// Return the phonetic letter of a letter represented as an integer 1->26 -string GetPhoneticIdent(int i); +const int LTRS(26); +// Return the phonetic letter of a letter represented as an integer 0..25 +string GetPhoneticLetter(const 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); +string GetPhoneticLetter(char c); // Get the compass direction associated with a heading in degrees // Currently returns 8 direction resolution (N, NE, E etc...)