Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/master/ArduSub/config.h
Views: 1798
#pragma once12#include "defines.h"34//////////////////////////////////////////////////////////////////////////////5//////////////////////////////////////////////////////////////////////////////6// HARDWARE CONFIGURATION AND CONNECTIONS7//////////////////////////////////////////////////////////////////////////////8//////////////////////////////////////////////////////////////////////////////910#ifndef CONFIG_HAL_BOARD11#error CONFIG_HAL_BOARD must be defined to build ArduSub12#endif1314// run at 400Hz on all systems15# define MAIN_LOOP_RATE 4001617#ifndef SURFACE_DEPTH_DEFAULT18# define SURFACE_DEPTH_DEFAULT -10.0f // pressure sensor reading 10cm depth means craft is considered surfaced19#endif2021//////////////////////////////////////////////////////////////////////////////22// PWM control23// default RC speed in Hz24#ifndef RC_SPEED_DEFAULT25# define RC_SPEED_DEFAULT 20026#endif2728//////////////////////////////////////////////////////////////////////////////29// Circle Nav parameters30//3132#ifndef CIRCLE_NAV_ENABLED33# define CIRCLE_NAV_ENABLED 134#endif3536//////////////////////////////////////////////////////////////////////////////37// RCMAP38//3940#ifndef RCMAP_ENABLED41# define RCMAP_ENABLED 042#endif4344//////////////////////////////////////////////////////////////////////////////45// Rangefinder46//4748#ifndef RANGEFINDER_HEALTH_MAX49# define RANGEFINDER_HEALTH_MAX 3 // number of good reads that indicates a healthy rangefinder50#endif5152#ifndef RANGEFINDER_TIMEOUT_MS53# define RANGEFINDER_TIMEOUT_MS 1000 // desired rangefinder alt will reset to current rangefinder alt after this many milliseconds without a good rangefinder alt54#endif5556#ifndef RANGEFINDER_WPNAV_FILT_HZ57# define RANGEFINDER_WPNAV_FILT_HZ 0.25f // filter frequency for rangefinder altitude provided to waypoint navigation class58#endif5960#ifndef RANGEFINDER_TILT_CORRECTION // by disable tilt correction for use of range finder data by EKF61# define RANGEFINDER_TILT_CORRECTION 062#endif6364#ifndef RANGEFINDER_SIGNAL_MIN_DEFAULT65# define RANGEFINDER_SIGNAL_MIN_DEFAULT 90 // rangefinder readings with signal quality below this value are ignored66#endif6768#ifndef SURFTRAK_DEPTH_DEFAULT69# define SURFTRAK_DEPTH_DEFAULT -50.0f // surftrak will try to keep the sub below this depth70#endif7172// Avoidance (relies on Proximity and Fence)73#ifndef AVOIDANCE_ENABLED74# define AVOIDANCE_ENABLED 075#endif7677#if AVOIDANCE_ENABLED // Avoidance Library relies on Fence78# define FENCE_ENABLED 179#endif8081#ifndef MAV_SYSTEM_ID82# define MAV_SYSTEM_ID 183#endif8485#ifndef EKF_ORIGIN_MAX_DIST_M86# define EKF_ORIGIN_MAX_DIST_M 50000 // EKF origin and waypoints (including home) must be within 50km87#endif8889//////////////////////////////////////////////////////////////////////////////90// Nav-Guided - allows external nav computer to control vehicle91#ifndef NAV_GUIDED92# define NAV_GUIDED 193#endif9495//////////////////////////////////////////////////////////////////////////////96// Flight mode definitions97//9899// Acro Mode100#ifndef ACRO_RP_P101# define ACRO_RP_P 4.5f102#endif103104#ifndef ACRO_YAW_P105# define ACRO_YAW_P 3.375f106#endif107108#ifndef ACRO_LEVEL_MAX_ANGLE109# define ACRO_LEVEL_MAX_ANGLE 3000110#endif111112#ifndef ACRO_BALANCE_ROLL113#define ACRO_BALANCE_ROLL 1.0f114#endif115116#ifndef ACRO_BALANCE_PITCH117#define ACRO_BALANCE_PITCH 1.0f118#endif119120#ifndef ACRO_EXPO_DEFAULT121#define ACRO_EXPO_DEFAULT 0.3f122#endif123124// AUTO Mode125#ifndef WP_YAW_BEHAVIOR_DEFAULT126# define WP_YAW_BEHAVIOR_DEFAULT WP_YAW_BEHAVIOR_CORRECT_XTRACK127#endif128129#ifndef AUTO_YAW_SLEW_RATE130# define AUTO_YAW_SLEW_RATE 60 // degrees/sec131#endif132133#ifndef YAW_LOOK_AHEAD_MIN_SPEED134# define YAW_LOOK_AHEAD_MIN_SPEED 100 // minimum ground speed in cm/s required before vehicle is aimed at ground course135#endif136137//////////////////////////////////////////////////////////////////////////////138// Stabilize Rate Control139//140#ifndef ROLL_PITCH_INPUT_MAX141# define ROLL_PITCH_INPUT_MAX 4500 // roll, pitch input range142#endif143#ifndef DEFAULT_ANGLE_MAX144# define DEFAULT_ANGLE_MAX 4500 // ANGLE_MAX parameters default value145#endif146147//////////////////////////////////////////////////////////////////////////////148// Loiter position control gains149//150#ifndef POS_XY_P151# define POS_XY_P 1.0f152#endif153154//////////////////////////////////////////////////////////////////////////////155// PosHold parameter defaults156//157#ifndef POSHOLD_ENABLED158# define POSHOLD_ENABLED 1 // PosHold flight mode enabled by default159#endif160161//////////////////////////////////////////////////////////////////////////////162// Throttle control gains163//164165#ifndef THR_DZ_DEFAULT166# define THR_DZ_DEFAULT 100 // the deadzone above and below mid throttle while in althold or loiter167#endif168169// default maximum vertical velocity and acceleration the pilot may request170#ifndef PILOT_VELZ_MAX171# define PILOT_VELZ_MAX 500 // maximum vertical velocity in cm/s172#endif173#ifndef PILOT_ACCEL_Z_DEFAULT174# define PILOT_ACCEL_Z_DEFAULT 100 // vertical acceleration in cm/s/s while altitude is under pilot control175#endif176177#ifndef AUTO_DISARMING_DELAY178# define AUTO_DISARMING_DELAY 0179#endif180181//////////////////////////////////////////////////////////////////////////////182// Logging control183//184185// Default logging bitmask186#ifndef DEFAULT_LOG_BITMASK187# define DEFAULT_LOG_BITMASK \188MASK_LOG_ATTITUDE_MED | \189MASK_LOG_GPS | \190MASK_LOG_PM | \191MASK_LOG_CTUN | \192MASK_LOG_NTUN | \193MASK_LOG_RCIN | \194MASK_LOG_IMU | \195MASK_LOG_CMD | \196MASK_LOG_CURRENT | \197MASK_LOG_RCOUT | \198MASK_LOG_OPTFLOW | \199MASK_LOG_COMPASS | \200MASK_LOG_CAMERA | \201MASK_LOG_MOTBATT202#endif203204205