diff --git a/src/plugins/simulator/fs9/fs9client.cpp b/src/plugins/simulator/fs9/fs9client.cpp index f685ff060..97425eea3 100644 --- a/src/plugins/simulator/fs9/fs9client.cpp +++ b/src/plugins/simulator/fs9/fs9client.cpp @@ -54,8 +54,8 @@ namespace BlackSimPlugin pbhstrct.pitch = newSituation.getPitch().value(CAngleUnit::deg()) * CFs9Sdk::pitchMultiplier(); pbhstrct.bank = newSituation.getBank().value(CAngleUnit::deg()) * CFs9Sdk::bankMultiplier(); // MSFS has inverted pitch and bank angles - pbhstrct.pitch = -pbhstrct.pitch; - pbhstrct.bank = -pbhstrct.bank; + pbhstrct.pitch = ~pbhstrct.pitch; + pbhstrct.bank = ~pbhstrct.bank; positionVelocity.pbh = pbhstrct.pbh; // Ground velocity @@ -111,8 +111,8 @@ namespace BlackSimPlugin pbhstrct.pitch = situation.getPitch().value(CAngleUnit::deg()) * CFs9Sdk::pitchMultiplier(); pbhstrct.bank = situation.getBank().value(CAngleUnit::deg()) * CFs9Sdk::bankMultiplier(); // MSFS has inverted pitch and bank angles - pbhstrct.pitch = -pbhstrct.pitch; - pbhstrct.bank = -pbhstrct.bank; + pbhstrct.pitch = ~pbhstrct.pitch; + pbhstrct.bank = ~pbhstrct.bank; positionSlewMode.pbh = pbhstrct.pbh; return positionSlewMode; diff --git a/src/plugins/simulator/fs9/simulatorfs9.cpp b/src/plugins/simulator/fs9/simulatorfs9.cpp index 57d238208..3b8df6aa1 100644 --- a/src/plugins/simulator/fs9/simulatorfs9.cpp +++ b/src/plugins/simulator/fs9/simulatorfs9.cpp @@ -78,17 +78,17 @@ namespace BlackSimPlugin FS_PBH pbhstrct; pbhstrct.pbh = positionVelocity.pbh; - double pitch = pbhstrct.pitch / CFs9Sdk::pitchMultiplier(); + int pitch = pbhstrct.pitch / CFs9Sdk::pitchMultiplier(); if (pitch > 180.0) pitch -= 360; - double bank = pbhstrct.bank / CFs9Sdk::bankMultiplier(); + int bank = pbhstrct.bank / CFs9Sdk::bankMultiplier(); if (bank > 180.0) bank -= 360; // MSFS has inverted pitch and bank angles - pitch = -pitch; - bank = -bank; + 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())); diff --git a/src/plugins/simulator/fscommon/fsuipc.cpp b/src/plugins/simulator/fscommon/fsuipc.cpp index 0db807ac2..e3ec0ddef 100644 --- a/src/plugins/simulator/fscommon/fsuipc.cpp +++ b/src/plugins/simulator/fscommon/fsuipc.cpp @@ -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());