Several attitude estimators written in pure Python as classes are included with
AHRS in the module
filters, and they can be accessed easily with a
For example, importing the QUEST estimator is simply done with:
>>> from ahrs.filters import QUEST
Most estimators are built to be working with signals of low-cost strapdown navigation systems. Three types of sensors are mainly used to this purpose:
- Gyroscopes measure the angular velocity.
- Accelerometers measure the acceleration (rate of change of velocity).
- Magnetometers measure the geomagnetic field.
Gyroscopes, provide good short-term reliability and resistance to vibration, accelerometers provide information that is reliable over time, and magnetometers provide heading information in addition to limited attitude information (pitch and roll).
For an attitude estimation we encounter two common strategies:
- Instantaneous estimation calculates the attitude using vectors in two frames (a body frame and a known reference frame). It finds the attitude in a single point in time, whitout necessarily considering the kinematics of the objective. Ideally, this works with a system in a quasi-static state. Thus, this estimation is sometimes called Static Attitude Determination.
- Recursive estimation not only uses vectorial observations, but also takes the system dynamics into account to capture and predict the behaviour of the system. Because the system kinematics are considered, these type of strategy is also called Dynamic Attitude Determination.
The most accurate estimators are the dynamic ones, but the are, generally, more computationally demanding, against the much simpler and faster static estimators.
The following algorithms are implemented in this package:
- Attitude from angular rate
- Algebraic Quaternion Algorithm
- Complementary filter for Quaternion estimation
- Davenport’s q-Method
- Extended Kalman Filter
- Fast Accelerometer-Magnetometer Combination
- Fast Linear Attitude Estimator
- Fourati’s nonlinear attitude estimation
- Factored Quaternion Algorithm
- Madgwick Orientation Filter
- Mahony Orientation Filter
- Optimal Linear Estimator of Quaternion
- Recursive Optimal Linear Estimator of Quaternion
- Super-fast Attitude from Accelerometer and Magnetometer
- Attitude from gravity (Tilt)