1
0
Fork 0

Change default airport search to exclude seaports and heliports, for the moment.

This commit is contained in:
jmt 2009-10-13 06:48:52 +00:00 committed by Tim Moore
parent 110dd605a0
commit d4cc5f9c44
3 changed files with 6 additions and 9 deletions

View file

@ -113,7 +113,7 @@ public:
}
virtual Type maxType() const {
return SEAPORT;
return AIRPORT;
}
virtual bool passAirport(FGAirport* aApt) const {
@ -128,9 +128,6 @@ public:
virtual bool passAirport(FGAirport* aApt) const;
virtual Type maxType() const {
return AIRPORT;
}
private:
double mMinLengthFt;
};
@ -138,7 +135,7 @@ public:
/**
* Syntactic wrapper around FGPositioned::findClosest - find the closest
* match for filter, and return it cast to FGAirport. The default filter
* passes all airports, including seaports and heliports.
* passes airports, but not seaports or heliports
*/
static FGAirport* findClosest(const SGGeod& aPos, double aCuttofNm, Filter* filter = NULL);

View file

@ -44,6 +44,10 @@ public:
virtual bool passAirport(FGAirport* aApt) const {
return aApt->getMetar();
}
// permit heliports and seaports too
virtual FGPositioned::Type maxType() const
{ return FGPositioned::SEAPORT; }
};
static AirportWithMetar airportWithMetarFilter;

View file

@ -1594,10 +1594,6 @@ private:
: mk(device) {}
virtual bool passAirport(FGAirport *a) const;
virtual FGPositioned::Type maxType() const {
return FGPositioned::AIRPORT;
}
private:
MK_VIII* mk;
};