Ref T261, guess push back

This commit is contained in:
Klaus Basan
2018-04-28 02:45:14 +02:00
committed by Roland Winklmeier
parent 6a2f76f4d7
commit 0b7706471c

View File

@@ -310,12 +310,22 @@ namespace BlackMisc
// Non VTOL aircraft have to move to be not on ground // Non VTOL aircraft have to move to be not on ground
const bool vtol = model.isVtol(); const bool vtol = model.isVtol();
if (!vtol && !this->isMoving()) if (!vtol)
{
if (this->getGroundSpeed().isNegativeWithEpsilonConsidered())
{
this->setOnGround(OnGround, CAircraftSituation::OnGroundByGuessing);
if (details) { *details = QStringLiteral("No VTOL, push back"); }
return true;
}
if (!this->isMoving())
{ {
this->setOnGround(OnGround, CAircraftSituation::OnGroundByGuessing); this->setOnGround(OnGround, CAircraftSituation::OnGroundByGuessing);
if (details) { *details = QStringLiteral("No VTOL, not moving => on ground"); } if (details) { *details = QStringLiteral("No VTOL, not moving => on ground"); }
return true; return true;
} }
}
// not on ground is default // not on ground is default
this->setOnGround(CAircraftSituation::NotOnGround, CAircraftSituation::OnGroundByGuessing); this->setOnGround(CAircraftSituation::NotOnGround, CAircraftSituation::OnGroundByGuessing);