Ohjurot / DualSense-Windows

Windows API for the PS5 DualSense controller
Other
333 stars 37 forks source link

Accelerometer and gyroscope seem to be swapped #27

Open z80 opened 3 years ago

z80 commented 3 years ago

Hello!

Awesome implementation! Thank you so much for making it available at github! I've tested your code (commit 0b869f4e34e4a6b608023a2f1e19bc28c037b64f). My impression is accelerometer and gyroscope readings are swapped. I.e. accelerometer shows angular velocity and gyroscope shows acceleration.

For example, this code builder << "gyro x: " << (int)inState.gyroscope.x << std::endl; builder << "gyro y: " << (int)inState.gyroscope.y << std::endl; builder << "gyro z: " << (int)inState.gyroscope.z << std::endl; builder << "acc x: " << (int)inState.accelerometer.x << std::endl; builder << "acc y: " << (int)inState.accelerometer.y << std::endl; builder << "acc z: " << (int)inState.accelerometer.z << std::endl;

provides this output (controller is 100% stationary) gyro x: -243 gyro y: 8187 gyro z: 1453 acc x: -5 acc y: 11 acc z: 2