I was wondering if anyone has any idea about how to solve the following problem.
We are in the process of tuning our quadrotor UAV. We have got it to the stage were it flies reasonably well in manual mode. However, when we switched to altitude mode, the UAV began to drift upwards.
Looking at the flight log, it shows in the Local Position Z graph that the Z setpoint is increasing. However, the Manual Control Inputs graph shows that the throttle starts at below 50% and is decreased, but the Z set-point continues to increase.
If I remember correctly, this was mostly due to a lack of understanding of how position control mode works (and incomplete position controller tuning). My understanding is that in position control mode the position setpoint is set to the current position unless the throttle stick is within the dead-band. This makes it look like the setpoint was ignoring the input from the sticks, but really it was just because we hadn’t tuned the position controller well yet and the setpoint was reflecting the current position.
The only thing that stands out to me on the log is that the z-velocity diverges from the z-velocity setpoint around the 2:56 mark. It has been a while since I have worked on this type of thing, but it seems odd to me that the estimate would diverge from the setpoint like that but move as fast/suddenly as it did.
How much tuning have you done of the altitude controller?
What are you using to estimate altitude?