nmea-toolkit

Typed NMEA 0183 parsing, diagnostics, and evidence toolkit

nmea
gnss
gps
parser
diagnostics
moon add jiujitong/nmea-toolkit@0.1.0
Download zip
Author
Version
0.1.0
License
Apache-2.0
Last updated
9 days ago
Downloads
4
README

#jiujitong/nmea-toolkit

Typed NMEA 0183 parsing and GNSS evidence analysis for MoonBit.

The package supports GGA, RMC, GSA, GSV, VTG, ZDA and GLL records, bounded stream decoding, multipart GSV assembly, explicit-time fix fusion, geographic metrics, tracks, quality findings, batch summaries and deterministic reports.

let record = @nmea.parse_sentence(
"$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47\r\n",
).unwrap()
guard record is @nmea.GgaRecordValue(gga) else { abort("expected GGA") }
println(gga.satellites())

See README.md and the five packages under examples/ for complete usage.

#
BatchResult

pub struct BatchResult[T] {
item_values : Array[SentenceResult[T]]
} derive(Eq,
Debug
)

#
BatchResult::count

fn[T] BatchResult::count(self : BatchResult[T]) -> Int

#
BatchResult::items

fn[T] BatchResult::items(self : BatchResult[T]) -> Array[SentenceResult[T]]

#
BatchResult::new

fn[T] BatchResult::new(items : Array[SentenceResult[T]]) -> BatchResult[T]

#
BatchSummary

pub(all) struct BatchSummary {
total_value : Int
successes_value : Int
failures_value : Int
formatter_entries_value : Array[StringCountEntry]
talker_entries_value : Array[StringCountEntry]
checksum_entries_value : Array[ChecksumCountEntry]
error_entries_value : Array[StringCountEntry]
} derive(Eq,
Debug
)

#
BatchSummary::checksum_count

fn BatchSummary::checksum_count(self : BatchSummary, status : ChecksumStatus) -> Int

#
BatchSummary::checksum_entries

fn BatchSummary::checksum_entries(self : BatchSummary) -> Array[ChecksumCountEntry]

#
BatchSummary::error_count

fn BatchSummary::error_count(self : BatchSummary, key : String) -> Int

#
BatchSummary::error_entries

fn BatchSummary::error_entries(self : BatchSummary) -> Array[StringCountEntry]

#
BatchSummary::failures

fn BatchSummary::failures(self : BatchSummary) -> Int

#
BatchSummary::formatter_count

fn BatchSummary::formatter_count(self : BatchSummary, key : String) -> Int

#
BatchSummary::formatter_entries

fn BatchSummary::formatter_entries(self : BatchSummary) -> Array[StringCountEntry]

#
BatchSummary::successes

fn BatchSummary::successes(self : BatchSummary) -> Int

#
BatchSummary::talker_count

fn BatchSummary::talker_count(self : BatchSummary, key : String) -> Int

#
BatchSummary::talker_entries

fn BatchSummary::talker_entries(self : BatchSummary) -> Array[StringCountEntry]

#
BatchSummary::total

fn BatchSummary::total(self : BatchSummary) -> Int

#
BoundingBox

pub(all) struct BoundingBox {
minimum_latitude_value : Double
maximum_latitude_value : Double
minimum_longitude_value : Double
maximum_longitude_value : Double
} derive(Eq,
Debug
)

#
BoundingBox::maximum_latitude

fn BoundingBox::maximum_latitude(self : BoundingBox) -> Double

#
BoundingBox::maximum_longitude

fn BoundingBox::maximum_longitude(self : BoundingBox) -> Double

#
BoundingBox::minimum_latitude

fn BoundingBox::minimum_latitude(self : BoundingBox) -> Double

#
BoundingBox::minimum_longitude

fn BoundingBox::minimum_longitude(self : BoundingBox) -> Double

#
BoundingBox::new

fn BoundingBox::new(minimum_latitude : Double, maximum_latitude : Double, minimum_longitude : Double, maximum_longitude : Double) -> Result[BoundingBox, NmeaError]

#
ChecksumCountEntry

pub(all) struct ChecksumCountEntry {
status_value : ChecksumStatus
count_value : Int
} derive(Eq,
Debug
)

#
ChecksumCountEntry::count

fn ChecksumCountEntry::count(self : ChecksumCountEntry) -> Int

#
ChecksumCountEntry::status

#
ChecksumStatus

pub(all) enum ChecksumStatus {
PresentValid
PresentInvalid
MissingChecksum
NotChecked
} derive(Eq,
Debug
)

#
Coordinate

pub(all) struct Coordinate {
axis_value : CoordinateAxis
degrees_value : Double
wire_value : ExactDecimal
hemisphere_value : UInt16
} derive(Eq,
Debug
)

#
Coordinate::axis

#
Coordinate::degrees

fn Coordinate::degrees(self : Coordinate) -> Double

#
Coordinate::hemisphere

fn Coordinate::hemisphere(self : Coordinate) -> UInt16

#
Coordinate::wire

fn Coordinate::wire(self : Coordinate) -> ExactDecimal

#
CoordinateAxis

pub(all) enum CoordinateAxis {
Latitude
Longitude
} derive(Eq,
Debug
)

#
Diagnostic

pub(all) struct Diagnostic {
code : String
severity : Severity
message : String
source : SourceRef
} derive(Eq,
Debug
)

#
Diagnostic::code

fn Diagnostic::code(self : Diagnostic) -> String

