Pitch greater than LOIT_ANG_MAX

I set LOIT_ANG_MAX to 45 deg, and I expected full pitch command to cause the copter to stay near 45 deg while in Loiter mode. However, I see that the pitch consistently goes to 55 or 60 deg. Bin file: https://paste.c-net.org/BelizeReverse

Perhaps something about my copter makes it go to 60, but shouldnt at least DesPitch be near 45?

It looks like the angle is being limited by ANGLE_MAX,6000 as it should in modes other than Loiter.
I see you are definitely in Loiter and the angle should be limited by LOIT_ANG_MAX,45. This could possibly be a bug.
As a test set LOIT_ANG_MAX,0 and see how that affects the angle in Loiter mode. It should max out at 40 degrees.

There’s some oscillations happening too, in both pitch and roll, and they are affected by each other. Best to run Autotune before doing too much more testing.
Also set the BATT_FS parameters.

thanks. yeah i figure its a bug, just based on the fact that the behavior is not matching the parameter spec.

the oscillations are expected, due to the attachments on the drone (i am experimenting).

Not sure why it’s not respecting the parameter but you can see here what the Controller is trying to do:

Target velocity

1 Like

See param discription:

Loiter maximum pilot requested lean angle. Set to zero for 2/3 of PSC_ANGLE_MAX/ANGLE_MAX. The maximum vehicle lean angle is still limited by PSC_ANGLE_MAX/ANGLE_MAX

Its a pilot input param, relates to how the vehicle responds to pilot input. It does not constrain the maximum lean angle. Set PSC_ANGLE_MAX to limit the max lean angle in position controller modes.

1 Like

ah so it was in the docs the whole time. my bad.

Yeah, I thought you can set LOIT_ANG_MAX to some specific angle and that would be the limit in Loiter mode, or leave it at zero for 2/3 of PSC_ANGLE_MAX or ANGLE_MAX (whichever is in play).
This has been my experience so far.

My understanding is: in Loiter mode these are applied in this order:

  1. LOIT_ANG_MAX
  2. PSC_ANGLE_MAX
  3. ANGLE_MAX
    and having one set at zero falls back to the next in line.