Organizes 11 projects for Cerbo GX/Venus OS into a single repository: - axiom-nmea: Raymarine LightHouse protocol decoder - dbus-generator-ramp: Generator current ramp controller - dbus-lightning: Blitzortung lightning monitor - dbus-meteoblue-forecast: Meteoblue weather forecast - dbus-no-foreign-land: noforeignland.com tracking - dbus-tides: Tide prediction from depth + harmonics - dbus-vrm-history: VRM cloud history proxy - dbus-windy-station: Windy.com weather upload - mfd-custom-app: MFD app deployment package - venus-html5-app: Custom Victron HTML5 app fork - watermaker: Watermaker PLC control UI Adds root README, .gitignore, project template, and per-project .gitignore files. Sensitive config files excluded via .gitignore with .example templates provided. Made-with: Cursor
101 lines
2.1 KiB
Python
101 lines
2.1 KiB
Python
"""
|
|
Raymarine NMEA Library
|
|
|
|
A Python library for decoding Raymarine LightHouse protocol data
|
|
and converting it to standard NMEA 0183 sentences.
|
|
|
|
Example usage:
|
|
from raymarine_nmea import RaymarineDecoder, NMEAGenerator
|
|
|
|
# Create decoder and generator
|
|
decoder = RaymarineDecoder()
|
|
generator = NMEAGenerator()
|
|
|
|
# Decode a packet (from multicast or PCAP)
|
|
sensor_data = decoder.decode(packet_bytes)
|
|
|
|
# Generate NMEA sentences
|
|
sentences = generator.generate_all(sensor_data)
|
|
for sentence in sentences:
|
|
print(sentence)
|
|
"""
|
|
|
|
__version__ = "1.0.0"
|
|
__author__ = "Axiom NMEA Project"
|
|
|
|
# Core protocol components
|
|
from .protocol.parser import ProtobufParser
|
|
from .protocol.decoder import RaymarineDecoder
|
|
from .protocol.constants import (
|
|
WIRE_VARINT,
|
|
WIRE_FIXED64,
|
|
WIRE_LENGTH,
|
|
WIRE_FIXED32,
|
|
RAD_TO_DEG,
|
|
MS_TO_KTS,
|
|
FEET_TO_M,
|
|
KELVIN_OFFSET,
|
|
)
|
|
|
|
# Data models
|
|
from .data.store import SensorData
|
|
|
|
# NMEA generation
|
|
from .nmea.generator import NMEAGenerator
|
|
from .nmea.sentence import NMEASentence
|
|
from .nmea.server import NMEATcpServer
|
|
|
|
# Listeners
|
|
from .listeners.multicast import MulticastListener
|
|
from .listeners.pcap import PcapReader
|
|
|
|
# Sensor configurations
|
|
from .sensors import (
|
|
TANK_CONFIG,
|
|
BATTERY_CONFIG,
|
|
MULTICAST_GROUPS,
|
|
MULTICAST_GROUPS_ALL,
|
|
)
|
|
|
|
# Venus OS D-Bus publishing (optional import - only works on Venus OS)
|
|
try:
|
|
from . import venus_dbus
|
|
HAS_VENUS_DBUS = True
|
|
except ImportError:
|
|
venus_dbus = None
|
|
HAS_VENUS_DBUS = False
|
|
|
|
__all__ = [
|
|
# Version
|
|
"__version__",
|
|
# Protocol
|
|
"ProtobufParser",
|
|
"RaymarineDecoder",
|
|
# Constants
|
|
"WIRE_VARINT",
|
|
"WIRE_FIXED64",
|
|
"WIRE_LENGTH",
|
|
"WIRE_FIXED32",
|
|
"RAD_TO_DEG",
|
|
"MS_TO_KTS",
|
|
"FEET_TO_M",
|
|
"KELVIN_OFFSET",
|
|
# Data
|
|
"SensorData",
|
|
# NMEA
|
|
"NMEAGenerator",
|
|
"NMEASentence",
|
|
"NMEATcpServer",
|
|
# Listeners
|
|
"MulticastListener",
|
|
"PcapReader",
|
|
# Config
|
|
"TANK_CONFIG",
|
|
"BATTERY_CONFIG",
|
|
"MULTICAST_GROUPS",
|
|
"MULTICAST_GROUPS_ALL",
|
|
# Venus OS
|
|
"venus_dbus",
|
|
"HAS_VENUS_DBUS",
|
|
]
|