Use bitwise negation operator to invert integer pitch and bank angles

refs #790
This commit is contained in:
Roland Winklmeier
2016-11-04 01:41:03 +01:00
committed by Klaus Basan
parent 5d7eff0797
commit 7f90652b2f
3 changed files with 10 additions and 10 deletions

View File

@@ -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());