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

AC_AttitudeControl: ensure yaw gets a FLTD default #26263

Merged
merged 3 commits into from
Feb 23, 2024

Conversation

andyp1per
Copy link
Collaborator

When people come to tune yaw D they need to have a FLTD set. There is no downside to not setting this by default

@amilcarlucas
Copy link
Contributor

I have it on the tuning guide, but a default is even better

@@ -137,7 +137,7 @@ class AC_AttitudeControl_Multi : public AC_AttitudeControl {
.imax = AC_ATC_MULTI_RATE_YAW_IMAX,
.filt_T_hz = AC_ATC_MULTI_RATE_RP_FILT_HZ,
.filt_E_hz = AC_ATC_MULTI_RATE_YAW_FILT_HZ,
.filt_D_hz = 0.0f,
.filt_D_hz = AC_ATC_MULTI_RATE_RP_FILT_HZ,
Copy link
Member

Choose a reason for hiding this comment

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

Its a bit upsetting that its using RATE_RP (roll pitch) but filt T is the same....

In fact filt_E is useing AC_ATC_MULTI_RATE_YAW_FILT_HZ and filt_T_hz is using AC_ATC_MULTI_RATE_RP_FILT_HZ its all a bit odd....

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeh, I can see how this is a little confusing or unclear. What would you suggest?

The end result is we want roll, pitch and yaw filter T and D to be the same (20.0)
roll and pitch filter E to be 0.0
yaw filter E to be 2.0

There is an opportunity here to make this clear for the future.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

LOL, I originally did a bigger change that changed the names but figured this was better for 4.5 :-P

@lthall
Copy link
Contributor

lthall commented Feb 22, 2024

After the meeting I believe the only change needed for clarity is the name of the variable to include Y for yaw.
AC_ATC_MULTI_RATE_RP_FILT_HZ to AC_ATC_MULTI_RATE_RPY_FILT_HZ

@peterbarker
Copy link
Contributor

I've cherry-picked Leonard's fixes for the naming into this PR.

In addition to fixing the defines in AP_CustomControl he's fixed the same defines in Copter.

I've tested that there's no compiler output change vs Andy's patch, so I believe that the one objection brought up at DevCall has been addressed. I'm marking this as MergeOnCIPass.

@rmackay9 rmackay9 merged commit 728d9a9 into ArduPilot:master Feb 23, 2024
92 checks passed
@andyp1per andyp1per deleted the pr-fltd-yaw-default branch February 24, 2024 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 4.5.0-beta3
Development

Successfully merging this pull request may close these issues.

None yet

7 participants