700756c16f
Initial commit. Delivers what the brief calls 'Sprint 0 - Foundations' (see docs/AR_Autopilot_brief.md section 12): - Complete repository structure (arautopilot package + firmware, display, installer, tools placeholders + docs). - Core data model (Pydantic v2): modes, alarms, actuator config, PID config + gain scheduling, vessel config, knob state machine, project config with YAML/JSON serialisation. - Seed library: 2 actuator profiles (hydraulic & electric DC reversible) and 2 default tunings (yacht motor planeo 30 m and 40 m). Conservative literature values, NOT the integrator's production tuning IP. - Firmware skeleton: only src/hal/pinout.h with the 21 I/O contract for the AR-NMEA-IO v1.0 board. No drivers, no main loop. - Studio stubs (real PySide6 app starts in Sprint 4). - pytest suite (80 tests, all green): modes, alarms, actuator, PID (incl. gain interpolation and the +/-50% adaptive bound from brief section 6), vessel, knob state, project config, library loader, end-to-end roundtrip. - examples/sprint0_demo.py - the acceptance demo from the brief. Acceptance criteria met: - pytest green (80/80) - demo creates, saves (YAML + JSON), reloads, and verifies a full ProjectConfig using the seed library - repository ready for tag `sprint-0-approved` See CHANGELOG.md for the detailed scope. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
101 lines
3.6 KiB
Markdown
101 lines
3.6 KiB
Markdown
# AR-Autopilot
|
|
|
|
Professional marine autopilot for vessels in the 30-40 m range (motor yachts, motor sailboats, fishing vessels, small ferries, coastal patrol boats).
|
|
|
|
Part of the **AR Suite** alongside AR-ECDIS, VMS-Sailor, AR-ShipDesign, AR-ElecArrangement, and AR-StabCol. Sold standalone or bundled with AR-ECDIS.
|
|
|
|
> **NOT** Dynamic Positioning. **NOT** joystick docking. This is a classic heading-and-track autopilot with intelligent drift compensation, controlling rudder actuators (hydraulic or electric).
|
|
|
|
---
|
|
|
|
## Status
|
|
|
|
**Sprint 0 — Foundations (in progress).**
|
|
|
|
This sprint delivers the repository structure, core data model, seed library, and a passing test suite. No functional firmware, Studio GUI, or display yet — those start in Sprint 1.
|
|
|
|
See [`docs/AR_Autopilot_brief.md`](docs/AR_Autopilot_brief.md) for the complete project brief, scope, and roadmap.
|
|
|
|
---
|
|
|
|
## Components
|
|
|
|
| Component | Tech | Purpose |
|
|
|---|---|---|
|
|
| **Studio** (`arautopilot/studio/`) | Python 3.11 + PySide6 | Project configurator (integrator-side, not shipped to customers). Generates per-vessel `.appack` packages |
|
|
| **Firmware** (`firmware/ar_autopilot_v1/`) | C++ on ESP32 via PlatformIO | Real-time PID control, NMEA 2000 + Modbus, safety logic. Runs on the AR-NMEA-IO v1.0 board (shared with VMS-Sailor) |
|
|
| **Display** (`display/`) | Flutter Desktop (Win + Linux) | Dedicated bridge cockpit-feel touch display with rotary knob input |
|
|
| **Core models** (`arautopilot/core/`) | Pydantic v2 | Shared data model (vessel config, PID config, actuator config, alarms, modes, knob state) |
|
|
| **Library** (`arautopilot/library/`) | YAML + JSON | Curated seed: actuator profiles, default tunings per vessel type |
|
|
|
|
---
|
|
|
|
## Requirements
|
|
|
|
- Python **3.11** or newer
|
|
- Git
|
|
- (Later sprints) PlatformIO, Flutter SDK, WiX Toolset
|
|
|
|
---
|
|
|
|
## Quick start (Sprint 0)
|
|
|
|
```powershell
|
|
# Create venv and install
|
|
python -m venv .venv
|
|
.\.venv\Scripts\Activate.ps1
|
|
python -m pip install -U pip
|
|
pip install -e ".[dev]"
|
|
|
|
# Run tests
|
|
pytest
|
|
|
|
# Run the Sprint 0 demo (creates, saves, reloads a project config)
|
|
python examples/sprint0_demo.py
|
|
```
|
|
|
|
---
|
|
|
|
## Repository layout
|
|
|
|
```
|
|
AR-Autopilot/
|
|
├── arautopilot/ # Python package (core models, library, studio stubs, tests)
|
|
├── firmware/ # ESP32 firmware (Sprint 1+; only pinout.h in Sprint 0)
|
|
├── display/ # Flutter dedicated display (Sprint 4+)
|
|
├── examples/ # Runnable demos
|
|
├── docs/ # Brief + per-sprint design docs
|
|
├── installer/ # WiX MSI scripts (later)
|
|
└── tools/ # Helper scripts (later)
|
|
```
|
|
|
|
See [`docs/architecture.md`](docs/architecture.md) for a one-page architecture overview.
|
|
|
|
---
|
|
|
|
## Sprint roadmap
|
|
|
|
| Sprint | Focus |
|
|
|---|---|
|
|
| **0** | Foundations: repo structure, core data model, seed library, tests |
|
|
| 1 | Firmware base (I/O, Modbus, NMEA 2000 read, STANDBY mode) |
|
|
| 2 | PID inner loop (rudder position control) |
|
|
| 3 | PID outer loop + Heading Hold (with ROT feed-forward & gain scheduling) |
|
|
| 4 | Studio + basic dedicated display |
|
|
| 5 | True Course + Track Keeping (smooth XTE correction) |
|
|
| 6 | Safety, alarms, NMEA 2000 publish, VMS alarm consumption |
|
|
| 7 | Knob + commissioning + offline auto-tuning |
|
|
| 8 | EKF + adaptive tuning + telemetry + VPN |
|
|
| 9 | Hardening + integrated testing |
|
|
| 10+ | Phase 2 (wind modes for sailboats) and beyond |
|
|
|
|
Full detail in the brief.
|
|
|
|
---
|
|
|
|
## License
|
|
|
|
Proprietary. All rights reserved. See [`LICENSE.txt`](LICENSE.txt).
|
|
|
|
Commercial deployment requires a per-vessel license bound to the installation HWID. Contact <alro65@gmail.com> for licensing.
|