2016-03-17 15:02:55 -03:00
# pragma once
2015-12-30 18:57:56 -04:00
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//
// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
//
// DO NOT EDIT this file to adjust your configuration. Create your own
// APM_Config.h and use APM_Config.h.example as a reference.
//
// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
///
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//
// Default and automatic configuration details.
//
// Notes for maintainers:
//
// - Try to keep this file organised in the same order as APM_Config.h.example
//
# include "defines.h"
///
/// DO NOT EDIT THIS INCLUDE - if you want to make a local change, make that
/// change in your local copy of APM_Config.h.
///
2016-02-20 15:32:42 -04:00
# include "APM_Config.h" // <== THIS INCLUDE, DO NOT EDIT IT. EVER.
2015-12-30 18:57:56 -04:00
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
// HARDWARE CONFIGURATION AND CONNECTIONS
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
# ifndef CONFIG_HAL_BOARD
2017-02-10 13:46:54 -04:00
# error CONFIG_HAL_BOARD must be defined to build ArduSub
2015-12-30 18:57:56 -04:00
# endif
//////////////////////////////////////////////////////////////////////////////
// HIL_MODE OPTIONAL
# ifndef HIL_MODE
2017-02-03 17:33:27 -04:00
# define HIL_MODE HIL_MODE_DISABLED
2015-12-30 18:57:56 -04:00
# endif
# define MAGNETOMETER ENABLED
// run at 400Hz on all systems
# define MAIN_LOOP_RATE 400
# define MAIN_LOOP_SECONDS 0.0025f
# define MAIN_LOOP_MICROS 2500
2016-03-01 21:39:23 -04:00
# ifndef SURFACE_DEPTH_DEFAULT
2017-02-03 17:33:27 -04:00
# define SURFACE_DEPTH_DEFAULT -10.0f // pressure sensor reading 10cm depth means craft is considered surfaced
2016-03-01 21:39:23 -04:00
# endif
2015-12-30 18:57:56 -04:00
//////////////////////////////////////////////////////////////////////////////
// PWM control
// default RC speed in Hz
2016-12-07 12:43:30 -04:00
# ifndef RC_SPEED_DEFAULT
2017-02-03 17:33:27 -04:00
# define RC_SPEED_DEFAULT 200
2015-12-30 18:57:56 -04:00
# endif
2016-11-29 12:53:48 -04:00
//////////////////////////////////////////////////////////////////////////////
// Circle Nav parameters
//
# ifndef CIRCLE_NAV_ENABLED
# define CIRCLE_NAV_ENABLED DISABLED
# endif
2016-11-25 23:55:35 -04:00
//////////////////////////////////////////////////////////////////////////////
// Channel 6 Tuning
//
# ifndef CH6_TUNE_ENABLED
# define CH6_TUNE_ENABLED DISABLED
# endif
2016-11-25 21:06:18 -04:00
//////////////////////////////////////////////////////////////////////////////
// Aux Switches
//
# ifndef AUXSW_ENABLED
# define AUXSW_ENABLED DISABLED
# endif
2016-11-25 18:58:31 -04:00
//////////////////////////////////////////////////////////////////////////////
// RPM
//
# ifndef RPM_ENABLED
# define RPM_ENABLED DISABLED
# endif
2016-11-25 19:26:28 -04:00
//////////////////////////////////////////////////////////////////////////////
// RCMAP
//
# ifndef RCMAP_ENABLED
# define RCMAP_ENABLED DISABLED
# endif
2015-12-30 18:57:56 -04:00
//////////////////////////////////////////////////////////////////////////////
2016-05-22 21:50:44 -03:00
// Rangefinder
2015-12-30 18:57:56 -04:00
//
2016-05-22 21:50:44 -03:00
# ifndef RANGEFINDER_ENABLED
2017-02-03 17:33:27 -04:00
# define RANGEFINDER_ENABLED ENABLED
2015-12-30 18:57:56 -04:00
# endif
2016-05-22 21:50:44 -03:00
# ifndef RANGEFINDER_HEALTH_MAX
2017-02-03 17:33:27 -04:00
# define RANGEFINDER_HEALTH_MAX 3 // number of good reads that indicates a healthy rangefinder
2015-12-30 18:57:56 -04:00
# endif
2016-05-22 21:50:44 -03:00
# ifndef RANGEFINDER_GAIN_DEFAULT
2017-02-03 17:33:27 -04:00
# define RANGEFINDER_GAIN_DEFAULT 0.8f // gain for controlling how quickly rangefinder range adjusts target altitude (lower means slower reaction)
2015-12-30 18:57:56 -04:00
# endif
2016-05-22 21:50:44 -03:00
# ifndef THR_SURFACE_TRACKING_VELZ_MAX
2017-02-03 17:33:27 -04:00
# define THR_SURFACE_TRACKING_VELZ_MAX 150 // max vertical speed change while surface tracking with rangefinder
2015-12-30 18:57:56 -04:00
# endif
2016-05-22 21:50:44 -03:00
# ifndef RANGEFINDER_TIMEOUT_MS
2017-02-03 17:33:27 -04:00
# define RANGEFINDER_TIMEOUT_MS 1000 // desired rangefinder alt will reset to current rangefinder alt after this many milliseconds without a good rangefinder alt
2015-12-30 18:57:56 -04:00
# endif
2016-05-22 21:50:44 -03:00
# ifndef RANGEFINDER_WPNAV_FILT_HZ
2017-02-03 17:33:27 -04:00
# define RANGEFINDER_WPNAV_FILT_HZ 0.25f // filter frequency for rangefinder altitude provided to waypoint navigation class
2015-12-30 18:57:56 -04:00
# endif
2016-05-22 21:50:44 -03:00
# ifndef RANGEFINDER_TILT_CORRECTION // by disable tilt correction for use of range finder data by EKF
2017-02-03 17:33:27 -04:00
# define RANGEFINDER_TILT_CORRECTION ENABLED
2015-12-30 18:57:56 -04:00
# endif
2017-02-03 00:18:27 -04:00
// Avoidance (relies on Proximity and Fence)
# ifndef AVOIDANCE_ENABLED
# define AVOIDANCE_ENABLED DISABLED
# endif
# if AVOIDANCE_ENABLED == ENABLED // Avoidance Library relies on Proximity and Fence
# define PROXIMITY_ENABLED ENABLED
# define FENCE_ENABLED ENABLED
# endif
// Proximity sensor
//
# ifndef PROXIMITY_ENABLED
2017-02-03 17:33:27 -04:00
# define PROXIMITY_ENABLED DISABLED
2017-02-03 00:18:27 -04:00
# endif
2015-12-30 18:57:56 -04:00
# ifndef MAV_SYSTEM_ID
2017-02-03 17:33:27 -04:00
# define MAV_SYSTEM_ID 1
2015-12-30 18:57:56 -04:00
# endif
//////////////////////////////////////////////////////////////////////////////
// Battery monitoring
//
# ifndef FS_BATT_VOLTAGE_DEFAULT
2017-02-03 17:33:27 -04:00
# define FS_BATT_VOLTAGE_DEFAULT 0 // default battery voltage below which failsafe will be triggered
2015-12-30 18:57:56 -04:00
# endif
# ifndef FS_BATT_MAH_DEFAULT
2017-02-03 17:33:27 -04:00
# define FS_BATT_MAH_DEFAULT 0 // default battery capacity (in mah) below which failsafe will be triggered
2015-12-30 18:57:56 -04:00
# endif
# ifndef BOARD_VOLTAGE_MIN
2017-02-03 17:33:27 -04:00
# define BOARD_VOLTAGE_MIN 4.3f // min board voltage in volts for pre-arm checks
2015-12-30 18:57:56 -04:00
# endif
# ifndef BOARD_VOLTAGE_MAX
2017-02-03 17:33:27 -04:00
# define BOARD_VOLTAGE_MAX 5.8f // max board voltage in volts for pre-arm checks
2015-12-30 18:57:56 -04:00
# endif
// prearm GPS hdop check
# ifndef GPS_HDOP_GOOD_DEFAULT
2017-02-03 17:33:27 -04:00
# define GPS_HDOP_GOOD_DEFAULT 140 // minimum hdop that represents a good position. used during pre-arm checks if fence is enabled
2015-12-30 18:57:56 -04:00
# endif
// GCS failsafe
# ifndef FS_GCS
2017-02-03 17:33:27 -04:00
# define FS_GCS DISABLED
2015-12-30 18:57:56 -04:00
# endif
# ifndef FS_GCS_TIMEOUT_MS
2017-02-03 17:33:27 -04:00
# define FS_GCS_TIMEOUT_MS 2500 // gcs failsafe triggers after 5 seconds with no GCS heartbeat
2015-12-30 18:57:56 -04:00
# endif
// Radio failsafe while using RC_override
# ifndef FS_RADIO_RC_OVERRIDE_TIMEOUT_MS
2017-02-03 17:33:27 -04:00
# define FS_RADIO_RC_OVERRIDE_TIMEOUT_MS 1000 // RC Radio failsafe triggers after 1 second while using RC_override from ground station
2015-12-30 18:57:56 -04:00
# endif
// Radio failsafe
# ifndef FS_RADIO_TIMEOUT_MS
2017-02-03 17:33:27 -04:00
# define FS_RADIO_TIMEOUT_MS 500 // RC Radio Failsafe triggers after 500 miliseconds with No RC Input
2015-12-30 18:57:56 -04:00
# endif
2016-05-03 01:45:37 -03:00
// missing terrain data failsafe
# ifndef FS_TERRAIN_TIMEOUT_MS
2017-02-03 17:33:27 -04:00
# define FS_TERRAIN_TIMEOUT_MS 1000 // 1 second of unhealthy rangefinder and/or missing terrain data will trigger failsafe
2016-05-03 01:45:37 -03:00
# endif
2015-12-30 18:57:56 -04:00
# ifndef PREARM_DISPLAY_PERIOD
# define PREARM_DISPLAY_PERIOD 30
# endif
// pre-arm baro vs inertial nav max alt disparity
# ifndef PREARM_MAX_ALT_DISPARITY_CM
2017-02-03 17:33:27 -04:00
# define PREARM_MAX_ALT_DISPARITY_CM 100 // barometer and inertial nav altitude must be within this many centimeters
2015-12-30 18:57:56 -04:00
# endif
// arming check's maximum acceptable accelerometer vector difference (in m/s/s) between primary and backup accelerometers
# ifndef PREARM_MAX_ACCEL_VECTOR_DIFF
2017-02-03 17:33:27 -04:00
# define PREARM_MAX_ACCEL_VECTOR_DIFF 0.70f // pre arm accel check will fail if primary and backup accelerometer vectors differ by 0.7m/s/s
2015-12-30 18:57:56 -04:00
# endif
// arming check's maximum acceptable rotation rate difference (in rad/sec) between primary and backup gyros
# ifndef PREARM_MAX_GYRO_VECTOR_DIFF
2017-02-03 17:33:27 -04:00
# define PREARM_MAX_GYRO_VECTOR_DIFF 0.0873f // pre arm gyro check will fail if primary and backup gyro vectors differ by 0.0873 rad/sec (=5deg/sec)
2015-12-30 18:57:56 -04:00
# endif
//////////////////////////////////////////////////////////////////////////////
// EKF Failsafe
# ifndef FS_EKF_ACTION_DEFAULT
2017-02-03 17:33:27 -04:00
# define FS_EKF_ACTION_DEFAULT FS_EKF_ACTION_DISABLED // EKF failsafe triggers land by default
2015-12-30 18:57:56 -04:00
# endif
# ifndef FS_EKF_THRESHOLD_DEFAULT
2017-02-03 17:33:27 -04:00
# define FS_EKF_THRESHOLD_DEFAULT 0.8f // EKF failsafe's default compass and velocity variance threshold above which the EKF failsafe will be triggered
2015-12-30 18:57:56 -04:00
# endif
# ifndef EKF_ORIGIN_MAX_DIST_M
2017-02-03 17:33:27 -04:00
# define EKF_ORIGIN_MAX_DIST_M 50000 // EKF origin and waypoints (including home) must be within 50km
2015-12-30 18:57:56 -04:00
# endif
//////////////////////////////////////////////////////////////////////////////
// MAGNETOMETER
# ifndef MAGNETOMETER
2017-02-03 17:33:27 -04:00
# define MAGNETOMETER ENABLED
2015-12-30 18:57:56 -04:00
# endif
// expected magnetic field strength. pre-arm checks will fail if 50% higher or lower than this value
# ifndef COMPASS_MAGFIELD_EXPECTED
2017-02-03 17:33:27 -04:00
# define COMPASS_MAGFIELD_EXPECTED 530 // pre arm will fail if mag field > 874 or < 185
2015-12-30 18:57:56 -04:00
# endif
// max compass offset length (i.e. sqrt(offs_x^2+offs_y^2+offs_Z^2))
# ifndef CONFIG_ARCH_BOARD_PX4FMU_V1
2017-02-03 17:33:27 -04:00
# ifndef COMPASS_OFFSETS_MAX
# define COMPASS_OFFSETS_MAX 600 // PX4 onboard compass has high offsets
# endif
2016-06-08 01:49:10 -03:00
# else // SITL, etc
2017-02-03 17:33:27 -04:00
# ifndef COMPASS_OFFSETS_MAX
# define COMPASS_OFFSETS_MAX 500
# endif
2015-12-30 18:57:56 -04:00
# endif
//////////////////////////////////////////////////////////////////////////////
// OPTICAL_FLOW
# ifndef OPTFLOW
2017-02-03 17:33:27 -04:00
# define OPTFLOW DISABLED
2015-12-30 18:57:56 -04:00
# endif
//////////////////////////////////////////////////////////////////////////////
2017-02-03 17:33:27 -04:00
// gripper
2017-02-03 00:18:27 -04:00
# ifndef GRIPPER_ENABLED
2017-02-03 17:33:27 -04:00
# define GRIPPER_ENABLED DISABLED
2015-12-30 18:57:56 -04:00
# endif
//////////////////////////////////////////////////////////////////////////////
// Nav-Guided - allows external nav computer to control vehicle
# ifndef NAV_GUIDED
2017-02-03 17:33:27 -04:00
# define NAV_GUIDED ENABLED
2015-12-30 18:57:56 -04:00
# endif
//////////////////////////////////////////////////////////////////////////////
// RADIO CONFIGURATION
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
// FLIGHT_MODE
//
# ifndef FLIGHT_MODE_1
2017-02-03 17:33:27 -04:00
# define FLIGHT_MODE_1 MANUAL
2015-12-30 18:57:56 -04:00
# endif
# ifndef FLIGHT_MODE_2
2017-02-03 17:33:27 -04:00
# define FLIGHT_MODE_2 STABILIZE
2015-12-30 18:57:56 -04:00
# endif
# ifndef FLIGHT_MODE_3
2017-02-03 17:33:27 -04:00
# define FLIGHT_MODE_3 ALT_HOLD
2015-12-30 18:57:56 -04:00
# endif
# ifndef FLIGHT_MODE_4
2017-02-03 17:33:27 -04:00
# define FLIGHT_MODE_4 STABILIZE
2015-12-30 18:57:56 -04:00
# endif
# ifndef FLIGHT_MODE_5
2017-02-03 17:33:27 -04:00
# define FLIGHT_MODE_5 STABILIZE
2015-12-30 18:57:56 -04:00
# endif
# ifndef FLIGHT_MODE_6
2017-02-03 17:33:27 -04:00
# define FLIGHT_MODE_6 STABILIZE
2015-12-30 18:57:56 -04:00
# endif
//////////////////////////////////////////////////////////////////////////////
// Throttle Failsafe
//
# ifndef FS_THR_VALUE_DEFAULT
2017-02-03 17:33:27 -04:00
# define FS_THR_VALUE_DEFAULT 975
2015-12-30 18:57:56 -04:00
# endif
//////////////////////////////////////////////////////////////////////////////
// Landing
//
# ifndef LAND_SPEED
2017-02-03 17:33:27 -04:00
# define LAND_SPEED 50 // the descent speed for the final stage of landing in cm/s
2015-12-30 18:57:56 -04:00
# endif
# ifndef LAND_START_ALT
2017-02-03 17:33:27 -04:00
# define LAND_START_ALT -25 // altitude in cm where land controller switches to slow rate of descent
2015-12-30 18:57:56 -04:00
# endif
# ifndef LAND_REQUIRE_MIN_THROTTLE_TO_DISARM
2017-02-03 17:33:27 -04:00
# define LAND_REQUIRE_MIN_THROTTLE_TO_DISARM DISABLED // we do not require pilot to reduce throttle to minimum before vehicle will disarm in AUTO, LAND or RTL
2015-12-30 18:57:56 -04:00
# endif
# ifndef LAND_REPOSITION_DEFAULT
2017-02-03 17:33:27 -04:00
# define LAND_REPOSITION_DEFAULT 1 // by default the pilot can override roll/pitch during landing
2015-12-30 18:57:56 -04:00
# endif
# ifndef LAND_WITH_DELAY_MS
2017-02-03 17:33:27 -04:00
# define LAND_WITH_DELAY_MS 4000 // default delay (in milliseconds) when a land-with-delay is triggered during a failsafe event
2015-12-30 18:57:56 -04:00
# endif
2016-04-05 02:43:42 -03:00
# ifndef LAND_CANCEL_TRIGGER_THR
2017-02-03 17:33:27 -04:00
# define LAND_CANCEL_TRIGGER_THR 700 // land is cancelled by input throttle above 700
2016-04-05 02:43:42 -03:00
# endif
2015-12-30 18:57:56 -04:00
//////////////////////////////////////////////////////////////////////////////
// Landing Detector
//
# ifndef LAND_DETECTOR_TRIGGER_SEC
2017-02-03 17:33:27 -04:00
# define LAND_DETECTOR_TRIGGER_SEC 1.0f // number of seconds to detect a landing
2015-12-30 18:57:56 -04:00
# endif
# ifndef LAND_DETECTOR_MAYBE_TRIGGER_SEC
2017-02-03 17:33:27 -04:00
# define LAND_DETECTOR_MAYBE_TRIGGER_SEC 0.2f // number of seconds that means we might be landed (used to reset horizontal position targets to prevent tipping over)
2015-12-30 18:57:56 -04:00
# endif
# ifndef LAND_DETECTOR_ACCEL_LPF_CUTOFF
# define LAND_DETECTOR_ACCEL_LPF_CUTOFF 1.0f // frequency cutoff of land detector accelerometer filter
# endif
# ifndef LAND_DETECTOR_ACCEL_MAX
# define LAND_DETECTOR_ACCEL_MAX 1.0f // vehicle acceleration must be under 1m/s/s
# endif
//////////////////////////////////////////////////////////////////////////////
// CAMERA TRIGGER AND CONTROL
//
# ifndef CAMERA
2017-02-03 17:33:27 -04:00
# define CAMERA ENABLED
2015-12-30 18:57:56 -04:00
# endif
//////////////////////////////////////////////////////////////////////////////
// MOUNT (ANTENNA OR CAMERA)
//
# ifndef MOUNT
2017-02-03 17:33:27 -04:00
# define MOUNT ENABLED
2015-12-30 18:57:56 -04:00
# endif
//////////////////////////////////////////////////////////////////////////////
// Flight mode definitions
//
// Acro Mode
# ifndef ACRO_RP_P
2017-02-03 17:33:27 -04:00
# define ACRO_RP_P 4.5f
2015-12-30 18:57:56 -04:00
# endif
# ifndef ACRO_YAW_P
2017-02-03 17:33:27 -04:00
# define ACRO_YAW_P 4.5f
2015-12-30 18:57:56 -04:00
# endif
# ifndef ACRO_LEVEL_MAX_ANGLE
2017-02-03 17:33:27 -04:00
# define ACRO_LEVEL_MAX_ANGLE 3000
2015-12-30 18:57:56 -04:00
# endif
# ifndef ACRO_BALANCE_ROLL
2017-02-03 17:33:27 -04:00
# define ACRO_BALANCE_ROLL 1.0f
2015-12-30 18:57:56 -04:00
# endif
# ifndef ACRO_BALANCE_PITCH
2017-02-03 17:33:27 -04:00
# define ACRO_BALANCE_PITCH 1.0f
2015-12-30 18:57:56 -04:00
# endif
# ifndef ACRO_EXPO_DEFAULT
2017-02-03 17:33:27 -04:00
# define ACRO_EXPO_DEFAULT 0.3f
2015-12-30 18:57:56 -04:00
# endif
// RTL Mode
# ifndef RTL_ALT_FINAL
2017-02-03 17:33:27 -04:00
# define RTL_ALT_FINAL 0 // the altitude the vehicle will move to as the final stage of Returning to Launch. Set to zero to land.
2015-12-30 18:57:56 -04:00
# endif
# ifndef RTL_ALT
2017-02-03 17:33:27 -04:00
# define RTL_ALT 1500 // default alt to return to home in cm, 0 = Maintain current altitude
2015-12-30 18:57:56 -04:00
# endif
# ifndef RTL_ALT_MIN
2017-02-03 17:33:27 -04:00
# define RTL_ALT_MIN 200 // min height above ground for RTL (i.e 2m)
2015-12-30 18:57:56 -04:00
# endif
# ifndef RTL_CLIMB_MIN_DEFAULT
2017-02-03 17:33:27 -04:00
# define RTL_CLIMB_MIN_DEFAULT 0 // vehicle will always climb this many cm as first stage of RTL
2015-12-30 18:57:56 -04:00
# endif
2016-05-03 01:45:37 -03:00
# ifndef RTL_ABS_MIN_CLIMB
2017-02-03 17:33:27 -04:00
# define RTL_ABS_MIN_CLIMB 250 // absolute minimum initial climb
2016-05-03 01:45:37 -03:00
# endif
2016-06-08 01:49:10 -03:00
# ifndef RTL_CONE_SLOPE_DEFAULT
2017-02-03 17:33:27 -04:00
# define RTL_CONE_SLOPE_DEFAULT 3.0f // slope of RTL cone (height / distance). 0 = No cone
2016-05-03 01:45:37 -03:00
# endif
# ifndef RTL_MIN_CONE_SLOPE
2017-02-03 17:33:27 -04:00
# define RTL_MIN_CONE_SLOPE 0.5f // minimum slope of cone
2016-05-03 01:45:37 -03:00
# endif
2015-12-30 18:57:56 -04:00
# ifndef RTL_LOITER_TIME
2017-02-03 17:33:27 -04:00
# define RTL_LOITER_TIME 5000 // Time (in milliseconds) to loiter above home before begining final descent
2015-12-30 18:57:56 -04:00
# endif
// AUTO Mode
# ifndef WP_YAW_BEHAVIOR_DEFAULT
2017-02-03 17:33:27 -04:00
# define WP_YAW_BEHAVIOR_DEFAULT WP_YAW_BEHAVIOR_LOOK_AT_NEXT_WP_EXCEPT_RTL
2015-12-30 18:57:56 -04:00
# endif
# ifndef AUTO_YAW_SLEW_RATE
2017-02-03 17:33:27 -04:00
# define AUTO_YAW_SLEW_RATE 60 // degrees/sec
2015-12-30 18:57:56 -04:00
# endif
# ifndef YAW_LOOK_AHEAD_MIN_SPEED
2017-02-10 13:46:54 -04:00
# define YAW_LOOK_AHEAD_MIN_SPEED 100 // minimum ground speed in cm/s required before vehicle is aimed at ground course
2015-12-30 18:57:56 -04:00
# endif
// Super Simple mode
# ifndef SUPER_SIMPLE_RADIUS
2017-02-03 17:33:27 -04:00
# define SUPER_SIMPLE_RADIUS 1000
2015-12-30 18:57:56 -04:00
# endif
//////////////////////////////////////////////////////////////////////////////
// Stabilize Rate Control
//
# ifndef ROLL_PITCH_INPUT_MAX
2017-02-03 17:33:27 -04:00
# define ROLL_PITCH_INPUT_MAX 4500 // roll, pitch input range
2015-12-30 18:57:56 -04:00
# endif
# ifndef DEFAULT_ANGLE_MAX
2017-02-03 17:33:27 -04:00
# define DEFAULT_ANGLE_MAX 4500 // ANGLE_MAX parameters default value
2015-12-30 18:57:56 -04:00
# endif
# ifndef ANGLE_RATE_MAX
2017-02-03 17:33:27 -04:00
# define ANGLE_RATE_MAX 18000 // default maximum rotation rate in roll/pitch axis requested by angle controller used in stabilize, loiter, rtl, auto flight modes
2015-12-30 18:57:56 -04:00
# endif
//////////////////////////////////////////////////////////////////////////////
// Loiter position control gains
//
# ifndef POS_XY_P
2017-02-03 17:33:27 -04:00
# define POS_XY_P 1.0f
2015-12-30 18:57:56 -04:00
# endif
//////////////////////////////////////////////////////////////////////////////
// Stop mode defaults
//
# ifndef BRAKE_MODE_SPEED_Z
2017-02-03 17:33:27 -04:00
# define BRAKE_MODE_SPEED_Z 250 // z-axis speed in cm/s in Brake Mode
2015-12-30 18:57:56 -04:00
# endif
# ifndef BRAKE_MODE_DECEL_RATE
2017-02-03 17:33:27 -04:00
# define BRAKE_MODE_DECEL_RATE 750 // acceleration rate in cm/s/s in Brake Mode
2015-12-30 18:57:56 -04:00
# endif
//////////////////////////////////////////////////////////////////////////////
// Velocity (horizontal) gains
//
# ifndef VEL_XY_P
2017-02-03 17:33:27 -04:00
# define VEL_XY_P 1.0f
2015-12-30 18:57:56 -04:00
# endif
# ifndef VEL_XY_I
2017-02-03 17:33:27 -04:00
# define VEL_XY_I 0.5f
2015-12-30 18:57:56 -04:00
# endif
# ifndef VEL_XY_IMAX
2017-02-03 17:33:27 -04:00
# define VEL_XY_IMAX 1000
2015-12-30 18:57:56 -04:00
# endif
# ifndef VEL_XY_FILT_HZ
2017-02-03 17:33:27 -04:00
# define VEL_XY_FILT_HZ 5.0f
2015-12-30 18:57:56 -04:00
# endif
//////////////////////////////////////////////////////////////////////////////
// PosHold parameter defaults
//
# ifndef POSHOLD_ENABLED
2017-02-03 17:33:27 -04:00
# define POSHOLD_ENABLED ENABLED // PosHold flight mode enabled by default
2015-12-30 18:57:56 -04:00
# endif
//////////////////////////////////////////////////////////////////////////////
// Throttle control gains
//
# ifndef THR_DZ_DEFAULT
# define THR_DZ_DEFAULT 100 // the deadzone above and below mid throttle while in althold or loiter
# endif
# ifndef ALT_HOLD_P
2017-02-03 17:33:27 -04:00
# define ALT_HOLD_P 3.0f
2015-12-30 18:57:56 -04:00
# endif
// Velocity (vertical) control gains
# ifndef VEL_Z_P
2017-02-03 17:33:27 -04:00
# define VEL_Z_P 8.0f
2015-12-30 18:57:56 -04:00
# endif
// Accel (vertical) control gains
# ifndef ACCEL_Z_P
2017-02-03 17:33:27 -04:00
# define ACCEL_Z_P 0.50f
2015-12-30 18:57:56 -04:00
# endif
# ifndef ACCEL_Z_I
2017-02-03 17:33:27 -04:00
# define ACCEL_Z_I 0.1f
2015-12-30 18:57:56 -04:00
# endif
# ifndef ACCEL_Z_D
2017-02-03 17:33:27 -04:00
# define ACCEL_Z_D 0.0f
2015-12-30 18:57:56 -04:00
# endif
# ifndef ACCEL_Z_IMAX
2017-02-03 17:33:27 -04:00
# define ACCEL_Z_IMAX 100
2015-12-30 18:57:56 -04:00
# endif
# ifndef ACCEL_Z_FILT_HZ
2017-02-03 17:33:27 -04:00
# define ACCEL_Z_FILT_HZ 20.0f
2015-12-30 18:57:56 -04:00
# endif
// default maximum vertical velocity and acceleration the pilot may request
# ifndef PILOT_VELZ_MAX
2017-02-03 17:33:27 -04:00
# define PILOT_VELZ_MAX 500 // maximum vertical velocity in cm/s
2015-12-30 18:57:56 -04:00
# endif
# ifndef PILOT_ACCEL_Z_DEFAULT
2017-02-03 17:33:27 -04:00
# define PILOT_ACCEL_Z_DEFAULT 100 // vertical acceleration in cm/s/s while altitude is under pilot control
2015-12-30 18:57:56 -04:00
# endif
// max distance in cm above or below current location that will be used for the alt target when transitioning to alt-hold mode
# ifndef ALT_HOLD_INIT_MAX_OVERSHOOT
2017-02-03 17:33:27 -04:00
# define ALT_HOLD_INIT_MAX_OVERSHOOT 200
2015-12-30 18:57:56 -04:00
# endif
// the acceleration used to define the distance-velocity curve
# ifndef ALT_HOLD_ACCEL_MAX
2017-02-03 17:33:27 -04:00
# define ALT_HOLD_ACCEL_MAX 250 // if you change this you must also update the duplicate declaration in AC_WPNav.h
2015-12-30 18:57:56 -04:00
# endif
# ifndef AUTO_DISARMING_DELAY
2016-05-03 23:23:58 -03:00
# define AUTO_DISARMING_DELAY 0
2015-12-30 18:57:56 -04:00
# endif
//////////////////////////////////////////////////////////////////////////////
// Dataflash logging control
//
# ifndef LOGGING_ENABLED
2017-02-03 17:33:27 -04:00
# define LOGGING_ENABLED ENABLED
2015-12-30 18:57:56 -04:00
# endif
// Default logging bitmask
# ifndef DEFAULT_LOG_BITMASK
2017-02-03 17:33:27 -04:00
# define DEFAULT_LOG_BITMASK \
2015-12-30 18:57:56 -04:00
MASK_LOG_ATTITUDE_MED | \
MASK_LOG_GPS | \
MASK_LOG_PM | \
MASK_LOG_CTUN | \
MASK_LOG_NTUN | \
MASK_LOG_RCIN | \
MASK_LOG_IMU | \
MASK_LOG_CMD | \
MASK_LOG_CURRENT | \
MASK_LOG_RCOUT | \
MASK_LOG_OPTFLOW | \
MASK_LOG_COMPASS | \
MASK_LOG_CAMERA | \
MASK_LOG_MOTBATT
# endif
//////////////////////////////////////////////////////////////////////////////
// AP_Limits Defaults
//
// Enable/disable AP_Limits
# ifndef AC_FENCE
2017-02-03 17:33:27 -04:00
# define AC_FENCE ENABLED
2015-12-30 18:57:56 -04:00
# endif
# ifndef AC_RALLY
2017-02-03 17:33:27 -04:00
# define AC_RALLY DISABLED
2015-12-30 18:57:56 -04:00
# endif
# ifndef AC_TERRAIN
2017-02-03 17:33:27 -04:00
# define AC_TERRAIN DISABLED // Requires Rally enabled as well
2015-12-30 18:57:56 -04:00
# endif
//////////////////////////////////////////////////////////////////////////////
// Developer Items
//
// use this to completely disable the CLI
# ifndef CLI_ENABLED
2017-02-03 17:33:27 -04:00
# define CLI_ENABLED ENABLED
2015-12-30 18:57:56 -04:00
# endif
2017-02-03 00:18:27 -04:00
# ifndef XTRACK_P
2017-02-03 17:33:27 -04:00
# define XTRACK_P 1.0f
# define XTRACK_I 0.5f
# define XTRACK_D 0.0f
# define XTRACK_IMAX 1000
# define XTRACK_FILT_HZ 5.0f
2017-02-03 00:18:27 -04:00
# define XTRACK_DT 0.05f
2017-02-03 17:33:27 -04:00
# define HEAD_P 1.0f
# define HEAD_I 0.5f
# define HEAD_D 0.0f
# define HEAD_IMAX 1000
# define HEAD_FILT_HZ 5.0f
# define HEAD_DT 0.05f
2015-12-30 18:57:56 -04:00
# endif