New Loiter testing

This topic is for discussion of “New Loiter” - a new feature in Copter-3.6

1 Like


I would like to know if this new feature could help to have more accurate control and “braking” for the drone.

I have following unwanted behavior with the old loiter (AC 3.5.5):

The drone is speed up to about 10 m/s on loiter mode and then control stick are released (centered). Drone will “brake” for a moment, where it loses half of the speed and after that it will level itself and continue slow deceleration (gliding) for more than 10 meters (depends on initial speed). Looks like freight train stop.
With slow speeds (<5 m/s) there is no behavior like this.

On AltHold mode the drone is behaving nicely (as the pilot controls it).
The drone is about 4 kg, with very rigid body and low vibrations. Size about 50x50cm (motor to motor).

PID’s aren’t fine tuned but those are good enough.


Sorry, I thought you were saying the new version still had this problem.

Yes these changes should help address this problem.

You can separately define the breaking behaviour.

Thank you,

I will try the new feature as soon as it is available as firmware binary and the version is at least known to be semi-stable.

I don’t have enough trust to my skills to do it from source. I’ll report back how it works when I get to use it.

Btw, is there a estimation when next 3.6 update is due?

If its going to be a long time, then i need to try the 3.6 -dev version. Any ideas how to minimize risks with -dev version, so I could test this feature?

Flown here with a 600 helicopter. It worked as expected on the first flight test with the defaults. I may tweak the braking a bit but no functional issues noted.

@Leonardthall my PSC_ANGLE_MAX setting defaulted to zero so it’s using the ANGLE_MAX setting for my test heli, which I have set to 70 degrees (mainly for banking in turns). So if I enter a value for PSC_ANGLE_MAX that will limit my maximum requested bank and pitch angle only in Loiter? Or will apply to auto flight mode as well?

I’m trying to figure out the relationship between PSC_ANGLE_MAX, ANGLE_MAX, and WPNAV_LOIT_ANGM. And how they are supposed to interact in the different flight modes.

I have not seen any issues yet. It handles wind fine. But seems a little overly aggressive in Loiter. Just want to understand the interaction better so I can still get my turning performance (bank angle) in Auto Flight Mode, but limit handling performance in Loiter for smooth precision maneuvering. For heli I am using Pos Hold for GPS augmented flying mode.


Hi Chris
So the way we decided that some users would be more comfortable flying manually with less maximum roll and pitch angle than they would be happy letting the autoplot fly. So ANGLE_MAX will be used if PSC_ANGLE_MAX is set to zero but if you set PSC_ANGLE_MAX the position controller will use it even if it is larger than ANGLE_MAX.

WPNAV_LOIT_ANGM is will only be used if it is less than the angle being used by the position controller. So the only reason to set this variable is if you want Loiters maximum commanded angle to be less than the position control maximum angle. The position control will then pass on the pilot commanded angle plus up to the PSC maximum angle to fight the wind.

So by default the Loter maximum angle is 2/3 the position controller maximum angle. This gives the position controller some additional freedom to fight the wind.

I hope that is clear. We have tried to make sensible decisions here while catering to a wide range of users.

I am sorry I don’t know. Randy is trying to keep them pretty regular so I don’t expect it to be a long time.

Master is kept pretty safe now days as there is a lot of work and checks done on code before it goes in. However, this is the newest and therefore most likely code to have issue. We do have an occasional bug or issue that is found in testing but this is what the master branch is for. We generally suggest that people test the code on less expensive and critical aircraft and when doing so be especially vigilant and safety aware.

Having said that Chris above is doing his testing on a 600 Heli but he is a talented pilot who is able to land the aircraft in other modes if needed.

Just be aware that Master is new and relatively untested code compared to the release code.

1 Like

Hi Leonard. I think I understand it and your explanation sort of validates an hour or so of experimentation I did with the settings late this afternoon. So basically,

  1. PSC_ANGLE_MAX = 0 means ANGLE MAX is used
  2. PSC_ANGLE_MAX >0 has priority over ANGLE_MAX for the position controller
  3. WPNAV_LOIT_ANGM is the pilot commanded angle in loiter. But it will use up to PSC_ANGLE_MAX or ANGLE_MAX to fight wind (depending on these settings)

