In GUIDED mode I commanded the quad to take off to 2 metres at 17:38:32.044. It left the ground but got nowhere near to 2 metres altitude when at 17:38:34.049 takeoff finished*. Zooming in on the XKF1.PD graph I just see a 40cm increase in altitude before the drone thinks it has reached 2 metres:
Is it possible that having large baro drift before takeoff while the drone is armed will cause takeoff to use some out of date value for the start altitude?
Thanks!
*I am checking for when Mavlink message EXTENDED_SYS_STATE changes from MAV_LANDED_STATE_TAKEOFF to MAV_LANDED_STATE_IN_AIR to determine end of takeoff
This is why airports report the local pressure when a pilot approaches. Pressure changes all the time because of the weather.
If you want accurate altitude using pressure, you need a second pressure sensor at your base station.
Okay, it sounds like that is just the way it works. Thanks for confirming this. It was incredibly scary having the drone at 40cm above ground thinking it was at 2m.
It’s a shame as my use case needs the drone to always be armed and ready to take off.
I just had a thought which is if I measure the pressure at the time of arming, I can set a different takeoff altitude based on the pressure difference at takeoff time.
IMUs also drift, there is no way to know for sure that it is not moving.
The correct procedure is to arm and take off immediately. The action of arming tells the copter that after that moment it will start to move.