mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 01:33:34 +08:00
125 lines
3.6 KiB
C
125 lines
3.6 KiB
C
/****************************************************************************
|
|
*
|
|
* Copyright (c) 2023 PX4 Development Team. All rights reserved.
|
|
*
|
|
* Redistribution and use in source and binary forms, with or without
|
|
* modification, are permitted provided that the following conditions
|
|
* are met:
|
|
*
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
* notice, this list of conditions and the following disclaimer.
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
* notice, this list of conditions and the following disclaimer in
|
|
* the documentation and/or other materials provided with the
|
|
* distribution.
|
|
* 3. Neither the name PX4 nor the names of its contributors may be
|
|
* used to endorse or promote products derived from this software
|
|
* without specific prior written permission.
|
|
*
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
* POSSIBILITY OF SUCH DAMAGE.
|
|
*
|
|
****************************************************************************/
|
|
|
|
/**
|
|
* Smooth takeoff ramp time constant
|
|
*
|
|
* Increasing this value will make climb rate controlled takeoff slower.
|
|
* If it's too slow the drone might scratch the ground and tip over.
|
|
* A time constant of 0 disables the ramp
|
|
*
|
|
* @unit s
|
|
* @min 0
|
|
* @max 5
|
|
* @group Multicopter Position Control
|
|
*/
|
|
PARAM_DEFINE_FLOAT(MPC_TKO_RAMP_T, 3.f);
|
|
|
|
/**
|
|
* Takeoff climb rate
|
|
*
|
|
* @unit m/s
|
|
* @min 1
|
|
* @max 5
|
|
* @decimal 2
|
|
* @group Multicopter Position Control
|
|
*/
|
|
PARAM_DEFINE_FLOAT(MPC_TKO_SPEED, 1.5f);
|
|
|
|
/**
|
|
* Altitude for 1. step of slow landing (descend)
|
|
*
|
|
* Below this altitude descending velocity gets limited to a value
|
|
* between "MPC_Z_VEL_MAX_DN" (or "MPC_Z_V_AUTO_DN") and "MPC_LAND_SPEED"
|
|
* Value needs to be higher than "MPC_LAND_ALT2"
|
|
*
|
|
* @unit m
|
|
* @min 0
|
|
* @max 122
|
|
* @decimal 1
|
|
* @group Multicopter Position Control
|
|
*/
|
|
PARAM_DEFINE_FLOAT(MPC_LAND_ALT1, 10.f);
|
|
|
|
/**
|
|
* Altitude for 2. step of slow landing (landing)
|
|
*
|
|
* Below this altitude descending velocity gets
|
|
* limited to "MPC_LAND_SPEED"
|
|
* Value needs to be lower than "MPC_LAND_ALT1"
|
|
*
|
|
* @unit m
|
|
* @min 0
|
|
* @max 122
|
|
* @decimal 1
|
|
* @group Multicopter Position Control
|
|
*/
|
|
PARAM_DEFINE_FLOAT(MPC_LAND_ALT2, 5.f);
|
|
|
|
/**
|
|
* Altitude for 3. step of slow landing
|
|
*
|
|
* Below this altitude descending velocity gets
|
|
* limited to "MPC_LAND_CRWL", if LIDAR available.
|
|
* No effect if LIDAR not available
|
|
*
|
|
* @unit m
|
|
* @min 0
|
|
* @max 122
|
|
* @decimal 1
|
|
* @group Multicopter Position Control
|
|
*/
|
|
PARAM_DEFINE_FLOAT(MPC_LAND_ALT3, 1.f);
|
|
|
|
/**
|
|
* Landing descend rate
|
|
*
|
|
* @unit m/s
|
|
* @min 0.6
|
|
* @decimal 1
|
|
* @group Multicopter Position Control
|
|
*/
|
|
PARAM_DEFINE_FLOAT(MPC_LAND_SPEED, 0.7f);
|
|
|
|
/**
|
|
* Land crawl descend rate
|
|
*
|
|
* Used below MPC_LAND_ALT3 if distance sensor data is availabe.
|
|
*
|
|
* @unit m/s
|
|
* @min 0.1
|
|
* @decimal 1
|
|
* @group Multicopter Position Control
|
|
*/
|
|
PARAM_DEFINE_FLOAT(MPC_LAND_CRWL, 0.3f);
|