Ref T260, ext. version of updating ground elevation, allows to guess gnd. again with updated elevation

This commit is contained in:
Klaus Basan
2018-04-18 05:05:21 +02:00
committed by Roland Winklmeier
parent 075ffa8ccb
commit d0addd547a
4 changed files with 35 additions and 8 deletions

View File

@@ -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; }