Seastead Software Stack

Open Source Architecture for a 30,000 lbs Solar-Electric Platform with Differential Thrust

πŸ—οΈ Platform Context Summary

This stack is tailored for your unique geometry: 40Γ—16 ft deck, 4Γ— angled columns (20 ft @ 45Β°), 44Γ—68 ft float footprint, ~30,000 lbs displacement.

Critical Hydrodynamic Note: Your platform (tiny oil platform geometry, large underwater column surface area, cable catenary drag) will have massive yaw inertia and asymmetric drag compared to a boat. Standard PID autopilots (designed for rudders) will oscillate or fail. You need a Model Predictive Control (MPC) or Gain-Scheduled PID approach handling:
  • Deadband/non-linearity of large props at low RPM
  • Cross-coupling: Thrust vector changes effective center of lateral resistance (CLR)
  • Current/windage on 20ft columns + cables

🧭 1. Autopilot & Navigation Core

Primary Recommendation: PyPilot (Heavily Modified)

PythonLinuxMIT License

You are correct that PyPilot is the best starting point. It runs on Raspberry Pi / BeagleBone, interfaces with IMU (MPU9250/ICM20948), GPS, and actuators via GPIO/I2C/Serial. However, stock PyPilot assumes rudder steering.

Required Modifications for Differential Thrust

  1. New Actuator Driver (`motor.py`): Replace `servo.py`/`motor.py` logic. Output must be Port PWM + Starboard PWM (or CAN/Serial commands to ESC/VFDs).
  2. Mixer Logic: Implement `thrust_port = throttle + yaw_output` / `thrust_stbd = throttle - yaw_output`.
  3. Asymmetric Thrust Calibration: Add a calibration routine mapping PWM β†’ Bollard Pull (Newtons) for each motor independently. Large 2.5m props on submersible mixers likely have significant deadband and non-linear curves.
  4. Gain Scheduling: Yaw authority changes drastically with speed (1 mph vs station-keeping). Implement lookup tables: `Kp_yaw = f(speed_over_ground, current_estimate)`.

Alternative: ArduPilot Rover (ArduRover)

C++LinuxGPLv3

Native support for Skid Steering / Differential Thrust (`SKID_STEER_OUT=1`). Mature EKF3 sensor fusion, Lua scripting for custom logic, Mission Planner / MAVLink ecosystem. Better suited if you plan autonomous waypoint missions or "Loiter" modes. Heavier resource usage (needs Pi 4 / Navio2 / Cube Orange).

FeaturePyPilot (Custom)ArduRover
Differential Thrust Native❌ (Requires Code)βœ… (Standard)
Sensor Fusion (EKF)Basic Complementaryβœ… EKF3 (GPS+IMU+OptFlow)
Solar/Charging Integrationβœ… Built-in (Tinypilot)βœ… Via Battery Monitor
Development LanguagePython (Easy Mods)C++ / Lua (Harder Core Mods)
Web UI / Remote Accessβœ… Excellent (pypilot.web)βœ… MAVLink / MAVProxy / Web
Recommendation: Start with PyPilot on a Raspberry Pi 4 (4GB/8GB). Write a custom `pypilot/differential_motor.py` driver. Use the existing `pypilot.autopilot` PID structure but feed it the mixed motor outputs. It is lighter, Python-based (faster iteration for your unique hydrodynamics), and the web UI is perfect for a seastead "bridge" display.

πŸ“Ή 2. Security Camera & NVR (Network Video Recorder)

Top Pick: Frigate NVR + Google Coral TPU (USB or M.2)

PythonDockerApache 2.0

Alternative: Shinobi

Node.jsDockerGPLv3

Traditional NVR. Good multi-user, websocket streams, API. No built-in AI (requires external `shinobi-detector` or Frigate sidecar). Higher CPU usage without Coral.

Camera Hardware Advice for Marine

Frigate `docker-compose.yml` Snippet

version: "3.9"
services:
  frigate:
    image: ghcr.io/blakeblackshear/frigate:stable
    container_name: frigate
    privileged: true # Needed for Coral TPU / GPU access
    restart: unless-stopped
    ports:
      - "5000:5000"   # Web UI
      - "8554:8554"   # RTSP Restream (if needed)
      - "1935:1935"   # RTMP (optional)
    volumes:
      - /dev/bus/usb:/dev/bus/usb     # Coral USB
      - /dev/apex_0:/dev/apex_0       # Coral M.2 (if used)
      - /dev/dri:/dev/dri             # Intel/AMD GPU (VAAPI)
      - ./config:/config
      - ./media/frigate:/media/frigate # Recordings (mount SSD/HDD here)
      - type: tmpfs                   # RAM disk for DB/Prebuffer
        target: /tmp/cache
        tmpfs:
          size: 1000000000 # 1GB
    environment:
      FRIGATE_RTSP_PASSWORD: "changeme"
    devices:
      - /dev/coral:/dev/coral # If using udev rules for Coral

πŸ–₯️ 3. System Integration: The "Bridge" Dashboard

Don't run separate UIs. Aggregate everything into a single touchscreen dashboard at the helm.

Home Assistant (HASS) - The Central Nervous System

PythonDockerApache 2.0

Data Flow Architecture

[ Sensors ] [ Actuators ] [ Compute / Storage ] IMU (I2C) Port Prop (PWM/CAN) Raspberry Pi 4 (8GB) GPS (UART/USB) <--> Stbd Prop (PWM/CAN) <--> |-- Docker: PyPilot (Autopilot Core) Wind (NMEA2k) Thruster ESCs |-- Docker: Frigate (NVR + AI) Depth (NMEA2k) Ballast Pumps |-- Docker: Home Assistant (UI/Logic) AIS (NMEA2k) Anchor Winch |-- Docker: Mosquitto (MQTT Broker) Battery (Modbus) Solar MPPTs |-- Docker: Node-RED (Automation Logic) Cameras (PoE) ------> Switch (PoE+) |-- Storage: 1TB NVMe (OS) + 4TB HDD (Video/Logs) | [ Network Switch ] | [ Starlink / 4G/5G Router ] ----> Internet (Updates / Remote Access / Weather)

Node-RED (Running inside HASS Add-on or separate Docker)

Visual wiring for Seastead Specific Logic:

πŸ—ΊοΈ 4. Navigation & Charting

OpenCPN (Chartplotter)

C++GPLv2

Standard for desktop/laptop. Runs on Pi 4 (slow) or connected laptop. Supports S-57/S-63 vector charts, CM93, NV Charts. Plugin architecture for Weather Routing, AIS, Radar.

Signal K Server (Maritime Data Bus)

Node.jsDockerApache 2.0

Essential. Translates NMEA0183/NMEA2000/Seatalk β†’ JSON/WebSockets/TCP/MQTT. PyPilot consumes Signal K for True Wind / SOG / COG. Home Assistant consumes Signal K via MQTT. OpenCPN consumes Signal K for AIS/Instruments.

# Typical Signal K Flow on Pi
NMEA2000 (Actisense NGW-1 / CANable) 
  -> signalk-to-n2k (CAN -> Signal K) 
  -> Signal K Server (Port 3000) 
  -> MQTT Broker (Mosquitto) 
  -> Home Assistant / PyPilot / Node-RED

Mobile/Remote: AvNav or AnchorWatch

AvNav runs headless on Pi, serves charts via Web UI (mobile friendly). Good backup if main screen fails.

βš™οΈ 5. Recommended Compute Hardware (Ruggedized)

RoleHardwareWhy
Main ComputerRaspberry Pi 4 Model B (8GB) + Argon ONE V2 M.2 Case (Passive cooling, SSD slot, RTC, Power Button)Low power (5-8W), runs all Docker containers (PyPilot, HASS, Frigate, SignalK, Mosquitto, Node-RED). M.2 NVMe for reliability vs SD card.
AI AcceleratorGoogle Coral USB Accelerator OR M.2 Coral (Dual Edge TPU) in Argon CaseFrigate needs this for 10+ camera streams @ low latency. USB is easier; M.2 is cleaner.
IMUMPU9250 / ICM20948 on Pypilot Hat or SparkFun 9DoF (I2C)PyPilot native support. Mount rigidly on deck structure (not cabinet), dampened vibration.
GPSu-blox F9P (RTK) or M8N (Standard) + External Antenna on MastRTK gives cm accuracy for station keeping / docking. Standard is fine for 1mph nav.
NMEA2000 GatewayActisense NGW-1 (ISO) or CANable Pro / PiCAN-M (DIY)Actisense is galvanically isolated (critical for lightning/ground loops on metal platform). CANable cheaper.
Motor ControlODrive Pro / VESC 6 / Industrial VFD + RS485/CAN Hat on Pi2.5m props = High Torque. ODrive/VESC handle FOC, current limiting, regen. Talk to Pi via CAN/USB.
SwitchIndustrial PoE+ Switch (8-16 port) e.g., Ubiquiti USW-Industrial / Netgear MS108EUPPower Cameras (PoE+ 30W), Pi, Signal K gateway. Managed VLANs for Camera / Control / Crew WiFi separation.
Storage1TB NVMe (OS/DB) + 2x 4TB 2.5" HDD (RAID1 via USB3) for Video/LogsNVMe for speed/boot. HDD for capacity. RAID1 for redundancy against vibration failure.

πŸ”§ 6. Custom Software You Will Likely Write

No open source project handles Cable-Tensioned Station Keeping or Solar-Drift Optimization out of the box.

Project A: `seastead_station_keeper` (Python / Node-RED)

Project B: `prop_curve_mapper` (Calibration Tool)

Run at sea: Sweep PWM 0-100% β†’ Log Motor Current, Voltage, GPS Speed, Heading Rate. Build lookup tables `Thrust_N = f(PWM, RPM)` and `Yaw_Nm = f(Port_PWM, Stbd_PWM)`. Feed into PyPilot mixer.

Project C: `cable_monitor` (Safety)

If you install load cells on the 4 corner cables + rectangle cables: Monitor tension asymmetry. Alert if > 2x expected working load (snag risk) or slack (cable jump risk).