Reference Frame of Acceleration Data

Discussions and questions about the Crazyflie Nano Quadcopter
Post Reply
Posts: 1
Joined: Wed Feb 19, 2020 5:01 am

Reference Frame of Acceleration Data

Post by acxz »


I am having trouble understanding the acceleration observations on the Crazyflie Nano platform, specifically regarding the accelerations. (``)
When keeping the drone on the ground and reading ``, all of the values are near zero. `` is around 0.04. However, my understanding of accelerometer data is that it should be -9.8 when sitting flat on the ground. Is the `` in the world frame instead of the body frame? What is the logic/math behind the `` values?

I tried to search the forums for previous topics on this, but the best I could find was the following comment by @nicuvlad94, which was not answered due to being off topic. viewtopic.php?f=2&t=4125&p=18896#p18896

If someone can explain this, it would be much appreciated.
Thank you
Posts: 686
Joined: Fri Jul 06, 2018 11:13 am

Re: Reference Frame of Acceleration Data

Post by kimberly »


So we usually advice to look into the firmware to understand where this values are coming from. So let me give you some pointers right here:

The accelerometer values is estimated with a stateEstimator, which is either the Complementary or the Kalman filter. `` is in world coordinates, but originaly it comes out of the state estimator in body coordinates due to that accelerometers give out those values directly. Before the state estimator (for example: estimator_kalman.c) sends it values to the stablizer (.c), it transforms the body coordinates into world coordinates ( ... man.c#L404). So if you look into the kalmanCoreExternalizeState() function, you can also see comments of why the gravity vector was taken out of the acceleration. But if you make a logging variable of the estimated acceleration in the kalman filter file, this will be in body coordinates with gravity if I understood correctly.
Post Reply