mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-23 00:04:02 -04:00
Plane: added TKOFF_FLAP_PCNT and LAND_FLAP_PERCENT
easier control of flaps for takeoff and landing
This commit is contained in:
parent
b94bc0c243
commit
f66039c9b4
@ -843,6 +843,25 @@ static void set_servos(void)
|
|||||||
} else {
|
} else {
|
||||||
auto_flap_percent = g.flap_1_percent;
|
auto_flap_percent = g.flap_1_percent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
special flap levels for takeoff and landing. This works
|
||||||
|
better than speed based flaps as it leads to less
|
||||||
|
possibility of oscillation
|
||||||
|
*/
|
||||||
|
if (control_mode == AUTO) {
|
||||||
|
switch (flight_stage) {
|
||||||
|
case AP_SpdHgtControl::FLIGHT_TAKEOFF:
|
||||||
|
auto_flap_percent = g.takeoff_flap_percent;
|
||||||
|
break;
|
||||||
|
case AP_SpdHgtControl::FLIGHT_LAND_APPROACH:
|
||||||
|
case AP_SpdHgtControl::FLIGHT_LAND_FINAL:
|
||||||
|
auto_flap_percent = g.land_flap_percent;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// manual flap input overrides auto flap input
|
// manual flap input overrides auto flap input
|
||||||
|
@ -124,6 +124,8 @@ public:
|
|||||||
k_param_terrain_lookahead,
|
k_param_terrain_lookahead,
|
||||||
k_param_fbwa_tdrag_chan,
|
k_param_fbwa_tdrag_chan,
|
||||||
k_param_rangefinder_landing,
|
k_param_rangefinder_landing,
|
||||||
|
k_param_land_flap_percent,
|
||||||
|
k_param_takeoff_flap_percent,
|
||||||
|
|
||||||
// 100: Arming parameters
|
// 100: Arming parameters
|
||||||
k_param_arming = 100,
|
k_param_arming = 100,
|
||||||
@ -438,6 +440,8 @@ public:
|
|||||||
AP_Int8 flap_1_speed;
|
AP_Int8 flap_1_speed;
|
||||||
AP_Int8 flap_2_percent;
|
AP_Int8 flap_2_percent;
|
||||||
AP_Int8 flap_2_speed;
|
AP_Int8 flap_2_speed;
|
||||||
|
AP_Int8 land_flap_percent;
|
||||||
|
AP_Int8 takeoff_flap_percent;
|
||||||
AP_Int8 rssi_pin;
|
AP_Int8 rssi_pin;
|
||||||
AP_Float rssi_range; // allows to set max voltage for rssi pin such as 5.0, 3.3 etc.
|
AP_Float rssi_range; // allows to set max voltage for rssi pin such as 5.0, 3.3 etc.
|
||||||
AP_Int8 inverted_flight_ch; // 0=disabled, 1-8 is channel for inverted flight trigger
|
AP_Int8 inverted_flight_ch; // 0=disabled, 1-8 is channel for inverted flight trigger
|
||||||
|
@ -206,6 +206,14 @@ const AP_Param::Info var_info[] PROGMEM = {
|
|||||||
// @User: User
|
// @User: User
|
||||||
GSCALAR(takeoff_throttle_slewrate, "TKOFF_THR_SLEW", 0),
|
GSCALAR(takeoff_throttle_slewrate, "TKOFF_THR_SLEW", 0),
|
||||||
|
|
||||||
|
// @Param: TKOFF_FLAP_PCNT
|
||||||
|
// @DisplayName: Takeoff flap percentage
|
||||||
|
// @Description: The amount of flaps (as a percentage) to apply in automatic takeoff
|
||||||
|
// @Range: 0 100
|
||||||
|
// @Units: Percent
|
||||||
|
// @User: Advanced
|
||||||
|
GSCALAR(takeoff_flap_percent, "TKOFF_FLAP_PCNT", 0),
|
||||||
|
|
||||||
// @Param: FBWA_TDRAG_CHAN
|
// @Param: FBWA_TDRAG_CHAN
|
||||||
// @DisplayName: FBWA taildragger channel
|
// @DisplayName: FBWA taildragger channel
|
||||||
// @Description: This is a RC input channel which when it goes above 1700 enables FBWA taildragger takeoff mode. It should be assigned to a momentary switch. Once this feature is enabled it will stay enabled until the aircraft goes above TKOFF_TDRAG_SPD1 airspeed, changes mode, or the pitch goes above the initial pitch when this is engaged or goes below 0 pitch. When enabled the elevator will be forced to TKOFF_TDRAG_ELEV. This option allows for easier takeoffs on taildraggers in FBWA mode, and also makes it easier to test auto-takeoff steering handling in FBWA. Setting it to 0 disables this option.
|
// @Description: This is a RC input channel which when it goes above 1700 enables FBWA taildragger takeoff mode. It should be assigned to a momentary switch. Once this feature is enabled it will stay enabled until the aircraft goes above TKOFF_TDRAG_SPD1 airspeed, changes mode, or the pitch goes above the initial pitch when this is engaged or goes below 0 pitch. When enabled the elevator will be forced to TKOFF_TDRAG_ELEV. This option allows for easier takeoffs on taildraggers in FBWA mode, and also makes it easier to test auto-takeoff steering handling in FBWA. Setting it to 0 disables this option.
|
||||||
@ -849,6 +857,14 @@ const AP_Param::Info var_info[] PROGMEM = {
|
|||||||
// @User: Advanced
|
// @User: Advanced
|
||||||
GSCALAR(flap_2_speed, "FLAP_2_SPEED", FLAP_2_SPEED),
|
GSCALAR(flap_2_speed, "FLAP_2_SPEED", FLAP_2_SPEED),
|
||||||
|
|
||||||
|
// @Param: LAND_FLAP_PERCNT
|
||||||
|
// @DisplayName: Landing flap percentage
|
||||||
|
// @Description: The amount of flaps (as a percentage) to apply in the landing approach and flare of an automatic landing
|
||||||
|
// @Range: 0 100
|
||||||
|
// @Units: Percent
|
||||||
|
// @User: Advanced
|
||||||
|
GSCALAR(land_flap_percent, "LAND_FLAP_PERCNT", 0),
|
||||||
|
|
||||||
// @Param: RSSI_PIN
|
// @Param: RSSI_PIN
|
||||||
// @DisplayName: Receiver RSSI sensing pin
|
// @DisplayName: Receiver RSSI sensing pin
|
||||||
// @Description: This selects an analog pin for the receiver RSSI voltage. It assumes the voltage is 5V for max rssi, 0V for minimum
|
// @Description: This selects an analog pin for the receiver RSSI voltage. It assumes the voltage is 5V for max rssi, 0V for minimum
|
||||||
|
Loading…
Reference in New Issue
Block a user