slop-stuff cheatsheets & experiments git

slop-stuff / Drones & FPV

ArduPilot

Autopilot for anything that flies — pin Copter 4.6.

Copter 4.6: modes, failsafes, params, EKF, tune order, maiden ladder, and AI-slop kill-list.

droneCopterfailsafeEKFMission Planner

ArduPilot Copter 4.6.x (stable 4.6.3). Units are cm / cm/s / cdeg unless noted. Wiki pages that show RTL_ALT_M, LAND_SPD_MS, PSC_NE_*, ARMING_SKIPCHK are 4.7 — do not copy them onto a 4.6 craft.

Quick reference

Topic4.6 truth
GCSMission Planner (Windows, .BIN logs, CompassMot) · QGroundControl (cross-platform flash) — don’t dual-write params
Cal orderFrame reboot → AHRS → accel 6-face → compass → radio + FS_THR_VALUE → ESC → motor test → level → battery FS → modes → outdoor GPS
MaidenStabilize → AltHold → Loiter → test RTL → Auto
Radio FSFS_THR_ENABLE=1 RTL · FS_THR_VALUE ≥10µs below RC3_MIN, >910
Battery FSStock BATT_FS_LOW_ACT=0 = warn only → set 2 RTL; BATT_LOW_VOLT default 10.5V is 3S
EKF FSTwo variances > FS_EKF_THRESH (0.8) → Land · don’t raise thresh
RTL climbRTL_ALT=1500 = 15 m (cm!) · home = arm point · straight line
ArmThrottle low + yaw right if ARMING_RUDDER=2 · ARMING_CHECK=1 never 0
Tune orderLinear motors → hover → harmonic notch → rate P/D → AutoTune → angle/pos later

GCS

Mission PlannerQGroundControl
Best atParam bitmasks, CompassMot, .BIN log analysisFlash, cross-platform UI
TrapDual-open with QGC = param fightsWeak CompassMot / log workflow

Flash Copter 4.6.x for your board target — not Plane, not “latest 4.7 beta”.

Frame & arming

ParamDefault / notePitfall
FRAME_CLASS1 Quad typical · reboot0 = pre-arm; Heli class on multicopter firmware = invalid
FRAME_TYPE1 X typical · rebootBF/DJI X ≠ ArduPilot X → flip on takeoff
ARMING_CHECK1 AllNever 0 “to make it arm”
ARMING_RUDDERCopter 2 ArmOrDisarmPlane default 1 ArmOnly — don’t copy
BRD_SAFETY_DEFLT1 on Pixhawk-classWas BRD_SAFETYENABLE; press safety or set 0 + reboot
DISARM_DELAY10 s0 + crash on side = motors stay live

Calibration order

Props off until maiden. Battery off during RC cal if USB can power the FC.

  1. FRAME_CLASS / FRAME_TYPE → reboot · Motor Test map
  2. AHRS_ORIENTATION if not arrow-forward → reboot
  3. Accel — all 6 faces, level → reboot
  4. Compass — prefer external mast mag; disable internal (COMPASS_USEn=0) if inconsistent; CompassMot = last resort
  5. Radio — Mode 2; Copter wants throttle low on center dialog; set FS_THR_VALUE from numbers
  6. ESC — DShot: set MOT_PWM_TYPE, no analog cal · Analog: ESC_CALIBRATION=3, props off, reboot, wait tones — not high-throttle-then-power
  7. Motor Test → set MOT_SPIN_ARM < MOT_SPIN_MIN
  8. Level horizon · BATT_MONITOR + capacity · BATT_FS_LOW_ACT=2
  9. FLTMODE_CH=5 with Stabilize/AltHold + RTL on throws
  10. Outdoor: 3D fix, HDOP ≤ GPS_HDOP_GOOD (default 1.40)

Flight mode matrix

ModeGPSAltSticksUse
StabilizeNmanual thrlean; center levelsmaiden + bailout
AcroNmanualrate; center ≠ levelafter tune
AltHoldNbaroStab + mid holds alt2nd flight
LoiterYbaro+GPSvelocity; center stopsdaily GPS hover
PosHoldYbarolean like Stab; release brakesprefer Loiter
RTLYbaro/terrain optautohome switch
AutoYmissionautomissions
GuidedYGCSGCSclick-to-fly
LandN*barodescent LAND_SPEEDFS fallback
BrakeYbaroignores sticksflyaway
SmartRTLYbarobreadcrumbobstacles to home
FlowHoldflow cambaroLoiter-likeonly if FLOW set up
SportNbarorate + hold attitudeoften compiled out in 4.6

*Land uses position if healthy. Only Stabilize/Acro save a bad EKF — RTL will not.

FLTMODE16 PWM slots on FLTMODE_CH (Copter 5, Plane 8). Never put only GPS modes on a 3-pos with no Stab/AltHold bailout.

Failsafe matrix

Triggers debounce; actions don’t auto-clear — flick the mode switch.

