mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
Ref T259, Ref T243 utility functions for aircraft situation/elevation plane
This commit is contained in:
@@ -77,5 +77,20 @@ namespace BlackMisc
|
||||
{
|
||||
return this->findBy(&CAircraftSituation::hasInboundGroundInformation, hasGroundInfo);
|
||||
}
|
||||
|
||||
bool CAircraftSituationList::hasSituationWithoutGroundElevation() const
|
||||
{
|
||||
return this->contains(&CAircraftSituation::hasGroundElevation, false);
|
||||
}
|
||||
|
||||
bool CAircraftSituationList::hasGroundElevationOutsideRange(const CLength &range) const
|
||||
{
|
||||
for (const CAircraftSituation &situation : *this)
|
||||
{
|
||||
if (!situation.hasGroundElevation()) { return true; }
|
||||
if (situation.getGroundElevationPlane().getRadius() > range) { return true; }
|
||||
}
|
||||
return false;
|
||||
}
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user