]> git.mxchange.org Git - flightgear.git/blob - src/ATC/CommStation.hxx
Merge branch 'next' of gitorious.org:fg/flightgear into next
[flightgear.git] / src / ATC / CommStation.hxx
1 #ifndef FG_ATC_COMM_STATION_HXX
2 #define FG_ATC_COMM_STATION_HXX
3
4 #include <Navaids/positioned.hxx>
5
6 class FGAirport;
7
8 namespace flightgear
9 {
10
11 class CommStation : public FGPositioned
12 {
13 public:
14     CommStation(const std::string& name, FGPositioned::Type t, const SGGeod& pos, int range, int freq);
15
16     void setAirport(FGAirport* apt);
17     FGAirport* airport() const { return mAirport; }
18
19     virtual flightgear::PositionedBinding* createBinding(SGPropertyNode* nd) const;  
20     
21     int rangeNm() const
22         { return mRangeNM; }
23         
24     int freqKHz() const
25         { return mFreqKhz; }
26         
27     double freqMHz() const;
28     
29     static CommStation* findByFreq(int freqKhz, const SGGeod& pos, FGPositioned::Filter* filt = NULL);
30 private:
31     int mRangeNM;
32     int mFreqKhz;
33     FGAirport* mAirport;
34 }; 
35     
36 } // of namespace flightgear
37
38 #endif // of FG_ATC_COMM_STATION_HXX
39