FemmeVerbeek / Arduino_LSM9DS1

LSM9DS1 Library for Arduino
Other
63 stars 14 forks source link

Spikes in Gyro #25

Open LazaroFilm opened 1 year ago

LazaroFilm commented 1 year ago

Has a solution been found for dealing with the spikes in the Gyro? I'm getting random spikes when at rest that are making my fusion filter go bonkers and prevents it from settling. Weirdly, the spikes are only on the Y axis gyro, and both on getRawGyro() and getGyro()

LazaroFilm commented 1 year ago

As seen in this screen shot taken in x-IMU2 GUI app (I'm using Fusion to fuse the sensor data from this library). You can see the green spikes (Y axis) on the gyro (top left), and you can see that they affect the orientation of the ARHS fusion algo. I have noted that the spikes are always around 18.9 and -18.5 deg/s, with the decimal changing a bit (I need to take longer samples and automate the spike detection) maybe we can simply remove it at least when at rest (IE, if previous value is <1 and so is the one right after, disregard that spike... that would allow for the Fusion algo to trigger the recalibration when at rest... Screenshot 2023-01-13 at 8 46 16 PM