meteor_detect/config-example.toml
2025-04-05 01:04:52 +08:00

168 lines
4.9 KiB
TOML

# Meteor Detection System Configuration
# Unique identifier for this detector (will be auto-generated if not specified)
device_id = "meteor-detector-01"
# Logging level (trace, debug, info, warn, error)
log_level = "info"
# Camera settings
[camera]
# Camera device:
# - Linux: device path (e.g., "/dev/video0")
# - macOS: device index (e.g., "0") or identifier
device = "/dev/video0"
# Resolution (options: HD1080p, HD720p, VGA)
resolution = "HD720p"
# Frames per second
fps = 30
# Exposure mode (Auto or Manual exposure time in microseconds)
exposure = "Auto"
# Gain/ISO setting (0-255)
gain = 128
# Whether to lock focus at infinity
focus_locked = true
# GPS and time synchronization
[gps]
# Whether to enable GPS functionality
enable_gps = true
# Serial port for GPS module
port = "/dev/ttyAMA0"
# Baud rate
baud_rate = 9600
# Whether to use PPS signal for precise timing
use_pps = true
# GPIO pin for PPS signal (BCM numbering)
pps_pin = 18
# Allow system to run without GPS (using fallback position)
allow_degraded_mode = true
# Camera orientation
[gps.camera_orientation]
# Azimuth/heading in degrees (0 = North, 90 = East)
azimuth = 0.0
# Elevation/pitch in degrees (0 = horizontal, 90 = straight up)
elevation = 90.0
# Fallback GPS position (used when GPS is not available)
[gps.fallback_position]
# Latitude in degrees (positive is North, negative is South)
latitude = 34.0522
# Longitude in degrees (positive is East, negative is West)
longitude = -118.2437
# Altitude in meters above sea level
altitude = 85.0
# Environmental sensors
[sensors]
# Whether to use DHT22 temperature/humidity sensor
use_dht22 = true
# GPIO pin for DHT22 data (BCM numbering)
dht22_pin = 4
# Whether to use light sensor
use_light_sensor = true
# GPIO pin for light sensor analog input
light_sensor_pin = 0
# Sampling interval in seconds
sampling_interval = 10
# Whether to allow operation without sensors (using fallback values)
allow_degraded_mode = true
# Default temperature value when sensor is unavailable (Celsius)
fallback_temperature = 25.0
# Default humidity value when sensor is unavailable (0-100%)
fallback_humidity = 50.0
# Default sky brightness value when sensor is unavailable (0-1)
fallback_sky_brightness = 0.05
# Storage settings
[storage]
# Directory for storing raw video data
raw_video_dir = "data/raw"
# Directory for storing event video clips
event_video_dir = "data/events"
# Maximum disk space to use for storage (in MB)
max_disk_usage_mb = 10000
# Number of days to keep event data
event_retention_days = 30
# Whether to compress video files
compress_video = true
# Detection settings
[detection]
# Minimum brightness change to trigger detection
min_brightness_delta = 30.0
# Minimum number of pixels changed to trigger detection
min_pixel_change = 10
# Minimum number of consecutive frames to confirm event
min_frames = 3
# Number of seconds to save before/after event
event_buffer_seconds = 10
# Detection sensitivity (0.0-1.0)
sensitivity = 0.7
# Detection pipeline configuration (for multiple detectors)
[detection.pipeline]
# Maximum number of parallel detector workers
max_parallel_workers = 4
# Aggregation strategy: "any", "all", "majority"
aggregation_strategy = "any"
# Detector configurations
# You can include multiple detectors by adding more [[detection.pipeline.detectors]] sections
# Brightness detector configuration
[[detection.pipeline.detectors]]
type = "brightness"
# Unique ID for this detector
id = "brightness-main"
# Minimum brightness change to trigger detection
min_brightness_delta = 30.0
# Minimum number of pixels changed to trigger detection
min_pixel_change = 10
# Minimum number of consecutive frames to confirm event
min_frames = 3
# Detection sensitivity (0.0-1.0)
sensitivity = 0.7
# CAMS detector configuration
[[detection.pipeline.detectors]]
type = "cams"
# Unique ID for this detector
id = "cams-main"
# Brightness threshold for meteor detection in maxpixel image
brightness_threshold = 30
# Minimum ratio of stdpixel to avepixel for meteor detection
std_to_avg_ratio_threshold = 1.5
# Minimum number of pixels that must exceed thresholds
min_pixel_count = 10
# Minimum trajectory length (pixels) to be considered a meteor
min_trajectory_length = 5
# Whether to save feature images for all batches (not just detections)
save_all_feature_images = false
# Directory to save feature images
output_dir = "output/cams"
# Prefix for saved files
file_prefix = "meteor"
# Communication settings
[communication]
# MQTT broker URL
mqtt_broker = "mqtt://localhost:1883"
# MQTT client ID (will be auto-generated if not specified)
mqtt_client_id = "meteor-detector-01"
# MQTT credentials (optional)
mqtt_username = ""
mqtt_password = ""
# Topic for event notifications
event_topic = "meteor/events"
# Topic for system status
status_topic = "meteor/status"
# HTTP API port
api_port = 8080
# Whether to enable SSL for HTTP API
api_use_ssl = false
# Path to SSL certificate and key (only needed if api_use_ssl = true)
api_cert_path = ""
api_key_path = ""