]> git.mxchange.org Git - flightgear.git/commitdiff
ATIS fixes from John Denker
authorDave Luff <daveluff@ntlworld.com>
Mon, 3 Jan 2011 01:19:01 +0000 (01:19 +0000)
committerDave Luff <daveluff@ntlworld.com>
Mon, 3 Jan 2011 01:19:01 +0000 (01:19 +0000)
src/ATCDCL/atis.cxx
src/ATCDCL/atis_lexicon.hxx
src/ATCDCL/atis_remap.hxx

index 26e7674a80b2a08c54317247951f3f6c2df223c1..dfc1381c6be4db70956031e1cce74396d582adc0 100644 (file)
@@ -216,9 +216,12 @@ int FGATIS::GenTransmission(const int regen, const int special) {
   using namespace lex;
 
   string BRK = ".\n";
+  string PAUSE = " / ";
 
   double tstamp = atof(fgGetString("sim/time/elapsed-sec"));
-  int interval = ATIS ? ATIS_interval : 2*minute;      // AWOS updated frequently
+  int interval = _type == ATIS ?
+        ATIS_interval   // ATIS updated hourly
+      : 2*minute;      // AWOS updated more frequently
   int sequence = current_commlist->GetAtisSequence(ident, 
                        tstamp, interval, special);
   if (!regen && sequence > LTRS) {
@@ -320,6 +323,9 @@ int FGATIS::GenTransmission(const int regen, const int special) {
       transmission += " " + at + " " + ConvertNumToSpokenDigits(buf) + BRK;
   }
 
+// Sounds better with a pause in there:
+  transmission += PAUSE;
+
   int did_some(0);
   int did_ceiling(0);
 
@@ -431,21 +437,24 @@ int FGATIS::GenTransmission(const int regen, const int special) {
   transmission += ConvertNumToSpokenDigits(buf) + BRK;
 
   if (_type == ATIS /* as opposed to AWOS */) {
-      const FGAirport* apt = fgFindAirportID(ident);
-      assert(apt);
-        string rwy_no = apt->getActiveRunwayForUsage()->ident();
+    const FGAirport* apt = fgFindAirportID(ident);
+    if (apt) {
+      string rwy_no = apt->getActiveRunwayForUsage()->ident();
       if(rwy_no != "NN") {
         transmission += Landing_and_departing_runway + " ";
         transmission += ConvertRwyNumToSpokenString(rwy_no) + BRK;
+#ifdef ATIS_TEST
         if (msg_OK) {
           msg_time = cur_time;
-          //cout << "In atis.cxx, r.rwy_no: " << rwy_no
-          //   << " wind_dir: " << wind_dir << endl;
+          cout << "In atis.cxx, r.rwy_no: " << rwy_no
+             << " wind_dir: " << wind_dir << endl;
         }
+#endif
+      }
     }
     transmission += On_initial_contact_advise_you_have_information + " ";
     transmission += phonetic_seq_string;
-    transmission += "... " + BRK;
+    transmission += "... " + BRK + PAUSE + PAUSE;
   }
 #ifdef ATIS_TEST
   cout << "**** ATIS active on:";
@@ -474,7 +483,7 @@ int FGATIS::GenTransmission(const int regen, const int special) {
   for (size_t where;;) {
     where = transmission.find_first_of(":.");
     if (where == string::npos) break;
-    transmission.replace(where, 1, " /_ ");
+    transmission.replace(where, 1, PAUSE);
   }
   return 1;
 }
index 2284f1f95fec913f0746537287e7252c3bba8a33..37c2a03dfed7f1ebc196a51de9efe630f6ed534c 100644 (file)
@@ -34,9 +34,12 @@ Q(hundred)
 Q(zero)
 Q(Temperature)
 Q(clear)
+Q(isolated)
+Q(few)
 Q(scattered)
 Q(broken)
 Q(overcast)
+Q(thin)
 Q(Sky_condition)
 Q(Ceiling)
 Q(minus)
index f679b70b98f950364f0708c0613e0357e2d799dd..c2341a2f0c79f339d44994a3c994f7d093df2f5f 100644 (file)
@@ -3,6 +3,7 @@ REMAP(Rgnl,  Regional)
 REMAP(Co,    County)
 REMAP(Muni,  Municipal)
 REMAP(Mem,   Memorial)
+REMAP(Meml,  Memorial)
 REMAP(Apt,   Airport)
 REMAP(Arpt,  Airport)
 REMAP(Fld,   Field)