|
FlightGear next
|
#include <airport.hxx>
Inherits FGPositioned.
Classes | |
| class | AirportFilter |
| struct | FindBestRunwayForHeadingParams |
| class | HardSurfaceFilter |
| class | PortsFilter |
| Filter which passes heliports and seaports in addition to airports. More... | |
| class | TypeRunwayFilter |
| Filter which passes specified port type and in case of airport checks if a runway larger the /sim/navdb/min-runway-length-ft exists. More... | |
Public Member Functions | |
| FGAirport (PositionedID aGuid, const std::string &id, const SGGeod &location, const std::string &name, bool has_metar, Type aType, SGPath sceneryPath=SGPath()) | |
| ~FGAirport () | |
| SGPath | sceneryPath () const |
| const std::string & | getId () const |
| const std::string & | getName () const |
| std::string | toString () const |
| double | getLongitude () const |
| double | getLatitude () const |
| double | getElevation () const |
| bool | getMetar () const |
| bool | isAirport () const |
| bool | isSeaport () const |
| bool | isHeliport () const |
| bool | isClosed () const |
| is the airport closed (disused)? | |
| virtual const std::string & | name () const |
| Return the name of this positioned. | |
| void | validateILSData () |
| reload the ILS data from XML if required. | |
| bool | hasTower () const |
| SGGeod | getTowerLocation () const |
| void | setMetar (bool value) |
| FGRunwayRef | getActiveRunwayForUsage () const |
| FGAirportDynamicsRef | getDynamics () const |
| FGGroundNetwork * | groundNetwork () const |
| unsigned int | numRunways () const |
| unsigned int | numHelipads () const |
| FGRunwayRef | getRunwayByIndex (unsigned int aIndex) const |
| FGHelipadRef | getHelipadByIndex (unsigned int aIndex) const |
| FGRunwayMap | getRunwayMap () const |
| FGHelipadMap | getHelipadMap () const |
| bool | hasRunwayWithIdent (const std::string &aIdent) const |
| bool | hasHelipadWithIdent (const std::string &aIdent) const |
| FGRunwayRef | getRunwayByIdent (const std::string &aIdent) const |
| FGHelipadRef | getHelipadByIdent (const std::string &aIdent) const |
| FGRunwayRef | findBestRunwayForHeading (double aHeading, struct FindBestRunwayForHeadingParams *parms=NULL) const |
| FGRunwayRef | findBestRunwayForPos (const SGGeod &aPos) const |
| return the most likely target runway based on a position. | |
| FGRunwayList | getRunwaysWithoutReciprocals () const |
| Retrieve all runways at the airport, but excluding the reciprocal runways. | |
| FGRunwayList | getRunways () const |
| Retrieve all runways at the airport. | |
| std::string | findAPTRunwayForNewName (const std::string &newIdent) const |
| bool | hasHardRunwayOfLengthFt (double aLengthFt) const |
| Useful predicate for FMS/GPS/NAV displays and similar - check if this airport has a hard-surfaced runway of at least the specified length. | |
| FGRunwayRef | longestRunway () const |
| unsigned int | numTaxiways () const |
| FGTaxiwayRef | getTaxiwayByIndex (unsigned int aIndex) const |
| FGTaxiwayList | getTaxiways () const |
| unsigned int | numPavements () const |
| FGPavementRef | getPavementByIndex (unsigned int aIndex) const |
| FGPavementList | getPavements () const |
| void | addPavement (FGPavementRef pavement) |
| unsigned int | numBoundary () const |
| FGPavementRef | getBoundaryIndex (unsigned int aIndex) const |
| FGPavementList | getBoundary () const |
| void | addBoundary (FGPavementRef boundary) |
| unsigned int | numLineFeatures () const |
| FGPavementList | getLineFeatures () const |
| void | addLineFeature (FGPavementRef linefeature) |
| void | setProcedures (const std::vector< flightgear::SID * > &aSids, const std::vector< flightgear::STAR * > &aStars, const std::vector< flightgear::Approach * > &aApproaches) |
| void | addSID (flightgear::SID *aSid) |
| void | addSTAR (flightgear::STAR *aStar) |
| void | addApproach (flightgear::Approach *aApp) |
| unsigned int | numSIDs () const |
| flightgear::SID * | getSIDByIndex (unsigned int aIndex) const |
| flightgear::SID * | findSIDWithIdent (const std::string &aIdent) const |
| flightgear::SIDList | getSIDs () const |
| flightgear::Transition * | selectSIDByEnrouteTransition (FGPositioned *enroute) const |
| flightgear::Transition * | selectSIDByTransition (const FGRunway *runway, const std::string &aIdent) const |
| unsigned int | numSTARs () const |
| flightgear::STAR * | getSTARByIndex (unsigned int aIndex) const |
| flightgear::STAR * | findSTARWithIdent (const std::string &aIdent) const |
| flightgear::STARList | getSTARs () const |
| flightgear::Transition * | selectSTARByEnrouteTransition (FGPositioned *enroute) const |
| flightgear::Transition * | selectSTARByTransition (const FGRunway *runway, const std::string &aIdent) const |
| unsigned int | numApproaches () const |
| flightgear::Approach * | getApproachByIndex (unsigned int aIndex) const |
| flightgear::Approach * | findApproachWithIdent (const std::string &aIdent) const |
| flightgear::ApproachList | getApproaches (flightgear::ProcedureType type=flightgear::PROCEDURE_INVALID) const |
| flightgear::CommStationList | commStationsOfType (FGPositioned::Type aTy) const |
| flightgear::CommStationList | commStations () const |
| void | testSuiteInjectGroundnetXML (const SGPath &path) |
| void | testSuiteInjectProceduresXML (const SGPath &path) |
Public Member Functions inherited from FGPositioned | |
| virtual | ~FGPositioned () |
| Type | type () const |
| const char * | typeString () const |
| const std::string & | ident () const |
| virtual const SGGeod & | geod () const |
| PositionedID | guid () const |
| virtual const SGVec3d & | cart () const |
| The cartesian position associated with this object. | |
| double | latitude () const |
| double | longitude () const |
| double | elevation () const |
| double | elevationM () const |
Static Public Member Functions | |
| static bool | isType (FGPositioned::Type ty) |
| static FGAirportRef | findClosest (const SGGeod &aPos, double aCuttofNm, Filter *filter=NULL) |
| Syntactic wrapper around FGPositioned::findClosest - find the closest match for filter, and return it cast to FGAirport. | |
| static FGAirportRef | getByIdent (const std::string &aIdent) |
| Helper to look up an FGAirport instance by unique ident. | |
| static FGAirportRef | findByIdent (const std::string &aIdent) |
| Helper to look up an FGAirport instance by unique ident. | |
| static char ** | searchNamesAndIdents (const std::string &aFilter) |
| Specialised helper to implement the AirportList dialog. | |
| static void | sortBySize (FGPositionedList &) |
| Sort an FGPositionedList of airports by size (number of runways + length) this is meant to prioritise more important airports. | |
| static void | clearAirportsCache () |
Static Public Member Functions inherited from FGPositioned | |
| static bool | isAirportType (FGPositioned *pos) |
| static bool | isRunwayType (FGPositioned *pos) |
| static bool | isNavaidType (FGPositioned *pos) |
| static FGPositionedList | findWithinRange (const SGGeod &aPos, double aRangeNm, Filter *aFilter) |
| static FGPositionedList | findWithinRangePartial (const SGGeod &aPos, double aRangeNm, Filter *aFilter, bool &aPartial) |
| static FGPositionedRef | findClosestWithIdent (const std::string &aIdent, const SGGeod &aPos, Filter *aFilter=NULL) |
| static FGPositionedRef | findFirstWithIdent (const std::string &aIdent, Filter *aFilter) |
| static FGPositionedList | findAllWithIdent (const std::string &aIdent, Filter *aFilter=NULL, bool aExact=true) |
| Find all items with the specified ident. | |
| static FGPositionedList | findAllWithName (const std::string &aName, Filter *aFilter=NULL, bool aExact=true) |
| As above, but searches names instead of idents. | |
| static void | sortByRange (FGPositionedList &, const SGGeod &aPos) |
| Sort an FGPositionedList by distance from a position. | |
| static FGPositionedRef | findClosest (const SGGeod &aPos, double aCutoffNm, Filter *aFilter=NULL) |
| Find the closest item to a position, which pass the specified filter A cutoff range in NM must be specified, to constrain the search acceptably. | |
| static FGPositionedList | findClosestN (const SGGeod &aPos, unsigned int aN, double aCutoffNm, Filter *aFilter=NULL) |
| Find the closest N items to a position, which pass the specified filter A cutoff range in NM must be specified, to constrain the search acceptably. | |
| static FGPositionedList | findClosestNPartial (const SGGeod &aPos, unsigned int aN, double aCutoffNm, Filter *aFilter, bool &aPartial) |
| Same as above, but with a time-bound in msec too. | |
| template<class T> | |
| static SGSharedPtr< T > | loadById (PositionedID id) |
| template<class T> | |
| static SGSharedPtr< T > | loadById (const PositionedIDVec &id_vec, size_t index) |
| template<class T> | |
| static std::vector< SGSharedPtr< T > > | loadAllById (const PositionedIDVec &id_vec) |
| static Type | typeFromName (const std::string &aName) |
| Map a candidate type string to a real type. | |
| static const char * | nameForType (Type aTy) |
| Map a type to a human-readable string. | |
| static FGPositionedRef | createWaypoint (FGPositioned::Type aType, const std::string &aIdent, const SGGeod &aPos, bool isTemporary=false, const std::string &aName={}) |
| static bool | deleteWaypoint (FGPositionedRef aWpt) |
Additional Inherited Members | |
Public Types inherited from FGPositioned | |
| enum | Type { INVALID = 0 , AIRPORT , HELIPORT , SEAPORT , RUNWAY , HELIPAD , TAXIWAY , PAVEMENT , WAYPOINT , FIX , NDB , VOR , ILS , LOC , GS , OM , MM , IM , DME , TACAN , MOBILE_TACAN , OBSTACLE , TOWER , FREQ_GROUND , FREQ_TOWER , FREQ_ATIS , FREQ_AWOS , FREQ_APP_DEP , FREQ_ENROUTE , FREQ_CLEARANCE , FREQ_UNICOM , PARKING , TAXI_NODE , COUNTRY , CITY , TOWN , VILLAGE , VISUAL_REPORTING_POINT , LAST_POI_TYPE , LAST_TYPE } |
Protected Member Functions inherited from FGPositioned | |
| FGPositioned (PositionedID aGuid, Type ty, const std::string &aIdent, const SGGeod &aPos) | |
| void | modifyPosition (const SGGeod &newPos) |
| void | invalidatePosition () |
Static Protected Member Functions inherited from FGPositioned | |
| static FGPositionedRef | loadByIdImpl (PositionedID id) |
Protected Attributes inherited from FGPositioned | |
| const PositionedID | mGuid |
| const Type | mType |
| const std::string | mIdent |
Definition at line 31 of file airport.hxx.
| FGAirport::FGAirport | ( | PositionedID | aGuid, |
| const std::string & | id, | ||
| const SGGeod & | location, | ||
| const std::string & | name, | ||
| bool | has_metar, | ||
| Type | aType, | ||
| SGPath | sceneryPath = SGPath() ) |
Definition at line 53 of file airport.cxx.
| FGAirport::~FGAirport | ( | ) |
Definition at line 77 of file airport.cxx.
| void FGAirport::addApproach | ( | flightgear::Approach * | aApp | ) |
Definition at line 867 of file airport.cxx.
| void FGAirport::addBoundary | ( | FGPavementRef | boundary | ) |
Definition at line 379 of file airport.cxx.
| void FGAirport::addLineFeature | ( | FGPavementRef | linefeature | ) |
Definition at line 396 of file airport.cxx.
| void FGAirport::addPavement | ( | FGPavementRef | pavement | ) |
Definition at line 362 of file airport.cxx.
| void FGAirport::addSID | ( | flightgear::SID * | aSid | ) |
Definition at line 857 of file airport.cxx.
| void FGAirport::addSTAR | ( | flightgear::STAR * | aStar | ) |
Definition at line 862 of file airport.cxx.
|
static |
Definition at line 483 of file airport.cxx.
| CommStationList FGAirport::commStations | ( | ) | const |
Definition at line 983 of file airport.cxx.
| CommStationList FGAirport::commStationsOfType | ( | FGPositioned::Type | aTy | ) | const |
Definition at line 997 of file airport.cxx.
| Approach * FGAirport::findApproachWithIdent | ( | const std::string & | aIdent | ) | const |
Definition at line 954 of file airport.cxx.
| std::string FGAirport::findAPTRunwayForNewName | ( | const std::string & | newIdent | ) | const |
Definition at line 783 of file airport.cxx.
| FGRunwayRef FGAirport::findBestRunwayForHeading | ( | double | aHeading, |
| struct FindBestRunwayForHeadingParams * | parms = NULL ) const |
Definition at line 211 of file airport.cxx.
| FGRunwayRef FGAirport::findBestRunwayForPos | ( | const SGGeod & | aPos | ) | const |
return the most likely target runway based on a position.
Specifically, return the runway for which the course from aPos to the runway end, mostly closely matches the runway heading. This is a good approximation of which runway the position is on or aiming towards.
Definition at line 248 of file airport.cxx.
|
static |
Helper to look up an FGAirport instance by unique ident.
Returns NULL if the airport could not be found.
Definition at line 489 of file airport.cxx.
|
static |
Syntactic wrapper around FGPositioned::findClosest - find the closest match for filter, and return it cast to FGAirport.
The default filter passes airports, but not seaports or heliports
Definition at line 425 of file airport.cxx.
| flightgear::SID * FGAirport::findSIDWithIdent | ( | const std::string & | aIdent | ) | const |
Definition at line 887 of file airport.cxx.
| STAR * FGAirport::findSTARWithIdent | ( | const std::string & | aIdent | ) | const |
Definition at line 921 of file airport.cxx.
| FGRunwayRef FGAirport::getActiveRunwayForUsage | ( | ) | const |
Definition at line 402 of file airport.cxx.
| Approach * FGAirport::getApproachByIndex | ( | unsigned int | aIndex | ) | const |
Definition at line 947 of file airport.cxx.
| ApproachList FGAirport::getApproaches | ( | flightgear::ProcedureType | type = flightgear::PROCEDURE_INVALID | ) | const |
Definition at line 967 of file airport.cxx.
| FGPavementList FGAirport::getBoundary | ( | ) | const |
Definition at line 374 of file airport.cxx.
| FGPavementRef FGAirport::getBoundaryIndex | ( | unsigned int | aIndex | ) | const |
|
static |
Helper to look up an FGAirport instance by unique ident.
Throws an exception if the airport could not be found - so callers can assume the result is non-NULL.
Definition at line 509 of file airport.cxx.
| FGAirportDynamicsRef FGAirport::getDynamics | ( | ) | const |
Definition at line 1048 of file airport.cxx.
|
inline |
Definition at line 61 of file airport.hxx.
| FGHelipadRef FGAirport::getHelipadByIdent | ( | const std::string & | aIdent | ) | const |
Definition at line 199 of file airport.cxx.
| FGHelipadRef FGAirport::getHelipadByIndex | ( | unsigned int | aIndex | ) | const |
Definition at line 123 of file airport.cxx.
| FGHelipadMap FGAirport::getHelipadMap | ( | ) | const |
Definition at line 148 of file airport.cxx.
|
inline |
Definition at line 53 of file airport.hxx.
|
inline |
Definition at line 59 of file airport.hxx.
| FGPavementList FGAirport::getLineFeatures | ( | ) | const |
Definition at line 391 of file airport.cxx.
|
inline |
Definition at line 57 of file airport.hxx.
|
inline |
Definition at line 62 of file airport.hxx.
|
inline |
Definition at line 54 of file airport.hxx.
| FGPavementRef FGAirport::getPavementByIndex | ( | unsigned int | aIndex | ) | const |
| FGPavementList FGAirport::getPavements | ( | ) | const |
Definition at line 357 of file airport.cxx.
| FGRunwayRef FGAirport::getRunwayByIdent | ( | const std::string & | aIdent | ) | const |
Definition at line 182 of file airport.cxx.
| FGRunwayRef FGAirport::getRunwayByIndex | ( | unsigned int | aIndex | ) | const |
Definition at line 116 of file airport.cxx.
| FGRunwayMap FGAirport::getRunwayMap | ( | ) | const |
Definition at line 130 of file airport.cxx.
| FGRunwayList FGAirport::getRunways | ( | ) | const |
Retrieve all runways at the airport.
Definition at line 300 of file airport.cxx.
| FGRunwayList FGAirport::getRunwaysWithoutReciprocals | ( | ) | const |
Retrieve all runways at the airport, but excluding the reciprocal runways.
For example at KSFO this might return 1L, 1R, 28L and 28R, but would not then include 19L/R or 10L/R.
Exactly which runways you get, is undefined (i.e, dont assumes it's runways with heading < 180 degrees) - it depends on order in apt.dat.
This is useful for code that wants to process each piece of tarmac at an airport once, not twice - eg mapping and nav-display code.
Definition at line 308 of file airport.cxx.
| flightgear::SID * FGAirport::getSIDByIndex | ( | unsigned int | aIndex | ) | const |
Definition at line 880 of file airport.cxx.
| flightgear::SIDList FGAirport::getSIDs | ( | ) | const |
Definition at line 900 of file airport.cxx.
| STAR * FGAirport::getSTARByIndex | ( | unsigned int | aIndex | ) | const |
Definition at line 914 of file airport.cxx.
| STARList FGAirport::getSTARs | ( | ) | const |
Definition at line 934 of file airport.cxx.
| FGTaxiwayRef FGAirport::getTaxiwayByIndex | ( | unsigned int | aIndex | ) | const |
Definition at line 337 of file airport.cxx.
| FGTaxiwayList FGAirport::getTaxiways | ( | ) | const |
Definition at line 344 of file airport.cxx.
| SGGeod FGAirport::getTowerLocation | ( | ) | const |
Definition at line 696 of file airport.cxx.
| FGGroundNetwork * FGAirport::groundNetwork | ( | ) | const |
Definition at line 1053 of file airport.cxx.
| bool FGAirport::hasHardRunwayOfLengthFt | ( | double | aLengthFt | ) | const |
Useful predicate for FMS/GPS/NAV displays and similar - check if this airport has a hard-surfaced runway of at least the specified length.
Definition at line 272 of file airport.cxx.
| bool FGAirport::hasHelipadWithIdent | ( | const std::string & | aIdent | ) | const |
Definition at line 175 of file airport.cxx.
| bool FGAirport::hasRunwayWithIdent | ( | const std::string & | aIdent | ) | const |
Definition at line 162 of file airport.cxx.
| bool FGAirport::hasTower | ( | ) | const |
Definition at line 819 of file airport.cxx.
| bool FGAirport::isAirport | ( | ) | const |
Definition at line 81 of file airport.cxx.
|
inline |
is the airport closed (disused)?
note at present we look for an [x] in the name, ideally the database would explicitly include this
Definition at line 70 of file airport.hxx.
| bool FGAirport::isHeliport | ( | ) | const |
Definition at line 91 of file airport.cxx.
| bool FGAirport::isSeaport | ( | ) | const |
Definition at line 86 of file airport.cxx.
|
inlinestatic |
Definition at line 45 of file airport.hxx.
| FGRunwayRef FGAirport::longestRunway | ( | ) | const |
Definition at line 285 of file airport.cxx.
|
inlinevirtual |
Return the name of this positioned.
By default this is the same as the ident, but for many derived classes it's more meaningful - the aiport or navaid name, for example.
Reimplemented from FGPositioned.
Definition at line 75 of file airport.hxx.
| unsigned int FGAirport::numApproaches | ( | ) | const |
Definition at line 940 of file airport.cxx.
| unsigned int FGAirport::numBoundary | ( | ) | const |
Definition at line 368 of file airport.cxx.
| unsigned int FGAirport::numHelipads | ( | ) | const |
Definition at line 109 of file airport.cxx.
| unsigned int FGAirport::numLineFeatures | ( | ) | const |
Definition at line 385 of file airport.cxx.
| unsigned int FGAirport::numPavements | ( | ) | const |
Definition at line 351 of file airport.cxx.
| unsigned int FGAirport::numRunways | ( | ) | const |
Definition at line 102 of file airport.cxx.
| unsigned int FGAirport::numSIDs | ( | ) | const |
Definition at line 873 of file airport.cxx.
| unsigned int FGAirport::numSTARs | ( | ) | const |
Definition at line 907 of file airport.cxx.
| unsigned int FGAirport::numTaxiways | ( | ) | const |
Definition at line 330 of file airport.cxx.
| SGPath FGAirport::sceneryPath | ( | ) | const |
Definition at line 96 of file airport.cxx.
|
static |
Specialised helper to implement the AirportList dialog.
Performs a case-insensitive search on airport names and ICAO codes, and returns matches in a format suitable for use by a puaList.
Definition at line 517 of file airport.cxx.
| flightgear::Transition * FGAirport::selectSIDByEnrouteTransition | ( | FGPositioned * | enroute | ) | const |
Definition at line 1064 of file airport.cxx.
| Transition * FGAirport::selectSIDByTransition | ( | const FGRunway * | runway, |
| const std::string & | aIdent ) const |
Definition at line 1076 of file airport.cxx.
| flightgear::Transition * FGAirport::selectSTARByEnrouteTransition | ( | FGPositioned * | enroute | ) | const |
Definition at line 1091 of file airport.cxx.
| Transition * FGAirport::selectSTARByTransition | ( | const FGRunway * | runway, |
| const std::string & | aIdent ) const |
Definition at line 1103 of file airport.cxx.
|
inline |
Definition at line 89 of file airport.hxx.
| void FGAirport::setProcedures | ( | const std::vector< flightgear::SID * > & | aSids, |
| const std::vector< flightgear::STAR * > & | aStars, | ||
| const std::vector< flightgear::Approach * > & | aApproaches ) |
|
static |
Sort an FGPositionedList of airports by size (number of runways + length) this is meant to prioritise more important airports.
Definition at line 1035 of file airport.cxx.
| void FGAirport::testSuiteInjectGroundnetXML | ( | const SGPath & | path | ) |
| void FGAirport::testSuiteInjectProceduresXML | ( | const SGPath & | path | ) |
|
inline |
Definition at line 55 of file airport.hxx.
| void FGAirport::validateILSData | ( | ) |
reload the ILS data from XML if required.
Definition at line 795 of file airport.cxx.