-
-
Notifications
You must be signed in to change notification settings - Fork 105
Open
Description
The documentation:
https://ahrs.readthedocs.io/en/latest/filters/complementary.html
Attitude propagation
The following line adds a sign that seems to contradict the documentation. Why is that?
ahrs/ahrs/filters/complementary.py
Lines 247 to 253 in 9e02c5d
| w = -0.5*dt*omega | |
| A = np.array([ | |
| [1.0, -w[0], -w[1], -w[2]], | |
| [w[0], 1.0, w[2], -w[1]], | |
| [w[1], -w[2], 1.0, w[0]], | |
| [w[2], w[1], -w[0], 1.0]]) | |
| q_omega = A @ q |
Filter
Negate q_am in some cases? Why?
ahrs/ahrs/filters/complementary.py
Lines 315 to 319 in 9e02c5d
| if np.linalg.norm(q_omega + q_am) < np.sqrt(2): | |
| q = (1.0 - self.gain)*q_omega - self.gain*q_am | |
| else: | |
| q = (1.0 - self.gain)*q_omega + self.gain*q_am | |
| return q/np.linalg.norm(q) |
However, the filter seems to work OK...
Metadata
Metadata
Assignees
Labels
No labels