Sudden descend switching to AltHold

This happens not every time, but I already faced that behavior three times in 10 recent missions.

I take off in Stabilize, climb at 1-2 meters and then switch to AltHold.
Copter falling down almost to the ground. And after half second it starts climbing again.

Here my throttle radio channel stays the same when I’ve switched to AltHold.
But desired climb rate drops to -130 for some reason.
CTUN.ThI is some strange saw too.

Finally after about a second all become stabilized.

What could be the reason?

2017-08-11 23-52-44.bin (944 KB)

I did some more tests and its look like this only happens when flying without GPS signal (i.e. indoors).

But this doesn’t happen everytime.

Is this a FW bug or some misconfiguration from my side?

Are you flying indoors? keep in mind that the atmospheric pressure changes rapidly due to your props moving the air around inside the room. you need an ultrasonic or laser based sensor to use Alt Hold indoors. I am quite quite new to the hobby , so take my advice with a pinch of salt…

I’m not flying indoors usually but sometimes I do short flights indoor for test purposes. I know that there could be light drift because of air moving. But that definitelly isn’t a case.

It was just like falling to the ground (see in my first log it falls from about 1m to 0.3 m in a half second, but actually descend was from ~1m to zero).

I have no understanding if this case is related to indors flying or not.
Even if it does then I would like to undestand why and when it could happen.

I’ve revieved my log several times and I didn’t found an answer why CTUN.Dcrt (desired climb) eventually dropped down to -120 right after switching from Stab to AltHold.

Today I’ve faced that falling again. This time it was flying outdoors with good GPS lock.

Behavior is the same: take off in Stab and switched to AltHold => copter dropped down instantly for about 0.5 meter and then holds normally (I was at ~2 meters height). This all happened very quickly, I think less then in a half second.

Logs also the same - after switching to AltHold there is a inexplicable DCrt drop:

Almost sounds like an throttle Mid issue

what position is your throttle in when you switch from stabilized mode to althold, if it is not anywhere near the mid point meaning 50% throttle it will drop altitude because you are telling it to descend instead of maintain position at 50% throttle above 50% it will start to climb.

My RC throttle stick was centered (RCIN 3 is about 1500)

By the way the same happened this weekend again. So I just avoiding to take-off in stab preffering alt-hold mode.

Where is your buzzer installed?

It is about 5 cm away from the FC.

I had the same issue only mine was glued on the pixhawk. I moved it away and it solved it. I dont think thats your issue if its not directly on the FC