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

Split up control methods for backtransition #23893

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

RomanBapst
Copy link
Contributor

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

…sition

Signed-off-by: RomanBapst <bapstroman@gmail.com>
Copy link
Contributor

@sfuhrer sfuhrer left a 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;
Copy link
Contributor

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?

@RomanBapst
Copy link
Contributor Author

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.

@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.
Also, I think this is cleaner in general.

}

Vector2f airspeed_vector = Vector2f(cosf(_local_pos.heading), sinf(_local_pos.heading)) * true_airspeed;
Vector2f ground_speed = airspeed_vector - _wind_vel;
Copy link
Contributor Author

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;
Copy link
Contributor

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...

Copy link
Contributor Author

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.

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