UNPKG

extended-nmea

Version:

A TypeScript library for parsing NMEA0183-like sentences with support for custom and proprietary sentences.

24 lines (23 loc) 964 B
import { TimeOnly, DateOnly, GeoCoordinate } from "./types"; export declare module Helpers { /** * Calculates the XOR checksum for the given input. The result are two hexadecimal, uppercase characters * (0x00 - 0xFF). * * @param data */ function xorChecksum(data: string): Uppercase<string>; /** * Parses the given data into a TimeOnly representation. * * @param data The data, formatted as 'hhmmss.sss' where hh = hours, mm = minutes and ss.ss = seconds with decimals. The decimal part is optional. */ function parseTime(data: string): TimeOnly; /** * Parses the given data into a DateOnly representation. * * @param data The data, formatted as 'ddMMyy' where dd = day, MM = month and yy = year (< 73 means after 2000) */ function parseDate(data: string): DateOnly; function parseGeoCoordinate(encoded: string, quadrant: string): GeoCoordinate; }