I cut corners on this specific point (by contrast with the other points, which I hope I got right ^^), but that should be a "smaller perturbation" compared with getting units / signs right:
the Kalman filter works by comparing the measurements it gets with the dynamic system evolution it expects from its internal model
to decide what to trust more or less, the Kalman filter needs error bars / uncertainties
these are from 2 sources: comparing the mismatch dynamic mode vs measurement (ie dynamic, from looking at how well the filter does), and a priori based on the expected noise level of the sensors
so, to do things really right, one should provide to the Kalman filter the expected noise characterisitcs of the exact sensor one is using, following the datasheet and or experimental measurements / tests
I did not do this and just used the typical default values (that probably correspond to a given set of accel / gyro / mag). But to do it really right, these parameters should be tuned:
I cut corners on this specific point (by contrast with the other points, which I hope I got right ^^), but that should be a "smaller perturbation" compared with getting units / signs right:
I did not do this and just used the typical default values (that probably correspond to a given set of accel / gyro / mag). But to do it really right, these parameters should be tuned:
https://github.com/adafruit/Adafruit_AHRS/blob/69b3a854be83d8b6c6d897d801882a222d1ae510/src/Adafruit_AHRS_NXPFusion.cpp#L41-L65
also if using gyro these should be adapted to the lat / lon:
https://github.com/adafruit/Adafruit_AHRS/blob/69b3a854be83d8b6c6d897d801882a222d1ae510/src/Adafruit_AHRS_NXPFusion.cpp#L66-L69
That may not play an as big role as the other effects, and may be a bit tricky to get right though...