Fix wrong pitch and bank value interpolation

Pitch and bank angle in CAircraftSituation are according to the
common aeronautical convention:
* Bank in degrees, positive = roll right
* Pitch in degrees, positive = pitch up

Microsoft Flight Simulator is using inverted angles, which was incorrectly
adjusted in the interpolator. This caused wrong values for X-Plane.
This angle correction is now moved into the MSFS specific plugins.
Additionally, so far the pitch and bank angles from own aircraft were
not yet corrected for MSFS. So we did send wrong values to the network.

refs #790
This commit is contained in:
Roland Winklmeier
2016-10-24 23:27:49 +02:00
committed by Klaus Basan
parent 44fcba296b
commit 42737faf2c
5 changed files with 15 additions and 8 deletions

View File

@@ -86,6 +86,9 @@ namespace BlackSimPlugin
if (bank > 180.0)
bank -= 360;
// MSFS has inverted pitch and bank angles
pitch = -pitch;
bank = -bank;
situation.setPitch(CAngle(pitch, CAngleUnit::deg()));
situation.setBank(CAngle(bank, CAngleUnit::deg()));
situation.setHeading(CHeading(pbhstrct.hdg / CFs9Sdk::headingMultiplier(), CHeading::Magnetic, CAngleUnit::deg()));