mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
Ref T260, ext. version of updating ground elevation, allows to guess gnd. again with updated elevation
This commit is contained in:
committed by
Roland Winklmeier
parent
075ffa8ccb
commit
d0addd547a
@@ -129,6 +129,13 @@ namespace BlackCore
|
||||
return r;
|
||||
}
|
||||
|
||||
int CAirspaceMonitor::updateAircraftGroundElevation(const CCallsign &callsign, const CElevationPlane &elevation)
|
||||
{
|
||||
const bool vtol = this->isVtolAircraft(callsign);
|
||||
const CLength cg = this->getCG(callsign);
|
||||
return this->updateAircraftGroundElevationExt(callsign, elevation, vtol, cg, true);
|
||||
}
|
||||
|
||||
const CLogCategoryList &CAirspaceMonitor::getLogCategories()
|
||||
{
|
||||
static const CLogCategoryList cats { CLogCategory::matching(), CLogCategory::network() };
|
||||
@@ -947,16 +954,19 @@ namespace BlackCore
|
||||
}
|
||||
}
|
||||
|
||||
if (situation.getOnGroundDetails() != CAircraftSituation::NotSet)
|
||||
{
|
||||
const bool vtol = this->isVtolAircraft(callsign);
|
||||
const CLength cg = this->getCG(callsign);
|
||||
correctedSituation.guessOnGround(vtol, cg);
|
||||
}
|
||||
|
||||
this->guessOnGround(correctedSituation); // does nothing if situation is not appropriate for guessing
|
||||
CRemoteAircraftProvider::storeAircraftSituation(correctedSituation);
|
||||
}
|
||||
|
||||
bool CAirspaceMonitor::guessOnGround(CAircraftSituation &situation) const
|
||||
{
|
||||
if (!situation.shouldGuessOnGround()) { return false; }
|
||||
const CCallsign callsign(situation.getCallsign());
|
||||
const bool vtol = this->isVtolAircraft(callsign);
|
||||
const CLength cg = this->getCG(callsign);
|
||||
return situation.guessOnGround(vtol, cg);
|
||||
}
|
||||
|
||||
void CAirspaceMonitor::sendInitialAtcQueries(const CCallsign &callsign)
|
||||
{
|
||||
if (!this->isConnected()) { return; }
|
||||
|
||||
Reference in New Issue
Block a user