# Hexa suddenly climbs \*fast\* in position hold mode

**URL:** <https://discuss.px4.io/t/hexa-suddenly-climbs-fast-in-position-hold-mode/6938>\
**Category:** Flight Testing & Log Analysis\
**Created:** [June 19, 2018, 3:29pm UTC](https://discuss.px4.io/t/hexa-suddenly-climbs-fast-in-position-hold-mode/6938 "2018-06-19T15:29:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DavideACucci](https://discuss.px4.io/letter_avatar_proxy/v4/letter/d/53a042/32.png) [@DavideACucci](https://discuss.px4.io/u/DavideACucci)\
**Post date:** [June 19, 2018, 3:29pm UTC](https://discuss.px4.io/t/hexa-suddenly-climbs-fast-in-position-hold-mode/6938/1 "2018-06-19T15:29:35Z")

</div>

A problem appeared (that was never there before) on my hexa. Now, when in **position hold** and sticks centered, it periodically goes up very fast for 5-10 m, then descends. This does not happen in manual mode.

The copter flew normally in a number of occasions and no changes were done in hardware/software.

I have a flight log here.

[https://logs.px4.io/plot\_app?log=a7160545-9b4a-4b4e-a6ab-ee69af11cc39](https://logs.px4.io/plot_app?log=a7160545-9b4a-4b4e-a6ab-ee69af11cc39)

A few observations:

- position hold was engaged approx at -10m (the copter stays around that value, except for the jumps)
- the mentioned effect appears three times from minute 15 to 16.
- I feel that the Z position estimate is not correct, as _visually_ the copter was climbing much more than the 1-2 meters reported in the logs.
- Also, from 15:25 to 15:35 the estimated velocity is about -0.5 m/s, but the position estimate does not change in that time frame (always approx -9.5m)

Does anybody have any clue of what is happening?

---

<div class="post-metadata">

**Author:** ![tumbili](https://discuss.px4.io/user_avatar/discuss.px4.io/tumbili/32/3779_2.png) [@tumbili](https://discuss.px4.io/u/tumbili)\
**Post date:** [June 21, 2018, 6:23am UTC](https://discuss.px4.io/t/hexa-suddenly-climbs-fast-in-position-hold-mode/6938/2 "2018-06-21T06:23:28Z")

</div>

Your log seems to be lacking the estimator status topic and many others. We cannot analyze it this way. Is this a custom firmware?

---

<div class="post-metadata">

**Author:** ![DavideACucci](https://discuss.px4.io/letter_avatar_proxy/v4/letter/d/53a042/32.png) [@DavideACucci](https://discuss.px4.io/u/DavideACucci)\
**Post date:** [June 21, 2018, 1:03pm UTC](https://discuss.px4.io/t/hexa-suddenly-climbs-fast-in-position-hold-mode/6938/3 "2018-06-21T13:03:42Z")

</div>

Yeah, you’re right. I had disabled most of the logs as I have several dropouts even if I am using the [suggested SD](https://dev.px4.io/en/log/logging.html).

Today I did another test. Here are the logs with the default set of topics. Please tell me if I should manually include more.

[https://logs.px4.io/plot\_app?log=9bb495d5-41fb-419d-bcba-b6d2735e0a58](https://logs.px4.io/plot_app?log=9bb495d5-41fb-419d-bcba-b6d2735e0a58)

The problem is clearly visible at minute ~4:20. The reference elevation is constant, yet the copter goes up, a lot, and fast. The actuator outputs are suddenly growing at minute 4:17.

I did other tests before this one and my sensation is that this happens in combination with yaw/roll/pitch setpoints (e.g., driving at a certain speed for a while). The last day there was high wind, and this was happening periodically even in position hold. Whereas today (almost no wind), the thing happened only after several seconds at ~4/5 m/s speed (in the beginning, when I fly at 2 m/s everything seems fine).

It is clear that the copter _knows_ it is going up, but it does not command the proper action to maintain elevation. I am using mostly default tuning parameters and the copter looks nice and stable, except for this.

Another interesting thing is the following. After min 3:40 the Z setpoint does not change at all, while the throttle on my radio does. It is not missing data, as I have checked the timestamps. Here is a plot of the two:

 ![](https://discuss.px4.io/uploads/default/original/2X/8/885d522ed597895471a8e490196d1230968b9de4.png)

My firmware is a custom variation of 1.6.5 stable, we have just some little modifications which don’t involve in any sense estimation or control.

As a side, I have the usual 3dr Ublox receiver + compass, plus the px4fmu\_v2 board. Is it normal that barometer and GPS elevation differ significantly? Shouldn’t the offset be compensated based on GPS at init?
