Sudden CTUN.ALT altitude change during takeoff in AltHold


We are actively testing 3.4RC1 with Navio2 and have noticed a potential issue.

In this flight we took off right after reboot in AltHold until GPS had a good fix, you can see that by Nsats growing during takeoff. Despite the Ctun.DAlt input, copter kept climbing even though the throttle stick has been centered. This can be observed by the CTUN.BAlt. Suddenly, at about 15sec (which seems to correlate with Nsats) the Ctun.Alt and Ctun.DAlt experience a jump and copter levels at new altitude.

From my understanding this could be related to the initial altitude in EKF being set while climbing and until that copter keeps climbing as it sees altitude Ctun.Alt as zero. At the same time baro altitude readings are accurate. (866.5 KB)

Addressed in this PR.