Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sub: allow stabilized modes to reach more aggressive attitudes #29510

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Williangalvani
Copy link
Contributor

This increases ROLL_PITCH_INPUT_MAX (which is used elsewhere to constrain angle_max) and changes the joystick code to consume the now-relaxed angle_max parameter instead of a hardcoded 200.

Both changes ROLL_PITCH_INPUT_MAX and change the joystick code
to consume the now-relaxed angle_max parameter instead of a hardcoded angle.
@@ -150,6 +150,7 @@ void Sub::transform_manual_control_to_rc_override(int16_t x, int16_t y, int16_t

void Sub::handle_jsbutton_press(uint8_t _button, bool shift, bool held)
{
float angle_max = aparm.angle_max/10; // convert from deg*100 to deg*10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really in decidegrees?! That's not a unit we've really used in ArduPilot.

I mean, I can see that it's multiplying a centdegrees by 10, which would give decidegrees, but isn't this really "your maximum trim angle is 10% of your maximum angle in degrees

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
float angle_max = aparm.angle_max/10; // convert from deg*100 to deg*10
const float trim_angle_max = aparm.angle_max * 0.1; // trim angle is 10% of the maximum angle (degrees)

Copy link
Contributor Author

@Williangalvani Williangalvani Mar 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm this was checked on a realvehicle. I did find it weird but I assumed it was just some ardusub oddty. Now think it is a deeper issue of how trim is being done. I'll think about it a bit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants