mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
Use bitwise negation operator to invert integer pitch and bank angles
refs #790
This commit is contained in:
committed by
Klaus Basan
parent
5d7eff0797
commit
7f90652b2f
@@ -359,8 +359,8 @@ namespace BlackSimPlugin
|
||||
|
||||
// speeds, situation
|
||||
// MSFS has inverted pitch and bank angles
|
||||
pitchRaw = -pitchRaw;
|
||||
bankRaw = -bankRaw;
|
||||
pitchRaw = ~pitchRaw;
|
||||
bankRaw = ~bankRaw;
|
||||
const double angleCorrectionFactor = 360.0 / 65536.0 / 65536.0; // see FSUIPC docu
|
||||
CAngle pitch = CAngle(pitchRaw * angleCorrectionFactor, CAngleUnit::deg());
|
||||
CAngle bank = CAngle(bankRaw * angleCorrectionFactor, CAngleUnit::deg());
|
||||
|
||||
Reference in New Issue
Block a user