]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/atislist.hxx
Patch from Andy Ross:
[flightgear.git] / src / ATC / atislist.hxx
index 284a95627b1653d12c7b5574f2599e0fa4975297..f0f5474a8d10ed4707a7ff94606e4c670c94f0c1 100644 (file)
@@ -1,6 +1,7 @@
 // atislist.hxx -- atis management class
 //
-// Written by Curtis Olson, started April 2000.
+// Written by David Luff, started October 2001.
+// Based on navlist.hxx by Curtis Olson, started April 2000.
 //
 // Copyright (C) 2000  Curtis L. Olson - curt@flightgear.org
 //
 
 #include <map>
 #include <vector>
+#include <string>
 
 #include "atis.hxx"
 
 SG_USING_STD(map);
 SG_USING_STD(vector);
+SG_USING_STD(string);
 
 
 class FGATISList {
@@ -49,6 +52,21 @@ class FGATISList {
 
     atis_map_type atislist;
 
+    // Add structure and map for storing a log of atis transmissions
+    // made in this session of FlightGear.  This allows the callsign
+    // to be allocated correctly wrt time.
+    typedef struct {
+       int hours;
+       int mins;
+       int callsign;
+    } atis_transmission_type;
+
+    typedef map < string, atis_transmission_type > atis_log_type;
+    typedef atis_log_type::iterator atis_log_iterator;
+    typedef atis_log_type::const_iterator atis_log_const_iterator;
+
+    atis_log_type atislog;
+
 public:
 
     FGATISList();
@@ -60,6 +78,9 @@ public:
     // query the database for the specified frequency, lon and lat are
     // in degrees, elev is in meters
     bool query( double lon, double lat, double elev, double freq, FGATIS *a );
+
+    // Return the callsign for a transmission given transmission time and airpord id
+    int GetCallSign( string apt_id, int hours, int mins );
 };