Skip to main content

Crate nmea_kit

Crate nmea_kit 

Source
Expand description

§nmea-kit

Bidirectional NMEA 0183 parser/encoder with AIS decoding and transponder-message encoding.

§Architecture

raw line ──→ parse_frame() ──→ NmeaFrame { prefix, talker, sentence_type, fields }
                                    │
                     ┌──────────────┼──────────────┐
                     ▼              ▼               ▼
               $ + known      $ + unknown     ! AIVDM/AIVDO     AIS app sentences
                     │              │               │              │
                     ▼              ▼               ▼              ▼
              Typed struct    Raw fields      AisMessage enum   AIS sentence struct

§Public API

  • parse_frame / encode_frame — frame layer (always available)
  • NmeaSentence — dispatch enum for all typed NMEA sentences
  • NmeaEncodable — trait for encoding NMEA sentences to wire format
  • ais — AIS decoder, transponder-message encoder, and !-prefixed AIS application sentences

§Features

  • nmea (default) — all 80 NMEA sentence types
  • ais (default) — decoding for all numeric AIS Types 1-27, encoder support for Types 1/2/3, 4, 5, 9, 11, 12, 14, 18, 19, 21, 24 and 27, plus ABM/BBM application sentences
  • dbs, dbt, dpt, … — individual sentence types

Re-exports§

pub use nmea::NmeaSentence;
pub use nmea::NmeaEncodable;

Modules§

ais
AIS (Automatic Identification System) message decoding and application-layer sentences.
nmea
NMEA 0183 sentence parsing and encoding.

Structs§

NmeaFrame
A parsed NMEA 0183 frame with references into the original input.

Enums§

EncodeError
Errors from encoding (invalid frame parts or field values).
FrameError
Errors from frame-level parsing (checksum, delimiters, tag blocks).

Functions§

encode_frame
Encode fields into a valid NMEA 0183 sentence string.
parse_frame
Parse a raw NMEA 0183 line into a validated frame.