jmagnuson / ahrs-rs

A Rust port of Madgwick's AHRS algorithm
MIT License
34 stars 19 forks source link

Sign error #1

Closed jmagnuson closed 9 years ago

jmagnuson commented 9 years ago

When calculating error from gravity,

2.0*self.q[0]*self.q[1] - self.q[2]*self.q[3]

should be

2.0*self.q[0]*self.q[1] + self.q[2]*self.q[3]