mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Default calculation of distance/bearing for airports. Follow up of the discussion in slack/during T125
Summary: Default calculation of distance/bearing for airports. Reviewers: msutcliffe, rwinklmeier Reviewed By: msutcliffe, rwinklmeier Subscribers: jenkins Maniphest Tasks: T125 Differential Revision: https://dev.swift-project.org/D48
This commit is contained in:
committed by
Mathew Sutcliffe
parent
73556492fd
commit
2b3b173b76
@@ -255,11 +255,14 @@ namespace BlackCore
|
||||
{
|
||||
// default implementation
|
||||
if (!sApp || !sApp->hasWebDataServices()) { return CAirportList(); }
|
||||
if (sApp->isShuttingDown()) { return CAirportList(); }
|
||||
|
||||
const CAirportList airports = sApp->getWebDataServices()->getAirports();
|
||||
CAirportList airports = sApp->getWebDataServices()->getAirports();
|
||||
if (airports.isEmpty()) { return airports; }
|
||||
const CCoordinateGeodetic ownPosition = this->getOwnAircraftPosition();
|
||||
return airports.findClosest(maxAirportsInRange(), ownPosition);
|
||||
airports = airports.findClosest(maxAirportsInRange(), ownPosition);
|
||||
if (m_autoCalcAirportDistance) { airports.calculcateAndUpdateRelativeDistanceAndBearing(ownPosition); }
|
||||
return airports;
|
||||
}
|
||||
|
||||
void CSimulatorCommon::setWeatherActivated(bool activated)
|
||||
|
||||
Reference in New Issue
Block a user