Gaining altitude in auto mission

while my plane was doing an auto mission at 100 meters terrain altitude it started gaining altitude in the last 4 lines, knowing that the terrain was lower than the home location.

the pixhawk I used had done almost 50 full auto missions and some were with harsh terrain more than the last mission.
I had checked the data log, everything is alright except that the plane was trying to pitch down by elevator(ch2=1700) but it still going up, also it didn’t cut the throttle down.

all the readings for airspeed, ground speed, GPS, sat num, mag_field, roll and mechanical failure was all fine

Please post a log. How bad were the vibrations?

https://drive.google.com/open?id=1Ifecmnm9qzFjjOeXrQUxk0Wo8pwrBxDM

i fount out that the pixhawk loaded a new terrain data during the mission and exactly when the plane start gaining altitude.

cloud you describe that for me please…

the automission was based on what altitude ? relative ? absolute ? or terrain ??