-
Notifications
You must be signed in to change notification settings - Fork 18k
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
TECS: Fix airspeed control during takeoff #27174
Changes from all commits
05272f1
a15417a
c1d113f
7c95fac
fa03001
04ec2b9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -142,12 +142,28 @@ const AP_Param::Info Plane::var_info[] = { | |
|
||
// @Param: TKOFF_THR_MAX_T | ||
// @DisplayName: Takeoff throttle maximum time | ||
// @Description: This sets the time that maximum throttle will be forced during a fixed wing takeoff without an airspeed sensor. If an airspeed sensor is being used then the throttle is set to maximum until the takeoff airspeed is reached. | ||
// @Description: This sets the time that maximum throttle will be forced during a fixed wing takeoff. | ||
// @Units: s | ||
// @Range: 0 10 | ||
// @Increment: 0.5 | ||
// @User: Standard | ||
ASCALAR(takeoff_throttle_max_t, "TKOFF_THR_MAX_T", 4), | ||
|
||
// @Param: TKOFF_THR_MIN | ||
// @DisplayName: Takeoff minimum throttle | ||
// @Description: The minimum throttle to use in takeoffs in AUTO and TAKEOFF flight modes, when TKOFF_OPTIONS bit 0 is set. Also, the minimum throttle to use in a quadpane forward transition. This can be useful to ensure faster takeoffs or transitions on aircraft where the normal throttle control leads to a slow takeoff or transition. It is used when it is larger than THR_MIN, otherwise THR_MIN is used instead. | ||
// @Units: % | ||
// @Range: 0 100 | ||
// @Increment: 1 | ||
// @User: Standard | ||
ASCALAR(takeoff_throttle_min, "TKOFF_THR_MIN", 60), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will now apply as the minimum throttle for a quadplane transition as well as a |
||
|
||
// @Param: TKOFF_OPTIONS | ||
// @DisplayName: Takeoff options | ||
// @Description: This selects the mode of the takeoff in AUTO and TAKEOFF flight modes. | ||
// @Bitmask: 0: When unset the maximum allowed throttle is always used (THR_MAX or TKOFF_THR_MAX) during takeoff. When set TECS is allowed to operate between a minimum (THR_MIN or TKOFF_THR_MIN) and a maximum (THR_MAX or TKOFF_THR_MAX) limit. Applicable only when using an airspeed sensor. | ||
// @User: Advanced | ||
ASCALAR(takeoff_options, "TKOFF_OPTIONS", 0), | ||
|
||
// @Param: TKOFF_TDRAG_ELEV | ||
// @DisplayName: Takeoff tail dragger elevator | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,11 +22,11 @@ const AP_Param::GroupInfo ModeTakeoff::var_info[] = { | |
// @Increment: 1 | ||
// @Units: m | ||
// @User: Standard | ||
AP_GROUPINFO("LVL_ALT", 2, ModeTakeoff, level_alt, 5), | ||
AP_GROUPINFO("LVL_ALT", 2, ModeTakeoff, level_alt, 10), | ||
|
||
// @Param: LVL_PITCH | ||
// @DisplayName: Takeoff mode altitude initial pitch | ||
// @Description: This is the target pitch for the initial climb to TKOFF_LVL_ALT | ||
// @Description: This is the target pitch during the takeoff. | ||
// @Range: 0 30 | ||
// @Increment: 1 | ||
// @Units: deg | ||
|
@@ -148,19 +148,19 @@ void ModeTakeoff::update() | |
|
||
if (plane.flight_stage == AP_FixedWing::FlightStage::TAKEOFF) { | ||
//below TAKOFF_LVL_ALT | ||
SRV_Channels::set_output_scaled(SRV_Channel::k_throttle, 100.0); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is now migrated to |
||
plane.takeoff_calc_roll(); | ||
plane.takeoff_calc_pitch(); | ||
plane.takeoff_calc_throttle(true); | ||
} else { | ||
if ((altitude_cm >= alt * 100 - 200)) { //within 2m of TKOFF_ALT ,or above and loitering | ||
if ((altitude_cm >= alt * 100 - 200)) { //within 2m of TKOFF_ALT, or above and loitering | ||
#if AP_FENCE_ENABLED | ||
plane.fence.auto_enable_fence_after_takeoff(); | ||
#endif | ||
plane.calc_nav_roll(); | ||
plane.calc_nav_pitch(); | ||
plane.calc_throttle(); | ||
} else { // still climbing to TAKEOFF_ALT; may be loitering | ||
plane.calc_throttle(); | ||
plane.takeoff_calc_throttle(); | ||
plane.takeoff_calc_roll(); | ||
plane.takeoff_calc_pitch(); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
QGC WPL 110 | ||
0 0 0 16 0.000000 0.000000 0.000000 0.000000 -35.363262 149.165237 584.390015 1 | ||
1 0 3 22 15.000000 0.000000 0.000000 0.000000 -35.361279 149.164230 100.000000 1 | ||
2 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.361229 149.163025 100.000000 1 | ||
3 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.364563 149.163773 100.000000 1 | ||
4 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.364384 149.164795 80.000000 1 | ||
5 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.361027 149.164093 80.000000 1 | ||
6 0 0 177 2.000000 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 | ||
7 0 3 189 0.000000 0.000000 0.000000 0.000000 -35.362915 149.162613 60.000000 1 | ||
8 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.363136 149.162750 60.000000 1 | ||
9 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.365467 149.164215 55.000000 1 | ||
10 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.365009 149.165482 39.889999 1 | ||
11 0 3 21 0.000000 0.000000 0.000000 1.000000 -35.363041 149.165222 0.000000 1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
QGC WPL 110 | ||
0 0 0 16 0.000000 0.000000 0.000000 0.000000 -35.363262 149.165237 584.390015 1 | ||
1 0 3 22 15.000000 0.000000 0.000000 0.000000 -35.361279 149.164230 100.000000 1 | ||
2 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.361229 149.163025 100.000000 1 | ||
3 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.364563 149.163773 100.000000 1 | ||
4 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.364384 149.164795 80.000000 1 | ||
5 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.361027 149.164093 80.000000 1 | ||
6 0 0 177 2.000000 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 | ||
7 0 3 189 0.000000 0.000000 0.000000 0.000000 -35.362915 149.162613 60.000000 1 | ||
8 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.363136 149.162750 60.000000 1 | ||
9 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.365467 149.164215 55.000000 1 | ||
10 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.365009 149.165482 39.889999 1 | ||
11 0 3 21 0.000000 0.000000 0.000000 1.000000 -35.363041 149.165222 0.000000 1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
QGC WPL 110 | ||
0 0 0 16 0.000000 0.000000 0.000000 0.000000 -35.363262 149.165237 584.390015 1 | ||
1 0 3 22 15.000000 0.000000 0.000000 0.000000 -35.361279 149.164230 100.000000 1 | ||
2 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.361229 149.163025 100.000000 1 | ||
3 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.364563 149.163773 100.000000 1 | ||
4 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.364384 149.164795 80.000000 1 | ||
5 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.361027 149.164093 80.000000 1 | ||
6 0 0 177 2.000000 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 | ||
7 0 3 189 0.000000 0.000000 0.000000 0.000000 -35.362915 149.162613 60.000000 1 | ||
8 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.363136 149.162750 60.000000 1 | ||
9 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.365467 149.164215 55.000000 1 | ||
10 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.365009 149.165482 39.889999 1 | ||
11 0 3 21 0.000000 0.000000 0.000000 1.000000 -35.363041 149.165222 0.000000 1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
QGC WPL 110 | ||
0 0 0 16 0.000000 0.000000 0.000000 0.000000 -35.363262 149.165237 584.390015 1 | ||
1 0 3 22 15.000000 0.000000 0.000000 0.000000 -35.361279 149.164230 100.000000 1 | ||
2 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.361229 149.163025 100.000000 1 | ||
3 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.364563 149.163773 100.000000 1 | ||
4 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.364384 149.164795 80.000000 1 | ||
5 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.361027 149.164093 80.000000 1 | ||
6 0 0 177 2.000000 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 | ||
7 0 3 189 0.000000 0.000000 0.000000 0.000000 -35.362915 149.162613 60.000000 1 | ||
8 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.363136 149.162750 60.000000 1 | ||
9 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.365467 149.164215 55.000000 1 | ||
10 0 3 16 0.000000 0.000000 0.000000 0.000000 -35.365009 149.165482 39.889999 1 | ||
11 0 3 21 0.000000 0.000000 0.000000 1.000000 -35.363041 149.165222 0.000000 1 |
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.
This has been made common to both with- and without-airspeed cases. I believe it makes it easier to tell the various takeoff combinations apart, without negatively affecting the with-airspeed takeoffs.
The general idea is that they should be max-throttle by default anyways.