Airport tweaks for flight-planning
This commit is contained in:
parent
f4b98cf204
commit
5c9771fb00
2 changed files with 56 additions and 2 deletions
|
@ -973,6 +973,54 @@ FGGroundNetwork *FGAirport::groundNetwork() const
|
|||
return _groundNetwork.get();
|
||||
}
|
||||
|
||||
flightgear::Transition* FGAirport::selectSIDByEnrouteTransition(FGPositioned* enroute) const
|
||||
{
|
||||
loadProcedures();
|
||||
for (auto sid : mSIDs) {
|
||||
auto trans = sid->findTransitionByEnroute(enroute);
|
||||
if (trans) {
|
||||
return trans;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Transition *FGAirport::selectSIDByTransition(const string &aIdent) const
|
||||
{
|
||||
loadProcedures();
|
||||
for (auto sid : mSIDs) {
|
||||
auto trans = sid->findTransitionByName(aIdent);
|
||||
if (trans) {
|
||||
return trans;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
flightgear::Transition* FGAirport::selectSTARByEnrouteTransition(FGPositioned* enroute) const
|
||||
{
|
||||
loadProcedures();
|
||||
for (auto star : mSTARs) {
|
||||
auto trans = star->findTransitionByEnroute(enroute);
|
||||
if (trans) {
|
||||
return trans;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Transition *FGAirport::selectSTARByTransition(const string &aIdent) const
|
||||
{
|
||||
loadProcedures();
|
||||
for (auto star : mSTARs) {
|
||||
auto trans = star->findTransitionByName(aIdent);
|
||||
if (trans) {
|
||||
return trans;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// get airport elevation
|
||||
double fgGetAirportElev( const std::string& id )
|
||||
{
|
||||
|
|
|
@ -247,12 +247,18 @@ class FGAirport : public FGPositioned
|
|||
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 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 std::string& aIdent) const;
|
||||
|
||||
unsigned int numApproaches() const;
|
||||
flightgear::Approach* getApproachByIndex(unsigned int aIndex) const;
|
||||
flightgear::Approach* findApproachWithIdent(const std::string& aIdent) const;
|
||||
|
|
Loading…
Add table
Reference in a new issue