; Fire Gimbal Control - example configuration. ; ; Copy this file to "config.ini" and edit for your deployment: ; cp config/config.example.ini config.ini ; ; The real config.ini is gitignored because it contains credentials. ; MQTT credentials may instead be supplied via the environment variables ; FGC_MQTT_USER and FGC_MQTT_PW, which take precedence over the values here. [General] ; Tower identity, substituted into all MQTT topics and CamEvent payloads. tower_name = ExampleTower ; Seconds between captures. image_interval = 5 ; 1 = print motor telemetry each loop tick, 0 = quiet. debug = 0 [Network] ; MQTT broker address (the ground-station / ZKMS server). zkms_server_ip = 127.0.0.1 ; Prefer the FGC_MQTT_USER / FGC_MQTT_PW environment variables over these. mqtt_user = CHANGE_ME mqtt_pw = CHANGE_ME [Camera] ; Camera IDs: GigE IP (e.g. 192.168.11.101) or USB device ID (e.g. DEV_1AB22C0AADED). ; Leave entries blank/absent for cameras you do not have. Order maps to RGB, ACR, NIR. id_Cam1 = DEV_0000000000 id_Cam2 = id_Cam3 = id_Cam4 = [Serial] ; Motor-controller serial device and baud rate. device = /dev/ttyACM0 baud = 115200 [IMU] ; Xsens MTi orientation/inertial sensor. Wired to the LattePanda's RS-232 header ; (an onboard hardware UART), so this is a stable /dev/ttyS* node - NOT a USB ; device and NOT /dev/ttyUSB0-3 (those are the Quectel modem). Find it with ; ls /dev/ttyS* ; dmesg | grep -iE 'ttyS|LPSS|HSUART' (often /dev/ttyS4) ; Enable with [Features] enable_imu = true. The host reconfigures the MTi to a ; Euler + calibrated 100 Hz stream at startup. device = baud = 115200 [Motor] ; Degrees<->encoder-counts calibration for each axis. The firmware speaks only ; in absolute encoder counts; these map them to the heading/elevation degrees ; used by MQTT (target_HDG) and CamEvent. CALIBRATE on the rig after homing: ; counts = zero_count + deg * counts_per_deg ; counts_per_deg may be negative to flip direction. min/max_deg clamp commands. ; ; Mechanical travel of this gimbal (between hard endstops, found at homing): ; Yaw ~320 deg (0 .. 320; NOT a full revolution, cannot wrap) ; Pitch 40 deg (-10 .. +30; -10 below horizon to +30 above) ; Keep all scan waypoints inside these ranges or the move clamps short. ; ; Yaw starting point: firmware steps_per_rev=177000 over ~180 deg => ~983.33. yaw_counts_per_deg = 983.33 yaw_zero_count = 500000 yaw_min_deg = -90 yaw_max_deg = 90 ; Re-anchor the yaw zero from homing instead of the fixed yaw_zero_count above: ; off (default) - use yaw_zero_count as written ; low - the lower-count endstop becomes 0 deg, degrees rise toward ; the higher-count endstop (which lands near +360) ; high - the higher-count endstop becomes 0 deg, degrees rise toward ; the lower-count endstop (which lands near +360) ; Keeps yaw_counts_per_deg as the scale; only the zero + direction come from the ; homed endstops, so the yaw origin is fixed by homing (no zero recalibration). ; yaw_min_deg/yaw_max_deg are auto-set to 0..(homed range). Pitch is unaffected. yaw_home_zero = off ; Pitch (physical endstops, -10..+30 deg = 40 deg travel). CALIBRATE counts_per_deg/zero_count. pitch_counts_per_deg = 8333.33 pitch_zero_count = 0 pitch_min_deg = -10 pitch_max_deg = 30 [Scan] ; Capture scan grid (the (yaw,pitch) waypoints auto-sweep steps through). ; If grid_file is set, that CSV is used verbatim (one "yaw_deg,pitch_deg" per ; line, '#' comments allowed) - edit it to define exact scan coordinates. ; If grid_file is blank, a grid is generated: yaw_intervals positions across ; [yaw_min_deg, yaw_max_deg] at each pitch level, traversed ping-pong. grid_file = yaw_intervals = 56 yaw_min_deg = -90 yaw_max_deg = 90 pitch_levels = 10,30,50 [Paths] ; Directory for saved .jxl images. Supports leading ~ and $ENV expansion. ; If blank, defaults to $XDG_DATA_HOME/fire_gimbal_control/images ; (i.e. ~/.local/share/fire_gimbal_control/images). output_dir = [Features] ; Enable/disable subsystems and select mock (simulated) implementations. ; CLI flags (e.g. --no-mqtt, --mock-camera, --mock-serial) override these. enable_mqtt = true enable_camera = true enable_serial = true enable_imu = false mock_camera = false mock_serial = false mock_imu = false [UI] ; Full-screen terminal dashboard (sectioned, colored, live status + log pane). ; false => headless line console (default; stdin commands, stdout logs). ; CLI --tui / --no-tui override this. Requires a build with WITH_TUI=ON. enable_tui = false [Logging] ; level: trace|debug|info|warn|error|off (default info). --log-level overrides. level = info ; Verbatim per-category wire tracing, independent of the level above. Comma list ; of: serial, mqtt, camera, control, all, none. OFF by default. --trace overrides. ; Lines are tagged [SERIAL]/[MQTT]/[CAMERA]/[CONTROL] with TX/RX direction, e.g. ; [SERIAL] TX kd180 / [SERIAL] RX $;1234;0;... trace =