FSTriggerRec actionMisconfig
Radiono pulses or ch3 < FS_THR_VALUE (~1s)FS_THR_ENABLE=1 RTLVALUE inside stick range; RX hold-last; RX forcing ch5=RTL (wiki: do not)
Batt lowV < BATT_LOW_VOLT 10s or mAhBATT_FS_LOW_ACT=2 RTLstock 0 warn-only; 10.5V is 3S; reboot to clear
Batt critlower V/mAhLand (1)CRT≥LOW pre-arm; Terminate=motors off
GCSno heartbeat 5s, after GCS connected1 RTL if telem; else leave 0closing MP mid-flight; bit4 continues pilot modes
EKFany two variances >0.8 ~1sLand (1); don’t raise threshraising lengthens flyaways
Dead-reckon (4.6)lost pos/velFS_DR_ENABLE RTL then EKF after ~30s≠ EKF FS
Fencealt/circle/polygonRTL/Landenable with none defined; no position+fence = no arm

Pre-4.0 names FS_BATT_* are slop — use BATT_FS_LOW_ACT, BATT_LOW_VOLT, BATT_CRT_*.

Must-have params

GPS / EKF

Param4.6 notePitfall
GPS1_TYPEwas GPS_TYPE0 + EKF wants GPS = cannot arm
GPS_HDOP_GOOD140 (=1.40)raising under trees → Loiter toiletbowl
EK3_ENABLE1 (EKF3)EKF2 gone from default builds
EK3_SRC1_POSXY/VELXYGPSmatch sources to hardware
EK3_SRC1_YAWCompassCopter ≠ Plane auto-GSF
FS_EKF_THRESH0.8don’t raise to “stop landing”

Motors / ESC

ParamNotePitfall
MOT_SPIN_ARM< MOT_SPIN_MINfind with Motor Test
MOT_THST_HOVERlearns ~0.2–0.5hover >0.7 unsafe for AltHold
MOT_PWM_TYPEDShot 4–7DShot → skip analog ESC cal
ESC_CALIBRATIONset 3, props offnot high-throttle plug-in

RTL / Land (cm!)

ParamDefault meaningPitfall
RTL_ALT1500 = 15 m15 = 15 cm → tree
RTL_ALT_FINAL0 = landnon-zero = hover and wait
LAND_SPEED50 cm/s4.7 name LAND_SPD_MS
ANGLE_MAX3000 cdeg = 30°4.7 → ATC_ANGLE_MAX in degrees

Tune order (not a PID dump)

  1. Linear motors / expo (MOT_THST_EXPO)
  2. Stable hover
  3. Harmonic notch (INS_HNTCH_*) — before AutoTune
  4. Rate P/D (ATC_RAT_*) — I≈P on multicopters
  5. AutoTune (rate only)
  6. Angle / position later (ATC_ANG_*, PSC_*)

PSC_ACCZ_*: keep I ≈ 2×P; never raise on a vibey craft (climb-to-the-moon). Toiletbowl in Loiter = compass, not PSC_POSXY_P.

EKF / vibes

CheckTarget
VIBE< ~30; Clip = 0
XKF4 variances< FS_EKF_THRESH
Mag vs throttlewalk = relocate mag, not CompassMot first

KEY: Raising FS_EKF_THRESH extends flyaways. Fix mount, props, mag, GPS — don’t paper over variances.

Maiden ladder

  1. Props on, outdoor clear, HDOP ≤ 1.4
  2. Stabilize — hover ~mid stick, practice bailout
  3. AltHold — mid holds height; watch climb on vibe
  4. Loiter — center stops; watch toiletbowl
  5. RTL at altitude — confirm climb, home, land behavior
  6. Auto — only with a real mission loaded

Logs: CTUN alt track · VIBE/Clip · MAG · XKF variances.

Plane landmines

Don’t paste onto CopterWhy
THR_FAILSAFE, RTL_ALTITUDEPlane names
MODE_CH=8 / FLTMODE_CH=8Copter default 5
Q_* VTOLPlane/QuadPlane
ARMING_RUDDER=1Copter wants 2 for yaw disarm
Wiki _M / _MS / PSC_NE_*4.7

AI-slop kill-list

SlopReality
BF rates = ATC_RAT_*Ardu has rate + angle + pos + ACCZ
FS_THR_VALUE near stick lowMust sit below RC3_MIN
ARMING_CHECK=0Not a fix
Raise FS_EKF_THRESHExtends flyaways
CompassMot firstDisable internal mag first
Plane params on CopterSee landmines
MP + QGC both writingPick one writer
GPS modes without 3D / HDOPToiletbowl / FS
Disarm vs Land vs TerminateAirMode keeps motors up — RC-loss won’t disarm
RTL_ALT=1500 as “1500 m”It’s 15 m (cm)
GPS_TYPEUse GPS1_TYPE
AutoTune flight 1Notch first
Default battery FS = RTLStock is warn only
Sport/FlowHold as universalOften missing / needs hardware
Home = launch pad vibeHome = arm point
RX forces mode-ch to RTLWiki do not
Teach 4.7 names on 4.6RTL_ALT_M, ARMING_SKIPCHK, PSC_NE_*

4.5→4.6 teach: GPS1_TYPE, ARMING_NEED_LOC, FS_DR_*, ATC_LAND_*_MULT, PID bit in LOG_BITMASK, Sport often gone.

Refs