feat(v1): relax fall sensitivity for low overhead cameras

Adds configurable event.require_rapid_drop (default off), require_lower_body
(default off) and horizontal_angle_threshold_degrees (default 45). With the
lenient defaults a sustained horizontal pose alone enters SUSPECT and confirms
after the confirm window, which is now the main false-positive guard; missing
knees/ankles no longer reject the pose. Thresholds flow into config_version.
End-to-end smoke confirms a lying pose; 70 tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ila
2026-07-21 23:29:16 +08:00
co-authored by Claude Opus 4.8
parent 5f29a8e60f
commit b1f0e8aeb4
12 changed files with 104 additions and 12 deletions
+14
View File
@@ -42,6 +42,20 @@ def test_rejected_pose_clears_pending_drop_before_the_next_horizontal_pose():
assert candidate.is_fall_candidate is False
def test_horizontal_pose_alone_starts_candidate_when_rapid_drop_not_required():
policy = FallEvidencePolicy(suspect_window_seconds=0.5, require_rapid_drop=False)
candidate = policy.evaluate(
"P-0001", _evidence(horizontal=True), now=0.0, state=FallState.NORMAL
)
upright = policy.evaluate(
"P-0002", _evidence(horizontal=False), now=0.0, state=FallState.NORMAL
)
assert candidate.is_fall_candidate is True
assert upright.is_fall_candidate is False
def test_upright_pose_is_recovery_evidence_only_after_confirmation():
policy = FallEvidencePolicy(suspect_window_seconds=0.5)