#
Diagnostic::message

fn Diagnostic::message(self : Diagnostic) -> String

#
Diagnostic::new

fn Diagnostic::new(code : NmeaErrorCode, severity : Severity, message : String, source : SourceRef) -> Diagnostic

#
Diagnostic::severity

fn Diagnostic::severity(self : Diagnostic) -> Severity

#
Diagnostic::source

fn Diagnostic::source(self : Diagnostic) -> SourceRef

#
ExactDecimal

pub(all) struct ExactDecimal {
coefficient_value : Int64
scale_value : Int
negative_zero_value : Bool
} derive(Eq,
Debug
)

A bounded decimal that preserves the coefficient and number of fractional digits.

#
ExactDecimal::coefficient

fn ExactDecimal::coefficient(self : ExactDecimal) -> Int64

#
ExactDecimal::compare

fn ExactDecimal::compare(self : ExactDecimal, other : ExactDecimal) -> Int

#
ExactDecimal::is_negative_zero

fn ExactDecimal::is_negative_zero(self : ExactDecimal) -> Bool

#
ExactDecimal::parse

fn ExactDecimal::parse(text : String, max_scale? : Int) -> Result[ExactDecimal, NmeaError]

Parses a base-10 decimal without accepting exponent notation.

#
ExactDecimal::scale

fn ExactDecimal::scale(self : ExactDecimal) -> Int

#
ExactDecimal::to_double

fn ExactDecimal::to_double(self : ExactDecimal) -> Double

#
ExactDecimal::to_string

fn ExactDecimal::to_string(self : ExactDecimal) -> String

#
FieldCursor

pub(all) struct FieldCursor {
fields_value : Array[String]
record_index_value : Int
} derive(
Debug
)

#
FieldCursor::decimal

fn FieldCursor::decimal(self : FieldCursor, index : Int, max_scale? : Int) -> Result[ExactDecimal, NmeaError]

#
FieldCursor::integer

fn FieldCursor::integer(self : FieldCursor, index : Int, min? : Int, max? : Int) -> Result[Int, NmeaError]

#
FieldCursor::length

fn FieldCursor::length(self : FieldCursor) -> Int

#
FieldCursor::new

fn FieldCursor::new(fields : Array[String], record_index? : Int) -> FieldCursor

#
FieldCursor::optional

fn FieldCursor::optional(self : FieldCursor, index : Int) -> Result[String?, NmeaError]

#
FieldCursor::record_index

fn FieldCursor::record_index(self : FieldCursor) -> Int

#
FieldCursor::required

fn FieldCursor::required(self : FieldCursor, index : Int) -> Result[String, NmeaError]

#
FieldProvenance

pub(all) struct FieldProvenance {
field_value : String
source_value : FusionSource
record_index_value : Int
} derive(Eq,
Debug
)

#
FieldProvenance::field

fn FieldProvenance::field(self : FieldProvenance) -> String

#
FieldProvenance::record_index

fn FieldProvenance::record_index(self : FieldProvenance) -> Int

#
FieldProvenance::source

#
FixFusion

pub struct FixFusion {
groups_value : Array[FusionGroup]
}

#
FixFusion::add_gga

fn FixFusion::add_gga(self : FixFusion, record : GgaRecord, record_index~ : Int, date? : UtcDate?) -> Unit

#
FixFusion::add_rmc

fn FixFusion::add_rmc(self : FixFusion, record : RmcRecord, record_index~ : Int) -> Unit

#
FixFusion::add_vtg

fn FixFusion::add_vtg(self : FixFusion, record : VtgRecord, time : UtcTime, record_index~ : Int, date? : UtcDate?) -> Unit

#
FixFusion::finish

fn FixFusion::finish(self : FixFusion) -> Array[FusedFix]

#
FixFusion::new

fn FixFusion::new() -> FixFusion

#
FrameLimits

pub(all) struct FrameLimits {
max_sentence_bytes : Int
max_fields : Int
max_field_bytes : Int
} derive(Eq,
Debug
)

#
FrameLimits::standard

fn FrameLimits::standard() -> FrameLimits

#
FusedFix

pub(all) struct FusedFix {
time_value : UtcTime
date_value : UtcDate?
latitude_value : Double?
longitude_value : Double?
altitude_value : ExactDecimal?
quality_value : GgaFixQuality?
satellites_value : Int?
speed_knots_value : ExactDecimal?
course_value : ExactDecimal?
usable_value : Bool
provenance_value : Array[FieldProvenance]
diagnostics_value : Array[Diagnostic]
source_record_indexes_value : Array[Int]
} derive(Eq,
Debug
)

#
FusedFix::altitude

fn FusedFix::altitude(self : FusedFix) -> ExactDecimal?

#
FusedFix::course

fn FusedFix::course(self : FusedFix) -> ExactDecimal?

#
FusedFix::date

fn FusedFix::date(self : FusedFix) -> UtcDate?

#
FusedFix::diagnostics

fn FusedFix::diagnostics(self : FusedFix) -> Array[Diagnostic]

#
FusedFix::latitude

fn FusedFix::latitude(self : FusedFix) -> Double?

#
FusedFix::longitude

fn FusedFix::longitude(self : FusedFix) -> Double?

#
FusedFix::provenance

fn FusedFix::provenance(self : FusedFix) -> Array[FieldProvenance]

#
FusedFix::quality

fn FusedFix::quality(self : FusedFix) -> GgaFixQuality?

#
FusedFix::satellites

