diff options
author | german77 <juangerman-13@hotmail.com> | 2021-11-02 02:49:14 +0100 |
---|---|---|
committer | Narr the Reg <juangerman-13@hotmail.com> | 2021-11-25 03:30:27 +0100 |
commit | 136eb9c4c2b2425c2dd45a79cf444dee7170714d (patch) | |
tree | 74a055a08126fdd33b2071baa08125177847db6e /src/core/hid/motion_input.h | |
parent | second commit lion review (diff) | |
download | yuzu-136eb9c4c2b2425c2dd45a79cf444dee7170714d.tar yuzu-136eb9c4c2b2425c2dd45a79cf444dee7170714d.tar.gz yuzu-136eb9c4c2b2425c2dd45a79cf444dee7170714d.tar.bz2 yuzu-136eb9c4c2b2425c2dd45a79cf444dee7170714d.tar.lz yuzu-136eb9c4c2b2425c2dd45a79cf444dee7170714d.tar.xz yuzu-136eb9c4c2b2425c2dd45a79cf444dee7170714d.tar.zst yuzu-136eb9c4c2b2425c2dd45a79cf444dee7170714d.zip |
Diffstat (limited to 'src/core/hid/motion_input.h')
-rw-r--r-- | src/core/hid/motion_input.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core/hid/motion_input.h b/src/core/hid/motion_input.h index 3deef5ac3..5b5b420bb 100644 --- a/src/core/hid/motion_input.h +++ b/src/core/hid/motion_input.h @@ -56,15 +56,31 @@ private: Common::Vec3f integral_error; Common::Vec3f derivative_error; + // Quaternion containing the device orientation Common::Quaternion<f32> quat{{0.0f, 0.0f, -1.0f}, 0.0f}; + + // Number of full rotations in each axis Common::Vec3f rotations; + + // Acceleration vector measurement in G force Common::Vec3f accel; + + // Gyroscope vector measurement in radians/s. Common::Vec3f gyro; + + // Vector to be substracted from gyro measurements Common::Vec3f gyro_drift; + // Minimum gyro amplitude to detect if the device is moving f32 gyro_threshold = 0.0f; + + // Number of invalid sequential data u32 reset_counter = 0; + + // If the provided data is invalid the device will be autocalibrated bool reset_enabled = true; + + // Use accelerometer values to calculate position bool only_accelerometer = true; }; |