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

GPS Track Time Analyzer

A tool that analyzes GPS track data to extract and report temporal information from navigation messages.

Capabilities

Parse timestamps from GPS messages

  • Given the message "$GPGGA,123519.50,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47", extract the timestamp and return a time object representing 12:35:19.50 UTC @test
  • Given the message "$GPRMC,220516,A,5133.82,N,00042.24,W,173.8,231.8,130694,004.2,W*70", extract the timestamp and return a time object representing 22:05:16 UTC @test

Parse dates from GPS messages

  • Given the message "$GPRMC,220516,A,5133.82,N,00042.24,W,173.8,231.8,130694,004.2,W*70", extract the date and return a date object representing June 13, 1994 @test

Combine date and time information

  • Given the message "$GPRMC,081836,A,3751.65,S,14507.36,E,000.0,360.0,130998,011.3,E*62", extract the complete datetime and return a datetime object representing September 13, 1998 at 08:18:36 UTC @test

Handle messages with timezone information

  • Given the message "$GPZDA,160012.71,11,03,2004,-1,00*7D", extract the local datetime including timezone offset and return a datetime object with UTC time March 11, 2004 at 16:00:12.71 and timezone offset of -1 hour @test

Implementation

@generates

API

from datetime import datetime, date, time

def extract_timestamp(nmea_message: str) -> time:
    """
    Extract time information from an NMEA message.

    Args:
        nmea_message: A valid NMEA sentence string

    Returns:
        A time object with the timestamp from the message (UTC timezone)
    """
    pass

def extract_datestamp(nmea_message: str) -> date:
    """
    Extract date information from an NMEA message.

    Args:
        nmea_message: A valid NMEA sentence string containing date information

    Returns:
        A date object with the datestamp from the message
    """
    pass

def extract_datetime(nmea_message: str) -> datetime:
    """
    Extract combined date and time information from an NMEA message.

    Args:
        nmea_message: A valid NMEA sentence string containing both date and time

    Returns:
        A datetime object combining date and time from the message (UTC timezone)
    """
    pass

def extract_local_datetime(nmea_message: str) -> datetime:
    """
    Extract datetime with timezone information from an NMEA message.

    Args:
        nmea_message: A valid NMEA sentence string with timezone data

    Returns:
        A datetime object with UTC time and timezone information
    """
    pass

Dependencies { .dependencies }

pynmea2 { .dependency }

Provides NMEA 0183 protocol parsing support for GPS and marine navigation messages.

@satisfied-by

Version

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