-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
Split up control methods for backtransition #23893
base: main
Are you sure you want to change the base?
Conversation
…sition Signed-off-by: RomanBapst <bapstroman@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you already some flight testing results to share? I'm curious to see if it really makes a difference to control heading in the Descend case or not.
_npfg.setAirspeedNom(_performance_model.getCalibratedTrimAirspeed() * _eas2tas); | ||
_npfg.setAirspeedMax(_performance_model.getMaximumCalibratedAirspeed() * _eas2tas); | ||
|
||
Vector2f virtual_target_point = Vector2f(cosf(_backtrans_heading), sinf(_backtrans_heading)) * 100.0f; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make a comment for the "100" magic number? Is it enough for all types of VTOLs?
@sfuhrer Yes, the reason I implemented this was actually because the test vehicle flew a turn with the previous implementation, which was just to set roll to 0. I guess it makes a big difference it you have crosswind or not. |
} | ||
|
||
Vector2f airspeed_vector = Vector2f(cosf(_local_pos.heading), sinf(_local_pos.heading)) * true_airspeed; | ||
Vector2f ground_speed = airspeed_vector - _wind_vel; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sfuhrer Sign error
Signed-off-by: RomanBapst <bapstroman@gmail.com>
true_airspeed = _performance_model.getCalibratedTrimAirspeed() * _eas2tas; | ||
} | ||
|
||
Vector2f airspeed_vector = Vector2f(cosf(_local_pos.heading), sinf(_local_pos.heading)) * true_airspeed; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RomanBapst have you checked in simulation how well this works with a high crosswind backtransition? As there the course is not equal tot he heading, so this assumption here gets stretched...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sfuhrer I will run a simulation with high wind and post results here.
Solved Problem
Previously, the method to control a transition to hover was handling both cases when position was available, and when it was not available.
It's cleaner to have the methods separates for once. Other than that, the method which controls the transition for the case when position is not available, now does heading hold, which is better than just demanded 0 roll, which was done previously.
Changelog Entry
Control heading during backtransition when local position is not available.
Test coverage
Currently tested in SITL, following up with plots from real tests.
Context
Related links, screenshot before/after, video