mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
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:
committed by
Klaus Basan
parent
44fcba296b
commit
42737faf2c
@@ -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()));
|
||||
|
||||
Reference in New Issue
Block a user