//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef _FG_TRANSMISSION_HXX
#include <iomanip.h>
#endif
+#include "ATC.hxx"
+
#if ! defined( SG_HAVE_NATIVE_SGI_COMPILERS )
SG_USING_STD(istream);
#endif
// FGTransmission - a class to encapsulate a speech transmission
class FGTransmission {
- int StationType; // Type of ATC station: 1 Approach
+ //int StationType; // Type of ATC station: 1 Approach
+ atc_type StationType;
TransCode Code; // DCL - no idea what this is.
string TransText; // The text of the spoken transmission
string MenuText; // An abbreviated version of the text for the menu entry
void Init();
- inline int get_station() const { return StationType; }
- inline TransCode get_code() { return Code; }
- inline string get_transtext() { return TransText; }
- inline string get_menutext() { return MenuText; }
+ inline atc_type get_station() const { return StationType; }
+ inline const TransCode& get_code() { return Code; }
+ inline const string& get_transtext() { return TransText; }
+ inline const string& get_menutext() { return MenuText; }
// Return the parsed logic of the transmission
TransPar Parse();
inline istream&
operator >> ( istream& in, FGTransmission& a ) {
char ch;
+ int tmp;
static bool first_time = true;
static double julian_date = 0;
julian_date = sgTimeCurrentMJD(0, 0) + MJD0;
first_time = false;
}
- in >> a.StationType;
+ // Ugly hack alert - eventually we'll use xml format for the transmissions file
+ in >> tmp;
+ if(tmp == 1) {
+ a.StationType = APPROACH;
+ } else {
+ a.StationType = INVALID;
+ }
in >> a.Code.c1;
in >> a.Code.c2;
in >> a.Code.c3;