summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-10-22 19:34:44 +0200
committerNarr the Reg <juangerman-13@hotmail.com>2021-11-25 03:30:25 +0100
commit21819da8cd7da60be8f8ba82dc940c2496a5317e (patch)
treec651a1d740ef15196811b602dd9589cabfae88e4 /src/core
parentkraken: Address comments from review (diff)
downloadyuzu-21819da8cd7da60be8f8ba82dc940c2496a5317e.tar
yuzu-21819da8cd7da60be8f8ba82dc940c2496a5317e.tar.gz
yuzu-21819da8cd7da60be8f8ba82dc940c2496a5317e.tar.bz2
yuzu-21819da8cd7da60be8f8ba82dc940c2496a5317e.tar.lz
yuzu-21819da8cd7da60be8f8ba82dc940c2496a5317e.tar.xz
yuzu-21819da8cd7da60be8f8ba82dc940c2496a5317e.tar.zst
yuzu-21819da8cd7da60be8f8ba82dc940c2496a5317e.zip
Diffstat (limited to 'src/core')
-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) {
rotations += gyro * sample_period;
}
+// Based on Madgwick's implementation of Mayhony's AHRS algorithm.
+// 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
void MotionInput::UpdateOrientation(u64 elapsed_time) {
if (!IsCalibrated(0.1f)) {
ResetOrientation();