When dealing with pitch and bank as signed ints, it is desirable to

round down, rather than toward zero, to get a linear distribution.

refs #790
This commit is contained in:
Mathew Sutcliffe
2016-11-06 19:25:39 +00:00
committed by Klaus Basan
parent f4d7474941
commit b5dfd15d66
3 changed files with 8 additions and 8 deletions

View File

@@ -358,8 +358,8 @@ namespace BlackSimPlugin
situation.setPosition(position);
const double angleCorrectionFactor = 360.0 / 65536.0 / 65536.0; // see FSUIPC docu
pitchRaw *= angleCorrectionFactor;
bankRaw *= angleCorrectionFactor;
pitchRaw = std::floor(pitchRaw * angleCorrectionFactor);
bankRaw = std::floor(bankRaw * angleCorrectionFactor);
// MSFS has inverted pitch and bank angles
pitchRaw = ~pitchRaw;