feat: add 5 deterministic rules (IMU outliers/watchdog, USBL SNR/spike, battery_low)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
floppyrj45
2026-04-19 15:20:17 +00:00
parent 67b2121add
commit 668d84c187
7 changed files with 340 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
"""Deterministic rules v0.
Adding a new rule = subclass Rule, register it in `ALL_RULES`, add a test.
"""
from __future__ import annotations
from .base import Rule
from .battery_low import BatteryLowRule
from .imu_outliers import ImuOutliersRule
from .usbl_distance_spike import UsblDistanceSpikeRule
from .usbl_snr_low import UsblSnrLowRule
from .watchdog_imu import WatchdogImuRule
def all_rules() -> list[Rule]:
"""Default rule set, instantiated with env/default thresholds."""
return [
ImuOutliersRule(),
WatchdogImuRule(),
UsblSnrLowRule(),
UsblDistanceSpikeRule(),
BatteryLowRule(),
]
__all__ = [
"Rule",
"ImuOutliersRule",
"WatchdogImuRule",
"UsblSnrLowRule",
"UsblDistanceSpikeRule",
"BatteryLowRule",
"all_rules",
]