# TerraHawk flight parameters: the night lights (docs/lights.md). Load after the airframe file, ONLY when the lights # node and its lighting battery are fitted; reboot after loading (CAN_P1_DRIVER). Without them, the board file's # CAN_P1_DRIVER 0 stands. Loading this file with the node missing fails the pre-arm check (BATT3 unhealthy), which is # intended. Also load sim/scripts/lights.lua onto the microSD card (APM/scripts). # The LUX F765's only CAN port, on for this node alone (the first flights fly with CAN off). # CAN on takes about 20 KB of the LUX's board memory: at a 240000 heap and a 32 KB log buffer EKF3 did not allocate # (bench, 2026-10-15). The board file therefore sets SCR_HEAP_SIZE 225000 and LOG_FILE_BUFSIZE 16 for both builds # (night measured 26.5 KB free lowest; docs/electronics-notes.md, the memory check). Do not set either one here: an # overlay value removes the name from the checklist gate. CAN_P1_DRIVER 1 CAN_D1_PROTOCOL 1 # SERVO13..16 (no pins on the LUX) carry lights.lua's four commands to the node as DroneCAN servo commands: # bits 12 to 15. The node reads them as its RCIN13..16 (hw/lights-node defaults.parm). CAN_D1_UC_SRV_BM 61440 CAN_D1_UC_SRV_RT 50 SERVO13_FUNCTION 95 SERVO14_FUNCTION 96 SERVO15_FUNCTION 97 SERVO16_FUNCTION 98 # The lighting battery, from the node's BatteryInfo (battery_id 3, the node's BATT_SERIAL_NUM). The capacity follows # the pack Ryan picks (Roaring Top 1300 recommended); the node's charge estimate is used (DroneCAN state of charge). BATT3_MONITOR 8 BATT3_SERIAL_NUM 3 BATT3_CAPACITY 1300 # No ArduPilot failsafe action on BATT3: lights.lua returns the aircraft at night only (LGT_LOW_PCT), and warns by day. BATT3_FS_LOW_ACT 0 BATT3_FS_CRT_ACT 0 # No AIRSPEED_STALL row here since 2026-10-20: the night build flies the common file's 20.0. The 20.6 that was here # (68002f2) came from Fuselage B's soft pitch band at 2.97 to 3.01 kg (jbsim-b3, 18.04 to 19.81 m/s). On Fuselage C, # th-testpilot flew it against 20.0 on the night model c24b-w78-night (3.207 kg; first-flight set, lights scripts and # this overlay, x3 each; ecca13b7, corrected fa3aba5a): no assist in any survey, peak true alpha in AUTO 7.3 to 8.8 deg # at 20.0 (7.3 to 9.0 at 20.6), no time at or above 9.5 deg, the same bank, the lane and transitions unchanged, S1 # 3.0 % and S2 0.7 % less energy at 20.0. The C side ports read low near the stall (AspS/AspT 0.82 median, 0.71 # lowest in those surveys), so 20.0 indicated is far above C's trimmed stall at this mass (about 17.2 m/s EAS, which # reads about 14.3; params/README.md). The stall test sets the real value for both builds. # Pre-arm on the lighting battery's charge, by day: 7.8 V (3.9 V a cell, about 75 %, at the light load before # arming). By day the lights are the two strobes and the node, about 4.5 W. At night lights.lua v1.2 raises this # floor to LGT_ARM_V (8.2 V, about 95 %) while disarmed, without saving it: the longest night flight (about 43 min, # the flight pack runs out first) takes about 43 % (4.1 Wh; the always-on rail is on the flight pack in flight), so # from 95 % the pack is near 53 % when the flight pack triggers its return, over LGT_LOW_PCT 40 (th-aeronautics, # 2026-10-11). The 7.8 here was once said to cover a night survey; it does not (th-aeronautics, 2026-10-10). The dock keeps # the pack charged; a bench pack below the floor needs a charge first. BATT3_ARM_VOLT 7.8