mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
Style and check condition
This commit is contained in:
committed by
Roland Winklmeier
parent
a062607520
commit
f85c6bcc30
@@ -1675,6 +1675,13 @@ namespace BlackSimPlugin
|
||||
position.Heading = situation.getHeading().value(CAngleUnit::deg());
|
||||
position.Airspeed = static_cast<DWORD>(situation.getGroundSpeed().valueInteger(CSpeedUnit::kts()));
|
||||
|
||||
// sanity check
|
||||
if (CBuildConfig::isLocalDeveloperDebugBuild() && situation.getGroundSpeed().isNegativeWithEpsilonConsidered())
|
||||
{
|
||||
BLACK_VERIFY_X(false, Q_FUNC_INFO, "Negative speed");
|
||||
position.Airspeed = 0;
|
||||
}
|
||||
|
||||
// MSFS has inverted pitch and bank angles
|
||||
position.Pitch = -situation.getPitch().value(CAngleUnit::deg());
|
||||
position.Bank = -situation.getBank().value(CAngleUnit::deg());
|
||||
|
||||
Reference in New Issue
Block a user