-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
Math errors in AQUA filter #103
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To calculate quaternion using gyroscope by integration of measurement, the factor is not 1/2 but -1/2 (sign error).
qDot = -0.5*self.Omega(gyr) @ q # Quaternion derivative (eq. 39)
To calculate quaternion for accelerometer and magnetometer (no gyroscope):
if lx >= 0:
q_mag = np.array([np.sqrt(Gamma+lxnp.sqrt(Gamma))/np.sqrt(2Gamma), 0.0, 0.0, ly/(np.sqrt(2)np.sqrt(Gamma+lxnp.sqrt(Gamma)))])
else:
q_mag = np.array([ly/(np.sqrt(2)np.sqrt(Gamma-lxnp.sqrt(Gamma))), 0.0, 0.0, np.sqrt(Gamma-lxnp.sqrt(Gamma))/np.sqrt(2Gamma)])
Missing parentheses at denominator: a/bc =/ a/(bc)
I found so many bug during the C rencoding process. You should check your code using simulate script of an IMU or use it in real implementation...
The text was updated successfully, but these errors were encountered: