Reading the repo
Reading the repo
Saved setup from 1 h ago
Will it work on my device?
| Component | What it does | ~Cost | |-----------|-------------|-------| | OPS243-A Radar | Ball speed, club speed, experimental spin | $249 | | Raspberry Pi 5 | Runs everything | $130 | | 7" Touchscreen | Shows shot data | $46 | | SparkFun SEN-14262 | Impact sound trigger for shot capture | $18 | | Power supply + accessories | 27 W supply with a captive, non-detachable cable, active cooler, microSD, cables | $39 | | Printed enclosure | ~750 g PETG, plus heat-set inserts and screws | $52 | | Base build, in its case | Ball speed, club speed, smash factor, spin, carry | ~$534 | | TI IWR6843LEVM | Launch angle, launch direction, experimental club path | $150 | | With the angle radar | | ~$684 |
Optional on top: battery power from a Geekworm UPS HAT (+$90, and it replaces the 27 W supply — see Powering OpenFlight), a tilt sensor ($15), and a global-shutter camera ($30). Everything together is roughly $819. Full staged breakdown in the parts list.
Without an angle radar you still get ball speed, club speed, smash factor, experimental spin, and estimated carry. The angle radar adds measured launch angle and experimental club path.
⚠️ The K-LD7 angle radars are deprecated. The supported angle radar is now the TI IWR6843. Don't buy K-LD7s for a new build; their software support remains for existing builds only. See the full parts list for details and links.
The IWR6843 needs custom firmware — the stock TI demo doesn't expose the raw radar cube OpenFlight needs. A validated prebuilt image ships in
firmware/releases/, so flashing it doesn't require the TI toolchain. See the IWR6843 Operator Guide.
CONTRIBUTING.mdThank you for your interest in contributing to OpenFlight! This document provides guidelines and instructions for contributing.
.node-version)Clone the repository
git clone https://github.com/open-flight/openflight.git
cd openflight
Install dependencies
make install
This installs Python dependencies (including dev tools) and UI dependencies.
Or manually:
uv sync --group dev
cd ui && npm install
Install pre-commit hooks
make hooks
This runs ruff, pylint, and ESLint automatically before each commit.
Build the UI (for frontend development)
make build-ui
# Run server in mock mode (no hardware needed)
make dev
# Or manually:
scripts/start-kiosk.sh --mock
# Run UI development server (separate terminal)
cd ui && npm run dev
All checks can be run at once with:
make lint
We use pylint for linting with a minimum score of 9.0 and ruff for formatting.
# Check code quality
uv run pylint src/openflight/
# Auto-format with ruff
make format
Use the checked-in UI color palette when adding or changing visual states.
cd ui
npm run lint # ESLint
npm run build # Type check + build
# Run all tests
make test
# Run specific test file
uv run pytest tests/test_launch_monitor.py -v
# Run with coverage (if pytest-cov installed)
uv run pytest tests/ --cov=src/openflight --cov-report=html
All tests must pass before submitting a PR.
Use the issue templates to file bugs, request features, or get help with hardware setup. Check existing issues before creating new ones.
Every pull request must meet all three of the following requirements. PRs that do not will be asked for changes before review.
Scoped to a single feature or fix with a clear story. A PR should do one thing. The description must explain what the change is and why it was required — the problem it solves or the need it meets. If you catch yourself writing "and also…", split the work into separate PRs.
Includes automated tests. New behavior needs new tests; bug fixes need a test that reproduces the bug (see Development Rules — write the failing test first). If you believe tests genuinely don't apply, say so explicitly in the PR and explain why.
Describes the manual (human) testing performed. Automated tests aren't enough. Document what you verified by hand: what you ran (mock mode, real hardware, specific UI flows), what you observed (numbers, screenshots), and which edge cases you exercised. "Tests pass" is not manual testing.
These requirements are enforced automatically by the PR Checks workflow, which will fail if:
src/openflight/ or ui/src/ changes without any accompanying
test changes — add the no-tests-needed label (and explain why in the description)
for the rare PR where tests genuinely don't apply;ui/src/ changes but the description contains no images — add
screenshots of the change (drag and drop them into the description), or add the
no-screenshots-needed label (and explain why) if the change has no visible effect;<type>(optional scope): <description> (allowed types: feat, fix, docs,
refactor, test, chore, perf, build, ci, style, revert), e.g.
feat(kld7): add launch angle smoothing.Fork the repository and create a feature branch
git checkout -b feature/your-feature-name
Make your changes with clear, focused commits, scoped to a single feature or fix
Add automated tests covering the new behavior or reproducing the fixed bug
Ensure quality checks pass
make test
make lint
cd ui && npm run build
Manually test your change and note what you verified by hand
Update documentation if needed
docs/docs/changelog.md under [Unreleased]Submit a pull request and fill out the PR template — including the automated tests, manual testing, and "why it was required" sections
Use clear, descriptive commit messages:
Add ball detection indicator to UI header
- Create BallDetectionIndicator component
- Add shot data to useSocket hook
- Update App.tsx to display indicator
High-priority contributions:
Feature ideas:
openflight/
├── src/openflight/ # Python package
│ ├── ops243.py # Radar driver
│ ├── launch_monitor.py # Shot detection
│ ├── server.py # WebSocket server
│ ├── rolling_buffer/ # OPS capture and signal processing
│ ├── iwr6843/ # Current angle radar
│ ├── kld7/ # Legacy angle radar
│ ├── sim/ # Simulator connectors
│ └── cloud/ # FlightWeb uploader
├── ui/ # React frontend
│ └── src/
│ ├── components/ # UI components
│ └── hooks/ # React hooks
├── tests/ # Test suite
├── scripts/
│ ├── start-kiosk.sh # Main startup script
│ ├── analysis/ # Post-session analysis & data capture
│ ├── hardware-test/ # Radar & trigger testing/debugging
│ ├── setup/ # Pi setup, systemd, deployment
│ └── vision/ # Camera, YOLO, ML training
├── models/ # ML models
└── docs/ # Documentation
OpenFlight supports mock mode for development without hardware:
make dev
The MockLaunchMonitor class simulates realistic shot data based on TrackMan averages.
By contributing, you agree that your contributions will be licensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later).
Then run bash setup.sh. It stops at the first error and is safe to run again. Servers and tests aren't started; it lists them at the end. Read it first.
Compare yours with the README's “Hardware at a Glance” list above before installing anything.
git clone https://github.com/open-flight/openflight.git cd openflight
Python 3.11
curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync
uv run pytest
See the Parts List for everything you need with purchase links.
Follow the Sound Trigger Wiring Guide to connect the SEN-14262 to the OPS243-A. The (deprecated) K-LD7 modules connect via USB — no wiring needed. The OPS243 also has an opt-in internal speed-trigger path, which requires OPS243-A firmware v1.3.2 or newer in the 1.3 release train; see the Internal Hardware Trigger Guide.
Adding the IWR6843 angle radar? The Pi cannot power both radars over USB, so the OPS243 moves to the Pi's GPIO UART header while the TI board takes the USB port. Do it in this order, validating each step before the next — doing both at once makes any failure ambiguous:
If your OPS243-A has WiFi, you cannot use the GPIO UART — its WiFi module already drives the radar's UART receive line. Use a separately powered USB hub instead; see the operator guide's Option B.
Flash Raspberry Pi OS (64-bit), plug in the radars, then run the interactive setup:
git clone https://github.com/open-flight/openflight.git
cd openflight
./scripts/setup/setup.sh
The script installs everything and walks you through the one-time hardware configuration (radar flash setup, legacy K-LD7 device naming, auto-start, and optional cloud sync) with prompts. It's safe to re-run any time. See the Raspberry Pi Setup Guide for details and troubleshooting. Touchscreen installations can use the Startup Splash Screen guide to install a terminal-free desktop launcher with immediate startup progress.
# Default: rolling buffer mode with sound trigger
scripts/start-kiosk.sh
# With the IWR6843 angle radar (OPS243 on the Pi GPIO UART).
# Geometry values are examples — measure your own; see the operator guide.
scripts/start-kiosk.sh --iwr6843 \
--ops-port /dev/ttyAMA0 \
--iwr6843-tee-m 1.372 --iwr6843-net-m 4.064 \
--iwr6843-tilt-deg 5.5 --iwr6843-radar-height-m 0.229 \
--iwr6843-ball-height-m 0.021
# With legacy K-LD7 hardware (measure the mount tilt first)
scripts/start-kiosk.sh --kld7 --kld7-mount-tilt <measured-degrees>
# Swing speed training (air swings / speed sticks, no sound trigger)
scripts/start-kiosk.sh --swing-speed
# Development mode (no hardware)
scripts/start-kiosk.sh --mock
# With Geekworm X1202/X1206 battery monitoring
scripts/start-kiosk.sh --battery geekworm
The IWR6843 example values are not universal. Measure the geometry from the antenna center and follow the operator guide; wrong values bias the result instead of producing an obvious startup error.
Then open http://localhost:8080 or use the touchscreen. Footer tabs switch between Live, Stats, Shots, Camera, Players, and Debug. Tap the footer logo for units, theme, and language; the footer power icon opens shutdown confirmation. On Live, tap a metric to pin it top-left while keeping all metrics visible. Use the Replay action on camera-backed shots to open a touch-friendly slow-motion impact clip. The MP4 is generated only when Replay is selected and is cached beside the raw camera capture. For a TV or tablet, use TV Display Mode.
OpenFlight can push your sessions to the FlightWeb cloud so you can review
shots from any device. It's opt-in, and raw radar data never leaves your
Pi — only shot results and session metadata are uploaded (verify with
openflight-cloud push --dry-run).
setup.sh offers to enable this and link your Pi. To do it by hand:
openflight-cloud link # pair this Pi (enter a short code in your browser)
openflight-cloud status # linked? queued? parked?
Once linked, sessions sync automatically (on session end and via a ~10-minute timer that heals wifi outages). See the Cloud Sync Guide for details.
OpenFlight also serves a fullscreen-friendly browser display for tablets, TV browsers, or a Chrome tab cast to Chromecast.
scripts/start-kiosk.sh.http://<openflight-host>:8080/display from another laptop, tablet, or TV browser.Prefer the hostname over the IP. Raspberry Pi OS broadcasts its hostname over mDNS (Avahi), so
http://openflight.local:8080/displaykeeps working even when the Pi's DHCP lease expir
…
No reports for Linux yet.
Opens a chat with this manual already filled in, for Linux. It uses your own account; gitmanual sends nothing.