1 // atis.hxx -- ATIS class
3 // Written by David Luff, started October 2001.
4 // Based on nav.hxx by Curtis Olson, started April 2000.
6 // Copyright (C) 2001 David C. Luff - david.luff@nottingham.ac.uk
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU General Public License as
10 // published by the Free Software Foundation; either version 2 of the
11 // License, or (at your option) any later version.
13 // This program is distributed in the hope that it will be useful, but
14 // WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
29 #include <simgear/compiler.h>
30 #include <simgear/math/sg_geodesy.hxx>
31 #include <simgear/misc/sgstream.hxx>
32 #include <simgear/magvar/magvar.hxx>
33 #include <simgear/timing/sg_time.hxx>
35 #ifdef SG_HAVE_STD_INCLUDES
37 #elif defined( __BORLANDC__ ) || (__APPLE__)
45 //DCL - a complete guess for now.
46 #define FG_ATIS_DEFAULT_RANGE 30
48 class FGATIS : public FGATC {
51 std::string transmission; // The actual ATIS transmission
52 // This is not stored in default.atis but is generated
53 // from the prevailing conditions when required.
55 // for failure modeling
56 std::string trans_ident; // transmitted ident
57 bool atis_failed; // atis failed?
60 // ATIS is actually a special case in that unlike other ATC eg.tower it doesn't actually know about
61 // or the whereabouts of the aircraft it is transmitting to. However, to ensure consistancy of
62 // operation with the other ATC classes the ATIS class must calculate range to the aircraft in order
63 // to decide whether to render the transmission - hence the users plane details must be stored.
64 //SGPropertyNode_ptr airplane_lon_node;
65 //SGPropertyNode_ptr airplane_lat_node;
66 //SGPropertyNode_ptr airplane_elev_node;
73 //run the ATIS instance
74 void Update(double dt);
76 //inline void set_type(const atc_type tp) {type = tp;}
77 inline const std::string& get_trans_ident() { return trans_ident; }
78 inline void set_refname(const std::string& r) { refname = r; }
82 std::string refname; // Holds the refname of a transmission in progress
84 //Update the transmission string
85 void UpdateTransmission(void);
87 friend std::istream& operator>> ( std::istream&, FGATIS& );
90 #endif // _FG_ATIS_HXX