Crates.io | ahrs-fusion |
lib.rs | ahrs-fusion |
version | 0.4.0 |
source | src |
created_at | 2021-12-18 18:01:42.809514 |
updated_at | 2022-05-16 08:18:44.931318 |
description | Port of NXP Sensor Fusion (as written by Adafruit) |
homepage | |
repository | https://github.com/gauteh/ahrs-fusion |
max_upload_size | |
id | 500085 |
size | 111,144 |
Port of Adafruit NXP sensor fusion algorithms based on Kalman filters for rust.
This library is no_std
, and e.g. on ARM you need to provide implementations
for sinf(..)
and the likes. The easiest way to do that is to just extern link
to e.g.: cmsis_dsp
(see this link for more explanation) and selecting one of the implementations to
provide the math functions.
To use micromath
:
$ cargo add cmsis_dsp --features micromath
if you are not using the cmsis_dsp library, also add the following to your crate:
extern crate cmsis_dsp;
You can also use this small library through Python bindings. Enter the python
directory and install using pip
or e.g. maturin develop --release
in your virtual environment.
There is also a small command line utility that takes as its argument the
frequency, and reads accelerometer and gyroscope from stdin as CSV. It outputs
the rotated acceleration for every line. It can be built or installed by
enabling the build-bin
feature flag:
$ cargo install --feature build-bin --path .
$ echo 1,2,3,4,5,6 | ahrs-csv 10