AHRS: Attitude and Heading Reference Systems#
Welcome!ahrs
is an open source Python toolbox for attitude estimationusing the most known algorithms, methods and resources.
It is designed to be flexible and simple to use, making it a great option forfast prototyping, testing and integration with your own Python projects.
This package collects functions and utilities to help you understand and usethe most common techniques for attitude estimation, and in no way it isrecommended to be used commercially.
All algorithms and implementations have their proper documentation andreferences, in case you need further clarification of their usage.
New in version 0.3#
TheWorld Magnetic Model (WMM)is fully implemented. It can be used to estimate all magnetic field elementson any given place of Earth for dates between 2015 and 2025.
Theellipsoid model of theWorld Geodetic System (WGS84)is included. A full implementation of theEarth Gravitational Model(EGM2008)isNOT available here, but the estimations of the main and derivedparameters of the WGS84 using the ellipsoid model are carried out.
TheInternational Gravity Formulaand the EU’sWELMEC normalgravity reference system are also implemented.
New class
DCM
(derived fromnumpy.ndarray
) for orientation/rotationrepresentations as 3x3 Direction Cosine Matrices.New class
QuaternionArray
to simultaneously handle an array with morequaternions at once.New submodule
frames
to represent the position of an object in differentreference frames.Metrics for rotationsin 3D spaces using quaternions and direction cosine matrices.
New operations, properties and methods for class
Quaternion
, now alsoderived fromnumpy.ndarray
.A whole bunch ofnew constant values(mainly for Geodesy) accessed from the top level of the package.
Docstrings are improved with further explanations, references and equationswhenever possible.
New and improved estimators include a short, but clear documentation withreferences. Many use different sensor arrays. The available algorithms are:
Algorithm | Gyroscope | Accelerometer | Magnetometer |
---|---|---|---|
AQUA | Optional | YES | Optional |
Complementary | YES | YES | Optional |
Davenport’s | NO | YES | YES |
EKF | YES | YES | YES |
FAMC | NO | YES | YES |
FLAE | NO | YES | YES |
Fourati | YES | YES | YES |
FQA | NO | YES | Optional |
Integration | YES | NO | NO |
Madgwick | YES | YES | Optional |
Mahony | YES | YES | Optional |
OLEQ | NO | YES | YES |
QUEST | NO | YES | YES |
ROLEQ | NO | YES | YES |
SAAM | NO | YES | YES |
Tilt | NO | YES | Optional |
TRIAD | NO | YES | YES |
Deprecations#
Submodulesio
andplot
are dismissed, removing dependecies on Scipy andmatplotlib. This decision was made with the intent to better focus on thealgorithmic part of the package.
Loading and visualizing the data is left to the preference of the user.