diff options
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: | |||
| 56 | Common::Vec3f integral_error; | 56 | Common::Vec3f integral_error; |
| 57 | Common::Vec3f derivative_error; | 57 | Common::Vec3f derivative_error; |
| 58 | 58 | ||
| 59 | // Quaternion containing the device orientation | ||
| 59 | Common::Quaternion<f32> quat{{0.0f, 0.0f, -1.0f}, 0.0f}; | 60 | Common::Quaternion<f32> quat{{0.0f, 0.0f, -1.0f}, 0.0f}; |
| 61 | |||
| 62 | // Number of full rotations in each axis | ||
| 60 | Common::Vec3f rotations; | 63 | Common::Vec3f rotations; |
| 64 | |||
| 65 | // Acceleration vector measurement in G force | ||
| 61 | Common::Vec3f accel; | 66 | Common::Vec3f accel; |
| 67 | |||
| 68 | // Gyroscope vector measurement in radians/s. | ||
| 62 | Common::Vec3f gyro; | 69 | Common::Vec3f gyro; |
| 70 | |||
| 71 | // Vector to be substracted from gyro measurements | ||
| 63 | Common::Vec3f gyro_drift; | 72 | Common::Vec3f gyro_drift; |
| 64 | 73 | ||
| 74 | // Minimum gyro amplitude to detect if the device is moving | ||
| 65 | f32 gyro_threshold = 0.0f; | 75 | f32 gyro_threshold = 0.0f; |
| 76 | |||
| 77 | // Number of invalid sequential data | ||
| 66 | u32 reset_counter = 0; | 78 | u32 reset_counter = 0; |
| 79 | |||
| 80 | // If the provided data is invalid the device will be autocalibrated | ||
| 67 | bool reset_enabled = true; | 81 | bool reset_enabled = true; |
| 82 | |||
| 83 | // Use accelerometer values to calculate position | ||
| 68 | bool only_accelerometer = true; | 84 | bool only_accelerometer = true; |
| 69 | }; | 85 | }; |
| 70 | 86 | ||