1 #include "CommStation.hxx"
2 #include <Airports/airport.hxx>
3 #include <Navaids/NavDataCache.hxx>
7 CommStation::CommStation(PositionedID aGuid, const std::string& name, FGPositioned::Type t, const SGGeod& pos, int range, int freq) :
8 FGPositioned(aGuid, t, name, pos),
15 void CommStation::setAirport(PositionedID apt)
20 FGAirportRef CommStation::airport() const
22 return FGPositioned::loadById<FGAirport>(mAirport);
25 double CommStation::freqMHz() const
27 return mFreqKhz / 1000.0;
31 CommStation::findByFreq(int freqKhz, const SGGeod& pos, FGPositioned::Filter* filt)
33 return (CommStation*) NavDataCache::instance()->findCommByFreq(freqKhz, pos, filt).ptr();
36 } // of namespace flightgear