Closed nxdefiant closed 7 years ago
Oh, good catch. So the result of this bug would be that the code applies corrections from the accelerometer in way more situations than it was intended to; basically that if
statement will almost always be true. It would only be false if the acceleration.norm()
were exactly 0, or more than 2.
Near line 137 of minimu9-ahrs.cpp you are using abs() to compare with a float, however abs() only returns an integer, so its always zero for -1 < x < 1 You might want to use fabs() instead.