-
Notifications
You must be signed in to change notification settings - Fork 12
Home
Using the Adafruit AHRS code, which in the source indicates it is derived from https://github.com/memsindustrygroup/Open-Source-Sensor-Fusion/ This location has lots of info, including that it is based on Freescale's version 4.2.2 Sensor Fusion library. NXP now has version 7.0.0 released.
In Resource 6, NXP says "...the equations of motion at the heart of this and many other fusion-based systems assume that all quantities are measured at the same moments in time. This may not even be possible to do, as there is no common set of sampling frequencies that apply to all sensors.The easiest way to deal with this problem is to ignore it via the simple expedient of polling all sensors at a fixed rate, while setting their internal sample rates high enough that you can ignore any sample time jitter. You might even want to sample at a much higher rate so that you can filter raw sensor samples to reduce noise. This approach has been taken by all prior versions of the sensor fusion library. Version 7.00 of the fusion library adds support for sensor hardware FIFOs." This, and more on pg 45. Suggests timing is v. important to get good performance. Same document, section 5.4, discusses calibration. Version 7 of the library performs magnetic calibration during use. Gyro and accelerometer calibration methods are also provided. Section 5.5 discusses adjustments that can be made to the Kalman filter parameters. Pg 81 states that it is expected for a gyro's zero offset to drift. See section 9.1.4 regarding expectations; getting 2-degree accuracy in heading is challenging. Also, a stationary sensor system isn't expected to work well due to assumptions in the Kalman filter - we need to keep this in mind while testing (in real-life use aboard a boat, not a problem). Section 11 talks about magnetic distortions/errors, and has a good list of references.
Reference 7 has performance graphs for the Fusion library when fed synthetic data from MatLab. Para 4.8.2 suggests that algorithm response to gyro step response is on the order of several seconds. See also tables 15-17 and para 4.8.5 - 4.8.7, which suggests we should get good stability within 1 degree when stationary, and accuracy around 2 degrees.
- https://github.com/SignalK/signalk-imu
- https://www.tindie.com/products/onehorse/ultimate-sensor-fusion-solution-mpu9250/
- kriswiner's Github repositories, including: https://github.com/kriswiner/EM7180_SENtral_sensor_hub/wiki/K.-Limits-of-Absolute-Heading-Accuracy-Using-Inexpensive-MEMS-Sensors and https://github.com/kriswiner/MPU6050/wiki/Affordable-9-DoF-Sensor-Fusion
- Estimation of heading using magnetometer and GPS
- Performance Improvement of Inertial Navigation System by Using Magnetometer with Vehicle Dynamic Constraints
- NXP User Guide to Sensor Fusion Library
- NXP Sensor Fusion Library Datasheet for Kinetis MCUs