mad-lab-fau / gaitmap

The Gait and Movement Analysis Package
https://gaitmap.readthedocs.io
Other
38 stars 2 forks source link

Swapping accelerometer and gyroscope data? #53

Closed rmndrs89 closed 9 months ago

rmndrs89 commented 9 months ago

Dear all,

it is a bit confusing how accelerometer and gyroscope data are used in the Madgwick AHRS implementation. When the data are enumerated over, the naming of acc and gyro seems to be swapped. Eventually, two and three lines below this is compensated for by calling:

            gyro=acc_val,
            acc=gyro_val,

but would it not make more sense to just change the zip order, e.g., for i, (acc_val, gyro_val) in enumerate(zip(acc, gyro)): and have:

            gyro=gyro_val,
            acc=acc_val,

Best regards, Robbin

AKuederle commented 9 months ago

You are completely right. Not sure how this happened. I will fix that later today. Thanks for reporting.