Alt Hold glitch - APM 2.0 - Firmware Heli 2.7.3

3689478238?profile=original

In my case Alt Hold worked always really nice, within 1 m in calm conditions, and still does.

But one incident scared me a bit. A few sec after switching to Alt Hold in about 5m, the heli dropped to the ground.  My first thought was a glitch caused by emf from the ESC. After I calmed down, I went for two other trials and like clockwork the same glitch again. But after the dropdowns I resumed flight with Alt Hold and it worked fine as always.

After a bit of analyzing the logs I came to the conclusion the glitch is caused by a kind of   ‘Alt error reset’ after the GPS status goes high. 

If you are in Alt Hold without GPS log  ( Alt Hold  needs no GPS log ) then as soon you get GPS log, the GPS status goes high, and the Alt error drops the same amount as your altitude to hold. If you in 5m the Alt error drops to -5 if you in 2m it drops to -2.

 

1. scare

3689478238?profile=original1.test

3689478405?profile=original2.test

3689478420?profile=original

So everything works fine as long as you have GPS log before switching to Alt Hold.

I think there needs to be looked in to this issue, to reduce the further scares :-))

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Randy

    That’s awesome  thanks a lot :-))

  • Developer

    After a quick discussion with Jason, I've checked in a small patch which should resolve this.

  • Developer

    @Manfred,

        Yup, should be fixed before 2.7.4 goes out.

  • Hi Randy

    Thanks for that

    That’s great you found the cause of it. Of course we can live with that for now, but maybe to solve it with the next update or so, to prevent further scares or even damage.

  • Developer

    Sorry, I've looked at the code again and it's not the home altitude that's the issue, it's actually that we reset the next_WP to home in the init_home function that is causing the problem.

  • Developer

    For now, I think you should ensure you have a gps lock before take-off.

  • Developer

    Manfred,

         Thanks for this detailed analysis.  So I've just looked at the code and what's happening here is that on the first gps lock the init_home is run.  This generally sets the horizonal position but it also appears to set the home altitude to 0.  I'll talk to a couple others on the dev team but I think we will change this so that the altitude is only set when you disarm the motors.

  • In my case Alt Hold worked always really nice, within 1 m in calm conditions, and still does.

    The barometer is covered.

    Everything works fine as long as you have GPS log before switching to Alt Hold.

  • Hi Ravi thanks

    I have no sonar, just barometer this are no emf problems.

  • hi manfred, i have you put the power filters on the sonar. do u have the shielded cable or the unshielded cable for sonar.

This reply was deleted.