It seems to work as advertised so far. It didn’t do anything it shouldn’t and when I was playing with those settings trying to figure it out the result was what is described. I think I like this implementation better than the alpha I tested last year. The problems with holding in the wind are gone. And the braking works better - it’s smoother and more precise.

I noticed my ACCEL_Z_P parameter carried over to the corresponding position controller param. That was one of the first things I checked. I’m gonna have to take a look at the code to see how you did that :grinning:

What I like to do is test it in stages. Start with the basic flight mode - Stabilize or Acro, which ever you prefer. Fly it and note any abnormalities. If everything seems fine progress to Altitude Hold and test that. If you note anything wrong keep Acro on tap to recover with the flip of a switch. Short of the rate controller blowing up (which is not likely) you can recover from anything in Acro.

Then go to Loiter finally and test that. Again, keep that one-switch-flip to Acro on tap in case something goes wrong.

Finally progress to Auto and test that. Still keeping that Acro switch handy.

I have not gotten to Auto yet. Still testing New Loiter.

Did a flight on latest master today and spent some time in New Loiter mode. I really like it - very good replacement for conventional loiter.

One thing that I will probably change before next flight: auto-brake a bit earlier (0.3 seconds instead of 1.0) and slightly less intensive (maybe -30%). But this is just personal preference - the defaults are perfectly reasonable IMHO.

My copter was a rather light setup, 17", 6s, around 3kg, no payload (tuned to fly between 3.7 and 4kg). Weather was very nice, only a very calm breeze (maybe 2-5kts).


Yes, we deliberately made the delay long and the breaking assertive so that people could clearly see the transition to breaking. I personally like the larger delay myself because I like to fly the aircraft to a stop like I would in Alt Hold, and then let the breaking catch any velocity I didn’t get all the way to zero.

I am glad you liked it!!

I’ll hopefully get it some extensive “New Loiter” testing on my SkyViper tomorrow…if the rain and winds hold off

1 Like

Flight video and log comparing New Loiter vs PosHold on the Sky viper. It was a rather breezy day, so I didn’t do anything crazy. Mainly watching how well it hovered in place and braking. my overall impression in this first flight was that PosHold appeared to be keeping steady better than Loiter. But this is only a single data point. My SV appeared to be doing a lot of drifting around when in loiter while fighting the wind.



Hi, Thanks for the feedback.

I don’t think this is possible as both Pos Hold and Loiter both use exactly the same controller and settings when hovering in place. I suspect it was just down to the level of wind and turbulence at the time. The difference between Pos Hold and Loiter happens when you touch the sticks. Pos Hold runs Alt Hold on whatever stick you have moved and continues to run Loiter on the other axis that you are not moving (quick and basic description of Pos Hold here).

Thanks for giving me your feedback on the breaking timing and aggressiveness too!! I will be interested to see what settings you end up with there.

I guess I don’t totally get the difference then. The only thing I’ve noticed is that PosHold is, by default, more aggressive, but that’s just a setting. But in common usage, I like PosHold because it always seems to hold position better than Loiter. Other than that the handling feels the same…

I want to have some more time with new Loiter… weather and life hasn’t cooperated. What were the specific goals that I should be testing for which have changed in the new Loiter?


Hi Lordneeko,

That is actually great feedback. That is the goal. If everybody feels that way I will have done well!


Regarding the new Loiter after update to the firmware I did not see the option to select the new loiter. Does the new firmware automatically replace the old flight modes like the stock Loitor? I am hoping that we would have control to use Old loiter and New as a flight mode option to fully test and evaluate the best mode to choose. when testing I did notice that we have more control via the stick but i also seeing less lock and some toilet bolling and no breaking at all. however this could be me rushing the GPS lock. I did roll back to stable and the toilet issues were gone. Thanks for your dedication and hard work.

The new loiter is the default. These are fundamental changes to the position controller so there is no option to share the two as separate modes.

There are some small controller changes so there may be small variation in the position lock until we work out the best default parameters to use.
These changes do not effect the tendency to toilet bowl.
Breaking has a complete set of parameters to define it so you can set it to your needs.

Hope this helps.