Skip to content

Feat/live camera shot analysis - #290

Merged
jewbetcha merged 2 commits into
mainfrom
feat/live-camera-shot-analysis
Oct 3, 2026
Merged

jewbetcha merged 2 commits into
mainfrom
feat/live-camera-shot-analysis

Conversation

@jewbetcha

@jewbetcha jewbetcha commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

This uses some basic OpenCV to supplement club path and horizontal angle metrics. Completely opt-in for now

Copilot AI balanced review requested due to automatic review settings October 3, 2026 03:27
@jewbetcha
jewbetcha merged commit ab79bcb into main Oct 3, 2026
13 of 17 checks passed
@jewbetcha
jewbetcha deleted the feat/live-camera-shot-analysis branch October 3, 2026 03:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The standalone analysis flag cannot perform analysis without IWR6843, and its current bounds exclude normal driver shots.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity · 2 Low severity

Open (4)
What changed in this PR

Adds opt-in live camera shot analysis to the capture pipeline.

Changes:

  • Adds impact-aware ball detection and horizontal-launch fitting.
  • Shares camera anchors and records analysis timing.
  • Improves simulator disconnect diagnostics.
File Description
src/​openflight/​camera/​ball_flight.py Adds horizontal-launch estimator
src/​openflight/​camera/​club_motion.py Adds impact-aware detection
src/​openflight/​camera/​club_delivery.py Reuses impact detection and anchors
src/​openflight/​server.py Wires analysis mode and timing
src/​openflight/​sim/​transport.py Reports disconnect reasons
scripts/​start-kiosk.sh Recognizes the new camera mode
tests/​test_camera_ball_flight.py Tests horizontal estimation
tests/​test_camera_club_motion.py Tests impact-aware detection
tests/​test_server.py Tests fusion and timing wiring
tests/​test_sim_server_wiring.py Tests reconnect logging
tests/​test_sim_transport.py Tests disconnect reasons
tests/​test_start_kiosk.py Tests kiosk argument handling
tests/​test_startup_status.py Tests camera startup status

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/openflight/server.py
Comment on lines +4359 to +4364
"--camera-shot-analysis",
action="store_true",
help=(
"Enable camera capture with experimental impact-aware ball and club analysis "
"instead of the legacy camera analyzer"
),
Comment on lines +545 to +548
if vertical_deg is None or not 18.0 <= vertical_deg <= 55.0:
return CameraBallEstimate("withheld_vertical_out_of_bounds")
if ops_ball_speed_mph is None or not 35.0 <= ops_ball_speed_mph <= 130.0:
return CameraBallEstimate("withheld_ball_speed_out_of_bounds")
Comment thread src/openflight/server.py
Comment on lines +4359 to +4364
"--camera-shot-analysis",
action="store_true",
help=(
"Enable camera capture with experimental impact-aware ball and club analysis "
"instead of the legacy camera analyzer"
),
ever_connected = True
self._set_state(ConnectionState.CONNECTED)
self._recv_loop()
reconnect_reason = self._recv_loop()
HarjotDhanota added a commit to HarjotDhanota/openflight that referenced this pull request Oct 13, 2026
…pilot branch (D30)

One merge of upstream's 72 commits (open-flight#221 hardware trigger, open-flight#260 Electron,
open-flight#266 Cl quadratic, open-flight#276 carry, open-flight#285 phone BLE, open-flight#287 cloud raw uploads,
open-flight#290 live camera shot analysis, docs and CI). Resolved per D30; every hunk
where one side won is logged in MERGE-NOTES.md.

- (a) the fork's enrichment result shape stays; BLE is mapped onto it, and
  KL's auto-merged skipped_reason="queue_full" line (a TypeError) is gone
- (b) phones get an OPS-only first result as provisional while a late IWR
  or camera result can still arrive; the late result is its final version
- (c) estimate_horizontal_launch stays in the code, unwired;
  --camera-shot-analysis is refused with a parser error that says why
- (d) one lost-dump detector for both trigger paths: upstream's orphan
  marker feeds the fork's discarded_dump outcome, reason dump_discarded
- (e) upstream's PA re-arm and no-clear-once-live for the hardware trigger;
  the fork's GC re-arm test dropped; the wait has no flush option at all
  (P7-1), with a sound-path test that fails if a flush returns
- camera hunks: the fork wins (no cross-shot tracker, D17; lighting labels)
- carry: the fork's D31 behaviour; the shared SPIN_CONFIDENCE_RELIABLE kept
- cloud: KL's shot_updated merge in both modes, raw line kept in raw mode
- git auto-merged duplicate internal-trigger methods in ops243.py; one copy
- pyproject: win32 added to uv environments so uv sync runs on Windows
- ui/package-lock.json regenerated with npm install (Electron 44)
- open-flight#266 Ferguson quadratic Cd/Cl is live (auto-merged); flagged for the owner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants