Altitude formula in crazyflie-firmware

Firmware/software/electronics/mechanics
Post Reply
Mitteau
Expert
Posts: 248
Joined: Fri Jan 29, 2016 6:00 am

Altitude formula in crazyflie-firmware

Post by Mitteau »

Hi,
I am not satisfied with the values of altitude above sea level that I can see on the Crazyflie python client. Sensor seems to be really unprecise and a look at the firmware shows a very costly formula, using pow function. Furthermore, I am not sure that the formula is correct and I replace "standard atmosphere" with a linear approximation. Here you can see the formulas in a human readable mathematical language:
P_20171124_174016.jpg
The approximation works under 2000 meters. It has to be modified to fly in higher altitudes.
The difference is only a few meters. This is not a problem to althold assistance which uses differences.
Regards.
Jean-Claude
Post Reply