View Code? Open in Web Editor
NEW
MatLAB and Python implementations for 6-DOF IMU attitude estimation using Kalman Filters, Complementary Filters, etc.
Home Page: http://philsal.co.uk/projects/imu-attitude-estimation
License: MIT License
MATLAB 43.37%
Python 56.63%
attitude-estimation's People
Contributors
attitude-estimation's Issues
The imu get_acc_angles()
function output is incorrect when the IMU is inverted (phi and theta converge back to 0).
It seems to be due to loss of sign in the 2nd argument to the atan2 calls. I'd like to figure out how to correct it.
|
def get_acc_angles(self): |
|
[ax, ay, az] = self.get_acc() |
|
phi = math.atan2(ay, math.sqrt(ax ** 2.0 + az ** 2.0)) |
|
theta = math.atan2(-ax, math.sqrt(ay ** 2.0 + az ** 2.0)) |
|
return [phi, theta] |
Thank you for the excellent article and sample code!