NMEA 0183 parsing, epoch accumulation, and GGA writing.
Summary
Functions
Create an incremental accumulator for chunked NMEA streams.
Finish an accumulator and return the trailing epoch, if any.
Parse a text buffer and group decoded sentences into epochs.
Forgiving parse of a text buffer into supported NMEA sentences.
Parse one NMEA sentence.
Push bytes into an accumulator.
Number of retained partial-line bytes in an accumulator.
Write a GGA sentence from validated GGA fields.
Functions
@spec accumulator(keyword()) :: {:ok, Sidereon.GNSS.NMEA.Accumulator.t()} | {:error, term()}
Create an incremental accumulator for chunked NMEA streams.
@spec finish(Sidereon.GNSS.NMEA.Accumulator.t()) :: {:ok, Sidereon.GNSS.NMEA.Snapshot.t() | nil} | {:error, term()}
Finish an accumulator and return the trailing epoch, if any.
@spec group_epochs(String.t()) :: {:ok, %{ sentences: [Sidereon.GNSS.NMEA.Sentence.t()], epochs: [Sidereon.GNSS.NMEA.Snapshot.t()], diagnostics: map() }}
Parse a text buffer and group decoded sentences into epochs.
@spec parse(String.t()) :: {:ok, %{sentences: [Sidereon.GNSS.NMEA.Sentence.t()], diagnostics: map()}} | {:error, term()}
Forgiving parse of a text buffer into supported NMEA sentences.
@spec parse_sentence(String.t()) :: {:ok, %{sentence: Sidereon.GNSS.NMEA.Sentence.t(), diagnostics: map()}} | {:error, term()}
Parse one NMEA sentence.
@spec push(Sidereon.GNSS.NMEA.Accumulator.t(), binary()) :: {:ok, %{ sentences: [Sidereon.GNSS.NMEA.Sentence.t()], snapshots: [Sidereon.GNSS.NMEA.Snapshot.t()], diagnostics: map() }} | {:error, term()}
Push bytes into an accumulator.
@spec retained_len(Sidereon.GNSS.NMEA.Accumulator.t()) :: non_neg_integer()
Number of retained partial-line bytes in an accumulator.
Write a GGA sentence from validated GGA fields.