Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I get different yaw angle with different estimator when using the same data #75

Open
ISOEhy opened this issue May 14, 2022 · 1 comment

Comments

@ISOEhy
Copy link

ISOEhy commented May 14, 2022

I have set the Frame to 'ENU' for all estimator, but I get different results. I am a beginner, I would appraciate it if you can give me a favor
image

@ISOEhy
Copy link
Author

ISOEhy commented May 14, 2022

orientation = Mahony(gyr=gyr,
acc=acc,
mag=mag,
frequency=50.0,
frame='ENU') # Using IMU
orientation_EKF = EKF(gyr=gyr,
acc=acc,
mag=mag,
frequency=50.0,
frame='ENU') # Using IMU
orientation_Comp = Complementary(gyr=gyr,
acc=acc,
mag=mag,
frequency=50.0,
frame='ENU') # Using IMU
orientation_Mad = Madgwick(gyr=gyr,
acc=acc,
mag=mag,
frequency=50.0,
frame='ENU') # Using IMU
orientation_AQUA = AQUA(gyr=gyr,
acc=acc,
mag=mag,
frequency=50.0,
frame='ENU') # Using IMU
return orientation.Q, orientation_EKF.Q, orientation_Comp.Q, orientation_Mad.Q, orientation_AQUA.Q

Qs = trip_quaternions(fp)
from scipy.spatial.transform import Rotation as R
import matplotlib.pyplot as plt
fd = pd.read_csv(fp) #.columns
tows = fd['tow']
fts = ['Mahony', 'EKF', 'Complementary', 'Madgwick', 'AQUA']
for Q in Qs:
yaws = []
for Q0 in Q:
q = R.from_quat(Q0)
p, r, y = q.as_euler('zyx', degrees=True)
yaws.append(y)
plt.plot(tows, yaws)
plt.legend(fts)
plt.title('Yaw angle')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant