PageSourceSearch

https://portal.vetstodrones.org/assets/ArduPilotHub-Di3iWLv5.js

js vetstodrones.org collected 2026-10-04 12:29:03 UTC 80,501 bytes, 1 lines download raw bytes

1var D=Object.defineProperty;var r=(c,t)=>D(c,"name",{value:t,configurable:!0});import{j as e,R as x,f as k,i as F,p as j,d as G,c as B}from"./index-DTVt8NL4.js";import{r as b,R as C}from"./react-vendor-Dco-0PLI.js";import"./supabase-Cwmic9fw.js";import"./leaflet-Cqo8bRNC.js";import"./xlsx-CNavmsef.js";import"./recharts-B6NvSeHA.js";const N={categories:[{id:"essential",name:"Essential Setup",icon:"⚙",description:"Parameters you must configure before first flight."},{id:"motor",name:"Motor & ESC",icon:"⟳",description:"Motor output, ESC protocol, and throttle configuration."},{id:"pid",name:"PID Tuning",icon:"◎",description:"Stabilization loop gains for roll, pitch, and yaw."},{id:"safety",name:"Safety & Failsafe",icon:"⚠",description:"Failsafe triggers, geofence, and safety switches."},{id:"navigation",name:"Navigation",icon:"◉",description:"GPS, EKF, and autonomous flight parameters."},{id:"battery",name:"Battery Monitor",icon:"▮",description:"Voltage and current sensing configuration."},{id:"rc",name:"RC & Channels",icon:"◇",description:"Transmitter input mapping and flight mode switches."},{id:"compass",name:"Compass",icon:"⊕",description:"Magnetometer calibration, orientation, and priority."},{id:"gps",name:"GPS",icon:"⊙",description:"GNSS receiver configuration, blending, and accuracy."},{id:"logging",name:"Logging",icon:"▦",description:"Onboard data logging for analysis and diagnostics."},{id:"terrain",name:"Terrain & Altitude",icon:"△",description:"Terrain following, rangefinder, and altitude sources."}],params:[{id:"FRAME_CLASS",category:"essential",name:"FRAME_CLASS",description:"Defines the vehicle frame type. Must match your physical airframe.",type:"enum",default:1,options:[{value:0,label:"Undefined"},{value:1,label:"Quad"},{value:2,label:"Hexa"},{value:3,label:"Octa"},{value:5,label:"Single/Coax"},{value:7,label:"Tri"},{value:12,label:"DodecaHexa"}],importance:"critical",notes:"Incorrect setting means wrong motor mixing — the drone will flip on takeoff.",relatedTerms:["flight-controller","ardupilot"]},{id:"FRAME_TYPE",category:"essential",name:"FRAME_TYPE",description:"Motor layout within the frame class. X is the most common for quads.",type:"enum",default:1,options:[{value:0,label:"Plus (+)"},{value:1,label:"X"},{value:2,label:"V"},{value:3,label:"H"},{value:10,label:"Y6B"},{value:12,label:"Y6F"}],importance:"critical",notes:"X layout has motor 1 at front-right. Plus layout has motor 1 directly forward.",relatedTerms:["flight-controller"]},{id:"ARMING_CHECK",category:"essential",name:"ARMING_CHECK",description:"Bitmask of pre-arm checks. 1 = all checks enabled (recommended).",type:"bitmask",default:1,range:[0,32767],importance:"critical",notes:"Disabling arming checks is dangerous. Only disable specific checks temporarily for debugging.",relatedTerms:["failsafe","ardupilot"]},{id:"ARMING_REQUIRE",category:"essential",name:"ARMING_REQUIRE",description:"Arming method requirement. Controls whether safety switch or GCS arming is needed.",type:"enum",default:1,options:[{value:0,label:"Disabled (auto-arm)"},{value:1,label:"Throttle down + rudder right"},{value:2,label:"GCS command only"}],importance:"high",notes:"Option 1 is standard for RC pilots. Option 2 recommended for autonomous operations.",relatedTerms:["ardupilot","flight-controller"]},{id:"SCHED_LOOP_RATE",category:"essential",name:"SCHED_LOOP_RATE",description:"Main loop rate in Hz. Higher rates give faster response but need more CPU.",type:"enum",default:400,options:[{value:50,label:"50 Hz"},{value:100,label:"100 Hz"},{value:200,label:"200 Hz"},{value:400,label:"400 Hz"},{value:800,label:"800 Hz"}],importance:"medium",notes:"400 Hz is standard. F4 processors may struggle above 400. H7 can run 800 Hz.",relatedTerms:["flight-controller","imu"]},{id:"BRD_SAFETY_DEFLT",category:"essential",name:"BRD_SAFETY_DEFLT",description:"Default state of the safety switch on boot.",type:"enum",default:1,options:[{value:0,label:"Safety off on boot"},{value:1,label:"Safety on (press to arm)"}],importance:"high",notes:"Keep enabled. Prevents accidental motor spin during setup. Some boards lack a physical switch.",relatedTerms:["flight-controller"]},{id:"SERIAL0_BAUD",category:"essential",name:"SERIAL0_BAUD",description:"USB serial port baud rate for GCS connection.",type:"enum",default:115,options:[{value:57,label:"57600"},{value:115,label:"115200"},{value:230,label:"230400"},{value:460,label:"460800"},{value:921,label:"921600"}],importance:"medium",notes:"115200 is standard for Mission Planner/QGC. Higher rates speed up parameter loading.",relatedTerms:["ardupilot"]},{id:"LOG_BITMASK",category:"essential",name:"LOG_BITMASK",description:"Master bitmask controlling which data is logged to onboard storage.",type:"bitmask",default:176126,range:[0,262143],importance:"high",notes:"Default logs most useful data. Enable all (262143) when diagnosing issues. Disable GPS (bit 5) only to save space.",relatedTerms:["ardupilot"]},{id:"MOT_PWM_TYPE",category:"motor",name:"MOT_PWM_TYPE",description:"ESC output protocol. Modern ESCs should use DShot.",type:"enum",default:0,options:[{value:0,label:"Normal (PWM)"},{value:1,label:"OneShot"},{value:2,label:"OneShot125"},{value:4,label:"DShot150"},{value:5,label:"DShot300"},{value:6,label:"DShot600"},{value:7,label:"DShot1200"}],importance:"high",notes:"DShot600 is recommended for most setups. Digital protocol eliminates calibration drift.",relatedTerms:["esc","dshot","pwm"]},{id:"MOT_SPIN_ARM",category:"motor",name:"MOT_SPIN_ARM",description:"Motor spin speed when armed but at zero throttle. 0.0–0.3 range.",type:"float",default:.1,range:[0,.3],step:.
101,importance:"medium",notes:"Setting too high causes the drone to shift on the ground. Too low and motors may not start reliably.",relatedTerms:["brushless-motor","esc"]},{id:"MOT_SPIN_MIN",category:"motor",name:"MOT_SPIN_MIN",description:"Minimum motor spin when flying. Below this, motor output is unreliable.",type:"float",default:.15,range:[0,.4],step:.01,importance:"medium",notes:"Affects stability at low throttle. Higher values improve low-throttle stability but reduce control range.",relatedTerms:["brushless-motor"]},{id:"MOT_SPIN_MAX",category:"motor",name:"MOT_SPIN_MAX",description:"Maximum motor output as proportion of full throttle.",type:"float",default:.95,range:[.5,1],step:.01,importance:"medium",notes:"Leave headroom for stabilization. 0.95 gives the flight controller 5% reserve for attitude corrections.",relatedTerms:["brushless-motor","esc"]},{id:"MOT_THST_EXPO",category:"motor",name:"MOT_THST_EXPO",description:"Motor thrust curve linearization. Compensates for non-linear motor response.",type:"float",default:.65,range:[0,1],step:.05,importance:"medium",notes:"Default 0.65 works for most setups. Lower values for large slow props, higher for small fast props.",relatedTerms:["brushless-motor","propeller"]},{id:"MOT_THST_HOVER",category:"motor",name:"MOT_THST_HOVER",description:"Estimated throttle required to hover. Learned automatically during flight.",type:"float",default:.35,range:[.1,.8],step:.01,importance:"high",notes:"Set close to actual hover throttle for faster initial tune. If >0.6, your TWR is dangerously low.",relatedTerms:["brushless-motor","propeller"]},{id:"MOT_BAT_VOLT_MAX",category:"motor",name:"MOT_BAT_VOLT_MAX",description:"Maximum battery voltage for thrust scaling. Fully charged voltage.",type:"float",default:0,range:[0,60],step:.1,importance:"medium",notes:"Set to cells × 4.2V (e.g., 6S = 25.2V). 0 = auto-detect. Helps maintain consistent thrust as battery drains.",relatedTerms:["lipo","voltage"]},{id:"MOT_BAT_VOLT_MIN",category:"motor",name:"MOT_BAT_VOLT_MIN",description:"Minimum battery voltage for thrust scaling. Near-empty voltage.",type:"float",default:0,range:[0,60],step:.1,importance:"medium",notes:"Set to cells × 3.3V (e.g., 6S = 19.8V). Paired with VOLT_MAX for voltage compensation.",relatedTerms:["lipo","voltage"]},{id:"MOT_PWM_MIN",category:"motor",name:"MOT_PWM_MIN",description:"Minimum PWM pulse sent to ESCs in microseconds.",type:"integer",default:1e3,range:[800,1400],step:1,importance:"medium",notes:"Must match ESC calibration range. Not used with DShot protocol.",relatedTerms:["esc","pwm"]},{id:"MOT_PWM_MAX",category:"motor",name:"MOT_PWM_MAX",description:"Maximum PWM pulse sent to ESCs in microseconds.",type:"integer",default:2e3,range:[1600,2200],step:1,importance:"medium",notes:"Must match ESC calibration range. Not used with DShot protocol.",relatedTerms:["esc","pwm"]},{id:"SERVO_BLH_AUTO",category:"motor",name:"SERVO_BLH_AUTO",description:"Enable BLHeli passthrough for ESC configuration via flight controller.",type:"enum",default:0,options:[{value:0,label:"Disabled"},{value:1,label:"Enabled"}],importance:"low",notes:"Enable temporarily to configure ESCs through BLHeliSuite without disconnecting.",relatedTerms:["esc","blheli"]},{id:"SERVO_DSHOT_ESC",category:"motor",name:"SERVO_DSHOT_ESC",description:"DShot ESC type. Determines which telemetry and command features are available.",type:"enum",default:0,options:[{value:0,label:"None"},{value:1,label:"BLHeli32/S"},{value:2,label:"BLHeli_S EDT"},{value:3,label:"AM32"}],importance:"medium",notes:"Enable for ESC telemetry (RPM, temperature, current per motor). BLHeli_32 is most common.",relatedTerms:["esc","dshot","blheli"]},{id:"ATC_RAT_RLL_P",category:"pid",name:"ATC_RAT_RLL_P",description:"Roll axis rate P gain. Primary stabilization gain for roll.",type:"float",default:.135,range:[.01,.5],step:.005,importance:"high",notes:"Too high causes oscillation. Too low causes sluggish response. Start with autotune.",relatedTerms:["pid","gyroscope","flight-controller"]},{id:"ATC_RAT_RLL_I",category:"pid",name:"ATC_RAT_RLL_I",description:"Roll axis rate I gain. Corrects steady-state error (e.g., wind holding).",type:"float",default:.135,range:[.01,.5],step:.005,importance:"high",notes:"Usually set equal to P gain. Too high causes slow oscillation and overshoot.",relatedTerms:["pid"]}
1,{id:"ATC_RAT_RLL_D",category:"pid",name:"ATC_RAT_RLL_D",description:"Roll axis rate D gain. Dampens rapid changes. Sensitive to vibration.",type:"float",default:.0036,range:[0,.02],step:5e-4,importance:"high",notes:"High D values amplify vibration noise. If motors get hot, reduce D first.",relatedTerms:["pid","vibration"]},{id:"ATC_RAT_RLL_FF",category:"pid",name:"ATC_RAT_RLL_FF",description:"Roll axis rate feed-forward. Anticipates control input for faster response.",type:"float",default:0,range:[0,.5],step:.005,importance:"medium",notes:"Reduces P/I workload. Particularly useful for large or heavy frames where P alone is insufficient.",relatedTerms:["pid"]},{id:"ATC_RAT_PIT_P",category:"pid",name:"ATC_RAT_PIT_P",description:"Pitch axis rate P gain.",type:"float",default:.135,range:[.01,.5],step:.005,importance:"high",notes:"Often slightly different from roll due to asymmetric mass distribution.",relatedTerms:["pid"]},{id:"ATC_RAT_PIT_I",category:"pid",name:"ATC_RAT_PIT_I",description:"Pitch axis rate I gain. Corrects steady-state pitch errors.",type:"float",default:.135,range:[.01,.5],step:.005,importance:"high",notes:"Usually equal to pitch P. Compensates for CG offset and wind.",relatedTerms:["pid"]},{id:"ATC_RAT_PIT_D",category:"pid",name:"ATC_RAT_PIT_D",description:"Pitch axis rate D gain. Dampens pitch oscillation.",type:"float",default:.0036,range:[0,.02],step:5e-4,importance:"high",notes:"Same tuning principles as roll D. Reduce if you see pitch oscillation after tuning.",relatedTerms:["pid","vibration"]},{id:"ATC_RAT_PIT_FF",category:"pid",name:"ATC_RAT_PIT_FF",description:"Pitch axis rate feed-forward.",type:"float",default:0,range:[0,.5],step:.005,importance:"medium",notes:"Mirrors roll FF. Set to match ATC_RAT_RLL_FF on symmetric frames.",relatedTerms:["pid"]},{id:"ATC_RAT_YAW_P",category:"pid",name:"ATC_RAT_YAW_P",description:"Yaw axis rate P gain.",type:"float",default:.18,range:[.01,.5],step:.005,importance:"medium",notes:"Yaw authority is typically lower than roll/pitch. May need higher P than roll/pitch.",relatedTerms:["pid"]},{id:"ATC_RAT_YAW_I",category:"pid",name:"ATC_RAT_YAW_I",description:"Yaw axis rate I gain. Corrects heading drift from motor torque imbalance.",type:"float",default:.018,range:[.01,.5],step:.005,importance:"medium",notes:"Typically 1/10 of yaw P. Too high causes yaw wagging.",relatedTerms:["pid"]},{id:"ATC_RAT_YAW_FF",category:"pid",name:"ATC_RAT_YAW_FF",description:"Yaw axis rate feed-forward. Critical for good yaw response on multirotors.",type:"float",default:0,range:[0,.5],step:.005,importance:"medium",notes:"Yaw benefits more from FF than roll/pitch because yaw authority is limited on most frames.",relatedTerms:["pid"]},{id:"ATC_INPUT_TC",category:"pid",name:"ATC_INPUT_TC",description:"Attitude control input time constant. Lower = snappier response.",type:"float",default:.15,range:[.01,.5],step:.01,importance:"low",notes:"0.15 for general use, 0.05 for aggressive flying, 0.3 for smooth video.",relatedTerms:["pid","flight-controller"]},{id:"ATC_ACCEL_R_MAX",category:"pid",name:"ATC_ACCEL_R_MAX",description:"Maximum roll acceleration in centidegrees/s/s. Limits how aggressively the drone rolls.",type:"float",default:11e4,range:[0,72e4],step:1e3,importance:"medium",notes:"0 = no limit. 110000 is default. Lower for smooth video (40000–60000), raise for acro.",relatedTerms:["pid","flight-controller"]},{id:"AUTOTUNE_AXES",category:"pid",name:"AUTOTUNE_AXES",description:"Which axes to autotune. Bitmask: 1=Roll, 2=Pitch, 4=Yaw.",type:"bitmask",default:7,range:[1,7],importance:"high",notes:"7 = all axes. Tune roll+pitch first (3), then yaw separately (4) for best results.",relatedTerms:["pid","ardupilot"]},{id:"FS_THR_ENABLE",category:"safety",name:"FS_THR_ENABLE",description:"Throttle failsafe action when RC signal is lost.",type:"enum",default:1,options:[{value:0,label:"Disabled"},{value:1,label:"RTL"},{value:2,label:"Continue Mission"},{value:3,label:"Land"}],importance:"critical",notes:"RTL is safest for most operations. Land if operating near obstacles. Never disable for commercial ops.",relatedTerms:["failsafe","ardupilot"]},{id:"FS_THR_VALUE",category:"safety",name:"FS_THR_VALUE",description:"PWM value below which throttle failsafe triggers.",type:"integer",default:975,range:[925,1100],step:1,importance:"critical",notes:"Set 10–20 PWM below your transmitter's minimum throttle output.",relatedTerms:["failsafe","pwm"]},{id:"FS_GCS_ENABLE",category:"safety",name:"FS_GCS_ENABLE",description:"GCS failsafe — action when telemetry link to ground station is lost.",type:"enum",default:0,options:[{value:0,label:"Disabled"},{value:1,label:"RTL"},{value:2,label:"Continue Mission"},{value:3,label:"Land"},{value:4,label:"SmartRTL or Land"}],importance:"high",notes:"Enable for autonomous missions. If GCS controls the mission, loss of link should trigger RTL.",relatedTerms:["failsafe","telemetry"]},{id:"FS_EKF_ACTION",category:"safety",name:"FS_EKF_ACTION",description:"Action when EKF variance exceeds thresholds (loss of navigation confidence).",type:"enum",default:1,options:[{value:0,label:"Disabled"},{value:1,label:"Land"},{value:2,label:"AltHold"},{value:3,label:"Land even in Stabilize"}],importance:"critical",notes:"Land is safest. EKF failure means the FC no longer trusts its position estimate.",relatedTerms:["ekf","failsafe","imu","gps"]},{id:"FS_EKF_THRESH",category:"safety",name:"FS_EKF_THRESH",description:"EKF variance threshold that triggers failsafe. Lower = more sensitive.",type:"float",default:.8,range:[.1,1],step:.1,importance:"medium",notes:"0.8 is default. Lower if operating in GPS-denied areas where early warning is critical.",relatedTerms:["ekf","failsafe"]},{id:"BATT_FS_LOW_ACT",category:"safety",name:"BATT_FS_LOW_ACT",description:"Action when battery voltage drops below low threshold.",type:"enum",default:0,options:[{value:0,label:"None"},{value:1,label:"Land"},{value:2,label:"RTL"},{value:3,label:"SmartRTL or Land"},{value:4,label:"SmartRTL or RTL"},{value:5,label:"Terminate"}],importance:"critical",notes:"RTL is recommended. SmartRTL retraces path which is safest in complex environments.",relatedTerms:["failsafe","lipo","battery-safety"]},{id:"BATT_FS_CRT_ACT",category:"safety",name:"BATT_FS_CRT_ACT",description:"Action when battery reaches critical level. More aggressive than low-battery action.",type:"enum",default:0,options:[{value:0,label:"None"},{value:1,label:"Land"},{value:2,label:"RTL"},{value:3,label:"SmartRTL or Land"},{value:4,label:"SmartRTL or RTL"},{value:5,label:"Terminate"}],importance:"critical",notes:"Land immediately is recommended. At critical level there may not be enough power for RTL.",relatedTerms:["failsafe","lipo","battery-safety"]},{id:"FENCE_ENABLE",category:"safety",name:"FENCE_ENABLE",description:"Enable geofence. Prevents flyaway beyond defined boundaries.",type:"enum",default:0,options:[{value:0,label:"Disabled"},{value:1,label:"Enabled"}],importance:"high",notes:"Always enable for commercial operations. Required for many regulatory frameworks.",relatedTerms:["gps","failsafe"]},{id:"FENCE_ACTION",category:"safety",name:"FENCE_ACTION",description:"Action when geofence is breached.",type:"enum",default:1,options:[{value:0,label:"Report only"},{value:1,label:"RTL or Land"},{value:2,label:"Land"},{value:3,label:"SmartRTL or Land"},{value:4,label:"Brake or Land"}],importance:"high",notes:"RTL or Land is standard. Report-only is useful during testing but unsafe for operations.",relatedTerms:["failsafe","gps"]},{id:"FENCE_ALT_MAX",category:"safety",name:"FENCE_ALT_MAX",description:"Maximum altitude above home in meters. Drone returns if exceeded.",type:"float",default:100,range:[10,1e3],step:1,importance:"high",notes:"Set to your local regulatory limit. FAA Part 107: 400ft (122m) AGL.",relatedTerms:["gps","barometer"]},{id:"FENCE_RADIUS",category:"safety",name:"FENCE_RADIUS",description:"Cylindrical geofence radius in meters from home point.",type:"float",default:300,range:[30,1e4],step:10,importance:"high",notes:"Set based on your operational area. Account for RTL overshoot — set 10–20% inside your legal boundary.",relatedTerms:["gps","failsafe"]},{id:"FENCE_ALT_MIN",category:"safety",name:"FENCE_ALT_MIN",description:"Minimum altitude fence in meters. Prevents flying too low in auto modes.",type:"float",default:-10,range:[-100,100],step:1,importance:"medium",notes:"Negative values disable. Set positive for operations where minimum altitude matters (e.g., over water).",relatedTerms:["barometer","failsafe"]},{id:"FS_CRASH_CHECK",category:"safety",name:"FS_CRASH_CHECK",description:"Enable crash detection. Disarms motors if a crash is detected.",type:"enum",default:1,options:[{value:0,label:"Disabled"},{value:1,label:"Disarm on crash"}],importance:"high",notes:"Prevents props from spinning after a crash. Reduces damage and injury risk. Keep enabled.",relatedTerms:["failsafe","imu"]},{id:"FS_VIBE_ENABLE",category:"safety",name:"FS_VIBE_ENABLE",description:"Enable vibration failsafe. Triggers when IMU vibration exceeds safe limits.",type:"enum",default:1,options:[{value:0,label:"Disabled"},{value:1,label:"Enabled"}],importance:"medium",notes:"High vibration degrades IMU data and can cause EKF failure. Land and inspect if triggered.",relatedTerms:["vibration","imu","failsafe"]},{id:"EK3_ENABLE",category:"navigation",name:"EK3_ENABLE",description:"Enable EKF3 state estimator. Should always be enabled.",type:"enum",default:1,options:[{value:0,label:"Disabled"},{value:1,label:"Enabled"}],importance:"critical",notes:"EKF3 is the recommended state estimator. Fuses all sensor data for position/attitude.",relatedTerms:["ekf","sensor-fusion","imu","gps"]},{id:"EK3_IMU_MASK",category:"navigation",name:"EK3_IMU_MASK",description:"Bitmask selecting which IMUs the EKF uses.",type:"bitmask",default:3,range:[0,7],importance:"high",notes:"3 = IMU 0 and 1 (dual redundancy). 7 = all three IMUs on triple-IMU boards.",relatedTerms:["imu","ekf"]},{id:"EK3_SRC1_POSXY",category:"navigation",name:"EK3_SRC1_POSXY",description:"Primary horizontal position source for EKF lane 1.",type:"enum",default:3,options:[{value:0,label:"None"},{value:3,label:"GPS"},{value:4,label:"Beacon"},{value:6,label:"External Nav"}
1],importance:"high",notes:"GPS is standard. ExternalNav for indoor/vision-based systems. Critical for position-hold modes.",relatedTerms:["gps","ekf"]},{id:"EK3_SRC1_POSZ",category:"navigation",name:"EK3_SRC1_POSZ",description:"Primary vertical position (altitude) source for EKF.",type:"enum",default:1,options:[{value:0,label:"None"},{value:1,label:"Barometer"},{value:2,label:"Rangefinder"},{value:3,label:"GPS"},{value:6,label:"External Nav"}],importance:"high",notes:"Barometer is default and most reliable. Rangefinder useful for precision landing. GPS altitude is noisy.",relatedTerms:["barometer","ekf"]},{id:"EK3_SRC1_VELXY",category:"navigation",name:"EK3_SRC1_VELXY",description:"Primary horizontal velocity source for EKF.",type:"enum",default:3,options:[{value:0,label:"None"},{value:3,label:"GPS"},{value:5,label:"Optical Flow"},{value:6,label:"External Nav"}],importance:"high",notes:"GPS is standard. Optical flow for low-altitude indoor flight. Can blend multiple sources across EKF lanes.",relatedTerms:["gps","ekf"]},{id:"WPNAV_SPEED",category:"navigation",name:"WPNAV_SPEED",description:"Horizontal speed in auto modes (cm/s). 500 = 5 m/s.",type:"integer",default:500,range:[50,2e3],step:50,importance:"medium",notes:"Commercial mapping: 300–500. Inspection: 200–400. Transit: 500–1000.",relatedTerms:["gps","ardupilot"]},{id:"WPNAV_SPEED_UP",category:"navigation",name:"WPNAV_SPEED_UP",description:"Maximum climb speed in auto modes (cm/s).",type:"integer",default:250,range:[50,1e3],step:10,importance:"medium",notes:"Constrained by available thrust margin. If hover throttle is high, reduce this value.",relatedTerms:["ardupilot"]},{id:"WPNAV_SPEED_DN",category:"navigation",name:"WPNAV_SPEED_DN",description:"Maximum descent speed in auto modes (cm/s).",type:"integer",default:150,range:[50,500],step:10,importance:"medium",notes:"Keep below vortex ring speed. 150 cm/s is conservative and safe for most airframes.",relatedTerms:["ardupilot"]},{id:"WPNAV_ACCEL",category:"navigation",name:"WPNAV_ACCEL",description:"Horizontal acceleration limit in auto modes (cm/s/s).",type:"integer",default:250,range:[50,500],step:10,importance:"medium",notes:"Lower for smoother waypoint transitions and camera work. Higher for faster mission completion.",relatedTerms:["ardupilot"]},{id:"WPNAV_RADIUS",category:"navigation",name:"WPNAV_RADIUS",description:"Distance in cm from waypoint at which it is considered reached.",type:"integer",default:200,range:[5,1e3],step:5,importance:"medium",notes:"200 cm (2m) for general use. Tighten for survey/mapping (50–100). Loosen for fast transit.",relatedTerms:["gps","ardupilot"]},{id:"RTL_ALT",category:"navigation",name:"RTL_ALT",description:"Altitude in cm for return-to-launch. 0 = return at current altitude.",type:"integer",default:1500,range:[0,3e4],step:100,importance:"high",notes:"1500 = 15m. Set above tallest obstacle. 0 means maintain current altitude.",relatedTerms:["failsafe","gps"]},{id:"RTL_ALT_FINAL",category:"navigation",name:"RTL_ALT_FINAL",description:"Altitude in cm to descend to after reaching home during RTL. 0 = land.",type:"integer",default:0,range:[0,1e4],step:100,importance:"medium",notes:"0 = auto-land at home. Set >0 to loiter at that altitude instead of landing (e.g., 500 = 5m hover).",relatedTerms:["failsafe","gps"]},{id:"RTL_LOIT_TIME",category:"navigation",name:"RTL_LOIT_TIME",description:"Time in milliseconds to loiter above home before descending in RTL.",type:"integer",default:5e3,range:[0,6e4],step:1e3,importance:"low",notes:"5000 = 5 seconds. Gives the pilot time to take over before auto-landing. 0 = descend immediately.",relatedTerms:["failsafe"]},{id:"LOIT_SPEED",category:"navigation",name:"LOIT_SPEED",description:"Maximum horizontal speed in Loiter mode (cm/s).",type:"integer",default:500,range:[20,2e3],step:50,importance:"medium",notes:"Lower for precision inspection (200–300). Default 500 gives a comfortable manual feel in Loiter.",relatedTerms:["gps","ardupilot"]},{id:"BATT_MONITOR",category:"battery",name:"BATT_MONITOR",description:"Battery monitoring type. Defines how voltage/current are measured.",type:"enum",default:4,options:[{value:0,label:"Disabled"},{value:3,label:"Analog V Only"},{value:4,label:"Analog V+I"},{value:5,label:"SMBus"},{value:8,label:"ESC Telemetry"},{value:9,label:"Sum of ESCs"}],importance:"critical",notes:"Analog V+I with a power module is most common. ESC telemetry requires compatible ESCs.",relatedTerms:["lipo","voltage","current"]},{id:"BATT_ARM_VOLT",category:"battery",name:"BATT_ARM_VOLT",description:"Minimum battery voltage to allow arming.",type:"float",default:0,range:[0,60],step:.1,importance:"high",notes:"Set to cells × 3.7V minimum. Prevents taking off with a depleted battery.",relatedTerms:["lipo","voltage"]},{id:"BATT_CAPACITY",category:"battery",name:"BATT_CAPACITY",description:"Battery capacity in mAh. Used for remaining capacity estimation.",type:"integer",default:3300,range:[0,1e5],step:100,importance:"high",notes:"Must match your actual battery. Critical for accurate % remaining display.",relatedTerms:["mah","lipo"]},{id:"BATT_LOW_VOLT",category:"battery",name:"BATT_LOW_VOLT",description:"Low battery voltage threshold (total pack voltage). Triggers BATT_FS_LOW_ACT.",type:"float",default:0,range:[0,60],step:.1,importance:"critical",notes:"Set to cells × 3.5V for low warning. E.g., 6S = 21.0V. Zero disables voltage-based failsafe.",relatedTerms:["lipo","voltage","failsafe"]},{id:"BATT_CRT_VOLT",category:"battery",name:"BATT_CRT_VOLT",description:"Critical battery voltage threshold. Triggers BATT_FS_CRT_ACT. Must be lower than BATT_LOW_VOLT.",type:"float",default:0,range:[0,60],step:.1,importance:"critical",notes:'Set to cells × 3.3V. E.g., 6S = 19.8V. This is the "land NOW" threshold.',relatedTerms:["lipo","voltage","failsafe"]},{id:"BATT_LOW_MAH",category:"battery",name:"BATT_LOW_MAH",description:"Low battery capacity remaining in mAh. Alternative to voltage-based failsafe.",type:"integer",default:0,range:[0,5e4],step:50,importance:"medium",notes:"More accurate than voltage under load. Set to ~20% of BATT_CAPACITY. Requires current sensor.",relatedTerms:["mah","lipo","fail
1safe"]},{id:"BATT_CRT_MAH",category:"battery",name:"BATT_CRT_MAH",description:"Critical battery capacity remaining in mAh. Triggers BATT_FS_CRT_ACT.",type:"integer",default:0,range:[0,5e4],step:50,importance:"medium",notes:"Set to ~10% of BATT_CAPACITY. Last-resort threshold before power loss.",relatedTerms:["mah","lipo","failsafe"]},{id:"BATT_VOLT_PIN",category:"battery",name:"BATT_VOLT_PIN",description:"Analog pin number for voltage sensing. Board-specific.",type:"integer",default:-1,range:[-1,15],step:1,importance:"medium",notes:"-1 = auto-detect (works on most boards). Override only if using a non-standard power module.",relatedTerms:["voltage"]},{id:"BATT_CURR_PIN",category:"battery",name:"BATT_CURR_PIN",description:"Analog pin number for current sensing. Board-specific.",type:"integer",default:-1,range:[-1,15],step:1,importance:"medium",notes:"-1 = auto-detect. Must be configured correctly for accurate mAh consumed and % remaining.",relatedTerms:["current"]},{id:"BATT_VOLT_MULT",category:"battery",name:"BATT_VOLT_MULT",description:"Voltage multiplier to convert pin reading to actual battery voltage.",type:"float",default:10.1,range:[0,100],step:.01,importance:"medium",notes:"Calibrate with a multimeter. Incorrect value means inaccurate voltage display and failsafe triggers.",relatedTerms:["voltage"]},{id:"BATT_AMP_PERVLT",category:"battery",name:"BATT_AMP_PERVLT",description:"Current sensor amps-per-volt scaling. Converts analog reading to actual current.",type:"float",default:17,range:[0,200],step:.1,importance:"medium",notes:"Varies by power module. Matek PM = 18.0, Holybro PM02 = 36.36. Calibrate with a watt meter.",relatedTerms:["current"]},{id:"BATT_AMP_OFFSET",category:"battery",name:"BATT_AMP_OFFSET",description:"Current sensor offset voltage. Corrects for zero-current reading.",type:"float",default:0,range:[-10,10],step:.01,importance:"low",notes:"If current reads >0A with nothing connected, adjust this. Small offset is normal.",relatedTerms:["current"]},{id:"FLTMODE1",category:"rc",name:"FLTMODE1",description:"Flight mode for switch position 1 (lowest PWM).",type:"enum",default:0,options:[{value:0,label:"Stabilize"},{value:2,label:"AltHold"},{value:3,label:"Auto"},{value:4,label:"Guided"},{value:5,label:"Loiter"},{value:6,label:"RTL"},{value:9,label:"Land"},{value:16,label:"PosHold"},{value:17,label:"Brake"},{value:21,label:"SmartRTL"}],importance:"high",notes:"Recommended: Stabilize/AltHold for manual, Loiter for position hold, RTL for safety.",relatedTerms:["ardupilot","flight-controller"]},{id:"FLTMODE2",category:"rc",name:"FLTMODE2",description:"Flight mode for switch position 2.",type:"enum",default:2,options:[{value:0,label:"Stabilize"},{value:2,label:"AltHold"},{value:3,label:"Auto"},{value:4,label:"Guided"},{value:5,label:"Loiter"},{value:6,label:"RTL"},{value:9,label:"Land"},{value:16,label:"PosHold"},{value:17,label:"Brake"},{value:21,label:"SmartRTL"}],importance:"high",notes:"Common setup: Position 1=Stabilize, 2=AltHold, 3=Loiter.",relatedTerms:["ardupilot"]},{id:"FLTMODE3",category:"rc",name:"FLTMODE3",description:"Flight mode for switch position 3.",type:"enum",default:5,options:[{value:0,label:"Stabilize"},{value:2,label:"AltHold"},{value:3,label:"Auto"},{value:4,label:"Guided"},{value:5,label:"Loiter"},{value:6,label:"RTL"},{value:9,label:"Land"},{value:16,label:"PosHold"},{value:17,label:"Brake"},{value:21,label:"SmartRTL"}],importance:"high",notes:'Many pilots put Loiter here as their "safe hover" mode.',relatedTerms:["ardupilot"]},{id:"FLTMODE4",category:"rc",name:"FLTMODE4",description:"Flight mode for switch position 4.",type:"enum",default:3,options:[{value:0,label:"Stabilize"},{value:2,label:"AltHold"},{value:3,label:"Auto"},{value:4,label:"Guided"},{value:5,label:"Loiter"},{value:6,label:"RTL"},{value:9,label:"Land"},{value:16,label:"PosHold"},{value:17,label:"Brake"},{value:21,label:"SmartRTL"}],importance:"medium",notes:"Auto mode is common here for mission execution.",relatedTerms:["ardupilot"]},{id:"FLTMODE5",category:"rc",name:"FLTMODE5",description:"Flight mode for switch position 5.",type:"enum",default:6,options:[{value:0,label:"Stabilize"},{value:2,label:"AltHold"},{value:3,label:"Auto"},{value:4,label:"Guided"},{value:5,label:"Loiter"},{value:6,label:"RTL"},{value:9,label:"Land"},{value:16,label:"PosHold"},{value:17,label:"Brake"},{value:21,label:"SmartRTL"}],importance:"medium",notes:"RTL is common here as an emergency return option.",relatedTerms:["ardupilot","failsafe"]},{id:"FLTMODE6",category:"rc",name:"FLTMODE6",description:"Flight mode for switch position 6 (highest PWM).",type:"enum",default:9,options:[{value:0,label:"Stabilize"},{value:2,label:"AltHold"},{value:3,label:"Auto"},{value:4,label:"Guided"},{value:5,label:"Loiter"},{value:6,label:"RTL"},{value:9,label:"Land"},{value:16,label:"PosHold"},{value:17,label:"Brake"},{value:21,label:"SmartRTL"}],importance:"medium",notes:"Land mode here gives a dedicated emergency landing switch position.",relatedTerms:["ardupilot"]},{id:"FLTMODE_CH",category:"rc",name:"FLTMODE_CH",description:"RC channel used for flight mode selection.",type:"integer",default:5,range:[1,16],step:1,importance:"high",notes:"Channel 5 is standard. Some transmitters use channel 8. Must match your TX switch assignment.",relatedTerms:["ardupilot"]},{id:"RC5_OPTION",category:"rc",name:"RC5_OPTION",description:"Auxiliary function assigned to RC channel 5.",type:"enum",default:0,options:[{value:0,label:"None"},{value:2,label:"Flip"},{value:9,label:"Camera Trigger"},{value:10,label:"Rangefinder"},{value:22,label:"Parachute Enable"},{value:28,label:"Relay 1"},{value:41,label:"Motor Interlock"},{value:52,label:"Acro"},{value:55,label:"Motor Emergency Stop"},{value:65,label:"GPS Disable"},{value:300,label:"Scripting 1"}],importance:"medium",notes:"Override only if not using Ch5 for flight modes. Motor Interlock is useful for safety.",relatedTerms:["ardupilot"]},{id:"RC7_OPTION",category:"rc",name:"RC7_OPTION",description:"Auxiliary function assigned to RC channel 7.",type:"enum",default:0,options:[{value:0,label:"None"},{value:9,label:"Camera Trigger"},{value:10,label:"Rangefinder"},{value:22,label:"Parachute Enable"},{value:28,label:"Relay 1"},{value:41,label:"Motor Interlock"},{value:55,label:"Motor Emergency Stop"},{value:56,label:"Reverse Throttle"},{value:65,label:"GPS Disable"},{value:300,label:"Scripting 1"}],importance:"medium",notes:"Common aux channel for gimbal control, camera trigger, or motor interlock.",relatedTerms:["ardupilot"]},{id:"RC_MAP_THROTTLE",category:"rc",name:"RC_MAP_THROTTLE",description:"RC channel mapped to throttle input.",type:"integer",default:3,range:[1,16],step:1,importance:"medium",notes:"Channel 3 is standard for Mode 2 transmitters (left stick vertical).",relatedTerms:["pwm"]},{id:"RC_MAP_ROLL",category:"rc",name:"RC_MAP_ROLL",description:"RC channel mapped to roll input.",type:"integer",default:1,range:[1,16],step:1,importance:"medium",notes:"Channel 1 is standard for Mode 2 transmitters (right stick horizontal).",relatedTerms:["pwm"]},{id:"RC_MAP_PITCH",category:"rc",name:"RC_MAP_PITCH",description:"RC channel mapped to pitch input.",type:"integer",default:2,range:[1,16],step:1,importance:"medium",notes:"Channel 2 is standard for Mode 2 transmitters (right stick vertical).",relatedTerms:["pwm"]},{id:"COMPASS_USE",category:"compass",name:"COMPASS_USE",description:"Enable use of compass 1 for yaw estimation.",type:"enum",default:1,options:[{value:0,label:"Disabled"},{value:1,label:"Enabled"}],importance:"critical",notes:"Required for GPS-based flight modes. Disable only for indoor/optical-flow setups.",relatedTerms:["compass","gps","ekf"]},{id:"COMPASS_USE2",category:"compass",name:"COMPASS_USE2",description:"Enable use of compass 2 for redundancy.",type:"enum",default:1,options:[{value:0,label:"Disabled"},{value:1,label:"Enabled"}],importance:"high",notes:"Enable if your GPS module has a built-in compass (most do). Provides backup heading.",relatedTerms:["compass","gps"]},{id:"COMPASS_ORIENT",category:"compass",name:"COMPASS_ORIENT",description:"Orientation of compass 1 relative to the flight controller. Used when compass is external.",type:"enum",default:0,options:[{value:0,label:"None (default forward)"},{value:4,label:"Yaw 180°"},{value:6,label:"Yaw 270°"},{value:8,label:"Roll 180°"}],importance:"high",notes:"Must match physical mounting. Wrong orientation causes toilet-bowling or fly-away. Calibrate after setting.",relatedTerms:["compass","imu"]},{id:"COMPASS_EXTERNAL",category:"compass",name:"COMPASS_EXTERNAL",description:"Mark compass 1 as externally mounted (on GPS mast, away from interference).",type:"enum",default:0,options:[{value:0,label:"Internal"},{value:1,label:"External"}
1],importance:"high",notes:"External compasses are less affected by motor/ESC/battery magnetic interference. Preferred for accuracy.",relatedTerms:["compass","gps"]},{id:"COMPASS_PRIO1_ID",category:"compass",name:"COMPASS_PRIO1_ID",description:"Device ID of the compass to use as primary. Set automatically during calibration.",type:"integer",default:0,range:[0,999999],step:1,importance:"medium",notes:"Usually auto-assigned. Override to force the external compass as primary (recommended).",relatedTerms:["compass"]},{id:"COMPASS_DEC",category:"compass",name:"COMPASS_DEC",description:"Magnetic declination angle in degrees. Auto-set from GPS location if available.",type:"float",default:0,range:[-180,180],step:.01,importance:"medium",notes:"Auto-updates from GPS in most cases. Manual set only needed if flying without GPS fix initially.",relatedTerms:["compass","gps"]},{id:"COMPASS_AUTODEC",category:"compass",name:"COMPASS_AUTODEC",description:"Enable automatic declination lookup from GPS coordinates.",type:"enum",default:1,options:[{value:0,label:"Disabled"},{value:1,label:"Enabled"}],importance:"medium",notes:"Keep enabled. Auto-declination uses the World Magnetic Model updated every 5 years.",relatedTerms:["compass","gps"]},{id:"COMPASS_MOT_X",category:"compass",name:"COMPASS_MOT_X",description:"Motor interference compensation on X axis. Set via compassmot calibration.",type:"float",default:0,range:[-1e3,1e3],step:.01,importance:"low",notes:"Run compassmot calibration to auto-set. Compensates for magnetic field from power wires and motors.",relatedTerms:["compass","brushless-motor"]},{id:"COMPASS_OFS_X",category:"compass",name:"COMPASS_OFS_X",description:"Compass 1 X-axis offset. Set during compass calibration.",type:"float",default:0,range:[-2e3,2e3],step:1,importance:"high",notes:"Auto-set during calibration. If offsets exceed 600, suspect nearby magnetic interference — relocate compass.",relatedTerms:["compass"]},{id:"COMPASS_LEARN",category:"compass",name:"COMPASS_LEARN",description:"Enable in-flight compass learning for offset and motor compensation.",type:"enum",default:0,options:[{value:0,label:"Disabled"},{value:1,label:"Internal learning"},{value:2,label:"EKF learning"},{value:3,label:"InFlight calibration"}],importance:"medium",notes:"EKF learning (2) is recommended. Continuously refines compass offset during flight.",relatedTerms:["compass","ekf"]},{id:"GPS_TYPE",category:"gps",name:"GPS_TYPE",description:"GPS receiver protocol type for port 1.",type:"enum",default:1,options:[{value:0,label:"None"},{value:1,label:"Auto"},{value:2,label:"uBlox"},{value:5,label:"NMEA"},{value:9,label:"DroneCAN"},{value:17,label:"UBlox-MovingBaseline"}],importance:"critical",notes:"Auto-detect (1) works for most modules. DroneCAN (9) for CAN-bus GPS like CUAV NEO 3.",relatedTerms:["gps"]},{id:"GPS_TYPE2",category:"gps",name:"GPS_TYPE2",description:"GPS receiver protocol type for port 2 (dual GPS setups).",type:"enum",default:0,options:[{value:0,label:"None"},{value:1,label:"Auto"},{value:2,label:"uBlox"},{value:9,label:"DroneCAN"},{value:17,label:"UBlox-MovingBaseline"}],importance:"medium",notes:"Enable for dual-GPS redundancy. Second GPS provides failover and can improve yaw estimation.",relatedTerms:["gps"]},{id:"GPS_AUTO_SWITCH",category:"gps",name:"GPS_AUTO_SWITCH",description:"Automatic switching between GPS receivers based on signal quality.",type:"enum",default:1,options:[{value:0,label:"Disabled (use GPS1)"},{value:1,label:"Use best GPS"},{value:2,label:"Blend"},{value:4,label:"Use GPS1 if both have fix"}],importance:"medium",notes:"Blend (2) combines both GPS readings for better accuracy. Requires dual GPS hardware.",relatedTerms:["gps","ekf"]},{id:"GPS_GNSS_MODE",category:"gps",name:"GPS_GNSS_MODE",description:"Which GNSS constellations to use. Bitmask: 1=GPS, 2=SBAS, 4=Galileo, 8=BeiDou, 16=IMES, 32=QZSS, 64=GLONASS.",type:"bitmask",default:0,range:[0,127],importance:"high",notes:"0 = use all available. For best urban performance enable GPS+Galileo+GLONASS+BeiDou (77). More constellations = more satellites visible.",relatedTerms:["gps"]},{id:"GPS_HDOP_GOOD",category:"gps",name:"GPS_HDOP_GOOD",description:"Maximum HDOP considered acceptable for arming. Lower = more accurate fix required.",type:"float",default:140,range:[50,999],step:10,importance:"medium",notes:"140 (1.4 HDOP) is default. Tighten to 100 for survey/mapping. HDOP >2.0 indicates poor satellite geometry.",relatedTerms:["gps"]},{id:"GPS_MIN_SATS",category:"gps",name:"GPS_MIN_SATS",description:"Minimum number of satellites required before arming in GPS modes.",type:"integer",default:6,range:[0,20],step:1,importance:"medium",notes:"6 is minimum for a usable 3D fix. Raise to 10+ for survey-grade operations.",relatedTerms:["gps"]},{id:"GPS_POS1_X",category:"gps",name:"GPS_POS1_X",description:"GPS antenna position offset from IMU in meters — X axis (forward/back).",type:"float",default:0,range:[-5,5],step:.01,importance:"low",notes:"Positive = forward of IMU. Important for large frames where GPS is far from FC. Improves EKF accuracy.",relatedTerms:["gps","imu","ekf"]},{id:"GPS_SAVE_CFG",category:"gps",name:"GPS_SAVE_CFG",description:"Save GPS module configuration to non-volatile memory.",type:"enum",default:2,options:[{value:0,label:"Never"},{value:1,label:"Once"},{value:2,label:"Every boot"}],importance:"low",notes:"Every boot (2) ensures consistent config. Speeds up satellite acquisition on power-on.",relatedTerms:["gps"]},{id:"LOG_BACKEND_TYPE",category:"logging",name:"LOG_BACKEND_TYPE",description:"Log storage destination.",type:"enum",default:1,options:[{value:0,label:"None"},{value:1,label:"File (SD card)"},{value:2,label:"MAVLink"},{value:3,label:"Both"}],importance:"high",notes:"File is standard. MAVLink streams logs to GCS in real-time. Both uses more bandwidth.",relatedTerms:["ardupilot"]},{id:"LOG_DISARMED",category:"logging",name:"LOG_DISARMED",description:"Log data while disarmed. Useful for pre-flight diagnostics.",type:"enum",default:0,options:[{value:0,label:"Disabled"},{value:1,label:"Enabled"}],importance:"medium",notes:"Enable when debugging sensor issues on the ground. Disable for normal ops to save storage.",relatedTerms:["ardupilot"]},{id:"LOG_REPLAY",category:"logging",name:"LOG_REPLAY",description:"Enable full EKF replay logging. Records all sensor data for post-flight re-estimation.",type:"enum",default:0,options:[{value:0,label:"Disabled"},{value:1,label:"Enabled"}],importance:"low",notes:"Generates large log files. Use when tuning EKF or diagnosing navigation issues.",relatedTerms:["ekf","ardupilot"]},{id:"LOG_FILE_DSRMROT",category:"logging",name:"LOG_FILE_DSRMROT",description:"Start a new log file on each disarm. Separates flights into individual files.",type:"enum",default:1,options:[{value:0,label:"One continuous file"},{value:1,label:"New file per flight"}],importance:"medium",notes:"Enabled by default. Makes it easier to find and analyze individual flight logs.",relatedTerms:["ardupilot"]},{id:"LOG_FILE_MB_FREE",category:"logging",name:"LOG_FILE_MB_FREE",description:"Minimum free space on SD card in MB before logging stops.",type:"integer",default:500,range:[10,1e4],step:10,importance:"low",notes:"Prevents filling the SD card completely. Check card space regularly on long mission days.",relatedTerms:["ardupilot"]},{id:"INS_LOG_BAT_MASK",category:"logging",name:"INS_LOG_BAT_MASK",description:"Bitmask of IMUs to log raw data for. Used for vibration analysis.",type:"bitmask",default:0,range:[0,7],importance:"medium",notes:"Enable (1) for vibration analysis post-flight. Generates large logs. Disable for normal ops.",relatedTerms:["imu","vibration"]},{id:"TERRAIN_ENABLE",category:"terrain",name:"TERRAIN_ENABLE",description:"Enable terrain following using SRTM data downloaded from GCS.",type:"enum",default:1,options:[{value:0,label:"Disabled"},{value:1,label:"Enabled"}],importance:"medium",notes:"Requires SD card and Mission Planner terrain data. Essential for missions over hilly terrain.",relatedTerms:["gps","barometer"]},{id:"TERRAIN_SPACING",category:"terrain",name:"TERRAIN_SPACING",description:"Terrain grid spacing in meters. Resolution of terrain altitude data.",type:"integer",default:100,range:[30,1e3],step:10,importance:"low",notes:"100m is default. Lower values g
1ive more accurate terrain following but use more memory.",relatedTerms:["gps"]},{id:"RNGFND1_TYPE",category:"terrain",name:"RNGFND1_TYPE",description:"Type of rangefinder connected. LiDAR or ultrasonic for precise altitude.",type:"enum",default:0,options:[{value:0,label:"None"},{value:1,label:"Analog"},{value:2,label:"MaxSonar (I2C)"},{value:5,label:"PWM"},{value:8,label:"LightWare (I2C)"},{value:9,label:"LightWare (Serial)"},{value:12,label:"LeddarOne"},{value:20,label:"Benewake TF02/Plus"},{value:25,label:"Benewake TFMini-Plus (I2C)"}],importance:"medium",notes:"LiDAR rangefinders give centimeter-accurate altitude below 40m. Essential for precision landing.",relatedTerms:["barometer"]},{id:"RNGFND1_MAX_CM",category:"terrain",name:"RNGFND1_MAX_CM",description:"Maximum range of the rangefinder in centimeters.",type:"integer",default:700,range:[10,12e3],step:10,importance:"medium",notes:"Set to your sensor's rated max range. TFMini = 1200cm (12m), LightWare SF11/C = 12000cm (120m).",relatedTerms:["barometer"]},{id:"RNGFND1_MIN_CM",category:"terrain",name:"RNGFND1_MIN_CM",description:"Minimum range of the rangefinder in centimeters.",type:"integer",default:20,range:[0,500],step:1,importance:"low",notes:"Readings below this are ignored. Set to sensor's rated minimum to avoid false readings at ground level.",relatedTerms:["barometer"]},{id:"RNGFND_LANDING",category:"terrain",name:"RNGFND_LANDING",description:"Use rangefinder during landing for precise touchdown altitude.",type:"enum",default:0,options:[{value:0,label:"Disabled"},{value:1,label:"Enabled"}],importance:"medium",notes:"Dramatically improves auto-landing accuracy. Barometer alone drifts due to ground effect pressure changes.",relatedTerms:["barometer"]},{id:"BARO_PRIMARY",category:"terrain",name:"BARO_PRIMARY",description:"Select which barometer to use as primary altitude source.",type:"enum",default:0,options:[{value:0,label:"Baro 1 (onboard)"},{value:1,label:"Baro 2 (if available)"}],importance:"medium",notes:"Some FCs have dual barometers for redundancy. Primary should be the one least affected by airflow.",relatedTerms:["barometer","flight-controller"]},{id:"BARO_GND_TEMP",category:"terrain",name:"BARO_GND_TEMP",description:"Ground temperature in degrees C for altitude calculation. Auto-set on boot.",type:"float",default:0,range:[-50,60],step:1,importance:"low",notes:"Auto-calibrates on boot. Manual override only needed for extreme accuracy or if temperature sensor is faulty.",relatedTerms:["barometer"]}]};function H({onClose:c,activityConfig:t,unlocks:h}){var f;const n=(t==null?void 0:t.config)||t||{},p=n.category||(t==null?void 0:t.category)||"essential",l=n.focusParam||(t==null?void 0:t.focusParam)||null,[o,y]=b.useState(p),[m,u]=b.useState(""),[d,T]=b.useState(l);b.useEffect(()=>{n.category&&y(n.category),n.focusParam&&T(n.focusParam)},[n.category,n.focusParam]);const A=b.useMemo(()=>{let a=N.params;if(o!=="all"&&(a=a.filter(g=>g.category===o)),m.length>=2){const g=m.toLowerCase();a=a.filter(S=>S.name.toLowerCase().includes(g)||S.description.toLowerCase().includes(g)||S.notes.toLowerCase().includes(g))}return a},[o,m]);return e.jsxs("div",{className:"pe",children:[e.jsxs("div",{className:"pe-header",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"pe-title",children:"ArduPilot Parameters"}),e.jsx("p",{className:"pe-subtitle",children:"Configuration reference for ArduCopter"})]}),c&&e.jsx("button",{className:"pe-close",onClick:c,children:"← Back"})]}),e.jsxs("div",{className:"pe-toolbar",children:[e.jsx("input",{className:"pe-search",type:"text",placeholder:"Search parameters...",value:m,onChange:r(a=>u(a.target.value),"onChange")}),e.jsx("div",{className:"pe-cats",children:N.categories.map(a=>e.jsxs("button",{className:`pe-cat ${o===a.id?"pe-cat--active":""}`,onClick:r(()=>y(a.id),"onClick"),children:[e.jsx("span",{className:"pe-cat__icon",children:a.icon}),e.jsx("span",{children:a.name})]},a.id))})]}),o!=="all"&&e.jsx("p",{className:"pe-cat-desc",children:(f=N.categories.find(a=>a.id===o))==null?void 0:f.description}),e.jsx("div",{className:"pe-list",children:A.map(a=>{const g=d===a.id;return e.jsxs("div",{className:`pe-param ${g?"pe-param--expanded":""}`,children:[e.jsxs("button",{className:"pe-param__header",onClick:r(()=>T(g?null:a.id),"onClick"),children:[e.jsxs("div",{className:"pe-param__name-row",children:[e.jsx("code",{className:"pe-param__name",children:a.name}),e.jsx("span",{className:`pe-param__importance pe-param__importance--${a.importance}`,children:a.importance})]}),e.jsx("p",{className:"pe-param__desc",children:a.description})]}),g&&e.jsxs("div",{className:"pe-param__detail",children:[e.jsxs("div",{className:"pe-param__meta",children:[e.jsxs("div",{className:"pe-param__meta-row",children:[e.jsx("span",{className:"pe-param__meta-key",children:"Type"}),e.jsx("span",{className:"pe-param__meta-val",children:a.type})]}),e.jsxs("div",{className:"pe-param__meta-row",children:[e.jsx("span",{className:"pe-param__meta-key",children:"Default"}),e.jsx("code",{className:"pe-param__meta-val",children:String(a.default)})]}),a.range&&e.jsxs("div",{className:"pe-param__meta-row",children:[e.jsx("span",{className:"pe-param__meta-key",children:"Range"}),e.jsxs("span",{className:"pe-param__meta-val",children:[a.range[0]," — ",a.range[1]]})]})]}),a.options&&e.jsxs("div",{className:"pe-param__options",children:[e.jsx("span",{className:"pe-param__options-title",children:"Values:"}),a.options.map(S=>e.jsxs("div",{className:"pe-param__option",children:[e.jsx("code",{className:"pe-param__option-val",children:S.value}),e.jsx("span",{children:S.label}),S.value===a.default&&e.jsx("span",{className:"pe-param__option-default",children:"default"})]},S.value))]}),e.jsx("div",{className:"pe-param__notes",children:e.jsx(x,{text:a.notes})})]})]},a.id)})}),A.length===0&&e.jsx("p",{className:"pe-empty",children:"No parameters match your search."})]})}r(H,"ParameterExplorer");const P=[{id:"accel",name:"Accelerometer Calibration",icon:"↕",purpose:"Tells the flight controller which way is level. Required before first flight.",when:"Initial setup, after mounting changes, after crash.",steps:[{title:"Place on Level Surface",detail:"Set the drone on a confirmed level surface. A machined table or calibrated level is ideal. The surface must not vibrate."}
1,{title:"Start Calibration",detail:'In Mission Planner, go to Setup > Mandatory Hardware > Accel Calibration. Click "Calibrate Accel" and follow the prompts.'},{title:"Position 1 — Level",detail:"Hold the drone level with the top facing up. Press any key when stable. Hold still for 5 seconds."},{title:"Position 2 — Left Side",detail:"Roll the drone onto its left side. The left motors should be pointing down. Hold still and confirm."},{title:"Position 3 — Right Side",detail:"Roll onto the right side. Right motors pointing down. Hold still and confirm."},{title:"Position 4 — Nose Down",detail:"Tilt so the nose points straight down. Hold still and confirm."},{title:"Position 5 — Nose Up",detail:"Tilt so the nose points straight up. Hold still and confirm."},{title:"Position 6 — Inverted",detail:"Flip completely upside down. Top plate facing the ground. Hold still and confirm."},{title:"Verify",detail:"After completion, check the HUD shows level when the drone is level. If the artificial horizon drifts more than 2°, recalibrate."}]},{id:"compass",name:"Compass Calibration",icon:"◎",purpose:"Maps local magnetic interference so the flight controller knows true heading.",when:"Initial setup, new location with different magnetic environment, after adding/moving electronics.",steps:[{title:"Move Away from Metal",detail:"Calibrate outdoors, away from buildings, cars, and metal structures. At least 10 meters from large metal objects."},{title:"Start Calibration",detail:'Mission Planner > Setup > Mandatory Hardware > Compass. Click "Start" on Onboard Mag Calibration.'},{title:"Rotate in All Orientations",detail:"Slowly rotate the drone in all directions — imagine painting the inside of an invisible sphere. Roll, pitch, and yaw through every angle."},{title:"Watch Progress Bars",detail:'Green bars fill as the calibration collects data from different orientations. Keep rotating until all bars are full or it says "Success".'},{title:"Accept Calibration",detail:"If offsets are reasonable (typically under 600), accept the calibration. Very high offsets indicate mounting near magnetic interference."},{title:"Verify",detail:"Point the nose north and check Mission Planner shows ~0° heading. Point east, should show ~90°. Errors over 10° indicate interference."}]},{id:"radio",name:"Radio Calibration",icon:"◇",purpose:"Maps your transmitter stick ranges so the flight controller interprets inputs correctly.",when:"Initial setup, new transmitter, after transmitter firmware update.",steps:[{title:"Power Transmitter",detail:"Turn on your transmitter and ensure it is bound to the receiver on the drone."},{title:"Start Calibration",detail:'Mission Planner > Setup > Mandatory Hardware > Radio Calibration. Click "Calibrate Radio".'},{title:"Move All Sticks",detail:"Move each stick to its full extent — up, down, left, right. Also toggle all switches through their positions."},{title:"Center and Confirm",detail:'Return all sticks and switches to center/default positions. Click "Click when Done".'},{title:"Verify Channels",detail:"Move each stick and verify the correct channel responds. Throttle should be Channel 3, Yaw on Channel 4 (Mode 2)."},{title:"Check Ranges",detail:"Normal range is ~1100 to ~1900 with center at ~1500. If ranges are very different, check transmitter endpoint settings."}]},{id:"esc",name:"ESC Calibration",icon:"⚡",purpose:"Synchronizes the throttle range between flight controller and all ESCs.",when:"New ESCs with PWM protocol. NOT needed for DShot ESCs.",steps:[{title:"Remove Propellers",detail:"CRITICAL: Remove ALL propellers before ESC calibration. Motors WILL spin during this process."},{title:"Set PWM Type",detail:"Ensure MOT_PWM_TYPE is set to 0 (Normal PWM). DShot ESCs do not need calibration — skip this entirely for DShot."},{title:"All-at-Once Method",detail:"Disconnect battery. Set transmitter throttle to maximum. Connect battery. Wait for ESC startup tones."},{title:"Set Low Point",detail:"Move throttle to minimum. ESCs will beep confirming the low point has been set."},{title:"Test",detail:"Slowly advance throttle. All motors should start spinning at approximately the same throttle position."}
1,{title:"Verify Sync",detail:"If one motor starts significantly before others, that ESC calibration failed. Repeat the process or calibrate individually."}]},{id:"level",name:"Level Horizon",icon:"—",purpose:"Sets the accelerometer level reference for your specific mounting angle.",when:"If the drone drifts consistently in one direction during hover.",steps:[{title:"Place on Level Surface",detail:"Same as accelerometer calibration — confirmed level surface, no vibration."},{title:"Calibrate Level",detail:'Mission Planner > Setup > Mandatory Hardware > Accel Calibration > "Calibrate Level".'},{title:"Wait",detail:"Hold the drone perfectly still on the level surface. The process takes 2-3 seconds."},{title:"Verify",detail:"HUD should show 0° pitch and 0° roll when on the level surface. This corrects for any mounting angle offset."}]}];function V(){const[c,t]=b.useState(null),[h,n]=b.useState({}),p=P.find(o=>o.id===c),l=r((o,y)=>{const m=`${o}-${y}`;n(u=>({...u,[m]:!u[m]}))},"toggleStep");return e.jsxs("div",{className:"cg",children:[e.jsx("h3",{className:"cg-title",children:"Calibration Procedures"}),p?e.jsxs("div",{className:"cg-detail",children:[e.jsx("button",{className:"cg-back",onClick:r(()=>t(null),"onClick"),children:"← All Calibrations"}),e.jsxs("h4",{className:"cg-detail__title",children:[p.icon," ",p.name]}),e.jsx("p",{className:"cg-detail__purpose",children:p.purpose}),e.jsxs("p",{className:"cg-detail__when",children:[e.jsx("strong",{children:"When to calibrate:"})," ",p.when]}),e.jsx("div",{className:"cg-steps",children:p.steps.map((o,y)=>{const m=h[`${p.id}-${y}`];return e.jsxs("div",{className:`cg-step ${m?"cg-step--done":""}`,children:[e.jsx("button",{className:"cg-step__check",onClick:r(()=>l(p.id,y),"onClick"),children:m?"✓":y+1}),e.jsxs("div",{className:"cg-step__content",children:[e.jsx("h5",{className:"cg-step__title",children:o.title}),e.jsx(x,{text:o.detail,className:"cg-step__detail"})]})]},y)})})]}):e.jsx("div",{className:"cg-list",children:P.map(o=>e.jsxs("button",{className:"cg-card",onClick:r(()=>t(o.id),"onClick"),children:[e.jsx("span",{className:"cg-card__icon",children:o.icon}),e.jsxs("div",{className:"cg-card__info",children:[e.jsx("span",{className:"cg-card__name",children:o.name}),e.jsx("span",{className:"cg-card__purpose",children:o.purpose})]}),e.jsxs("span",{className:"cg-card__steps",children:[o.steps.length," steps"]})]},o.id))})]})}r(V,"CalibrationGuide");const M=[{id:"stabilize",name:"Stabilize",value:0,gpsRequired:!1,category:"manual",difficulty:"advanced",description:"Manual control with self-leveling. No altitude or position hold. Full pilot authority.",when:"Emergency fallback, experienced pilot preference, indoor flight without GPS.",risks:"Will not hold altitude or position. Requires constant pilot input."},{id:"alt-hold",name:"Altitude Hold",value:2,gpsRequired:!1,category:"manual",difficulty:"intermediate",description:"Holds altitude using barometer. Pilot controls horizontal movement and yaw.",when:"Indoor flight, GPS-denied environments, learning to fly.",risks:"No position hold — will drift with wind. Baro can be affected by prop wash."},{id:"loiter",name:"Loiter",value:5,gpsRequired:!0,category:"assisted",difficulty:"beginner",description:"GPS position and altitude hold. Drone stays in place when sticks are centered.",when:"Default for most commercial operations. Best for beginners.",risks:"Requires good GPS (>8 sats, HDOP <2). Will toilet-bowl if compass is miscalibrated."},{id:"poshold",name:"PosHold",value:16,gpsRequired:!0,category:"assisted",difficulty:"beginner",description:"Like Loiter but with more direct stick feel. Blends GPS hold with manual response.",when:"Inspection work where smooth manual control with position hold is needed.",risks:"Same GPS requirements as Loiter."},{id:"auto",name:"Auto",value:3,gpsRequired:!0,category:"autonomous",difficulty:"beginner",description:"Executes pre-programmed mission waypoints autonomously.",when:"Mapping surveys, pre-planned inspection routes, repetitive flight paths.",risks:"Mission must be validated before flight. Ensure RTL is configured as fallback."},{id:"guided",name:"Guided",value:4,gpsRequired:!0,category:"autonomous",difficulty:"intermediate",description:"Ground station sends real-time position commands. Drone flies to commanded point.",when:"Ground station-directed operations, companion computer control.",risks:"Depends on telemetry link. If link is lost, failsafe activates."},{id:"rtl",name:"Return to Launch",value:6,gpsRequired:!0,category:"safety",difficulty:"beginner",description:"Flies home to launch point at RTL_ALT, then lands.",when:"Emergency, low battery, signal loss, end of mission.",risks:"Ensure RTL_ALT clears all obstacles. Home position must be set correctly."},{id:"land",name:"Land",value:9,gpsRequired:!1,category:"safety",difficulty:"beginner",description:"Descends vertically and lands at current position.",when:"Emergency landing, GPS-denied return not possible.",risks:"Lands wherever it currently is. No obstacle avoidance."},{id:"brake",name:"Brake",value:17,gpsRequired:!0,category:"safety",difficulty:"beginner",description:"Immediately stops horizontal movement and holds position.",when:"Emergency stop during any flight mode.",risks:"Aggressive deceleration. Not for use near obstacles."},{id:"smartrtl",name:"Smart RTL",value:21,gpsRequired:!0,category:"safety",difficulty:"intermediate",description:"Retraces the outbound flight path home. Avoids obstacles along the return.",when:"Complex environments where direct RTL might hit obstacles.",risks:"Uses stored breadcrumb path. If memory is full, falls back to regular RTL."}],W=[{id:"all",label:"All Modes"},{id:"manual",label:"Manual"},{id:"assisted",label:"Assisted"},{id:"autonomous",label:"Autonomous"},{id:"safety",label:"Safety"}];function U(){const[c,t]=b.useState("all"),[h,n]=b.useState(null),p=c==="all"?M:M.filter(l=>l.category===c);return e.jsxs("div",{className:"fmc",children:[e.jsx("h3",{className:"fmc-title",children:"Flight Modes Reference"}),e.jsx("div",{className:"fmc-cats",children:W.map(l=>e.jsx("button",{className:`fmc-cat ${c===l.id?"fmc-cat--active":""}`,onClick:r(()=>t(l.id),"onClick"),children:l.label},l.id))}),e.jsx("div",{className:"fmc-list",children:p.map(l=>{const o=h===l.id;return e.jsxs("div",{className:`fmc-mode ${o?"fmc-mode--expanded":""}`,children:[e.jsxs("button",{className:"fmc-mode__header",onClick:r(()=>n(o?null:l.id),"onClick"),children:[e.jsxs("div",{className:"fmc-mode__left",children:[e.jsx("span",{className:"fmc-mode__name",children:l.name}),e.jsxs("div",{className:"fmc-mode__tags",children:[e.jsx("span",{className:`fmc-tag fmc-tag--${l.difficulty}`,children:l.difficulty}),l.gpsRequired&&e.jsx("span",{className:"fmc-tag fmc-tag--gps",children:"GPS"}),e.jsx("span",{className:"fmc-tag fmc-tag--cat",children:l.category})]})]}),e.jsx("code",{className:"fmc-mode__value",children:l.value})]}),o&&e.jsxs("div",{className:"fmc-mode__detail",children:[e.jsx("p",{className:"fmc-mode__desc",children:l.description}),e.jsxs("div",{className:"fmc-mode__row",children:[e.jsx("span",{className:"fmc-mode__label",children:"When to use:"}),e.jsx("span",{children:l.when})]}),e.jsxs("div",{className:"fmc-mode__row fmc-mode__row--warn",children:[e.jsx("span",{className:"fmc-mode__label",children:"Risks:"}),e.jsx("span",{children:l.risks})]})]})]},l.id)})})]})}r(U,"FlightModeConfig");const L={name:"V2D Survey Quad",desc:"A 650mm commercial quadcopter with X motor layout for aerial mapping operations. 6S power system, DShot ESCs, dual GPS, external 
1compass on mast.",specs:{frame:"Quad X (650mm)",motors:"4x T-Motor U7 V2 (320KV)",escs:"4x T-Motor FLAME 60A (DShot600)",fc:"CubeOrange (STM32H743)",gps:"Here3 (CAN GPS + external compass)",battery:"6S 16000mAh LiPo",receiver:"TBS Crossfire Nano RX (SBUS)",telemetry:"RFD900x (UART, 57600 baud)"}},q=[{id:"frame",title:"Frame Configuration",icon:"🛠",desc:"Tell ArduPilot what aircraft it’s running on. Wrong frame config = flip on takeoff.",params:[{name:"FRAME_CLASS",question:"Based on the aircraft specs above, what value does FRAME_CLASS need?",options:[{value:0,label:"0"},{value:1,label:"1",correct:!0},{value:2,label:"2"},{value:3,label:"3"}],explanation:"FRAME_CLASS = 1 tells ArduPilot to use quad motor mixing (4 motors). Setting this wrong means the firmware sends signals to the wrong number of outputs."},{name:"FRAME_TYPE",question:"Check the motor arrangement in the specs. What FRAME_TYPE matches this layout?",options:[{value:0,label:"0"},{value:1,label:"1",correct:!0},{value:3,label:"3"},{value:2,label:"2"}],explanation:"FRAME_TYPE = 1 (X) places Motor 1 at front-right. Plus layout places Motor 1 directly forward. Using the wrong layout means motor direction assignments are wrong."}]},{id:"motor",title:"Motor & ESC Protocol",icon:"⚙",desc:"Configure how the FC communicates with the ESCs and set voltage limits.",params:[{name:"MOT_PWM_TYPE",question:"Review the ESC specs. What protocol type should MOT_PWM_TYPE be set to?",options:[{value:0,label:"0"},{value:4,label:"4"},{value:5,label:"5"},{value:6,label:"6",correct:!0}],explanation:"DShot600 is a digital protocol — no ESC calibration needed, more precise, and supports telemetry. Always match the type to what your ESCs supp
1ort."},{name:"MOT_BAT_VOLT_MAX",question:"A fully charged LiPo cell reads 4.2V. Given the battery in the spec sheet, what is MOT_BAT_VOLT_MAX?",options:[{value:16.8,label:"16.8V"},{value:22.2,label:"22.2V"},{value:25.2,label:"25.2V",correct:!0},{value:50.4,label:"50.4V"}],explanation:"Each LiPo cell is 4.2V fully charged. 6S × 4.2V = 25.2V. This value lets the firmware calculate remaining capacity accurately."},{name:"MOT_BAT_VOLT_MIN",question:"LiPo cells should not discharge below 3.5V for longevity. Calculate MOT_BAT_VOLT_MIN for this battery pack.",options:[{value:14.4,label:"14.4V"},{value:19.8,label:"19.8V"},{value:21,label:"21.0V",correct:!0},{value:22.2,label:"22.2V"}],explanation:"3.5V per cell is a safe minimum for LiPo longevity. 6 × 3.5 = 21.0V. Going below 3.3V/cell risks permanent cell damage."}]},{id:"battery",title:"Battery Monitoring",icon:"🔋",desc:"Configure voltage and current sensing so failsafes know when to trigger.",params:[{name:"BATT_MONITOR",question:"The FC's power module provides both voltage and current measurements. Which BATT_MON
1ITOR setting uses both inputs?",options:[{value:0,label:"0 — Disabled"},{value:3,label:"3 — Voltage only"},{value:4,label:"4 — Voltage + Current",correct:!0},{value:8,label:"8 — CAN bus"}],explanation:"Analog voltage + current gives the firmware both metrics needed for accurate capacity estimation and failsafe triggers. The CubeOrange power module provides both."},{name:"BATT_CAPACITY",question:"Check the battery spec. What value should BATT_CAPACITY be set to for accurate remaining-capacity calculations?",options:[{value:5e3,label:"5000"},{value:1e4,label:"10000"},{value:16e3,label:"16000",correct:!0},{value:22e3,label:"22000"}],explanation:"Setting the correct capacity allows the firmware to calculate remaining mAh and trigger capacity-based failsafes (BATT_LOW_MAH)."},{name:"BATT_LOW_VOLT",question:"BATT_LOW_VOLT should give the pilot enough time to RTL but not trigger unnecessarily. For this pack, 3.6V per cell is recommended. What total voltage is that?",options:[{value:21,label:"21.0V"},{value:21.6,label:"21.6V",correct:!0},{value:22.2,label:"22.2V"},{value:19.8,label:"19.8V"}],explanation:"3.6V/cell gives enough warning to RTL before hitting the critical threshold. Too high triggers unnecessary warnings; too low risks not having time to return."}]},{id:"failsafe",title:"Failsafe Configuration",icon:"⚠",desc:"Set what happens when things go wrong — signal loss, low battery, EKF failure.",params:[{name:"FS_THR_ENABLE",question:"During a mapping flight, the RC transmitter loses connection. What automated response gives the best chance of recovering the aircraft?",options:[{value:0,label:"0 — Disabled"},{value:1,label:"1 — RTL",correct:!0},{value:2,label:"2 — Continue"},{value:3,label:"3 — Land"}],explanation:'RTL is the safest default for RC loss — the drone returns to a known safe location. "Continue mission" is useful for autonomous survey but requires more setup. "Disabled" is dangerous.'}
1,{name:"FS_GCS_ENABLE",question:"The RFD900x telemetry link drops during a survey. The pilot still has RC control. What GCS failsafe action is appropriate?",options:[{value:0,label:"0 — Disabled"},{value:1,label:"1 — RTL",correct:!0},{value:2,label:"2 — Continue"},{value:3,label:"3 — Land"}],explanation:'RTL on GCS loss is the conservative default. For autonomous survey operations where GCS loss is expected (long range), "Continue mission" may be appropriate.'},{name:"FENCE_ENABLE",question:"The survey area is near an airport. The operations manual requires a hard boundary. What should FENCE_ENABLE be set to?",options:[{value:0,label:"0 — Disabled"},{value:1,label:"1 — Enabled",correct:!0}],explanation:"Geofencing is a safety net for commercial operations. It prevents the drone from exceeding altitude limits or flying beyond a set radius from home. Required by many SOPs."}]},{id:"flightmodes",title:"Flight Mode Assignment",icon:"✈",desc:"Assign flight modes to your transmitter switch positions for the mission profile.",params:[{name:"FLTMODE1",question:"The pilot needs a default mode for takeoff and general positioning during survey setup. The aircraft has GPS. What mode keeps the quad stationary when the pilot releases the sticks?",options:[{value:0,label:"0"},{value:2,label:"2"},{value:5,label:"5",correct:!0},{value:3,label:"3"}],explanation:"Loiter provides GPS position and altitude hold — the drone stays put when sticks are centered. Stabilize requires constant pilot input. AltHold holds altitude but drifts with wind. Auto would immediately start a mission."},{name:"FLTMODE4",question:"Mid-flight, the pilot needs to switch to a mode that follows the uploaded survey grid autonomously. Which mode executes waypoint missions from the flight controller’s memory?",options:[{value:4,label:"4"},{value:5,label:"5"},{value:3,label:"3",correct:!0},{value:6,label:"6"}],explanation:"Auto mode executes the pre-uploaded mission. Guided requires real-time GCS commands for each waypoint. Loiter just holds position. RTL returns home."},{name:"FLTMODE6",question:"The pilot’s last switch position is reserved for emergencies — signal degradation, unexpected weather, or disorientation. What mode should bring the aircraft back without further pilot input?",options:[{value:0,label:"0"},{value:6,label:"6",correct:!0},{value:9,label:"9"},{value:17,label:"17"}],explanation:"RTL autonomously navigates home at a configured altitude and lands. Land desce
1nds at the current position (which may be far away). Brake only stops movement. Stabilize requires full manual control — the opposite of what you want in an emergency."}]},{id:"preflight",title:"Pre-Arm & Safety",icon:"✅",desc:"Final safety settings before the aircraft is ready for first power-up.",params:[{name:"ARMING_CHECK",question:"This is a first flight on a new build. A technician suggests setting ARMING_CHECK to 0 to skip a GPS warning. Is that the right approach?",options:[{value:0,label:"0"},{value:1,label:"1",correct:!0}],explanation:"Always enable all arming checks for a real build. Pre-arm checks verify GPS lock, compass health, accelerometer calibration, battery voltage, and more. Disabling them removes your last safety net."},{name:"ARMING_REQUIRE",question:"The operations team needs the pilot to have direct physical control over when motors spin up. Which ARMING_REQUIRE setting achieves this?",options:[{value:0,label:"0"},{value:1,label:"1",correct:!0},{value:2,label:"2"}],explanation:"Stick-based arming (throttle down + yaw right) gives the pilot direct control over when motors spin up. GCS-only arming is used for autonomous systems. Auto-arm is dangerous for manned operations."}]}];function K(c){const t=[...c];for(let h=t.length-1;h>0;h--){const n=Math.floor(Math.random()*(h+1));[t[h],t[n]]=[t[n],t[h]]}return t}r(K,"shuffleOptions");function Y(){const c=C.useMemo(()=>q.map(i=>({...i,params:i.params.map(s=>({...s,options:K(s.options)}))})),[]),[t,h]=b.useState(0),[n,p]=b.useState({}),[l,o]=b.useState({}),[y,m]=b.useState(!1),u=c[t],d=c.reduce((i,s)=>i+s.params.length,0);Object.keys(n).length;const T=Object.values(n).filter(i=>i.correct).length,A=b.useCallback((i,s,_)=>{var E;(E=n[i])!=null&&E.correct||(_?(k(),p(v=>({...v,[i]:{value:s,correct:!0}})),o(v=>({...v,[i]:!1}))):(F(),p(v=>{var w;return{...v,[i]:{value:s,correct:!1,attempt:(((w=v[i])==null?void 0:w.attempt)||0)+1}}})))},[n]),f=b.useCallback(i=>{o(s=>({...s,[i]:!0}))},[]),a=u==null?void 0:u.params.every(i=>{var s;return(s=n[i.name])==null?void 0:s.correct}),g=u==null?void 0:u.params.filter(i=>{var s;return(s=n[i.name])==null?void 0:s.correct}).length,S=r(()=>{t<c.length-1?h(t+1):(m(!0),window.dispatchEvent(new CustomEvent("setup-sim-complete")))},"handleNext"),O=r(()=>{h(0),p({}),o({}),m(!1)},"handleReset");return y?e.jsx("div",{className:"ss",children:e.jsxs("div",{className:"ss-summary",children:[e.jsx("h3",{className:"ss-summary__title",children:T===d?"✓ Setup Complete!":"Setup Review"}),e.jsxs("div",{className:"ss-summary__score",children:[e.jsxs("span",{className:`ss-summary__number ${T===d?"ss-summary__number--perfect":""}`,children:[T,"/",d]}),e.jsx("span",{className:"ss-summary__label",children:"parameters correct"})]}),e.jsx("div",{className:"ss-summary__stages",children:c.map(i=>{const s=i.params.filter(E=>{var v;return(v=n[E.name])==null?void 0:v.correct}).length,_=i.params.length;return e.jsxs("div",{className:"ss-summary__stage",children:[e.jsx("span",{className:"ss-summary__stage-icon",children:i.icon}),e.jsx("span",{className:"ss-summary__stage-name",children:i.title}),e.jsxs("span",{className:`ss-summary__stage-score ${s===_?"ss-summary__stage-score--pass":"ss-summary__stage-score--fail"}`,children:[s,"/",_]})]},i.id)})}),T<d&&e.jsx("div",{className:"ss-summary__note",children:"Review the explanations for incorrect answers, then try again. In a real setup, every wrong parameter can cause a crash."}),e.jsxs("button",{className:"ss-btn ss-btn--reset",onClick:O,children:["↻"," Try Again"]})]})}):e.jsxs("div",{className:"ss",children:[e.jsxs("div",{className:"ss-scenario",children:[e.jsxs("h4",{className:"ss-scenario__name",children:["🛩"," ",L.name]}),e.jsx("p",{className:"ss-scenario__desc",children:L.desc}),e.jsx("div",{className:"ss-scenario__specs",children:Object.entries(L.specs).map(([i,s])=>e.jsxs("div",{className:"ss-scenario__spec",children:[e.jsx("span",{className:"ss-scenario__spec-key",children:i}),e.jsx("span",{className:"ss-scenario__spec-val",children:s})]},i))})]}),e.jsx("div",{className:"ss-stages",children:c.map((i,s)=>{const _=i.params.every(w=>n[w.name]),E=i.params.filter(w=>{var R;return(R=n[w.name])==null?void 0:R.correct}).length,v=s===t;return e.jsxs("button",{className:`ss-stage ${v?"ss-stage--active":""} ${_?"ss-stage--done":""}`,onClick:r(()=>{j(),h(s)},"onClick"),children:[e.jsx("span",{className:"ss-stage__icon",children:_?E===i.params.length?"✓":"⚠":i.icon}),e.jsx("span",{className:"ss-stage__label",children:i.title})]},i.id)})}),e.jsxs("div",{className:"ss-content",children:[e.jsxs("div",{className:"ss-content__header",children:[e.jsxs("h4",{className:"ss-content__title",children:[u.icon," ",u.title]}),e.jsx("p",{className:"ss-content__desc",children:u.desc}),e.jsxs("span",{className:"ss-content__progress",children:[g,"/",u.params.length," correct"]})]}),e.jsx("div",{className:"ss-params",children:u.params.map(i=>{const s=n[i.name];
1return e.jsxs("div",{className:`ss-param ${s!=null&&s.correct?"ss-param--correct":""} ${s&&!s.correct?"ss-param--wrong":""}`,children:[e.jsxs("div",{className:"ss-param__header",children:[e.jsx("code",{className:"ss-param__name",children:i.name}),s&&e.jsx("span",{className:`ss-param__badge ${s.correct?"ss-param__badge--pass":"ss-param__badge--fail"}`,children:s.correct?"✓":"✗"})]}),e.jsx("p",{className:"ss-param__question",children:i.question}),e.jsx("div",{className:"ss-param__options",children:i.options.map(_=>{const E=(s==null?void 0:s.value)===_.value,v=_.correct,w=s==null?void 0:s.correct,R=s&&!s.correct,I=R&&v&&l[i.name];return e.jsx("button",{className:`ss-opt ${E&&w?"ss-opt--correct":""} ${E&&R?"ss-opt--wrong":""} ${I?"ss-opt--reveal":""}`,onClick:r(()=>A(i.name,_.value,!!_.correct),"onClick"),disabled:w,children:_.label},_.value)})}),s&&!s.correct&&e.jsxs("div",{className:"ss-param__retry",children:[e.jsxs("p",{className:"ss-param__retry-msg",children:["✗"," Incorrect — review the scenario specs and try again."]}),l[i.name]?e.jsx("p",{className:"ss-param__explanation",children:i.explanation}):e.jsx("button",{className:"ss-param__explain-btn",onClick:r(()=>f(i.name),"onClick"),children:"Show hint"})]}),(s==null?void 0:s.correct)&&e.jsx(e.Fragment,{children:l[i.name]?e.jsx("p",{className:"ss-param__explanation",children:i.explanation}):e.jsx("button",{className:"ss-param__explain-btn",onClick:r(()=>f(i.name),"onClick"),children:"Show explanation"})})]},i.name)})}),e.jsxs("div",{className:"ss-nav",children:[t>0&&e.jsxs("button",{className:"ss-btn ss-btn--back",onClick:r(()=>h(t-1),"onClick"),children:["←"," Previous"]}),e.jsx("div",{className:"ss-nav__spacer"}),a&&e.jsx("button",{className:"ss-btn ss-btn--next",onClick:S,children:t<c.length-1?"Next Stage →":"View Results"})]})]})]})}r(Y,"SetupSimulator");function z({activityConfig:c,verifyActivity:t}){const[h,n]=C.useState(null),[p,l]=C.useState(""),[o,y]=C.useState(!1),[m,u]=C.useState(!1),d=c==null?void 0:c.verification,T=(c==null?void 0:c.label)||"Activity",A=r(()=>{const f=d.type==="text"?p.trim():h,a=d.type==="text"?f.toLowerCase()===String(d.answer).toLowerCase():f===d.answer;y(!0),u(a),a&&t()},"handleSubmit");return e.jsxs("div",{className:"aph-activity-panel",children:[e.jsxs("div",{className:"aph-activity-panel__header",children:[e.jsx("span",{children:"📋"}),e.jsx("span",{className:"aph-activity-panel__label",children:T})]}),c.prompt&&e.jsx("p",{className:"aph-activity-panel__prompt",children:c.prompt}),(d==null?void 0:d.steps)&&e.jsx("ol",{className:"aph-activity-panel__steps",children:d.steps.map((f,a)=>e.jsx("li",{children:f},a))}),d&&!o&&e.jsxs("div",{className:"aph-activity-panel__quiz",children:[e.jsx("p",{className:"aph-activity-panel__question",children:d.question}),d.type==="choice"&&e.jsx("div",{className:"aph-activity-panel__options",children:d.options.map((f,a)=>e.jsx("button",{className:`aph-activity-panel__option ${h===f?"aph-activity-panel__option--selected":""}`,onClick:r(()=>n(f),"onClick"),children:f},a))}),d.type==="text"&&e.jsxs("div",{className:"aph-activity-panel__text-input",children:[e.jsx("input",{className:"aph-activity-panel__input",type:"text",value:p,onChange:r(f=>l(f.target.value),"onChange"),placeholder:"Type your answer...",onKeyDown:r(f=>f.key==="Enter"&&p.trim()&&A(),"onKeyDown")}),d.hint&&e.jsxs("p",{className:"aph-activity-panel__hint",children:["💡 ",d.hint]})]}),e.jsx("button",{className:"aph-activity-panel__submit",disabled:d.type==="choice"?!h:!p.trim(),onClick:A,children:"Submit Answer"})]}),o&&m&&e.jsx("div",{className:"aph-activity-panel__result aph-activity-panel__result--correct",children:"✓ Correct! Close this panel to return to the lesson."}),o&&!m&&e.jsxs("div",{className:"aph-activity-panel__result aph-activity-panel__result--wrong",style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"1rem"},children:[e.jsx("span",{children:"✗ Not quite — review the steps above and try again."}),e.jsx("button",{onClick:r(()=>{y(!1),u(!1),n(null),l("")},"onClick"),style:{padding:"0.3rem 0.75rem",background:"none",border:"1px solid var(--border-default)",borderRadius:"4px",color:"var(--gold-400)",fontSize:"0.75rem",cursor:"pointer",whiteSpace:"nowrap",flexShrink:0},children:"↻ Try Again"})]})]})}r(z,"ActivityPanel");const X=[{id:"params",label:"Parameters",icon:"⚙",unlockKey:"paramCategories"},{id:"calibration",label:"Calibration",icon:"◎",unlockKey:"calibrations"},{id:"modes",label:"Flight Modes",icon:"✈",unlockKey:"flightModes"},{id:"setup",label:"Setup Sim",icon:"▶",unlockKey:"setupSim"}];function ie({onClose:c,activityConfig:t}){const{completedLessons:h,testMode:n}=G(),{computeUnlocks:p,verifyActivity:l}=B(),o=b.useMemo(()=>p(h),[p,h]),m=((t==null?void 0:t.config)||t||{}).tab||(t==null?void 0:t.tab)||null,[u,d]=b.useState(m||"params"),[T,A]=C.useState(!1);C.useEffect(()=>{const a=r(()=>A(!0),"handler");return window.addEventListener("setup-sim-complete",a),()=>window.removeEventListener("setup-sim-complete",a)},[]),b.useEffect(()=>{m&&d(m)},[m]);const f=r(a=>{if(n||m===a.id||m==="setup"&&(a.id==="params"||a.id==="modes"||a.id==="calibration"))return!0;const g=o[a.unlockKey];return g&&(g.has("*")||g.size>0)},"isTabUnlocked");return e.jsxs("div",{className:"aph",children:[e.jsx("div",{className:"aph-header",children:e.jsxs("div",{children:[e.jsx("h2",{className:"aph-title",children:"ArduPilot Reference"}),e.jsx("p",{className:"aph-subtitle",children:"Configuration, calibration, and flight mode reference"})]})}),t&&(m!=="setup"||T)&&e.jsx(z,{activityConfig:t,verifyActivity:l}),m==="setup"&&!T&&e.jsxs("div",{style:{margin:"0 0 1rem",padding:"0.6rem 1rem",background:"rgba(201,169,93,0.06)",border:"1px solid rgba(201,169,93,0.2)",borderRadius:"6px",fontSize:"0.8rem",color:"var(--text-muted)"},children:["📋 ",e.jsx("strong",{style:{color:"var(--gold-400)"},children:t.label})," — Complete all 6 setup stages below to unlock the final question."]}),e.jsx("div",{className:"aph-tabs",children:X.map(a=>{const g=!f(a);return e.jsxs("button",{className:`aph-tab ${u===a.id?"aph-tab--active":""} ${g?"aph-tab--locked":""}`,onClick:r(()=>!g&&d(a.id),"onClick"),disabled:g,title:g?"Complete related lessons to unlock":"",children:[e.jsx("span",{children:g?"🔒":a.icon})," ",a.label]},a.id)})}),e.jsxs("div",{className:"aph-content",children:[u==="params"&&e.jsx(H,{activityConfig:t,unlocks:o}),u==="calibration"&&e.jsx(V,{activityConfig:t,unlocks:o}),u==="modes"&&e.jsx(U,{activityConfig:t,unlocks:o}),u==="setup"&&e.jsx(Y,{activityConfig:t})]})]})}r(ie,"ArduPilotHub");export{ie as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.