I have tried several different IMU filters available in the sensor fusion toolbox MATLAB and found that they don't return the same answer each time despite being given the same data and no settings being changed between implementations, does anyone know why that is?
The filters/fusion methods I am having issues with are: complementaryFilter, ahrsfilter, and imufilter
The way I tested them (after noticing a problem with a larger section of code I was working on) was for example:
FUSE = complementaryFilter('SampleRate', 248.0159)
[complementary1,~] = FUSE(IMU(1).acc,IMU(1).gyro,IMU(1).mag);
[complementary2,~] = FUSE(IMU(1).acc,IMU(1).gyro,IMU(1).mag);
complementary1 == complementary2;
IMU(1).acc, IMU(1).gyro, and IMU(1).mag are accelerometer, gyroscope, and magnetometer values I have saved in a struct. The answer from this comparison was 0. I tested it with two other filters I was also using and the ans was 1. These filters/fusion methods that were consistent were ecompass (also available in the sensor fusion toolbox) and the open-source Madgwick filter. I would like to understand why the answer is different every time for these three filters