Files
simulation/config/ardupilot_gps_denied.parm

92 lines
2.8 KiB
Plaintext

# ArduPilot Parameters for GPS-Denied Navigation Simulation
# =========================================================
# GPS is ENABLED for: Geofence safety, LOCAL_POSITION_NED telemetry
# GPS is SIMULATED DENIED for: Control (using GUIDED_NOGPS mode)
# ====================
# GPS Configuration
# ====================
# Enable GPS (needed for geofence and position telemetry)
GPS_TYPE 1 # Auto-detect
# ====================
# Geofence Settings
# ====================
# Disabled for now - causes "fence requires position" errors
# TODO: Re-enable after basic flight works
FENCE_ENABLE 0
FENCE_TYPE 3 # Alt + Circle
FENCE_ACTION 2 # Land on breach
FENCE_ALT_MAX 10 # Maximum altitude (meters)
FENCE_RADIUS 20 # Circular fence radius (meters)
FENCE_MARGIN 2 # Margin inside fence for warning
# ====================
# EKF Configuration
# ====================
# Use EKF3 with GPS (for telemetry)
AHRS_EKF_TYPE 3
EK3_ENABLE 1
EK2_ENABLE 0
# EKF3 Source - GPS for position (enables LOCAL_POSITION_NED)
EK3_SRC1_POSXY 3 # GPS for XY position
EK3_SRC1_POSZ 1 # Barometer for Z position
EK3_SRC1_VELXY 3 # GPS for XY velocity
EK3_SRC1_VELZ 0 # None for Z velocity
EK3_SRC1_YAW 1 # Compass for yaw
# ====================
# Failsafe Settings
# ====================
FS_EKF_ACTION 1 # Land on EKF failsafe
FS_EKF_THRESH 0.8 # EKF failsafe threshold
FS_GPS_ENABLE 0 # Disable GPS failsafe (we simulate GPS-denied)
# ====================
# Flight Modes
# ====================
FLTMODE1 0 # Stabilize
FLTMODE2 2 # Alt Hold
FLTMODE3 5 # Loiter
FLTMODE4 4 # Guided
FLTMODE5 6 # RTL
FLTMODE6 9 # Land
# ====================
# Scheduler (WSL fix)
# ====================
SCHED_LOOP_RATE 200
# ====================
# Arming / Failsafes
# ====================
ARMING_CHECK 0
FS_THR_ENABLE 0
FS_GCS_ENABLE 0
# ====================
# Logging
# ====================
LOG_BITMASK 0
LOG_DISARMED 0
# ====================
# Landing Speed
# ====================
LAND_SPEED 150 # Final descent cm/s (default 50)
LAND_SPEED_HIGH 250 # Initial descent cm/s (default 0=WPNAV_SPEED_DN)
# ====================
# SITL Fast Startup
# ====================
# These MUST be in the .parm file (loaded at boot), not set via MAVLink
GPS_HDOP_GOOD 250 # Accept worse GPS quality (default 140)
EK3_CHECK_SCALE 200 # Relax EKF health checks (default 100)
EK3_GPS_CHECK 0 # Disable GPS preflight checks entirely in SITL
EK3_POSNE_M_NSE 0.5 # Trust GPS position more (default 0.5)
EK3_VELD_M_NSE 0.2 # Trust GPS vertical vel more (default 0.4)
EK3_VELNE_M_NSE 0.1 # Trust GPS horizontal vel more (default 0.3)
INS_GYRO_CAL 0 # Skip gyro calibration on boot (SITL only)
AHRS_GPS_MINSATS 6 # Minimum satellites