Skip to content

Rust and Python bindings of the Adafruit / NXP Sensor Fusion filter

License

Notifications You must be signed in to change notification settings

gauteh/ahrs-fusion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Rust and Python bindings of the Adafruit / NXP Sensor Fusion filter

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages