NOUAR (Navigation Oriented Unmanned Astral Regulator) is a system for automating ship lighting based on precise astronomical events using only onboard GPS data. The goal is to remove manual intervention and keep lighting behavior consistent across vessels regardless of location.
This repository now includes the core computation layer, an early-stage UI, and a custom OS pipeline for embedded deployment.
This is an early-stage implementation.
What exists right now:
- Solar time calculation (sunrise and sunset)
- NMEA
$GPRMCparser - Date and time primitives
- Accuracy validation against NOAA and USNO datasets
- Local GUI (Slint-based, partially implemented)
- Custom Buildroot-based OS for Raspberry Pi 5
- Docker-based cross-compilation pipeline
What does not exist yet:
- Scheduler
- Relay control
- Full device integration
- Complete mode system (harbor, sailing, anchor)
- etc.
- Parses
$GPRMCsentences and validates checksum (XOR) - Extracts latitude, longitude (decimal degrees), UTC date and time
- Handles hemisphere signs correctly
- Rejects invalid, inactive, or malformed sentences
- Computes sunrise and sunset from latitude, longitude, and date
- Fully UTC-based
- Handles edge cases like midnight wraparound and orbital drift differences
- Validated against NOAA and USNO datasets
Dmy(date): strict parsing (dd-mm-yyyyordd/mm/yyyy), leap year aware, strongly validated with typed errorsHms(time): supports 24h and 12h formats, conversion from fractional hours, correct rounding, and overflow handling across seconds, minutes, and hours
-
Built using Slint (direct DRM rendering, no compositor required)
-
Local, offline-first interface
-
Current state:
- 1 of 2 primary screens implemented
- Navigation screen available
-
Includes:
- Central UI entry via Slint runtime
- Componentized inputs
- Global theming system
-
Custom OS built using Buildroot for Raspberry Pi 5
-
Cross-compiled via Docker for reproducible builds
-
Includes:
- Root filesystem overlays
- Custom boot splash
- Preconfigured runtime environment for NOUAR
-
GPU stack enabled:
- KMS/DRM
- Mesa
- vc4
- seatd
-
Font configuration fixed for Slint/Skia (Space Grotesk included)
Solar calculations are tested against real-world datasets.
- Average absolute error: ~26s
- Accuracy within ±75s: 100%
- Accuracy within ±35s: 100%
Notes:
- NOAA data is local-time based and converted to UTC, which introduces ~50–60s drift near day boundaries due to orbital progression.
- USNO data is strictly UTC-aligned, so comparison is tighter.
use lib_gps::parse_gprmc;
use lib_solar_calculator::calculate_solar_time;
use common::{dms::Dms, coord::Coord};
let sentence = "$GPRMC,...*46";
let nmea = parse_gprmc(sentence)?;
println!("{}", nmea);
// Lat: xx.xxxxxx, Lon: xx.xxxxxx, Date: dd-mm-yyyy, Time: HH:MM:SS
let sunrise = calculate_solar_time(
Coord { ... },
Dms { ... },
true // false -> sunset
);
println!("{}", sunrise);
// HH:MM:SScargo test --workspaceCovers:
- Date parsing
- Time parsing and conversion
- GPS parsing (valid and invalid cases)
- Solar calculation against external datasets
- GPS is the only time source
- Everything runs in UTC to avoid timezone drift
- Parsing is strict, not permissive
- Errors are explicit and typed
- UI is local-only and does not depend on network or external services
- System is designed to run on a minimal custom OS, not a general-purpose distro
Planned next steps:
- Complete remaining UI screens
- Scheduler engine (event-driven)
- Hardware abstraction layer for relays
- Mode system (GPS, Manual, Switch)
- Grouping and bulk operations
- Full integration with embedded runtime
- Rust (workspace-based)
- Slint (UI, DRM rendering)
- Buildroot (custom OS)
- Docker (cross-compilation pipeline)
- Raspberry Pi 5 target
