| Did you know ... | Search Documentation: |
| Pack logtalk -- logtalk-3.101.0/docs/handbook/_sources/libraries/nmea.rst.txt |
.. _library_nmea:
nmea
The nmea library parses NMEA 0183 sentences from GPS/GNSS receivers
into canonical raw terms and provides typed semantic decoding for a
selected set of common sentence types.
Open the `../../apis/library_index.html#nmea <../../apis/library_index.html#nmea>`__ link in a web browser.
To load this library, load the loader.lgt file:
::
| ?- logtalk_load(nmea(loader)).
To test this library predicates, load the tester.lgt file:
::
| ?- logtalk_load(nmea(tester)).
atom(Atom), chars(List),
codes(List), stream(Stream), or file(Path) sources.checksum(required)checksum(optional)checksum(ignore)unknown_type(keep)unknown_type(error)Parsed sentences are represented as:
::
nmea_sentence(Talker, Type, Fields, checksum(Provided, Computed))
Where:
Talker is a normalized lowercase talker atom such as gp or
gn$P... sentences use the atom proprietaryType is the normalized lowercase sentence type atomFields is the ordered list of field atoms after the sentence
identifierProvided is either a normalized uppercase hexadecimal checksum
atom or missingComputed is the normalized uppercase hexadecimal checksum atom
computed from the sentence payloadThe library currently provides semantic decoding for these sentence types:
gga(Time, Coordinate, fix(FixQuality, SatellitesUsed, HDOP), altitude(AntennaAltitudeMeters, GeoidSeparationMeters), dgps(DifferentialAgeSeconds, StationId))rmc(Time, Status, Coordinate, movement(SpeedKnots, CourseDegrees), Date, MagneticVariation, Mode)gsa(SelectionMode, FixType, SatelliteIds, dop(PDOP, HDOP, VDOP), SystemId)gsv(MessageCount, MessageNumber, SatellitesInView, Satellites)vtg(track(TrueCourseDegrees, MagneticCourseDegrees), speed(SpeedKnots, SpeedKph), Mode)gll(Coordinate, Time, Status, Mode)
Shared semantic subterms include:geographic(Latitude, Longitude)utc_time(Hour, Minute, Second, fraction(Numerator, Denominator))date(Year, Month, Day)magnetic_variation(Degrees, east|west)satellite(PRN, ElevationDegrees, AzimuthDegrees, SnrDbHz)missing
Two-digit RMC years are expanded using a fixed GPS-era rule:
80..99 map to 1980..199900..79 map to 2000..2079Implemented in this first version:
$P... sentence passthroughGGA, RMC, GSA, GSV, VTG, and
GLL
Deliberately out of scope for this first version:
! sentencesGSV multi-fragment aggregation