Replies: 2 comments 5 replies
-
So the function name is a bit misleading. What the function actually does is to compensate the accelerometers with the roll pitch trim values that is set by the user in the cfclient. This is usually done when the Crazyflie in manual flight hovering, has an noticeable bias towards one direction. The roll pitch trim values can be used to compensate for that. About the mathematical principle, this seems to just rotate the accelerometers axis with the roll pitch trim values by using rotation calculation, which seems legit.
|
Beta Was this translation helpful? Give feedback.
-
But I found that this sensorsAccAlignToGravity function does not work well in the case of large angles. I tried to tilt the accelerometer by about 30 degrees and apply this function, but the results did not align with gravity. |
Beta Was this translation helpful? Give feedback.
-
What is the mathematical principle of the sensorsAccAlignToGravity function?
How do I know the roll and pitch angles of the accelerometer in its initial state?
https://github.com/bitcraze/crazyflie-firmware/blob/master/src/hal/src/sensors_bmi088_bmp3xx.c#L926
Beta Was this translation helpful? Give feedback.
All reactions