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

Plane: ATT.DesPitch now reports actual target, not nav output #28991

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

Conversation

Georacer
Copy link
Contributor

@Georacer Georacer commented Jan 2, 2025

Summary

This PR changes the logged quantity in ATT.DesPitch from Plane::nav_pitch_cd to the target value that actually gets passed to the pitch controller.

Details

Logging Plane::nav_pitch_cd in ATT.DesPitch gives the false impression that there's steady-state error in the pitch controller.

This PR improves log readability, as it already includes PTCH_TRIM_DEG and the contribution of KFF_THR2PTCH.

Plane::nav_pitch_cd is already logged in CTUN.

Testing

sim_vehicle.py was spun up and PTCH_TRIM_DEG=3 was set.
TAKEOFF mode was armed.

Before:
ATT.DesPitch and CTUN.NavPitch overlap.
Steady-state error is falsely logged.
Screenshot from 2025-01-02 11-59-11

After:
The three pitch quantites are clearly discernible.
Screenshot from 2025-01-02 11-58-48

@IamPete1
Copy link
Member

IamPete1 commented Jan 2, 2025

What happens in modes where stabilize_pitch_get_pitch_out is not called, like manual?

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