-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
FW position control add takeoff minimum pitch #11373
Conversation
@@ -1309,7 +1309,7 @@ FixedwingPositionControl::control_takeoff(const Vector2f &curr_pos, const Vector | |||
_parameters.throttle_max, // XXX should we also set runway_takeoff_throttle here? | |||
_parameters.throttle_cruise, | |||
_runway_takeoff.climbout(), | |||
radians(_runway_takeoff.getMinPitch(pos_sp_curr.pitch_min, 10.0f, _parameters.pitch_limit_min)), |
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.
comment only: additional benefit is removal of hidden hard-coded values like this 10 degree thing...
@dagar I've reviewed the code and as far as I can tell this looks good. One question: a long time ago you made a change that allowed the vehicle to bypass the Takeoff pitch/throttle behavior when switching to Takeoff Waypoint in the middle of flight. is that preserved? or maybe not even necessary anymore? |
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.
Lgtm
c9390ba
to
a47471c
Compare
Testing this in SITL is actually a bit difficult. Anyone interested in hand (or catapult) launch with gazebo? |
One thing I am still confused about: will this takeoff minimum pitch be valid until FW_CLMBOUT_DIFF or until MIS_TAKEOFF_ALT? or is it both (essentially whichever is greater)? |
actually you are right, this is hard to test in SITL. I don't know if it is due to the way the SITL model works, or if there is actually something else going on. I can't get the vehicle to behave differently during takeoff no matter what "Pitch" value I place in the TakeoffWP param. This doesn't match our experience in real flight test. Might have to go do some real flight tests on this. |
a47471c
to
e27f085
Compare
e27f085
to
3f5e3b9
Compare
Testing as part of #11845 |
We finally got out to flight test this PR. It works! It was tested on a lightly customized branch of 1.8.x firmware so it may need re-testing as part of 1.9.x, but the logic works. Fixed wing flight log: 4 short flights with FW_TKO_PITCH_MIN set to different values. You can see the vehicle's takeoff and climbout pitch behavior changes according to the parameter values. It is also successfully ignoring the default value set in QGC (15 degrees). |
Closing this in favor of #11845 |
This is currently passed through via mavlink, but I don't think it makes sense to set per mission. This is a vehicle parameter.