mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 15:15:50 +08:00
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:
committed by
Klaus Basan
parent
f4d7474941
commit
b5dfd15d66
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user