ahrs-fusion

Crates.ioahrs-fusion
lib.rsahrs-fusion
version0.4.0
sourcesrc
created_at2021-12-18 18:01:42.809514
updated_at2022-05-16 08:18:44.931318
descriptionPort of NXP Sensor Fusion (as written by Adafruit)
homepage
repositoryhttps://github.com/gauteh/ahrs-fusion
max_upload_size
id500085
size111,144
Gaute Hope (gauteh)

documentation

README

AHRS Fusion

Port of Adafruit NXP sensor fusion algorithms based on Kalman filters for rust.

Linking

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;

Python bindings

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.

Using from the command-line

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

Resources

Commit count: 25

cargo fmt