summaryrefslogtreecommitdiff
path: root/src/core/hid/motion_input.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hid/motion_input.cpp')
-rw-r--r--src/core/hid/motion_input.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/hid/motion_input.cpp b/src/core/hid/motion_input.cpp
index 93f37b77b..c25fea966 100644
--- a/src/core/hid/motion_input.cpp
+++ b/src/core/hid/motion_input.cpp
@@ -73,6 +73,8 @@ void MotionInput::UpdateRotation(u64 elapsed_time) {
73 rotations += gyro * sample_period; 73 rotations += gyro * sample_period;
74} 74}
75 75
76// Based on Madgwick's implementation of Mayhony's AHRS algorithm.
77// https://github.com/xioTechnologies/Open-Source-AHRS-With-x-IMU/blob/master/x-IMU%20IMU%20and%20AHRS%20Algorithms/x-IMU%20IMU%20and%20AHRS%20Algorithms/AHRS/MahonyAHRS.cs
76void MotionInput::UpdateOrientation(u64 elapsed_time) { 78void MotionInput::UpdateOrientation(u64 elapsed_time) {
77 if (!IsCalibrated(0.1f)) { 79 if (!IsCalibrated(0.1f)) {
78 ResetOrientation(); 80 ResetOrientation();