Hi, did you solve this? Sounds like a scope, or casting issue.
I'm having a different problem with the IMU and I can see you have a IMU class with Gyro, Accel and Mag data incorporated. Is it for the MPU6886 + BMM150 sensors.
Would you be happy to let me have a look at :
IMU class .h & .cpp files. MahonyAHRS.h & .cpp files.I'm fighting with the MahonyAHRSUpdate I'm using. The calculations are diverging to NaN after just 2-3 calls and I'd like to compare your code to mine.
Thanks!