altitude hold

The altitude hold function on the apm2.5 seems to be very unstable and I have tried all the fixes/suggestions I can find on the forums to no avail. It seems I can get the quad to hover if I am climbing relatively fast when I go to the alt hld mode. If I hover for 10 seconds before engaging the altitude hold the quad will slowly descend to the ground and at times will oscillate( tried oscillation fixes). Barometer covered etc. It would seem that throttle calculations are off by quite a bit. Has anyone got this mode to work in trustworthy manner? I certainly wouldn't trust the altitude function to be used in flying waypoints etc, its just to unstable. The quad flies very stable and handles great in stable mode.

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

Join diydrones

Email me when people reply –

Replies

  • I'm surprised a negative I term didn't cause instability. The I term accumulates error over time so the longer the quad is not at the correct height, the stronger the input signal gets to push it to the correct height. A negative term will still accumulate but it will act in the wrong direction. The longer the quad is at the wrong height, the stronger the push to keep it away from the correct height.
  • Althold def. worked better on 2.7.3 than in 2.8.0/1. Seems like fixing the gps issue in 2.7.3 did something evil to althold.

    Hopefully the current software does not use gps altitude information at all. BTW i coded an althold with baro/acc fusion for mwii wich gives me naza like results without throttlepid stuff or vario pid etc. Just 2 parameters for althold and one to compensate for fast movement. I know it's mathematically wrong, but it works. It can even be altered to reach a specific hight at desired speed.


    I include the code here again, this time i stripped it down to the core parts for an easy overview. I hope that a DEV can make something out of it.

    So long

    Kraut Rob

    MwiiBaroAccSkeleton.zip

  • Harley,

    I have been playing with alt hold as I noticed a few issues. There are a few recent threads that you should review.
    I have a few changes to make before I test again.
    What do you have? Sonar?
    Your altitude when you hover? More info is helpful. Do you have a log available?
    Randy
This reply was deleted.

Activity

DIY Robocars via Twitter
RT @chr1sa: Donkeycar 4.4 released with tons of new features, including path learning (useful with GPS outdoors), better Web and Lidar supp…
Nov 27
DIY Robocars via Twitter
RT @NXP: We are already biting our nails in anticipation of the #NXPCupEMEA challenge! 😉 Did you know there are great cash prizes to be won…
Nov 24
DIY Robocars via Twitter
RT @gclue_akira: レースまであと3日。今回のコースは激ムズかも。あと一歩 #jetracer https://t.co/GKcEjImQ3t
Nov 24
DIY Robocars via Twitter
UC Berkeley's DIY robocar program https://roar.berkeley.edu/
Nov 24
DIY Robocars via Twitter
RT @chr1sa: The next @DIYRobocars autonomous car race at @circuitlaunch will be on Sat, Dec 10. Thrills, spills and a Brazilian BBQ. Fun…
Nov 24
DIY Robocars via Twitter
RT @arthiak_tc: Donkey car platform ... Still training uses behavioral cloning #TCXpo #diyrobocar @OttawaAVGroup https://t.co/PHBYwlFlnE
Nov 20
DIY Robocars via Twitter
RT @emurmur77: Points for style. @donkeycar racing in @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/Y2hMyj1…
Nov 20
DIY Robocars via Twitter
RT @SmallpixelCar: Going to @diyrobocars race at @UCSDJacobs https://t.co/Rrf9vDJ8TJ
Nov 8
DIY Robocars via Twitter
RT @SmallpixelCar: Race @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/kK686Hb9Ej
Nov 8
DIY Robocars via Twitter
RT @PiWarsRobotics: Presenting: the Hacky Racers Robotic Racing Series in collaboration with #PiWars. Find out more and register your inter…
Oct 23
DIY Robocars via Twitter
RT @Hacky_Racers: There will be three classes at this event: A4, A2, and Hacky Racer! A4 and A2 are based around UK paper sizing and existi…
Oct 23
DIY Robocars via Twitter
Oct 23
DIY Robocars via Twitter
Oct 19
DIY Robocars via Twitter
Oct 18
DIY Robocars via Twitter
RT @NeaveEng: Calling all UK based folks interested in @diyrobocars, @f1tenth, @donkey_car, and similar robot racing competitions! @hacky_r…
Oct 13
DIY Robocars via Twitter
RT @araffin2: 🏎️ After hours of video editing, I'm happy to share a best of my Twitch videos on learning to race with RL. 🏎️ Each part is…
Oct 13
More…