#ahrs #imu #api-bindings #no-std

no-std fusion-imu

Rust wrapper for the Fusion AHRS C library

3 releases

0.1.2 Jul 8, 2024
0.1.1 Jul 6, 2024
0.1.0 Jul 6, 2024

#930 in Algorithms

35 downloads per month

MIT license

1MB
1.5K SLoC

Rust 739 SLoC // 0.0% comments C 477 SLoC // 0.3% comments Python 141 SLoC // 0.1% comments

Fusion AHRS

Crates.io Docs CI License

This library provides idiomatic Rust bindings to the Fusion AHRS C library. See https://github.com/xioTechnologies/Fusion for algorithm details.

Usage

Bindings are generated from the C headers at build time using a build.rs script. This script also compiles the C library for the correct target. Both require a C compiler to be installed.

When cross-compiling for other targets you may get an error like:

fatal error: 'math.h' file not found

To solve this, set the FUSION_IMU_INCLUDE_PATH environment variable to the folder that contains the math.h header for the target you're compiling for.

Features

  • serde - Enables serde support for the input and output types of this crate.
  • defmt - Derives defmt::Format on the input and output types of this crate.

License

This crate is licenced under the MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT). The C library is licensed under the same license.

Dependencies

~0.3–3MB
~63K SLoC