tessl install tessl/pypi-pynmea2@1.19.0Python library for parsing and generating NMEA 0183 protocol messages used in GPS and marine navigation systems
Agent Success
Agent success rate when using this tile
77%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.12x
Baseline
Agent success rate without this tile
69%
Build a marine instrument data processor that decodes and analyzes proprietary SeaTalk protocol messages from Raymarine marine instruments. The processor should parse SeaTalk NMEA sentences, extract command types, and generate a summary report of instrument readings.
Raymarine SeaTalk is a proprietary marine protocol that bridges SeaTalk data to NMEA 0183 format. SeaTalk messages contain various types of instrument data such as depth readings, wind measurements, GPS positions, speed, and heading information. Your task is to process these messages and extract meaningful information.
Your program should read SeaTalk sentences from a file named seatalk_data.txt. Each line in the file contains a single SeaTalk NMEA sentence string.
Example input file content:
$STALK,84,86,26,97,02,00,00,00,08*3D
$STALK,00,02,00,00,00,60*0F
$STALK,84,56,E2,00,00,00,00,08,DB*27Generate a file named seatalk_report.txt containing:
Example output format:
SeaTalk Message Analysis Report
================================
Total sentences parsed: 42
Total parsing errors: 1
Command Types Detected:
- Apparent Wind Angle: 8
- Compass Heading: 15
- Water Depth: 12
- Water Speed: 7Provides NMEA 0183 protocol parsing with SeaTalk proprietary format support.
Create a test file test_processor.py that verifies basic SeaTalk parsing functionality.
Given an input file test_input_1.txt containing:
$STALK,84,86,26,97,02,00,00,00,08*3D
$STALK,00,02,00,00,00,60*0F
$STALK,10,01,00,00*58When the processor runs on this input file
Then the output file should contain:
Create a test in test_processor.py that verifies counting of repeated command types.
Given an input file test_input_2.txt containing:
$STALK,84,86,26,97,02,00,00,00,08*3D
$STALK,84,86,26,97,02,00,00,00,08*3D
$STALK,00,02,00,00,00,60*0FWhen the processor runs on this input file
Then the output file should contain: