A fork of jremington's AHRS library for the Adafruit LSM9DS1
Find a file
2024-06-25 11:04:31 +00:00
calibration First iteration of the implementation 2024-06-22 11:41:15 +02:00
src First iteration of the implementation 2024-06-22 11:41:15 +02:00
.gitignore Initial commit 2024-06-14 10:30:39 +00:00
LICENSE Initial commit 2024-06-14 10:30:39 +00:00
README.md Update README.md 2024-06-25 11:04:31 +00:00
sample_main.cpp Did some calibration 2024-06-22 13:11:26 +02:00

LSM9DS1-Adafruit-AHRS

This library is a Mahony-based AHRS and Tilt compensated compass for ESP32s and the LSM9DS1 sensor, written and tested for the Adafruit LSM9DS1 breakout board, using I2C connection on a Tiny S3 (ESP32) using PlatformIO. This library is a a fork of jremington's AHRS library for the sensor of the same name, however it utilizes Adafruits's LSM9DS1 library instead of the Sparkfun one and operates using C++ instead of Arduino conventions. This library is not affiliated with Adafruit.

Image of the IMU

This library was written to support the Ringinator project and to better understand the science behind Mahony.

Installation

All you need to do is to copy this folder into the /lib folder of your PlatformIO project and add lib_deps = lib/LSM9DS1_Adafruit_AHRS to your init file.

How to use

Calibration

first run the mega_calibration.cpp on your Microcontroller and then copy the code snippets into the library file.

Absolute orientation

Simply import the headers and take a look at the sample_main.cpp file

Commentary

The implementation does not fully work, because the up-vector seems to be tilted, causing the horizontal plane to be tilted as well. You can visualize the output using this guide

Dependencies