Skip to main content

Crate nmea

Crate nmea 

Source
Expand description

§NMEA 0183 parser

Use Nmea::parse() and Nmea::parse_for_fix() to preserve state between receiving new NMEA sentences (large size, not recommended for embedded platforms).

For embedded platforms, i.e. no_std, use parse_str() or parse_bytes() to parse sentences without preserving state.

Units used: celsius, degrees, knots, meters for altitude.

Check the feature flags below for all the supported sentences.

§Crate features

  • default — Default features: std & all-sentences
  • std (enabled by default) — Enable the std (standard library) usage
  • serde — Enable derives for (De)Serialization with serde
  • defmt — Enable derives of defmt@1.0 formatting for embedded platforms
  • features-docs — Enable the documentation of features (disabled by default to remove unnecessary to the functionality dependencies)

§Sentences features

  • all-sentences (enabled by default) — Enable all sentences

§Categorised features

  • GNSS (enabled by default) — GNSS specific sentences related to the position or speed relative to the ground
  • waypoint (enabled by default) — Waypoint
  • maritime (enabled by default) — Maritime
  • radar (enabled by default) — Radar
  • water (enabled by default) — Water
  • vendor-specific (enabled by default) — Vendor-specific messages
  • other (enabled by default) — Other

§Supported sentences (alphabetically ordered)

  • AAM (enabled by default) — Waypoint Arrival Alarm (feature: waypoint)
  • ALM (enabled by default) — GPS Almanac Data (feature: GNSS)
  • APA (enabled by default) — Autopilot Sentence “A” (feature: GNSS)
  • BOD (enabled by default) — Bearing - Waypoint to Waypoint (feature: waypoint)
  • BWC (enabled by default) — Bearing & Distance to Waypoint - Great Circle (feature: waypoint)
  • BWW (enabled by default) — Bearing - Waypoint to Waypoint (feature: waypoint)
  • DBK (enabled by default) — Depth Below Keel (feature: water)
  • DBS (enabled by default) — Depth Below Surface (feature: water)
  • DPT (enabled by default) — Depth of Water (feature: water)
  • GBS (enabled by default) — GPS Satellite Fault Detection (feature: GNSS)
  • GGA (enabled by default) — * Global Positioning System Fix Data (feature: GNSS)
  • GLL (enabled by default) — * Geographic Position - Latitude/Longitude (feature: GNSS)
  • GNS (enabled by default) — * Fix data (feature: GNSS)
  • GSA (enabled by default) — * GPS DOP and active satellites (feature: GNSS)
  • GST (enabled by default) — GPS Pseudorange Noise Statistics (feature: GNSS)
  • GSV (enabled by default) — * Satellites in view (feature: GNSS)
  • HDT (enabled by default) — Heading - True (feature: other)
  • MDA (enabled by default) — Meterological Composite (feature: other)
  • MTW (enabled by default) — Mean Temperature of Water (feature: water)
  • MWV (enabled by default) — Wind Speed and Angle (feature: other)
  • RMC (enabled by default) — * Recommended Minimum Navigation Information (feature: GNSS)
  • RMZ (enabled by default) — PGRMZ - Garmin Altitude (Vendor specific) (feature: vendor-specific)
  • TTM (enabled by default) — Tracked target message (feature: radar)
  • TXT (enabled by default) — * Text message (feature: other)
  • VHW (enabled by default) — Water speed and heading (feature: water)
  • VTG (enabled by default) — * Track made good and Ground speed (feature: GNSS)
  • WNC (enabled by default) — Distance - Waypoint to waypoint (feature: waypoint)
  • ZDA (enabled by default) — Time & Date - UTC, day, month, year and local time zone (feature: other)
  • ZFO (enabled by default) — UTC & Time from origin Waypoint (feature: waypoint)
  • ZTG (enabled by default) — UTC & Time to Destination Waypoint (feature: waypoint)

* Nmea::parse() supported sentences

Modules§

sentences
All the supported sentence type data and parsers.

Structs§

Nmea
NMEA parser
NmeaSentence
A known and parsable Nmea sentence type.
Satellite
Satellite information
SentenceMask

Enums§

Error
ParseResult
The result of parsing a single NMEA message.
SentenceType
NMEA sentence type

Constants§

SENTENCE_MAX_LEN
The maximum message length parsable by the crate.
TEXT_PARAMETER_MAX_LEN
Maximum length of a single waypoint id data in sentence

Functions§

parse_bytes
Parse a NMEA 0183 sentence from bytes and extract data from it.
parse_nmea_sentence
parse_str
Parse a NMEA 0183 sentence from a string slice and extract data from it.