fn FusedFix::satellites(self : FusedFix) -> Int?

#
FusedFix::source_record_indexes

fn FusedFix::source_record_indexes(self : FusedFix) -> Array[Int]

#
FusedFix::speed_knots

fn FusedFix::speed_knots(self : FusedFix) -> ExactDecimal?

#
FusedFix::time

fn FusedFix::time(self : FusedFix) -> UtcTime

#
FusedFix::usable

fn FusedFix::usable(self : FusedFix) -> Bool

#
FusionGroup

type FusionGroup

#
FusionSource

pub(all) enum FusionSource {
GgaSource
RmcSource
VtgSource
} derive(Eq,
Debug
)

#
GgaFixQuality

pub(all) enum GgaFixQuality {
InvalidFix
GpsFix
DgpsFix
PpsFix
RtkFixed
RtkFloat
EstimatedFix
ManualFix
SimulationFix
UnknownFix(Int)
} derive(Eq,
Debug
)

#
GgaRecord

pub(all) struct GgaRecord {
talker_value : String
time_value : UtcTime
latitude_value : Coordinate?
longitude_value : Coordinate?
quality_value : GgaFixQuality
satellites_value : Int
hdop_value : ExactDecimal?
altitude_value : ExactDecimal?
geoid_separation_value : ExactDecimal?
dgps_age_value : ExactDecimal?
dgps_station_value : String?
} derive(Eq,
Debug
)

#
GgaRecord::altitude

fn GgaRecord::altitude(self : GgaRecord) -> ExactDecimal?

#
GgaRecord::encode

fn GgaRecord::encode(self : GgaRecord) -> Result[String, NmeaError]

#
GgaRecord::geoid_separation

fn GgaRecord::geoid_separation(self : GgaRecord) -> ExactDecimal?

#
GgaRecord::hdop

fn GgaRecord::hdop(self : GgaRecord) -> ExactDecimal?

#
GgaRecord::latitude

fn GgaRecord::latitude(self : GgaRecord) -> Coordinate?

#
GgaRecord::longitude

fn GgaRecord::longitude(self : GgaRecord) -> Coordinate?

#
GgaRecord::quality

fn GgaRecord::quality(self : GgaRecord) -> GgaFixQuality

#
GgaRecord::satellites

fn GgaRecord::satellites(self : GgaRecord) -> Int

#
GgaRecord::time

fn GgaRecord::time(self : GgaRecord) -> UtcTime

#
GllRecord

pub(all) struct GllRecord {
talker_value : String
latitude_value : Coordinate
longitude_value : Coordinate
time_value : UtcTime
status_value : RmcStatus
mode_value : String?
} derive(Eq,
Debug
)

#
GllRecord::encode

fn GllRecord::encode(self : GllRecord) -> Result[String, NmeaError]

#
GllRecord::latitude

fn GllRecord::latitude(self : GllRecord) -> Coordinate

#
GllRecord::longitude

fn GllRecord::longitude(self : GllRecord) -> Coordinate

#
GllRecord::mode

fn GllRecord::mode(self : GllRecord) -> String?

#
GllRecord::status

fn GllRecord::status(self : GllRecord) -> RmcStatus

#
GllRecord::time

fn GllRecord::time(self : GllRecord) -> UtcTime

#
GsaFixMode

pub(all) enum GsaFixMode {
NoDimensionalFix
TwoDimensional
ThreeDimensional
} derive(Eq,
Debug
)

#
GsaRecord

pub(all) struct GsaRecord {
talker_value : String
selection_value : GsaSelection
fix_mode_value : GsaFixMode
satellite_ids_value : Array[String]
pdop_value : ExactDecimal?
hdop_value : ExactDecimal?
vdop_value : ExactDecimal?
} derive(Eq,
Debug
)

#
GsaRecord::encode

fn GsaRecord::encode(self : GsaRecord) -> Result[String, NmeaError]

#
GsaRecord::fix_mode

fn GsaRecord::fix_mode(self : GsaRecord) -> GsaFixMode

#
GsaRecord::hdop

fn GsaRecord::hdop(self : GsaRecord) -> ExactDecimal?

#
GsaRecord::pdop

fn GsaRecord::pdop(self : GsaRecord) -> ExactDecimal?

#
GsaRecord::satellite_ids

fn GsaRecord::satellite_ids(self : GsaRecord) -> Array[String]

#
GsaRecord::selection

fn GsaRecord::selection(self : GsaRecord) -> GsaSelection

#
GsaRecord::vdop

fn GsaRecord::vdop(self : GsaRecord) -> ExactDecimal?

#
GsaSelection

pub(all) enum GsaSelection {
AutomaticSelection
ManualSelection
} derive(Eq,
Debug
)

#
GsvAssembler

pub struct GsvAssembler {
pending_value : Array[PendingGsvAssembly]
}

#
GsvAssembler::new

#
GsvAssembler::pending_count

fn GsvAssembler::pending_count(self : GsvAssembler) -> Int

#
GsvAssembler::push

fn GsvAssembler::push(self : GsvAssembler, record : GsvRecord, record_index~ : Int) -> Result[GsvAssembly?, NmeaError]

#
GsvAssembly

pub(all) struct GsvAssembly {
talker_value : String
signal_id_value : String?
total_messages_value : Int
total_satellites_value : Int
observations_value : Array[SatelliteObservation]
source_record_indexes_value : Array[Int]
} derive(Eq,
Debug
)

#
GsvAssembly::observations

fn GsvAssembly::observations(self : GsvAssembly) -> Array[SatelliteObservation]

#
GsvAssembly::signal_id

fn GsvAssembly::signal_id(self : GsvAssembly) -> String?

#
GsvAssembly::source_record_indexes

fn GsvAssembly::source_record_indexes(self : GsvAssembly) -> Array[Int]

#
GsvAssembly::talker

fn GsvAssembly::talker(self : GsvAssembly) -> String

#
GsvAssembly::total_messages

fn GsvAssembly::total_messages(self : GsvAssembly) -> Int

#
GsvAssembly::total_satellites

fn GsvAssembly::total_satellites(self : GsvAssembly) -> Int

#
GsvRecord

pub(all) struct GsvRecord {
talker_value : String
total_messages_value : Int
message_number_value : Int
total_satellites_value : Int
observations_value : Array[SatelliteObservation]
signal_id_value : String?
} derive(Eq,
Debug
)

#
GsvRecord::encode

fn GsvRecord::encode(self : GsvRecord) -> Result[String, NmeaError]

#
GsvRecord::message_number

fn GsvRecord::message_number(self : GsvRecord) -> Int

#
GsvRecord::observations

fn GsvRecord::observations(self : GsvRecord) -> Array[SatelliteObservation]

#
GsvRecord::signal_id

fn GsvRecord::signal_id(self : GsvRecord) -> String?

#
GsvRecord::total_messages

fn GsvRecord::total_messages(self : GsvRecord) -> Int

#
GsvRecord::total_satellites

fn GsvRecord::total_satellites(self : GsvRecord) -> Int

#
NmeaBatch

pub(all) struct NmeaBatch {
items_value : Array[SentenceResult[NmeaRecord]]
summary_value : BatchSummary
} derive(Eq,
Debug
)

#
NmeaBatch::items

#
NmeaBatch::summary

fn NmeaBatch::summary(self : NmeaBatch) -> BatchSummary

#
NmeaChecksum

pub(all) struct NmeaChecksum {
value : Int
}

#
NmeaChecksum::calculate

fn NmeaChecksum::calculate(payload : String) -> Int

Returns the XOR of all ASCII code units in a sentence payload.

#
NmeaChecksum::hex

fn NmeaChecksum::hex(value : Int) -> String

#
NmeaChecksum::verify

fn NmeaChecksum::verify(payload : String, expected : String) -> Bool

#
NmeaError

pub(all) struct NmeaError {
diagnostic : Diagnostic
} derive(Eq,
Debug
)

#
NmeaError::code

fn NmeaError::code(self : NmeaError) -> String

#
NmeaError::diagnostic

fn NmeaError::diagnostic(self : NmeaError) -> Diagnostic

#
NmeaError::from_diagnostic

fn NmeaError::from_diagnostic(diagnostic : Diagnostic) -> NmeaError

#
NmeaError::severity

fn NmeaError::severity(self : NmeaError) -> Severity

#
NmeaErrorCode

pub(all) enum NmeaErrorCode {
FramingMissingStart
FramingInvalidPrefix
FramingMissingChecksumDelimiter
FramingTooLong
ChecksumMissing
ChecksumMalformed
ChecksumMismatch
FieldMissing
FieldEmpty
FieldInvalidInteger
FieldInvalidDecimal
CoordinateInvalid
DateInvalid
TimeInvalid
SentenceUnsupported
SentenceInvalid
StreamLimitExceeded
GsvAssemblyInvalid
FusionConflict
GeographicInvalid
TrackQualityIssue
IntegrityInvalid
} derive(Eq,
Debug
)

#
NmeaErrorCode::code

fn NmeaErrorCode::code(self : NmeaErrorCode) -> String

#
NmeaFrame

pub(all) struct NmeaFrame {
prefix_value : UInt16
talker_value : String
formatter_value : String
fields_value : Array[String]
checksum_status_value : ChecksumStatus
checksum_value : Int?
} derive(Eq,
Debug
)

#
NmeaFrame::checksum_status

fn NmeaFrame::checksum_status(self : NmeaFrame) -> ChecksumStatus

#
NmeaFrame::encode

fn NmeaFrame::encode(self : NmeaFrame) -> String

#
NmeaFrame::fields

fn NmeaFrame::fields(self : NmeaFrame) -> Array[String]

#
NmeaFrame::formatter

fn NmeaFrame::formatter(self : NmeaFrame) -> String

#
NmeaFrame::new

fn NmeaFrame::new(prefix : UInt16, talker : String, formatter : String, fields : Array[String]) -> NmeaFrame

#
NmeaFrame::prefix

fn NmeaFrame::prefix(self : NmeaFrame) -> UInt16

#
NmeaFrame::talker

fn NmeaFrame::talker(self : NmeaFrame) -> String

#
NmeaRecord

pub(all) enum NmeaRecord {
GgaRecordValue(GgaRecord)
RmcRecordValue(RmcRecord)
GsaRecordValue(GsaRecord)
GsvRecordValue(GsvRecord)
VtgRecordValue(VtgRecord)
ZdaRecordValue(ZdaRecord)
GllRecordValue(GllRecord)
RawRecordValue(RawRecord)
} derive(Eq,
Debug
)

#
NmeaRecord::encode

fn NmeaRecord::encode(self : NmeaRecord) -> Result[String, NmeaError]

#
NmeaRecord::formatter

