mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
FW position control: catapult/hand-launch: enable without launch detection
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
parent
6fec452c4b
commit
974ead4015
@ -1551,8 +1551,7 @@ FixedwingPositionControl::control_auto_takeoff(const hrt_abstime &now, const flo
|
||||
_launchDetector.forceSetFlyState();
|
||||
}
|
||||
|
||||
if (!_launch_detected && _launchDetector.getLaunchDetected() > launch_detection_status_s::STATE_WAITING_FOR_LAUNCH
|
||||
&& _param_fw_laun_detcn_on.get()) {
|
||||
if (!_launch_detected && _launchDetector.getLaunchDetected() > launch_detection_status_s::STATE_WAITING_FOR_LAUNCH) {
|
||||
_launch_detected = true;
|
||||
_launch_global_position = global_position;
|
||||
_takeoff_ground_alt = _current_altitude;
|
||||
@ -1577,8 +1576,7 @@ FixedwingPositionControl::control_auto_takeoff(const hrt_abstime &now, const flo
|
||||
}
|
||||
|
||||
/* Set control values depending on the detection state */
|
||||
if (_launchDetector.getLaunchDetected() > launch_detection_status_s::STATE_WAITING_FOR_LAUNCH
|
||||
&& _param_fw_laun_detcn_on.get()) {
|
||||
if (_launchDetector.getLaunchDetected() > launch_detection_status_s::STATE_WAITING_FOR_LAUNCH) {
|
||||
/* Launch has been detected, hence we have to control the plane. */
|
||||
|
||||
float target_airspeed = adapt_airspeed_setpoint(control_interval, takeoff_airspeed, adjusted_min_airspeed, ground_speed,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user