CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/pypi-pynmea2

tessl install tessl/pypi-pynmea2@1.19.0

Python 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%

task.mdevals/scenario-1/

NMEA Message Validator

A utility for validating marine navigation data messages to ensure data integrity.

Capabilities

Message Validation

Validates navigation data messages by verifying their integrity checksums. Messages follow the format: $<data>*<checksum> where the checksum is a two-digit hexadecimal value computed from the message data.

  • When given a valid message with correct checksum, returns True @test
  • When given a message with incorrect checksum, returns False @test
  • When given a message without a checksum, raises an appropriate error @test
  • When given a malformed message (missing $ prefix), raises an appropriate error @test

Checksum Computation

Computes integrity checksums for navigation data messages using standard XOR algorithm.

  • When given message data, returns the correct two-digit hexadecimal checksum @test
  • When given an empty message, returns "00" as the checksum @test

Implementation

@generates

API

def validate_message(message: str) -> bool:
    """
    Validates a navigation data message by checking its integrity checksum.

    Args:
        message: A navigation data message string in the format "$<data>*<checksum>"

    Returns:
        True if the message has a valid checksum, False otherwise

    Raises:
        ValueError: If the message format is invalid
    """
    pass

def compute_checksum(data: str) -> str:
    """
    Computes the integrity checksum for navigation data.

    Args:
        data: The message data (without $ prefix or * and checksum suffix)

    Returns:
        A two-digit hexadecimal string representing the checksum
    """
    pass

Dependencies { .dependencies }

pynmea2 { .dependency }

Provides NMEA 0183 protocol parsing and validation support.

@satisfied-by

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/pynmea2@1.19.x
tile.json