fn NmeaRecord::formatter(self : NmeaRecord) -> String

#
NmeaRecord::talker

fn NmeaRecord::talker(self : NmeaRecord) -> String

#
ParsePolicy

pub(all) enum ParsePolicy {
Strict
Lenient
} derive(Eq,
Debug
)

#
PendingGsvAssembly

type PendingGsvAssembly

#
QualityThresholds

pub(all) struct QualityThresholds {
max_gap_millis_value : Int64
max_segment_distance_meters_value : Double
max_speed_mps_value : Double
max_speed_mismatch_mps_value : Double
minimum_satellites_value : Int
minimum_fix_quality_rank_value : Int
} derive(Eq,
Debug
)

#
QualityThresholds::new

fn QualityThresholds::new(max_gap_millis? : Int64, max_segment_distance_meters? : Double, max_speed_mps? : Double, max_speed_mismatch_mps? : Double, minimum_satellites? : Int, minimum_fix_quality_rank? : Int) -> Result[QualityThresholds, NmeaError]

#
QualityThresholds::standard

#
RawRecord

pub(all) struct RawRecord {
frame_value : NmeaFrame
} derive(Eq,
Debug
)

#
RawRecord::frame

fn RawRecord::frame(self : RawRecord) -> NmeaFrame

#
RmcRecord

pub(all) struct RmcRecord {
talker_value : String
time_value : UtcTime
status_value : RmcStatus
latitude_value : Coordinate?
longitude_value : Coordinate?
speed_knots_value : ExactDecimal?
course_value : ExactDecimal?
date_value : UtcDate
magnetic_variation_value : ExactDecimal?
magnetic_direction_value : String?
mode_value : String?
} derive(Eq,
Debug
)

#
RmcRecord::course

fn RmcRecord::course(self : RmcRecord) -> ExactDecimal?

#
RmcRecord::date

fn RmcRecord::date(self : RmcRecord) -> UtcDate

#
RmcRecord::encode

fn RmcRecord::encode(self : RmcRecord) -> Result[String, NmeaError]

#
RmcRecord::latitude

fn RmcRecord::latitude(self : RmcRecord) -> Coordinate?

#
RmcRecord::longitude

fn RmcRecord::longitude(self : RmcRecord) -> Coordinate?

#
RmcRecord::magnetic_variation

fn RmcRecord::magnetic_variation(self : RmcRecord) -> ExactDecimal?

#
RmcRecord::speed_knots

fn RmcRecord::speed_knots(self : RmcRecord) -> ExactDecimal?

#
RmcRecord::status

fn RmcRecord::status(self : RmcRecord) -> RmcStatus

#
RmcRecord::time

fn RmcRecord::time(self : RmcRecord) -> UtcTime

#
RmcStatus

pub(all) enum RmcStatus {
Active
Void
} derive(Eq,
Debug
)

#
SatelliteObservation

pub(all) struct SatelliteObservation {
satellite_id_value : String
elevation_degrees_value : Int?
azimuth_degrees_value : Int?
snr_value : Int?
} derive(Eq,
Debug
)

#
SatelliteObservation::azimuth_degrees

fn SatelliteObservation::azimuth_degrees(self : SatelliteObservation) -> Int?

#
SatelliteObservation::elevation_degrees

fn SatelliteObservation::elevation_degrees(self : SatelliteObservation) -> Int?

#
SatelliteObservation::satellite_id

fn SatelliteObservation::satellite_id(self : SatelliteObservation) -> String

#
SatelliteObservation::snr

#
SentenceResult

pub struct SentenceResult[T] {
record_index_value : Int
formatter_value : String?
checksum_status_value : ChecksumStatus
value_value : T?
error_value : NmeaError?
} derive(Eq,
Debug
)

#
SentenceResult::checksum_status

fn[T] SentenceResult::checksum_status(self : SentenceResult[T]) -> ChecksumStatus

#
SentenceResult::err

fn[T] SentenceResult::err(record_index : Int, checksum_status : ChecksumStatus, error : NmeaError) -> SentenceResult[T]

#
SentenceResult::error

fn[T] SentenceResult::error(self : SentenceResult[T]) -> NmeaError?

#
SentenceResult::formatter

fn[T] SentenceResult::formatter(self : SentenceResult[T]) -> String?

#
SentenceResult::ok

fn[T] SentenceResult::ok(record_index : Int, formatter : String, checksum_status : ChecksumStatus, value? : T?) -> SentenceResult[T]

#
SentenceResult::record_index

fn[T] SentenceResult::record_index(self : SentenceResult[T]) -> Int

#
SentenceResult::value

fn[T] SentenceResult::value(self : SentenceResult[T]) -> T?

#
Severity

pub(all) enum Severity {
Info
Warning
Error
} derive(Eq,
Debug
)

#
SourceRef

pub(all) struct SourceRef {
record_index : Int
field_index : Int?
byte_offset : Int?
} derive(Eq,
Debug
)

#
SourceRef::byte

fn SourceRef::byte(record_index : Int, byte_offset : Int) -> SourceRef

#
SourceRef::byte_offset

fn SourceRef::byte_offset(self : SourceRef) -> Int?

#
SourceRef::field

fn SourceRef::field(record_index : Int, field_index : Int, byte_offset? : Int?) -> SourceRef

#
SourceRef::field_index

fn SourceRef::field_index(self : SourceRef) -> Int?

#
SourceRef::record_index

fn SourceRef::record_index(self : SourceRef) -> Int

#
SourceRef::sentence

fn SourceRef::sentence(record_index : Int) -> SourceRef

#
StreamDecoder

pub struct StreamDecoder {
policy_value : ParsePolicy
limits_value : StreamLimits
buffer_value : Array[Byte]
record_index_value : Int
discarding_value : Bool
skip_lf_value : Bool
}

#
StreamDecoder::buffered_bytes

fn StreamDecoder::buffered_bytes(self : StreamDecoder) -> Int

#
StreamDecoder::finish

#
StreamDecoder::new

fn StreamDecoder::new(policy? : ParsePolicy, limits? : StreamLimits) -> StreamDecoder

#
StreamDecoder::push

fn StreamDecoder::push(self : StreamDecoder, chunk : Bytes) -> Array[SentenceResult[NmeaRecord]]

#
StreamLimits

pub(all) struct StreamLimits {
max_buffer_bytes_value : Int
frame_limits_value : FrameLimits
} derive(Eq,
Debug
)

#
StreamLimits::frame_limits

fn StreamLimits::frame_limits(self : StreamLimits) -> FrameLimits

#
StreamLimits::max_buffer_bytes

fn StreamLimits::max_buffer_bytes(self : StreamLimits) -> Int

#
StreamLimits::new

fn StreamLimits::new(max_buffer_bytes : Int, frame_limits? : FrameLimits) -> Result[StreamLimits, NmeaError]

#
StreamLimits::standard

fn StreamLimits::standard() -> StreamLimits

#
StringCountEntry

pub(all) struct StringCountEntry {
key_value : String
count_value : Int
} derive(Eq,
Debug
)

#
StringCountEntry::count

fn StringCountEntry::count(self : StringCountEntry) -> Int

#
StringCountEntry::key

fn StringCountEntry::key(self : StringCountEntry) -> String

#
Track

pub(all) struct Track {
points_value : Array[TrackPoint]
segments_value : Array[TrackSegment]
summary_value : TrackSummary
} derive(Eq,
Debug
)

#
Track::from_points

fn Track::from_points(points : Array[TrackPoint]) -> Result[Track, NmeaError]

#
Track::points

fn Track::points(self : Track) -> Array[TrackPoint]

#
Track::segments

fn Track::segments(self : Track) -> Array[TrackSegment]

#
Track::summary

fn Track::summary(self : Track) -> TrackSummary

#
TrackFilter

pub(all) struct TrackFilter {
start_time_value : UtcDateTime?
end_time_value : UtcDateTime?
bounds_value : BoundingBox?
minimum_fix_quality_rank_value : Int?
maximum_severity_value : Severity?
} derive(Eq,
Debug
)

#
TrackFilter::new

fn TrackFilter::new(start_time? : UtcDateTime?, end_time? : UtcDateTime?, bounds? : BoundingBox?, minimum_fix_quality_rank? : Int?, maximum_severity? : Severity?) -> Result[TrackFilter, NmeaError]

#
TrackFinding

pub(all) struct TrackFinding {
kind_value : TrackFindingKind
severity_value : Severity
point_index_value : Int?
segment_index_value : Int?
diagnostic_value : Diagnostic
} derive(Eq,
Debug
)

#
TrackFinding::diagnostic

fn TrackFinding::diagnostic(self : TrackFinding) -> Diagnostic

#
TrackFinding::kind

#
TrackFinding::point_index

fn TrackFinding::point_index(self : TrackFinding) -> Int?

#
TrackFinding::segment_index

fn TrackFinding::segment_index(self : TrackFinding) -> Int?

#
TrackFinding::severity

fn TrackFinding::severity(self : TrackFinding) -> Severity

#
TrackFindingKind

pub(all) enum TrackFindingKind {
NoFixFinding
LowSatellitesFinding
LowFixQualityFinding
NonMonotonicTimeFinding
LongGapFinding
CoordinateJumpFinding
ExcessiveSpeedFinding
SpeedMismatchFinding
} derive(Eq,
Debug
)

#
TrackPoint

pub(all) struct TrackPoint {
latitude_value : Double
longitude_value : Double
altitude_value : ExactDecimal?
datetime_value : UtcDateTime?
reported_speed_knots_value : ExactDecimal?
quality_value : GgaFixQuality?
satellites_value : Int?
usable_value : Bool
source_record_indexes_value : Array[Int]
} derive(Eq,
Debug
)

#
TrackPoint::altitude

fn TrackPoint::altitude(self : TrackPoint) -> ExactDecimal?

#
TrackPoint::datetime

fn TrackPoint::datetime(self : TrackPoint) -> UtcDateTime?

#
TrackPoint::from_fused

fn TrackPoint::from_fused(fix : FusedFix) -> Result[TrackPoint, NmeaError]

#
TrackPoint::latitude

fn TrackPoint::latitude(self : TrackPoint) -> Double

#
TrackPoint::longitude

fn TrackPoint::longitude(self : TrackPoint) -> Double

#
TrackPoint::new

fn TrackPoint::new(latitude : Double, longitude : Double, altitude? : ExactDecimal?, datetime? : UtcDateTime?, reported_speed_knots? : ExactDecimal?, quality? : GgaFixQuality?, satellites? : Int?, usable? : Bool, source_record_indexes? : Array[Int]) -> Result[TrackPoint, NmeaError]

#
TrackPoint::quality

fn TrackPoint::quality(self : TrackPoint) -> GgaFixQuality?

#
TrackPoint::reported_speed_knots

fn TrackPoint::reported_speed_knots(self : TrackPoint) -> ExactDecimal?

#
TrackPoint::satellites

fn TrackPoint::satellites(self : TrackPoint) -> Int?

#
TrackPoint::source_record_indexes

fn TrackPoint::source_record_indexes(self : TrackPoint) -> Array[Int]

#
TrackPoint::usable

fn TrackPoint::usable(self : TrackPoint) -> Bool

#
TrackQualityReport

pub(all) struct TrackQualityReport {
findings_value : Array[TrackFinding]
} derive(Eq,
Debug
)

#
TrackQualityReport::findings

#
TrackSegment

pub(all) struct TrackSegment {
start_index_value : Int
end_index_value : Int
distance_meters_value : Double
bearing_degrees_value : Double
duration_millis_value : Int64?
derived_speed_mps_value : Double?
} derive(Eq,
Debug
)

#
TrackSegment::bearing_degrees

fn TrackSegment::bearing_degrees(self : TrackSegment) -> Double

#
TrackSegment::derived_speed_mps

fn TrackSegment::derived_speed_mps(self : TrackSegment) -> Double?

#
TrackSegment::distance_meters

fn TrackSegment::distance_meters(self : TrackSegment) -> Double

#
TrackSegment::duration_millis

fn TrackSegment::duration_millis(self : TrackSegment) -> Int64?

#
TrackSegment::end_index

fn TrackSegment::end_index(self : TrackSegment) -> Int

#
TrackSegment::start_index

fn TrackSegment::start_index(self : TrackSegment) -> Int

#
TrackSummary

pub(all) struct TrackSummary {
point_count_value : Int
segment_count_value : Int
total_distance_meters_value : Double
total_duration_millis_value : Int64?
bounds_value : BoundingBox?
} derive(Eq,
Debug
)

#
TrackSummary::bounds

fn TrackSummary::bounds(self : TrackSummary) -> BoundingBox?

#
TrackSummary::point_count

fn TrackSummary::point_count(self : TrackSummary) -> Int

#
TrackSummary::segment_count

fn TrackSummary::segment_count(self : TrackSummary) -> Int

#
TrackSummary::total_distance_meters

fn TrackSummary::total_distance_meters(self : TrackSummary) -> Double

#
TrackSummary::total_duration_millis

fn TrackSummary::total_duration_millis(self : TrackSummary) -> Int64?

#
UtcDate

pub(all) struct UtcDate {
year_value : Int
month_value : Int
day_value : Int
} derive(Eq,
Debug
)

#
UtcDate::day

fn UtcDate::day(self : UtcDate) -> Int

#
UtcDate::month

fn UtcDate::month(self : UtcDate) -> Int

#
UtcDate::new

fn UtcDate::new(year : Int, month : Int, day : Int, source : SourceRef) -> Result[UtcDate, NmeaError]

#
UtcDate::parse_rmc

fn UtcDate::parse_rmc(text : String, source : SourceRef) -> Result[UtcDate, NmeaError]

#
UtcDate::year

fn UtcDate::year(self : UtcDate) -> Int

#
UtcDateTime

pub(all) struct UtcDateTime {
date_value : UtcDate
time_value : UtcTime
} derive(Eq,
Debug
)

#
UtcDateTime::compare

fn UtcDateTime::compare(self : UtcDateTime, other : UtcDateTime) -> Int

#
UtcDateTime::date

fn UtcDateTime::date(self : UtcDateTime) -> UtcDate

#
UtcDateTime::millis_since

fn UtcDateTime::millis_since(self : UtcDateTime, earlier : UtcDateTime) -> Int64

#
UtcDateTime::new

fn UtcDateTime::new(date : UtcDate, time : UtcTime) -> UtcDateTime

#
UtcDateTime::time

fn UtcDateTime::time(self : UtcDateTime) -> UtcTime

#
UtcTime

pub(all) struct UtcTime {
hour_value : Int
minute_value : Int
second_value : Int
nanosecond_value : Int
second_wire_value : ExactDecimal
} derive(Eq,
Debug
)

#
UtcTime::hour

fn UtcTime::hour(self : UtcTime) -> Int

#
UtcTime::minute

fn UtcTime::minute(self : UtcTime) -> Int

#
UtcTime::nanosecond

fn UtcTime::nanosecond(self : UtcTime) -> Int

#
UtcTime::parse

fn UtcTime::parse(text : String, source : SourceRef) -> Result[UtcTime, NmeaError]

#
UtcTime::second

fn UtcTime::second(self : UtcTime) -> Int

#
UtcTime::to_string

fn UtcTime::to_string(self : UtcTime) -> String

#
VtgRecord

pub(all) struct VtgRecord {
talker_value : String
true_course_value : ExactDecimal?
magnetic_course_value : ExactDecimal?
speed_knots_value : ExactDecimal?
speed_kph_value : ExactDecimal?
mode_value : String?
} derive(Eq,
Debug
)

#
VtgRecord::encode

fn VtgRecord::encode(self : VtgRecord) -> Result[String, NmeaError]

#
VtgRecord::magnetic_course

fn VtgRecord::magnetic_course(self : VtgRecord) -> ExactDecimal?

#
VtgRecord::mode

fn VtgRecord::mode(self : VtgRecord) -> String?

#
VtgRecord::speed_knots

fn VtgRecord::speed_knots(self : VtgRecord) -> ExactDecimal?

#
VtgRecord::speed_kph

fn VtgRecord::speed_kph(self : VtgRecord) -> ExactDecimal?

#
VtgRecord::true_course

fn VtgRecord::true_course(self : VtgRecord) -> ExactDecimal?

#
ZdaRecord

pub(all) struct ZdaRecord {
talker_value : String
time_value : UtcTime
date_value : UtcDate
local_zone_hours_value : Int
local_zone_minutes_value : Int
} derive(Eq,
Debug
)

#
ZdaRecord::date

fn ZdaRecord::date(self : ZdaRecord) -> UtcDate

#
ZdaRecord::encode

fn ZdaRecord::encode(self : ZdaRecord) -> Result[String, NmeaError]

#
ZdaRecord::local_zone_hours

fn ZdaRecord::local_zone_hours(self : ZdaRecord) -> Int

#
ZdaRecord::local_zone_minutes

fn ZdaRecord::local_zone_minutes(self : ZdaRecord) -> Int

#
ZdaRecord::time

fn ZdaRecord::time(self : ZdaRecord) -> UtcTime

#
analyze_frame_batch

fn analyze_frame_batch(frames : Array[NmeaFrame]) -> NmeaBatch

#
analyze_track_quality

fn analyze_track_quality(track : Track, thresholds : QualityThresholds) -> TrackQualityReport

#
coordinate_wire_text

fn coordinate_wire_text(value : Coordinate) -> String

Renders the axis-specific degree width used by NMEA degree-minute fields.

#
filter_track

fn filter_track(track : Track, filter : TrackFilter, report? : TrackQualityReport?) -> Result[Track, NmeaError]

#
haversine_distance_meters

fn haversine_distance_meters(latitude1 : Double, longitude1 : Double, latitude2 : Double, longitude2 : Double) -> Result[Double, NmeaError]

#
initial_bearing_degrees

fn initial_bearing_degrees(latitude1 : Double, longitude1 : Double, latitude2 : Double, longitude2 : Double) -> Result[Double, NmeaError]

#
mean_earth_radius_meters

let mean_earth_radius_meters : Double

#
parse_batch

fn parse_batch(inputs : Array[String], policy? : ParsePolicy, limits? : FrameLimits) -> NmeaBatch

#
parse_frame

fn parse_frame(input : String, policy? : ParsePolicy, limits? : FrameLimits) -> Result[NmeaFrame, NmeaError]

Parses one complete caller-provided NMEA frame.

#
parse_gga

fn parse_gga(frame : NmeaFrame) -> Result[GgaRecord, NmeaError]

#
parse_gll

fn parse_gll(frame : NmeaFrame) -> Result[GllRecord, NmeaError]

#
parse_gsa

fn parse_gsa(frame : NmeaFrame) -> Result[GsaRecord, NmeaError]

#
parse_gsv

fn parse_gsv(frame : NmeaFrame) -> Result[GsvRecord, NmeaError]

#
parse_latitude

fn parse_latitude(value : String, hemisphere : String, source : SourceRef) -> Result[Coordinate, NmeaError]

#
parse_longitude

fn parse_longitude(value : String, hemisphere : String, source : SourceRef) -> Result[Coordinate, NmeaError]

#
parse_record

fn parse_record(frame : NmeaFrame) -> Result[NmeaRecord, NmeaError]

#
parse_rmc

fn parse_rmc(frame : NmeaFrame) -> Result[RmcRecord, NmeaError]

#
parse_sentence

fn parse_sentence(input : String, policy? : ParsePolicy, limits? : FrameLimits) -> Result[NmeaRecord, NmeaError]

#
parse_vtg

fn parse_vtg(frame : NmeaFrame) -> Result[VtgRecord, NmeaError]

#
parse_zda

fn parse_zda(frame : NmeaFrame) -> Result[ZdaRecord, NmeaError]

#
render_batch_json

fn render_batch_json(batch : NmeaBatch) -> String

#
render_batch_text

fn render_batch_text(batch : NmeaBatch) -> String

#
render_fused_fix_json

fn render_fused_fix_json(fix : FusedFix) -> String

#
render_fused_fix_text

fn render_fused_fix_text(fix : FusedFix) -> String

#
render_gsv_json

fn render_gsv_json(assembly : GsvAssembly) -> String

#
render_gsv_text

fn render_gsv_text(assembly : GsvAssembly) -> String

#
render_track_quality_json

fn render_track_quality_json(report : TrackQualityReport) -> String

#
render_track_quality_text

fn render_track_quality_text(report : TrackQualityReport) -> String

#
speed_meters_per_second

fn speed_meters_per_second(distance_meters : Double, elapsed_millis~ : Int64) -> Result[Double, NmeaError]

#
utc_date_rmc_wire

fn utc_date_rmc_wire(value : UtcDate) -> String

Renders the compact ddmmyy form used by RMC.

#
utc_time_wire

fn utc_time_wire(value : UtcTime) -> String

Renders the compact hhmmss decimal form used by NMEA fields.

#
validate_batch_integrity

fn validate_batch_integrity(batch : NmeaBatch) -> Array[Diagnostic]

#
validate_fused_fix_integrity

fn validate_fused_fix_integrity(fix : FusedFix) -> Array[Diagnostic]

#
validate_gsv_integrity

fn validate_gsv_integrity(assembly : GsvAssembly) -> Array[Diagnostic]

#
validate_track_integrity

fn validate_track_integrity(track : Track) -> Array[Diagnostic]