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-7/

NMEA Query Message Handler

Build a system to create and parse NMEA query messages for GPS device communication.

Capabilities

Create Query Messages

Create query messages that follow the NMEA query protocol format where one device requests specific sentence types from another device.

  • Create a query message where device "CC" asks device "GP" for "GGA" sentences and verify the formatted output includes proper checksum @test
  • Create a query message where device "EC" asks device "GP" for "RMC" sentences @test
  • Create a query message where device "AI" asks device "GL" for "GSA" sentences @test

Parse Query Messages

Parse incoming query message strings to extract the talker, listener, and requested sentence type information.

  • Parse "$CCGPQ,GGA*2A" and extract talker="CC", listener="GP", sentence_type="GGA" @test
  • Parse "$ECGPQ,RMC*3B" and extract talker="EC", listener="GP", sentence_type="RMC" @test

Render Query Messages

Render query message objects back to properly formatted NMEA strings.

  • Render a parsed query message back to string format with proper checksum @test

Implementation

@generates

API

def create_query_message(talker: str, listener: str, sentence_type: str) -> str:
    """
    Create an NMEA query message.

    Args:
        talker: Two-character talker ID (e.g., "CC", "EC")
        listener: Two-character listener ID (e.g., "GP", "GL")
        sentence_type: Three-character sentence type to query (e.g., "GGA", "RMC")

    Returns:
        Formatted NMEA query string with checksum (e.g., "$CCGPQ,GGA*2A")
    """

def parse_query_message(message: str) -> dict:
    """
    Parse an NMEA query message string.

    Args:
        message: NMEA query string (e.g., "$CCGPQ,GGA*2A")

    Returns:
        Dictionary with keys 'talker', 'listener', 'sentence_type', and 'is_query'
        Example: {'talker': 'CC', 'listener': 'GP', 'sentence_type': 'GGA', 'is_query': True}
    """

Dependencies { .dependencies }

pynmea2 { .dependency }

Provides NMEA 0183 protocol parsing and generation support.

@satisfied-by

Version

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