Documentation ¶
Index ¶
- Constants
- func CheckCRC(sentence BaseSentence, rawFields string) error
- func Checksum(s string) string
- func DateTime(referenceYear int, d Date, t Time) time.Time
- func FormatDMS(l float64) string
- func FormatGPS(l float64) string
- func LatDir(l float64) string
- func LonDir(l float64) string
- func MustRegisterParser(sentenceType string, parser ParserFunc)
- func ParseDMS(s string) (float64, error)
- func ParseDecimal(s string) (float64, error)
- func ParseGPS(s string) (float64, error)
- func ParseLatLong(s string) (float64, error)
- func ParsePrefix(prefix string) (string, string, error)
- func RegisterParser(sentenceType string, parser ParserFunc) error
- type AAM
- type ABM
- type ACK
- type ACN
- type ALA
- type ALC
- type ALCAlertEntry
- type ALF
- type ALR
- type APB
- type ARC
- type BBM
- type BEC
- type BOD
- type BWC
- type BWR
- type BWW
- type BaseSentence
- type DBK
- type DBS
- type DBT
- type DOR
- type DPT
- type DSC
- type DSE
- type DSEDataSet
- type DTM
- type Date
- type EVE
- type FIR
- type Float64
- type GGA
- type GLGSVdeprecated
- type GLGSVInfodeprecated
- type GLL
- type GNGGAdeprecated
- type GNGNSdeprecated
- type GNRMCdeprecated
- type GNS
- type GPGGAdeprecated
- type GPGLLdeprecated
- type GPGSAdeprecated
- type GPGSVdeprecated
- type GPGSVInfodeprecated
- type GPHDTdeprecated
- type GPRMCdeprecated
- type GPVTGdeprecated
- type GPZDAdeprecated
- type GSA
- type GSV
- type GSVInfo
- type HBT
- type HDG
- type HDM
- type HDT
- type HSC
- type Int64
- type MDA
- type MTA
- type MTKdeprecated
- type MTW
- type MWD
- type MWV
- type NotSupportedError
- type OSD
- type PCDIN
- type PGN
- type PGRME
- type PHTRO
- type PMTK001
- type PRDID
- type PSKPDPT
- type PSONCMS
- type Parser
- func (p *Parser) AssertType(typ string)
- func (p *Parser) Date(i int, context string) Date
- func (p *Parser) EnumChars(i int, context string, options ...string) []string
- func (p *Parser) EnumString(i int, context string, options ...string) string
- func (p *Parser) Err() error
- func (p *Parser) Float64(i int, context string) float64
- func (p *Parser) HexInt64(i int, context string) int64
- func (p *Parser) Int64(i int, context string) int64
- func (p *Parser) LatLong(i, j int, context string) float64
- func (p *Parser) ListString(from int, context string) (list []string)
- func (p *Parser) NullFloat64(i int, context string) Float64
- func (p *Parser) NullInt64(i int, context string) Int64
- func (p *Parser) SetErr(context, value string)
- func (p *Parser) SixBitASCIIArmour(i int, fillBits int, context string) []byte
- func (p *Parser) String(i int, context string) string
- func (p *Parser) Time(i int, context string) Time
- type ParserFunc
- type Query
- type RMB
- type RMC
- type ROT
- type RPM
- type RSA
- type RSD
- type RTE
- type Sentence
- type SentenceParser
- type THS
- type TLB
- type TLBTarget
- type TLL
- type TTD
- type TTM
- type TXT
- type TagBlock
- type Time
- type VBW
- type VDMVDO
- type VDR
- type VHW
- type VLW
- type VPW
- type VSD
- type VTG
- type VWR
- type VWT
- type WPL
- type XDR
- type XDRMeasurement
- type XTE
- type ZDA
Constants ¶
const ( // TypeAPB type of APB sentence for Autopilot Sentence "B" TypeAPB = "APB" // StatusWarningASetAPB indicates LORAN-C Blink or SNR warning StatusWarningASetAPB = "V" // StatusWarningAClearORNotUsedAPB general warning flag or other navigation systems when a reliable fix is not available StatusWarningAClearORNotUsedAPB = "A" // StatusWarningBSetAPB means Loran-C Cycle Lock warning OK or not used StatusWarningBSetAPB = "A" // StatusWarningBClearAPB means Loran-C Cycle Lock warning flag StatusWarningBClearAPB = "V" )
const ( // WPStatusPerpendicularPassedA is warning for passing the perpendicular of the course line of waypoint WPStatusPerpendicularPassedA = "A" // WPStatusPerpendicularPassedV indicates for not passing of the perpendicular of the course line of waypoint WPStatusPerpendicularPassedV = "V" // WPStatusArrivalCircleEnteredA is warning of entering to waypoint circle WPStatusArrivalCircleEnteredA = "A" // WPStatusArrivalCircleEnteredV indicates of not yet entered into waypoint circle WPStatusArrivalCircleEnteredV = "V" )
Autopilot related constants (used in APB, APA, AAM)
const ( // AlertCommandAcknowledge means acknowledge AlertCommandAcknowledge = "A" // AlertCommandRequestRepeatInformation means request/repeat information AlertCommandRequestRepeatInformation = "Q" // AlertCommandResponsibilityTransfer means responsibility transfer AlertCommandResponsibilityTransfer = "O" // AlertCommandSilence means silence AlertCommandSilence = "S" )
const ( // PrefixGNGNS prefix // // Deprecated: Use TypeGNS instead PrefixGNGNS = "GNGNS" // PrefixGPGGA prefix // // Deprecated: Use TypeGGA instead PrefixGPGGA = "GPGGA" // PrefixGPGLL prefix for GPGLL sentence type // // Deprecated: Use TypeGLL instead PrefixGPGLL = "GPGLL" // PrefixGPGSA prefix of GPGSA sentence type // // Deprecated: Use TypeGSA instead PrefixGPGSA = "GPGSA" // PrefixGPRMC prefix of GPRMC sentence type // // Deprecated: Use TypeRMC instead PrefixGPRMC = "GPRMC" // PrefixPGRME prefix for PGRME sentence type // // Deprecated: Use TypePGRME instead PrefixPGRME = "PGRME" // PrefixGLGSV prefix // // Deprecated: Use TypeGSV instead PrefixGLGSV = "GLGSV" // PrefixGNGGA prefix // // Deprecated: Use TypeGGA instead PrefixGNGGA = "GNGGA" // PrefixGNRMC prefix of GNRMC sentence type // // Deprecated: Use TypeRMC instead PrefixGNRMC = "GNRMC" // PrefixGPGSV prefix // // Deprecated: Use TypeGSV instead PrefixGPGSV = "GPGSV" // PrefixGPHDT prefix of GPHDT sentence type // // Deprecated: Use TypeHDT instead PrefixGPHDT = "GPHDT" // PrefixGPVTG prefix // // Deprecated: Use TypeVTG instead PrefixGPVTG = "GPVTG" // PrefixGPZDA prefix // // Deprecated: Use TypeZDA instead PrefixGPZDA = "GPZDA" )
const ( // TypeDOR type of DOR sentence for Door Status Detection TypeDOR = "DOR" // TypeSingleDoorDOR is type for single door related event TypeSingleDoorDOR = "E" // TypeFaultDOR is type for fault with door TypeFaultDOR = "F" // TypeSectionDOR is type for section of doors related event TypeSectionDOR = "S" // DoorStatusOpenDOR is status for open door DoorStatusOpenDOR = "O" // DoorStatusClosedDOR is status for closed door DoorStatusClosedDOR = "C" // DoorStatusFaultDOR is status for fault with door DoorStatusFaultDOR = "X" // SwitchSettingHarbourModeDOR is setting for Harbour mode (allowed open) SwitchSettingHarbourModeDOR = "O" // SwitchSettingSeaModeDOR is setting for Sea mode (ordered closed) SwitchSettingSeaModeDOR = "C" )
const ( // TypeDSC type of DSC sentence for Digital Selective Calling Information TypeDSC = "DSC" // AcknowledgementRequestDSC is type for Acknowledge request AcknowledgementRequestDSC = "R" // AcknowledgementDSC is type for Acknowledgement AcknowledgementDSC = "B" // AcknowledgementNeitherDSC is type for Neither (end of sequence) AcknowledgementNeitherDSC = "S" )
const ( // TypeDSE type of DSE sentence for Expanded digital selective calling TypeDSE = "DSE" // AcknowledgementAutomaticDSE is type for automatic AcknowledgementAutomaticDSE = "A" // AcknowledgementRequestDSE is type for request AcknowledgementRequestDSE = "R" // AcknowledgementQueryDSE is type for query AcknowledgementQueryDSE = "Q" )
const ( // TypeFIR type of FIR sentence for Fire Detection TypeFIR = "FIR" // TypeEventOrAlarmFIR is Event, Fire Alarm type TypeEventOrAlarmFIR = "E" // TypeFaultFIR is type for Fault TypeFaultFIR = "F" // TypeDisablementFIR is type for detector disablement TypeDisablementFIR = "D" // ConditionActivationFIR is activation condition ConditionActivationFIR = "A" // ConditionNonActivationFIR is non-activation condition ConditionNonActivationFIR = "V" // ConditionUnknownFIR is unknown condition ConditionUnknownFIR = "X" // AlarmStateAcknowledgedFIR is value for alarm acknowledgement AlarmStateAcknowledgedFIR = "A" // AlarmStateNotAcknowledgedFIR is value for alarm being not acknowledged AlarmStateNotAcknowledgedFIR = "V" )
const ( // TypeGGA type for GGA sentences TypeGGA = "GGA" // Invalid fix quality. Invalid = "0" // GPS fix quality GPS = "1" // DGPS fix quality DGPS = "2" // PPS fix PPS = "3" // RTK real time kinematic fix RTK = "4" // FRTK float RTK fix FRTK = "5" // EST estimated fix. EST = "6" )
const ( // TypeGLL type for GLL sentences TypeGLL = "GLL" // ValidGLL character ValidGLL = "A" // InvalidGLL character InvalidGLL = "V" )
const ( // NoFixGNS Character NoFixGNS = "N" // AutonomousGNS Character AutonomousGNS = "A" // DifferentialGNS Character DifferentialGNS = "D" // PreciseGNS Character PreciseGNS = "P" // RealTimeKinematicGNS Character RealTimeKinematicGNS = "R" // FloatRTKGNS RealTime Kinematic Character FloatRTKGNS = "F" // EstimatedGNS Fix Character EstimatedGNS = "E" // ManualGNS Fix Character ManualGNS = "M" // SimulatorGNS Character SimulatorGNS = "S" )
GNS mode values. These are same values ans GLL/RMC FAAMode* values. Note: there can be other values (proprietary).
const ( // TypeGSA type for GSA sentences TypeGSA = "GSA" // Auto - Field 1, auto or manual fix. Auto = "A" // Manual - Field 1, auto or manual fix. Manual = "M" // FixNone - Field 2, fix type. FixNone = "1" // Fix2D - Field 2, fix type. Fix2D = "2" // Fix3D - Field 2, fix type. Fix3D = "3" )
const ( // TypeHDM type of HDM sentence for vessel heading in degrees with respect to magnetic north TypeHDM = "HDM" // MagneticHDM for valid Magnetic heading MagneticHDM = "M" )
const ( // TypeMDA type for MDA sentences TypeMDA = "MDA" // InchMDA for valid pressure in Inches of mercury InchMDA = "I" // BarsMDA for valid pressure in Bars BarsMDA = "B" // DegreesCMDA for valid data in degrees C DegreesCMDA = "C" // TrueMDA for valid data in True direction TrueMDA = "T" // MagneticMDA for valid data in Magnetic direction MagneticMDA = "M" // KnotsMDA for valid data in Knots KnotsMDA = "N" // MetersSecondMDA for valid data in Meters per Second MetersSecondMDA = "M" )
const ( // TypeMTW type of MWT sentence describing mean temperature of water TypeMTW = "MTW" // CelsiusMTW is MTW unit of measurement in celsius CelsiusMTW = "C" )
const ( // TypeMWD type for MWD sentences TypeMWD = "MWD" // TrueMWD for valid True Direction TrueMWD = "T" // MagneticMWD for valid Magnetic direction MagneticMWD = "M" // KnotsMWD for valid Knots KnotsMWD = "N" // MetersSecondMWD for valid Meters per Second MetersSecondMWD = "M" )
const ( // TypeMWV type for MWV sentences TypeMWV = "MWV" // RelativeMWV for Valid Relative angle data RelativeMWV = "R" // TheoreticalMWV for valid Theoretical angle data TheoreticalMWV = "T" // UnitKMHMWV unit for Kilometer per hour (KM/H) UnitKMHMWV = "K" // KM/H // UnitMSMWV unit for Meters per second (M/S) UnitMSMWV = "M" // M/S // UnitKnotsMWV unit for knots UnitKnotsMWV = "N" // knots // UnitSMilesHMWV unit for Miles per hour (M/H) UnitSMilesHMWV = "S" // ValidMWV data is valid ValidMWV = "A" // InvalidMWV data is invalid InvalidMWV = "V" )
const ( // TypeOSD type for OSD sentence for Own Ship Data TypeOSD = "OSD" // OSDReferenceBottomTrackingLog is reference for bottom tracking log OSDReferenceBottomTrackingLog = "B" // OSDReferenceManual is reference for manually entered OSDReferenceManual = "M" // OSDReferenceWaterReferenced is reference for water referenced OSDReferenceWaterReferenced = "W" // OSDReferenceRadarTracking is reference for radar tracking of fixed target OSDReferenceRadarTracking = "R" // OSDReferencePositioningSystemGroundReference is reference for positioning system ground reference OSDReferencePositioningSystemGroundReference = "P" )
const ( // TypePGRME type for PGRME sentences TypePGRME = "GRME" // ErrorUnit must be meters (M) ErrorUnit = "M" )
const ( // TypePHTRO type of PHTRO sentence for vessel pitch and roll TypePHTRO = "HTRO" // PHTROBowUP for bow up PHTROBowUP = "M" // PHTROBowDown for bow down PHTROBowDown = "P" // PHTROPortUP for port up PHTROPortUP = "T" // PHTROPortDown for port down PHTROPortDown = "B" )
const ( // TypeRMB type of RMB sentence for recommended minimum navigation information TypeRMB = "RMB" // DataStatusWarningClearRMB means data is OK DataStatusWarningClearRMB = "A" // DataStatusWarningSetRMB means warning flag set DataStatusWarningSetRMB = "V" )
const ( // TypeRMC type for RMC sentences TypeRMC = "RMC" // ValidRMC character ValidRMC = "A" // InvalidRMC character InvalidRMC = "V" )
const ( // TypeROT type of ROT sentence for vessel rate of turn TypeROT = "ROT" // ValidROT data is valid ValidROT = "A" // InvalidROT data is invalid InvalidROT = "V" )
const ( // TypeRPM type of RPM sentence for Engine or Shaft revolutions and pitch TypeRPM = "RPM" // SourceEngineRPM is value for case when source is Engine SourceEngineRPM = "E" // SourceShaftRPM is value for case when source is Shaft SourceShaftRPM = "S" )
const ( // TypeRSD type of RSD sentence for RADAR System Data TypeRSD = "RSD" // RSDDisplayRotationCourseUp is when display rotation is course up RSDDisplayRotationCourseUp = "C" // RSDDisplayRotationHeadingUp is when display rotation is ship heading up RSDDisplayRotationHeadingUp = "H" // RSDDisplayRotationNorthUp is when display rotation is (true) north up RSDDisplayRotationNorthUp = "N" )
const ( // TypeRTE type for RTE sentences TypeRTE = "RTE" // ActiveRoute active route ActiveRoute = "c" // WaypointList list containing waypoints WaypointList = "w" )
const ( // TagBlockSep is the separator (slash `\`) that indicates start and end of tag block TagBlockSep = '\\' // SentenceStart is the token to indicate the start of a sentence. SentenceStart = "$" // SentenceStartEncapsulated is the token to indicate the start of encapsulated data. SentenceStartEncapsulated = "!" // ProprietarySentencePrefix is the token to indicate the start of parametric sentences. ProprietarySentencePrefix = 'P' // QuerySentencePostfix is the suffix token to indicate the Query sentences. QuerySentencePostfix = 'Q' // FieldSep is the token to delimit fields of a sentence. FieldSep = "," // ChecksumSep is the token to delimit the checksum of a sentence. ChecksumSep = "*" )
const ( // TypeTHS type for THS sentences TypeTHS = "THS" // AutonomousTHS autonomous ths heading AutonomousTHS = "A" // EstimatedTHS estimated (dead reckoning) THS heading EstimatedTHS = "E" // ManualTHS manual input THS heading ManualTHS = "M" // SimulatorTHS simulated THS heading SimulatorTHS = "S" // InvalidTHS not valid THS heading (or standby) InvalidTHS = "V" )
const ( // TypeTLL type of TLL sentence for Target latitude and longitude TypeTLL = "TLL" // RadarTargetLost is used when target is lost RadarTargetLost = "L" // RadarTargetAcquisition is used when target is acquired RadarTargetAcquisition = "Q" // RadarTargetTracking is used when tracking target RadarTargetTracking = "T" )
const ( // StatusValid indicated status having valid value StatusValid = "A" // StatusInvalid indicated status having invalid value StatusInvalid = "V" )
const ( // UnitAmpere is unit for current in Amperes UnitAmpere = "A" // UnitBars is unit for pressure in Bars UnitBars = "B" // UnitBinary is unit for binary data UnitBinary = "B" // UnitCelsius is unit for temperature in Celsius UnitCelsius = TemperatureCelsius // UnitFahrenheit is unit for temperature in Fahrenheit UnitFahrenheit = TemperatureFahrenheit // UnitDegrees is unit for angular displacement in Degrees UnitDegrees = "D" // UnitHertz is unit for frequency in Hertz UnitHertz = "H" // UnitLitresPerSecond is unit for volumetric flow in Litres per second UnitLitresPerSecond = "I" // UnitKelvin is unit of temperature in Kelvin UnitKelvin = TemperatureKelvin // UnitKilogramPerCubicMetre is unit of density in kilogram per cubic metre UnitKilogramPerCubicMetre = "K" // UnitMeters is unit of distance in Meters UnitMeters = DistanceUnitMetre // UnitNewtons is unit of force in Newtons (1 kg*m/s2) UnitNewtons = "N" // UnitCubicMeters is unit of volume in cubic meters UnitCubicMeters = "M" // UnitRevolutionsPerMinute is unit of rotational speed or the frequency of rotation around a fixed axis in revolutions per minute (RPM) UnitRevolutionsPerMinute = "R" // UnitPercent is percent of full range UnitPercent = "P" // UnitPascal is unit of pressure in Pascals UnitPascal = "P" // UnitPartsPerThousand is in parts-per notation set of pseudo-unit to describe small values of miscellaneous dimensionless quantities, e.g. mole fraction or mass fraction. UnitPartsPerThousand = "S" // UnitVolts is unit of voltage in Volts UnitVolts = "V" )
const ( // SpeedKnots is a unit of speed equal to one nautical mile per hour, exactly 1.852 km/h (approximately 1.151 mph or 0.514 m/s) SpeedKnots = "N" // SpeedMeterPerSecond is unit of speed of 1 meter per second SpeedMeterPerSecond = "M" // SpeedKilometerPerHour is unit of speed of 1 kilometer per hour SpeedKilometerPerHour = "K" )
const ( // TemperatureCelsius is unit of temperature measured in celsius. °C = (°F − 32) / 1,8 TemperatureCelsius = "C" // TemperatureFahrenheit is unit of temperature measured in fahrenheits. °F = °C * 1,8 + 32 TemperatureFahrenheit = "F" // TemperatureKelvin is unit of temperature measured in kelvins. K = °C + 273,15 TemperatureKelvin = "K" )
const ( // HeadingMagnetic - Magnetic heading is your direction relative to magnetic north, read from your magnetic compass. // Magnetic north is the point on the Earth's surface where its magnetic field points directly downwards. HeadingMagnetic = "M" // HeadingTrue - True heading is your direction relative to true north, or the geographic north pole. // True north is the northern axis of rotation of the Earth. It is the point where the lines of longitude converge // on maps. HeadingTrue = "T" )
In navigation, the heading of a vessel or object is the compass direction in which the craft's bow or nose is pointed. Note that the heading may not necessarily be the direction that the vehicle actually travels, which is known as its course or track. https://en.wikipedia.org/wiki/Heading_(navigation)
const ( // BearingMagnetic is the clockwise angle between Earth's magnetic north and an object observed from the vessel. BearingMagnetic = "M" // BearingTrue is the clockwise angle between Earth's true (geographical) north and an object observed from the vessel. BearingTrue = "T" )
In nautical navigation the absolute bearing is the clockwise angle between north and an object observed from the vessel. https://en.wikipedia.org/wiki/Bearing_(angle)
const ( // FAAModeAutonomous is Autonomous mode FAAModeAutonomous = "A" // FAAModeDifferential is Differential Mode FAAModeDifferential = "D" // FAAModeEstimated is Estimated (dead-reckoning) mode FAAModeEstimated = "E" // FAAModeRTKFloat is RTK Float mode FAAModeRTKFloat = "F" // FAAModeManualInput is Manual Input Mode FAAModeManualInput = "M" // FAAModeDataNotValid is Data Not Valid FAAModeDataNotValid = "N" // FAAModePrecise is Precise (NMEA4.00+) FAAModePrecise = "P" // FAAModeRTKInteger is RTK Integer mode FAAModeRTKInteger = "R" // FAAModeSimulated is Simulated Mode FAAModeSimulated = "S" )
FAAMode is type for FAA mode indicator (NMEA 2.3 and later). In NMEA 2.3, several sentences (APB, BWC, BWR, GLL, RMA, RMB, RMC, VTG, WCV, and XTE) got a new last field carrying the signal integrity information needed by the FAA. Source: https://www.xj3.nl/dokuwiki/doku.php?id=nmea Note: there can be other values (proprietary).
const ( // compatibility. There is no such status in NMEA. // Deprecated: use NavStatusSafe NavStatusSimulated = "S" // compatibility. There is no such status in NMEA. // Deprecated: use NavStatusNotValid NavStatusDataValid = "V" NavStatusSafe = "S" NavStatusCaution = "C" NavStatusUnsafe = "U" NavStatusNotValid = "V" )
Navigation Status (NMEA 4.1 and later)
const ( // DistanceUnitKilometre is unit for distance in kilometres (1km = 1000m) DistanceUnitKilometre = "K" // DistanceUnitNauticalMile is unit for distance in nautical miles (1nmi = 1852m) DistanceUnitNauticalMile = "N" // DistanceUnitStatuteMile is unit for distance in statute miles (1smi = 5,280 feet = 1609.344m) DistanceUnitStatuteMile = "S" // DistanceUnitMetre is unit for distance in metres DistanceUnitMetre = "M" // DistanceUnitFeet is unit for distance in feets (1f = 0.3048m) DistanceUnitFeet = "f" // DistanceUnitFathom is unit for distance in fathoms (1fm = 6ft = 1,8288m) DistanceUnitFathom = "F" )
const ( // Degrees value Degrees = '\u00B0' // Minutes value Minutes = '\'' // Seconds value Seconds = '"' // Point value Point = '.' // North value North = "N" // South value South = "S" // East value East = "E" // West value West = "W" // Left value Left = "L" // Right value Right = "R" )
const ( // TypeVDM type for VDM sentences TypeVDM = "VDM" // TypeVDO type for VDO sentences TypeVDO = "VDO" )
const ( // TransducerAngularDisplacementXDR is transducer type for Angular displacement TransducerAngularDisplacementXDR = "A" // TransducerTemperatureXDR is transducer type for Temperature TransducerTemperatureXDR = "C" // TransducerDepthXDR is transducer type for Depth TransducerDepthXDR = "D" // TransducerFrequencyXDR is transducer type for Frequency TransducerFrequencyXDR = "F" // TransducerHumidityXDR is transducer type for Humidity TransducerHumidityXDR = "H" // TransducerForceXDR is transducer type for Force TransducerForceXDR = "N" // TransducerPressureXDR is transducer type for Pressure TransducerPressureXDR = "P" // TransducerFlowXDR is transducer type for Flow TransducerFlowXDR = "R" // TransducerAbsoluteHumidityXDR is transducer type for Absolute humidity TransducerAbsoluteHumidityXDR = "B" // TransducerGenericXDR is transducer type for Generic TransducerGenericXDR = "G" // TransducerCurrentXDR is transducer type for Current TransducerCurrentXDR = "I" // TransducerSalinityXDR is transducer type for Salinity TransducerSalinityXDR = "L" // TransducerSwitchValveXDR is transducer type for Switch, valve TransducerSwitchValveXDR = "S" // TransducerTachometerXDR is transducer type for Tachometer TransducerTachometerXDR = "T" // TransducerVoltageXDR is transducer type for Voltage TransducerVoltageXDR = "U" // TransducerVolumeXDR is transducer type for Volume TransducerVolumeXDR = "V" )
const (
// TypeAAM type of AAM sentence for Waypoint Arrival Alarm
TypeAAM = "AAM"
)
const (
// TypeABM type of ABM sentence for AIS addressed binary and safety related message
TypeABM = "ABM"
)
const (
// TypeACK type of ACK sentence for alert acknowledge
TypeACK = "ACK"
)
const (
// TypeACN type of ACN sentence for alert command
TypeACN = "ACN"
)
const (
// TypeALA type of ALA sentence for System Faults and alarms
TypeALA = "ALA"
)
const (
// TypeALC type of ALC sentence for cyclic alert list
TypeALC = "ALC"
)
const (
// TypeALF type of ALF sentence for alert sentence
TypeALF = "ALF"
)
const (
// TypeALR type of ALR sentence for alert command refused
TypeALR = "ALR"
)
const (
// TypeARC type of ARC sentence for alert command refused
TypeARC = "ARC"
)
const (
// TypeBBM type of BBM sentence for AIS broadcast binary message
TypeBBM = "BBM"
)
const (
// TypeBEC type of BEC sentence for bearing and distance to waypoint (dead reckoning)
TypeBEC = "BEC"
)
const (
// TypeBOD type of BOD sentence for bearing waypoint to waypoint
TypeBOD = "BOD"
)
const (
// TypeBWC type of BWC sentence for bearing and distance to waypoint, great circle
TypeBWC = "BWC"
)
const (
// TypeBWR type of BWR sentence for bearing and distance to waypoint (Rhumb Line)
TypeBWR = "BWR"
)
const (
// TypeBWW type of BWW sentence for bearing (from destination) destination waypoint to origin waypoint
TypeBWW = "BWW"
)
const (
// TypeDBK type of DBK sentence for Depth Below Keel
TypeDBK = "DBK"
)
const (
// TypeDBS is type of DBS sentence for Depth Below Surface
TypeDBS = "DBS"
)
const (
// TypeDBT type for DBT sentences
TypeDBT = "DBT"
)
const (
// TypeDPT type for DPT sentences
TypeDPT = "DPT"
)
const (
// TypeDTM type of DTM sentence for Datum Reference
TypeDTM = "DTM"
)
const (
// TypeEVE type of EVE sentence for General Event Message
TypeEVE = "EVE"
)
const (
// TypeGNS type for GNS sentences
TypeGNS = "GNS"
)
const (
// TypeGSV type of GSV sentences for satellites in view
TypeGSV = "GSV"
)
const (
// TypeHBT type of HBT sentence for heartbeat supervision sentence.
TypeHBT = "HBT"
)
const (
// TypeHDG type of HDG sentence for vessel heading, deviation and variation with respect to magnetic north.
TypeHDG = "HDG"
)
const (
// TypeHDT type for HDT sentences
TypeHDT = "HDT"
)
const (
// TypeHSC type of HSC sentence for Heading steering command
TypeHSC = "HSC"
)
const (
// TypeMTA type of MTA sentence for Air Temperature
TypeMTA = "MTA"
)
const ( // TypeMTK type for PMTK sentences // Deprecated: use PMTK001 instead. PMTK protocol contains actually many commands. This struct is for MTK 001 ACK command. TypeMTK = "MTK001" )
const (
// TypePCDIN is type of PCDIN sentence for SeaSmart.Net Protocol
TypePCDIN = "CDIN"
)
const (
// TypePGN is type of PGN sentence for transferring single NMEA2000 frame as NMEA0183 sentence
TypePGN = "PGN"
)
const (
// TypePMTK001 type of acknowledgement sentence for MTK protocol
TypePMTK001 = "MTK001"
)
const (
// TypePRDID type of PRDID sentence for vessel pitch, roll and heading
TypePRDID = "RDID"
)
const (
// TypePSKPDPT type for proprietary Skipper PSKPDPT sentences
TypePSKPDPT = "SKPDPT"
)
const (
// TypePSONCMS is type of PSONCMS sentence for proprietary Xsens IMU/VRU/AHRS device
TypePSONCMS = "SONCMS"
)
const (
// TypeQuery type of Query sentence for a listener to request a particular sentence from a talker
TypeQuery = "Q"
)
const (
// TypeRSA type of RSA sentence for Rudder Sensor Angle
TypeRSA = "RSA"
)
const (
// TypeTLB type of TLB target label.
TypeTLB = "TLB"
)
const (
// TypeTTD type of TTD sentence for tracked target data.
TypeTTD = "TTD"
)
const (
// TypeTTM type of TTM sentence for Tracked Target Message
TypeTTM = "TTM"
)
const (
// TypeTXT type for TXT sentences for the transmission of text messages
TypeTXT = "TXT"
)
const (
// TypeVBW type of VBW sentence for Dual Ground/Water Speed
TypeVBW = "VBW"
)
const (
// TypeVDR type of VDR sentence for Set and Drift
TypeVDR = "VDR"
)
const (
// TypeVHW type for VHW sentences
TypeVHW = "VHW"
)
const (
// TypeVLW type of VLW sentence for Distance Traveled through Water
TypeVLW = "VLW"
)
const (
// TypeVPW type of VPW sentence for Speed Measured Parallel to Wind
TypeVPW = "VPW"
)
const (
// TypeVSD type of VSD sentence for AIS voyage static data.
TypeVSD = "VSD"
)
const (
// TypeVTG type for VTG sentences
TypeVTG = "VTG"
)
const (
// TypeVWR type of VWR sentence for Relative Wind Speed and Angle
TypeVWR = "VWR"
)
const (
// TypeVWT type of VWT sentence for True Wind Speed and Angle
TypeVWT = "VWT"
)
const (
// TypeWPL type for WPL sentences
TypeWPL = "WPL"
)
const (
// TypeXDR type of XDR sentence for Transducer Measurement
TypeXDR = "XDR"
)
const (
// TypeXTE type of XTE sentence for Cross-track error, measured
TypeXTE = "XTE"
)
const (
// TypeZDA type for ZDA sentences
TypeZDA = "ZDA"
)
Variables ¶
This section is empty.
Functions ¶
func CheckCRC ¶ added in v1.9.0
func CheckCRC(sentence BaseSentence, rawFields string) error
CheckCRC is default implementation for checking sentence Checksum
func Checksum ¶ added in v1.2.0
Checksum xor all the bytes in a string and return it as an uppercase hex string
func DateTime ¶ added in v1.10.0
DateTime converts the provided Date and Time values to a standard UTC time.Time. The referenceYear parameter is used to determine the offset (century) for the two-digit year in Date. For example, if the referenceYear is 2024, the offset used is 2000; and the input date's year is prepended with 20. If referenceYear is 0, the current UTC year is used. If either Date or Time is not valid, DateTime returns the zero time.Time.
func MustRegisterParser ¶ added in v1.2.0
func MustRegisterParser(sentenceType string, parser ParserFunc)
MustRegisterParser register a custom parser or panic
func ParseDecimal ¶
ParseDecimal parses a decimal format coordinate. e.g: 151.196019
func ParseLatLong ¶
ParseLatLong parses the supplied string into the LatLong.
Supported formats are: - DMS (e.g. 33° 23' 22") - Decimal (e.g. 33.23454) - GPS (e.g 15113.4322 S)
func ParsePrefix ¶ added in v1.9.0
ParsePrefix is default implementation for prefix parsing. It takes in the sentence first field and splits it into a talker id and sentence type.
func RegisterParser ¶ added in v1.2.0
func RegisterParser(sentenceType string, parser ParserFunc) error
RegisterParser register a custom parser
Types ¶
type AAM ¶ added in v1.6.0
type AAM struct { BaseSentence // StatusArrivalCircleEntered is warning of arrival to waypoint circle // * A = Arrival Circle Entered // * V = not entered StatusArrivalCircleEntered string // StatusPerpendicularPassed is warning for perpendicular passing of waypoint // * A = Perpendicular passed at waypoint // * V = not passed StatusPerpendicularPassed string // ArrivalCircleRadius is radius for arrival circle ArrivalCircleRadius float64 // ArrivalCircleRadiusUnit is unit for arrival circle radius ArrivalCircleRadiusUnit string // DestinationWaypointID is destination waypoint ID DestinationWaypointID string }
AAM - Waypoint Arrival Alarm This sentence is generated by some units to indicate the status of arrival (entering the arrival circle, or passing the perpendicular of the course line) at the destination waypoint (source: GPSD). https://gpsd.gitlab.io/gpsd/NMEA.html#_aam_waypoint_arrival_alarm
Format: $--AAM,A,A,x.x,N,c--c*hh<CR><LF> Example: $GPAAM,A,A,0.10,N,WPTNME*43
type ABM ¶ added in v1.8.0
type ABM struct { BaseSentence // NumFragments is total number of fragments/sentences need to transfer the message (1 - 9) NumFragments int64 // 0 // FragmentNumber is current fragment/sentence number (1 - 9) FragmentNumber int64 // 1 // MessageID is sequential message identifier (0 - 3) MessageID int64 // 2 // MMSI is The MMSI of destination AIS unit for the ITU-R M.1371 message (10 digits or empty) MMSI string // 3 // Channel is AIS channel for broadcast of the radio message (0 - 3) // 0 - no broadcast // 1 - on AIS channel A // 2 - on AIS channel B // 3 - broadcast on both AIS channels Channel string // 4 // VDLMessageNumber is VDL message number (6/12), see ITU-R M.1371 VDLMessageNumber int64 // 5 // Payload is encapsulated data (6 bit binary-converted data) (1 - 63 bytes) Payload []byte // 6 }
ABM - AIS addressed binary and safety related message https://fcc.report/FCC-ID/ADB9ZWRTR100/2768717.pdf (page 6) FURUNO MARINE RADAR, model FAR-15XX manual
Format: !--ABM,x,x,x,xxxxxxxxx,x,xx,s--s,x,*hh<CR><LF> Example: !AIABM,26,2,1,3381581370,3,8,177KQJ5000G?tO`K>RA1wUbN0TKH,0*02
type ACK ¶ added in v1.8.0
type ACK struct { BaseSentence // AlertIdentifier is alert identifier (001 to 99999) AlertIdentifier int64 // 0 }
ACK - Acknowledge. This sentence is used to acknowledge an alarm condition reported by a device. http://www.nmea.de/nmea0183datensaetze.html#ack https://www.furuno.it/docs/INSTALLATION%20MANUALgp170_installation_manual.pdf GPS NAVIGATOR Model GP-170 (page 42) https://www.manualslib.com/manual/2226813/Jrc-Jln-900.html?page=239#manual (JRC JLN-900: Installation And Instruction Manual)
Format: $--ACK,xxx*hh<CR><LF> Example: $VRACK,001*50
type ACN ¶ added in v1.8.0
type ACN struct { BaseSentence // Time is time of alarm condition change, UTC (000000.00 - 240001.00) Time Time // 0 // ManufacturerMnemonicCode is manufacturer mnemonic code ManufacturerMnemonicCode string // 1 // AlertIdentifier is alert identifier (001 to 99999) AlertIdentifier int64 // 2 // AlertInstance is alert instance AlertInstance int64 // 3 // Command is Alert command // * A - acknowledge, // * Q - request/repeat information // * O - responsibility transfer // * S - silence Command string // 4 // State is alarm state // * C - command // * possible more classifier values but these are not mentioned in manual State string // 5 }
ACN - Alert command. Used for acknowledge, silence, responsibility transfer and to request repeat of alert. https://www.furuno.it/docs/INSTALLATION%20MANUALIME44900D_FA170.pdf Furuno CLASS A AIS Model FA-170 (page 49) https://www.furuno.it/docs/INSTALLATION%20MANUALgp170_installation_manual.pdf GPS NAVIGATOR Model GP-170 (page 42)
Format: $--ACN,hhmmss.ss,AAA,x.x,x.x,A,A*hh<CR><LF> Example: $VRACN,220516,BPMP1,A,A,Bilge pump alarm1*43
type ALA ¶ added in v1.6.0
type ALA struct { BaseSentence // Time is Event Time Time Time // SystemIndicator is system indicator of original alarm source. Detector system type with 2 char identifier. // Values not known // https://www.nmea.org/Assets/20190303%20nmea%200183%20talker%20identifier%20mnemonics.pdf SystemIndicator string // SubSystemIndicator is sub system equipment indicator of original alarm source SubSystemIndicator string // InstanceNumber is instance number of equipment/unit/item (00-99) InstanceNumber int64 // Type is alarm type (000-999) Type int64 // Condition describes the condition triggering current message // * N – Normal state (OK) // * H - Alarm state (fault); // could be more Condition string // AlarmAckState is Alarm's acknowledge state // * A – Acknowledged // * H - Harbour mode // * V – Not acknowledged // * O - Override // could be more AlarmAckState string // Message's description text (could be cut to fit max packet length) Message string }
ALA - System Faults and alarms Source: "Interfacing Voyage Data Recorder Systems, AutroSafe Interactive Fire-Alarm System, 116-P-BSL336/EE, RevA 2007-01-25, Autronica Fire and Security AS " (page 31 | p.8.1.3) https://product.autronicafire.com/fileshare/fileupload/14251/bsl336_ee.pdf
Format: $FRALA,hhmmss,aa,aa,xx,xxx,a,a,c-cc*hh<CR><LF> Example: $FRALA,143955,FR,OT,00,901,N,V,Syst Fault : AutroSafe comm. OK*4F
type ALC ¶ added in v1.8.0
type ALC struct { BaseSentence // NumFragments is total number of ALC sentences this message (01, 16) NumFragments int64 // 0 // FragmentNumber is current fragment/sentence number (01 - 16) FragmentNumber int64 // 1 // MessageID is sequential message identifier (00 - 99) MessageID int64 // 2 // Number of alert entries (0 - 3) EntriesNumber int64 // 3 // Additional alert entries. Each entry identifies a certain alert with a certain state. // It is not allowed that an alert entry is split between two ALC sentences AlertEntries []ALCAlertEntry // 4 }
ALC - Cyclic alert list https://fcc.report/FCC-ID/ADB9ZWRTR100/2768717.pdf (page 6) FURUNO MARINE RADAR, model FAR-15XX manual
Format: $--ALC,xx,xx,xx,xx, aaa,x.x,x.x,x.x,’’’’’’’’’,*hh<CR><LF> Example: $FBALC,02,01,03,01,FEB,01,02,03*0A
type ALCAlertEntry ¶ added in v1.8.0
type ALCAlertEntry struct { // ManufacturerMnemonicCode is manufacturer mnemonic code ManufacturerMnemonicCode string // i+4 // AlertIdentifier is alert identifier (001 to 99999) AlertIdentifier int64 // i+5 // AlertInstance is alert instance AlertInstance int64 // i+6 // RevisionCounter is revision counter (1 - 99) RevisionCounter int64 // i+7 }
ALCAlertEntry is instance of alert entry for ALC sentence
type ALF ¶ added in v1.8.0
type ALF struct { BaseSentence // NumFragments is total number of ALF sentences this message (1, 2) NumFragments int64 // 0 // FragmentNumber is current fragment/sentence number (1 - 2) FragmentNumber int64 // 1 // MessageID is sequential message identifier (0 - 9) MessageID int64 // 2 // Time is time of last change (000000.00 - 240001.00 / null) Time Time // 3 // Category is alert category (A/B/C/null) // A - Alert category A, // B - Alert category B, // C - Alert category C, Category string // 4 // Priority is alert priority (A/W/C/null) // E - Emergency Alarm: E, for use with Bridge alert management // A - Alarm, // W - Warning, // C - Caution, // null Priority string // 5 // State is alert state (A/S/O/U/V/N/null) // A - Acknowledged // S - Silence // O - Active-responsiblity transferred // U - Rectified-unacknowledged // V - Not acknowledged // N - Normal state // null State string // 6 // ManufacturerMnemonicCode is manufacturer mnemonic code ManufacturerMnemonicCode string // 7 // AlertIdentifier is alert identifier (001 to 99999) AlertIdentifier int64 // 8 // AlertInstance is alert instance AlertInstance int64 // 9 // RevisionCounter is revision counter (1 - 99) RevisionCounter int64 // 10 // EscalationCounter is escalation counter (0 - 9) EscalationCounter int64 // 11 // Text is alarm text Text string // 12 }
ALF - Alert sentence https://fcc.report/FCC-ID/ADB9ZWRTR100/2768717.pdf (page 6) FURUNO MARINE RADAR, model FAR-15XX manual https://www.rcom.nl/wp-content/uploads/2017/09/NSR-NGR-3000-Users-Manual.pdf (page 47)
Format: $--ALF,x,x,x,hhmmss.ss,a,a,a,aaa,x.x,x.x,x.x,x,c--c,*hh<CR><LF> Example: $VDALF,1,0,1,220516,B,A,S,SAL,001,1,2,0,My alarm*2c
type ALR ¶ added in v1.8.0
type ALR struct { BaseSentence // Time is time of alarm condition change, UTC (000000.00 - 240001.00) Time Time // 0 // AlarmIdentifier is unique alarm number (identifier) at alarm source AlarmIdentifier int64 // 1 // AlarmCondition is alarm condition (A/V) // A - threshold exceeded // V - not exceeded Condition string // 2 // State is alarm state (A/V) // A - acknowledged // V - not acknowledged State string // 3 // Description is alarm description text Description string // 4 }
ALR - Set alarm state https://fcc.report/FCC-ID/ADB9ZWRTR100/2768717.pdf (page 7) FURUNO MARINE RADAR, model FAR-15XX manual
Format: $--ALR,hhmmss.ss,xxx,A,A,c--c,*hh<CR><LF> Example: $RAALR,220516,BPMP1,A,A,Bilge pump alarm1*43
type APB ¶ added in v1.6.0
type APB struct { BaseSentence // StatusGeneralWarning is used for warnings // * V = LORAN-C Blink or SNR warning // * A = general warning flag or other navigation systems when a reliable fix is not available StatusGeneralWarning string // StatusLockWarning is used for lock warning // * V = Loran-C Cycle Lock warning flag // * A = OK or not used StatusLockWarning string // CrossTrackErrorMagnitude is Cross Track Error Magnitude CrossTrackErrorMagnitude float64 // DirectionToSteer is Direction to steer, // * L = left // * R = right DirectionToSteer string // CrossTrackUnits is cross track units // * N = nautical miles // * K = for kilometers CrossTrackUnits string // StatusArrivalCircleEntered is warning of arrival to waypoint circle // * A = Arrival Circle Entered // * V = not entered StatusArrivalCircleEntered string // StatusPerpendicularPassed is warning for perpendicular passing of waypoint // * A = Perpendicular passed at waypoint // * V = not passed StatusPerpendicularPassed string // BearingOriginToDest is Bearing origin to destination BearingOriginToDest float64 // BearingOriginToDestType is Bearing origin to dest type // * M = Magnetic // * T = True BearingOriginToDestType string // DestinationWaypointID is Destination waypoint ID DestinationWaypointID string // BearingPresentToDest is Bearing, present position to Destination BearingPresentToDest float64 // BearingPresentToDestType is Bearing present to dest type // * M = Magnetic // * T = True BearingPresentToDestType string // Heading is heading to steer to destination waypoint Heading float64 // HeadingType is Heading type // * M = Magnetic // * T = True HeadingType string // FAA mode indicator (filled in NMEA 2.3 and later) FFAMode string }
APB - Autopilot Sentence "B" for heading/tracking https://gpsd.gitlab.io/gpsd/NMEA.html#_apb_autopilot_sentence_b https://www.tronico.fi/OH6NT/docs/NMEA0183.pdf (page 5)
Format: $--APB,A,A,x.x,a,N,A,A,x.x,a,c--c,x.x,a,x.x,a*hh<CR><LF> Format NMEA 2.3+: $--APB,A,A,x.x,a,N,A,A,x.x,a,c--c,x.x,a,x.x,a,a*hh<CR><LF> Example: $GPAPB,A,A,0.10,R,N,V,V,011,M,DEST,011,M,011,M*82
$ECAPB,A,A,0.0,L,M,V,V,175.2,T,Antechamber_Bay,175.2,T,175.2,T*48
type ARC ¶ added in v1.8.0
type ARC struct { BaseSentence // Time is UTC Time Time Time // 0 // ManufacturerMnemonicCode is manufacturer mnemonic code ManufacturerMnemonicCode string // 1 // AlertIdentifier is alert identifier (001 to 99999) AlertIdentifier int64 // 2 // AlertInstance is alert instance AlertInstance int64 // 3 // Command is Refused alert command // A - acknowledge // Q - request/repeat information // O - responsibility transfer // S - silence Command string // 4 }
ARC - Alert command refused https://fcc.report/FCC-ID/ADB9ZWRTR100/2768717.pdf (page 7) FURUNO MARINE RADAR, model FAR-15XX manual
Format: $--ARC,hhmmss.ss,aaa,x.x,x.x,c*hh<CR><LF> Example: $RAARC,220516,TCK,002,1,A*73
type BBM ¶ added in v1.8.0
type BBM struct { BaseSentence // NumFragments is total number of fragments/sentences need to transfer the message (1 - 9) NumFragments int64 // 0 // FragmentNumber is current fragment/sentence number (1 - 9) FragmentNumber int64 // 1 // MessageID is sequential message identifier (0 - 9) MessageID int64 // 2 // Channel is AIS channel for broadcast of the radio message (0 - 3) // 0 - no broadcast // 1 - on AIS channel A // 2 - on AIS channel B // 3 - broadcast on both AIS channels Channel string // 3 // VDLMessageNumber is ITU-r M.1371 message number (8/14) VDLMessageNumber int64 // 4 // Payload is encapsulated data (6 bit binary-converted data) (1 - 63 bytes) Payload []byte // 5 }
BBM - AIS broadcast binary message https://fcc.report/FCC-ID/ADB9ZWRTR100/2768717.pdf (page 7) FURUNO MARINE RADAR, model FAR-15XX manual
Format: !--BBM,x,x,x,x,xx,s—s,x*hh<CR><LF> Example: !AIBBM,26,2,1,3,8,177KQJ5000G?tO`K>RA1wUbN0TKH,0*2C
type BEC ¶ added in v1.6.0
type BEC struct { BaseSentence Time Time // UTC Time Latitude float64 // latitude of waypoint Longitude float64 // longitude of waypoint BearingTrue float64 // true bearing in degrees BearingTrueValid bool // is unit of true bearing valid BearingMagnetic float64 // magnetic bearing in degrees BearingMagneticValid bool // is unit of magnetic bearing valid DistanceNauticalMiles float64 // distance to waypoint in nautical miles DistanceNauticalMilesValid bool // is unit of distance to waypoint nautical miles valid DestinationWaypointID string // destination waypoint ID }
BEC - bearing and distance to waypoint (dead reckoning) http://www.nmea.de/nmea0183datensaetze.html#bec https://www.eye4software.com/hydromagic/documentation/nmea0183/
Format: $--BEC,hhmmss.ss,llll.ll,a,yyyyy.yy,a,x.x,T,x.x,M,x.x,N,c--c*hh<CR><LF> Example: $GPBEC,220516,5130.02,N,00046.34,W,213.8,T,218.0,M,0004.6,N,EGLM*33
type BOD ¶ added in v1.6.0
type BOD struct { BaseSentence BearingTrue float64 // true bearing in degrees BearingTrueType string // is type of true bearing BearingMagnetic float64 // magnetic bearing in degrees BearingMagneticType string // is type of magnetic bearing DestinationWaypointID string // destination waypoint ID OriginWaypointID string // origin waypoint ID }
BOD - bearing waypoint to waypoint (origin to destination). Replaced by BWW in NMEA4+ (according to GPSD docs) If your system supports RMB it is better to use RMB as it is more common (according to OpenCPN docs) https://gpsd.gitlab.io/gpsd/NMEA.html#_bod_bearing_waypoint_to_waypoint
Format: $--BOD,x.x,T,x.x,M,c--c,c--c*hh<CR><LF> Example: $GPBOD,099.3,T,105.6,M,POINTB*64
$GPBOD,097.0,T,103.2,M,POINTB,POINTA*4A
type BWC ¶ added in v1.6.0
type BWC struct { BaseSentence Time Time // UTC Time Latitude float64 // latitude of waypoint Longitude float64 // longitude of waypoint BearingTrue float64 // true bearing in degrees BearingTrueType string // is type of true bearing BearingMagnetic float64 // magnetic bearing in degrees BearingMagneticType string // is type of magnetic bearing DistanceNauticalMiles float64 // distance to waypoint in nautical miles DistanceNauticalMilesUnit string // is unit of distance to waypoint nautical miles DestinationWaypointID string // destination waypoint ID FFAMode string // FAA mode indicator (filled in NMEA 2.3 and later) }
BWC - bearing and distance to waypoint, great circle https://gpsd.gitlab.io/gpsd/NMEA.html#_bwc_bearing_distance_to_waypoint_great_circle http://aprs.gids.nl/nmea/#bwc
Format: $--BWC,hhmmss.ss,llll.ll,a,yyyyy.yy,a,x.x,T,x.x,M,x.x,N,c--c*hh<CR><LF> Format (NMEA 2.3+): $--BWC,hhmmss.ss,llll.ll,a,yyyyy.yy,a,x.x,T,x.x,M,x.x,N,c--c,m*hh<CR><LF> Example: $GPBWC,081837,,,,,,T,,M,,N,*13
$GPBWC,220516,5130.02,N,00046.34,W,213.8,T,218.0,M,0004.6,N,EGLM*21
type BWR ¶ added in v1.6.0
type BWR struct { BaseSentence Time Time // UTC Time Latitude float64 // latitude of waypoint Longitude float64 // longitude of waypoint BearingTrue float64 // true bearing in degrees BearingTrueType string // is type of true bearing BearingMagnetic float64 // magnetic bearing in degrees BearingMagneticType string // is type of magnetic bearing DistanceNauticalMiles float64 // distance to waypoint in nautical miles DistanceNauticalMilesUnit string // is unit of distance to waypoint nautical miles DestinationWaypointID string // destination waypoint ID FFAMode string // FAA mode indicator (filled in NMEA 2.3 and later) }
BWR - bearing and distance to waypoint (Rhumb Line). This is calculated along rumb line instead of along the great circle. https://gpsd.gitlab.io/gpsd/NMEA.html#_bwr_bearing_and_distance_to_waypoint_rhumb_line
Format: $--BWR,hhmmss.ss,llll.ll,a,yyyyy.yy,a,x.x,T,x.x,M,x.x,N,c--c*hh<CR><LF> Format (NMEA 2.3+): $--BWR,hhmmss.ss,llll.ll,a,yyyyy.yy,a,x.x,T,x.x,M,x.x,N,c--c,m*hh<CR><LF> Example: $GPBWR,081837,,,,,,T,,M,,N,*02
$GPBWR,220516,5130.02,N,00046.34,W,213.8,T,218.0,M,0004.6,N,EGLM*30
type BWW ¶ added in v1.6.0
type BWW struct { BaseSentence BearingTrue float64 // true bearing in degrees BearingTrueType string // is type of true bearing BearingMagnetic float64 // magnetic bearing in degrees BearingMagneticType string // is type of magnetic bearing DestinationWaypointID string // destination waypoint ID OriginWaypointID string // origin waypoint ID }
BWW - bearing (from destination) destination waypoint to origin waypoint Replaces by BOD in NMEA4+ (according to GPSD docs) If your system supports RMB it is better to use RMB as it is more common (according to OpenCPN docs) https://gpsd.gitlab.io/gpsd/NMEA.html#_bww_bearing_waypoint_to_waypoint http://www.nmea.de/nmea0183datensaetze.html#bww
Format: $--BWW,x.x,T,x.x,M,c--c,c--c*hh<CR><LF> Example: $GPBWW,097.0,T,103.2,M,POINTB,POINTA*41
type BaseSentence ¶
type BaseSentence struct { Talker string // The talker id (e.g GP) Type string // The data type (e.g GSA) Fields []string // Array of fields Checksum string // The (raw) Checksum Raw string // The raw NMEA sentence received TagBlock TagBlock // NMEA tagblock }
BaseSentence contains the information about the NMEA sentence
func (BaseSentence) DataType ¶ added in v1.2.0
func (s BaseSentence) DataType() string
DataType returns the type of the message
func (BaseSentence) Prefix ¶
func (s BaseSentence) Prefix() string
Prefix returns the talker and type of message
func (BaseSentence) String ¶
func (s BaseSentence) String() string
String formats the sentence into a string
func (BaseSentence) TalkerID ¶ added in v1.2.0
func (s BaseSentence) TalkerID() string
TalkerID returns the talker of the message
type DBK ¶ added in v1.6.0
type DBK struct { BaseSentence DepthFeet float64 // Depth, feet DepthFeetUnit string // f = feet DepthMeters float64 // Depth, meters DepthMetersUnit string // M = meters DepthFathoms float64 // Depth, Fathoms DepthFathomsUnit string // F = Fathoms }
DBK - Depth Below Keel (obsolete, use DPT instead) https://gpsd.gitlab.io/gpsd/NMEA.html#_dbk_depth_below_keel https://wiki.openseamap.org/wiki/OpenSeaMap-dev:NMEA#DBK_-_Depth_below_keel
Format: $--DBK,x.x,f,x.x,M,x.x,F*hh<CR><LF> Example: $SDDBK,12.3,f,3.7,M,2.0,F*2F
type DBS ¶ added in v1.2.0
type DBS struct { BaseSentence DepthFeet float64 // Depth, feet DepthFeetUnit string // f = feet DepthMeters float64 // Depth, meters DepthMeterUnit string // M = meters DepthFathoms float64 // Depth, Fathoms DepthFathomUnit string // F = Fathoms }
DBS - Depth Below Surface (obsolete, use DPT instead) https://gpsd.gitlab.io/gpsd/NMEA.html#_dbs_depth_below_surface https://wiki.openseamap.org/wiki/OpenSeaMap-dev:NMEA#DBS_-_Depth_below_surface
Format: $--DBS,x.x,f,x.x,M,x.x,F*hh<CR><LF> Example: $23DBS,01.9,f,0.58,M,00.3,F*21
type DBT ¶ added in v1.2.0
type DBT struct { BaseSentence DepthFeet float64 DepthMeters float64 DepthFathoms float64 }
DBT - Depth below transducer https://gpsd.gitlab.io/gpsd/NMEA.html#_dbt_depth_below_transducer
Format: $--DBT,x.x,f,x.x,M,x.x,F*hh<CR><LF> Example: $IIDBT,032.93,f,010.04,M,005.42,F*2C
type DOR ¶ added in v1.6.0
type DOR struct { BaseSentence // Type is type of the message // * E – Single door // * F – Fault // * S – Section (whole or part of section) Type string // Time is Event Time Time Time // SystemIndicator is system indicator. Detector system type with 2 char identifier. // * WT - watertight // * WS - semi watertight // * FD - fire door // * HD - hull door // * OT - other // could be more // https://www.nmea.org/Assets/20190303%20nmea%200183%20talker%20identifier%20mnemonics.pdf SystemIndicator string // DivisionIndicator1 is first division indicator for locating origin detector for this message DivisionIndicator1 string // DivisionIndicator2 is second division indicator for locating origin detector for this message DivisionIndicator2 int64 // DoorNumberOrCount is Door number or activated door count (seems to be field with overloaded meaning) DoorNumberOrCount int64 // DoorStatus is Door status // * O – Open // * C – Closed // * X – Fault // could be more DoorStatus string // SwitchSetting is Mode switch setting // * O – Harbour mode (allowed open) // * C – Sea mode (ordered closed) SwitchSetting string // Message's description text (could be cut to fit max packet length) Message string }
DOR - Door Status Detection Source: "Interfacing Voyage Data Recorder Systems, AutroSafe Interactive Fire-Alarm System, 116-P-BSL336/EE, RevA 2007-01-25, Autronica Fire and Security AS " (page 32 | p.8.1.4) https://product.autronicafire.com/fileshare/fileupload/14251/bsl336_ee.pdf
Format: $FRDOR,a,hhmmss,aa,aa,xxx,xxx,a,a,c--c*hh<CR><LF> Example: $FRDOR,E,233042,FD,FP,000,010,C,C,Door Closed : TEST FPA Name*4D
type DPT ¶ added in v1.2.0
type DPT struct { BaseSentence Depth float64 // Water depth relative to transducer, meters Offset float64 // offset from transducer RangeScale float64 // OPTIONAL, Maximum range scale in use (NMEA 3.0 and above) }
DPT - Depth of Water https://gpsd.gitlab.io/gpsd/NMEA.html#_dpt_depth_of_water
Format: $--DPT,x.x,x.x,x.x*hh<CR><LF> Example: $SDDPT,0.5,0.5,*7B
$INDPT,2.3,0.0*46
type DSC ¶ added in v1.6.0
type DSC struct { BaseSentence // FormatSpecifier is Format specifier (2 digits) // > The call content is first described by a "format specifier" element. The format specifier is explained in // > ITU-Rec. M.493-13 Section 4, with various symbol codes in the "service command" range of symbols representing // > various message formats, as shown in Table 3 (by symbol number, then meaning of symbol) as follows: // > * 102 = selective call to a group of ships in particular geographic area // > * 112 = distress alert call // > * 114 = selective call to a group of ships having common interest // > * 116 = all ships call // > * 120 = selective call to particular individual station // > * 123 = selective call to a particular individual using automatic service FormatSpecifier string // Address (10 digits) Address string // Category (2 digits or empty) // > The call content is next described by a "category element" in Section 6. Again, various symbol codes in the // > "service command" range of symbols represent various categories, as follows from Table 3 (by symbol number, // > then meaning of symbol): // > * 100 = routine // > * 108 = safety // > * 110 = urgency // > * 112 = distress Category string // DistressCauseOrTeleCommand1 is The cause of the distress or first telecommand (2 digits or empty) // > Nature of Distress is to be encoded, again using Table 3, as follows // > * 100 = Fire, explosion // > * 101 = Flooding // > * 102 = Collision // > * 103 = Grounding // > * 104 = Listing, in danger of capsize // > * 105 = Sinking // > * 106 = Disabled and adrift // > * 107 = Undesignated distres // > * 108 = Abandoning ship // > * 109 = Piracy/armed robbery attack // > * 110 = Man overboard // > * 111 = unassigned symbol; take no action // > * 112 = EPRIB emission // > * 113 through 27 = unassigned symbol; take no action DistressCauseOrTeleCommand1 string // CommandTypeOrTeleCommand2 is Type of communication or second telecommand (2 digits) CommandTypeOrTeleCommand2 string // PositionOrCanal is Position (lat+lon) or Canal/frequency (Maximum 16 digits) // > Distress coordinates are to be encoded five parts, sent as a string of ten digits. The first digit indicates // > the direction of the latitude and longitude, with "0" for North and East, "1" for North and West, // > "2" for South and East, and "3" for South and West. The next two digits are the latitude in degrees. // > The next two digits are the latitude in whole minutes. The next three digits are the longitude in degrees. // > The next two digits are longitude in whole minutes. PositionOrCanal string // Position (lat+lon) or Canal/frequency (Maximum 16 digits) // TimeOrTelephoneNumber is Time or Telephone Number (Maximum 16 digits) // > The time in universal coordinated time is to be sent in 24-hour format in two parts, a total of four digits. // > The first two digits are the hours. The next two are the minutes. TimeOrTelephoneNumber string // MMSI of ship in distress (10 digits or empty) // > The call content is next described as having a "self-identification" element. This is simply the sending // > station's MMSI, encoded like the address element. This identifies who sent the message. MMSI string // DistressCause is The cause of the distress (2 digits or empty) DistressCause string // Acknowledgement (R=Acknowledge request, B=Acknowledgement, S=Neither (end of sequence)) Acknowledgement string // Expansion indicator (E or empty) ExpansionIndicator string }
DSC – Digital Selective Calling Information https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn:opencpn_user_manual:advanced_features:nmea_sentences https://web.archive.org/web/20190303170916/http://continuouswave.com/whaler/reference/DSC_Datagrams.html http://www.busse-yachtshop.de/pdf/icom-GM600-handbuch.pdf https://github.com/mariokonrad/marnav/blob/master/src/marnav/nmea/dsc.cpp (marnav has interesting enums worth checking)
Note: many fields of DSC are conditional with double meaning and we only map raw sentence to fields without any logic/checking of those conditions. We could have specific fields if we only knew the rules to populate them.
Format: $--DSC,xx,xxxxxxxxxx,xx,xx,xx,x.x, x.x,xxxxxxxxxx,xx, a,a*hh<CR><LF> Example: $CDDSC,20,3380400790,00,21,26,1423108312,2021,,,B, E*73
type DSE ¶ added in v1.6.0
type DSE struct { BaseSentence TotalNumber int64 // total number of sentences, 01 to 99 Number int64 // number of current sentence, 01 to 99 Acknowledgement string // Acknowledgement (R=Acknowledge request, B=Acknowledgement, S=Neither (end of sequence)) MMSI string // MMSI of vessel (10 digits) DataSets []DSEDataSet }
DSE – Expanded digital selective calling. Is sentence that follows DSC sentence to provide additional (extended) data. https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn:opencpn_user_manual:advanced_features:nmea_sentences http://www.busse-yachtshop.de/pdf/icom-GM600-handbuch.pdf
Format: $CDDSE, x, x, a, xxxxxxxxxx, xx, c--c, .........., xx, c--c*hh<CR><LF> Example: $CDDSE,1,1,A,3380400790,00,46504437*15
type DSEDataSet ¶ added in v1.6.0
type DSEDataSet struct { // Code is code field, 2 digits // From OpenCPN wiki: // > 00–this field of two-digits appears to be the expansion data specifier described in Table 1 of ITU-Rec.M821-1, // > but with the symbol representation in two-digits instead of three-digits. The leading “1” seems to not be used. // > (See modified table, above.) This field identifies the data that will follow in the next field. In this message, // > the data will be “enhanced position resolution.” Code string // Data is data field, Enhanced position resolution, Maximum 8 characters, could be empty // From OpenCPN wiki: // > 45894494–the data payload, which is eight digits. The first four are the decimal portion of the latitude // > minutes; the last four are the decimal portion of the longitude minutes. The latitude and longitude whole // > minutes were sent in the immediately preceding datagram. This is as specified in the ITU-Rec. M.821-1 in // > section 2.1.2.1 Data string }
DSEDataSet is pair of DSE sets of data containing code + its data
type DTM ¶ added in v1.7.0
type DTM struct { BaseSentence LocalDatumCode string // Local datum code (W84,W72,S85,P90,999) LocalDatumSubcode string // Local datum subcode. May be blank. LatitudeOffsetMinute float64 // Latitude offset (minutes) (negative if south) LongitudeOffsetMinute float64 // Longitude offset (minutes) (negative if west) AltitudeOffsetMeters float64 // Altitude offset in meters DatumName string // Reference datum name. What’s usually seen here is "W84", the standard WGS84 datum used by GPS. }
DTM - Datum Reference https://gpsd.gitlab.io/gpsd/NMEA.html#_dtm_datum_reference
Format: $--DTM,ref,x,llll,c,llll,c,aaa,ref*hh<CR><LF> Example: $GPDTM,W84,,0.0,N,0.0,E,0.0,W84*6F Example: $GPDTM,W84,,00.0000,N,00.0000,W,,W84*53
type EVE ¶ added in v1.6.0
type EVE struct { BaseSentence Time Time // Event Time TagCode string // Tag code Message string // Event text }
EVE - General Event Message Source: "Interfacing Voyage Data Recorder Systems, AutroSafe Interactive Fire-Alarm System, 116-P-BSL336/EE, RevA 2007-01-25, Autronica Fire and Security AS " (page 34 | p.8.1.5) https://product.autronicafire.com/fileshare/fileupload/14251/bsl336_ee.pdf
Format: $FREVE,hhmmss,c--c,c--c*hh<CR><LF> Example: $FREVE,000001,DZ00513,Fire Alarm On: TEST DZ201 Name*0A
type FIR ¶ added in v1.6.0
type FIR struct { BaseSentence // Type is type of the message // * E – Event, Fire Alarm // * F – Fault // * D – Disablement Type string // Time is Event Time Time Time // SystemIndicator is system indicator. Detector system type with 2 char identifier. // * FD Generic fire detector // * FH Heat detector // * FS Smoke detector // * FD Smoke and heat detector // * FM Manual call point // * GD Any gas detector // * GO Oxygen gas detector // * GS Hydrogen sulphide gas detector // * GH Hydro-carbon gas detector // * SF Sprinkler flow switch // * SV Sprinkler manual valve release // * CO CO2 manual release // * OT Other SystemIndicator string // DivisionIndicator1 is first division indicator for locating origin detector for this message DivisionIndicator1 string // DivisionIndicator2 is second division indicator for locating origin detector for this message DivisionIndicator2 int64 // FireDetectorNumberOrCount is Fire detector number or activated detectors count (seems to be field with overloaded meaning) FireDetectorNumberOrCount int64 // Condition describes the condition triggering current message // * A – Activation // * V – Non-activation // * X – State unknown Condition string // AlarmAckState is Alarm's acknowledge state // * A – Acknowledged // * V – Not acknowledged AlarmAckState string // Message's description text (could be cut to fit max packet length) Message string }
FIR - Fire Detection event with time and location Source: "Interfacing Voyage Data Recorder Systems, AutroSafe Interactive Fire-Alarm System, 116-P-BSL336/EE, RevA 2007-01-25, Autronica Fire and Security AS " (page 39 | p.8.1.6) https://product.autronicafire.com/fileshare/fileupload/14251/bsl336_ee.pdf
Format: $FRFIR,a,hhmmss,aa,aa,xxx,xxx,a,a,c--c*hh<CR><LF> Example: $FRFIR,E,103000,FD,PT,000,007,A,V,Fire Alarm : TEST PT7 Name TEST DZ2 Name*7A
type GGA ¶ added in v1.2.0
type GGA struct { BaseSentence Time Time // Time of fix. Latitude float64 // Latitude. Longitude float64 // Longitude. FixQuality string // Quality of fix. NumSatellites int64 // Number of satellites in use. HDOP float64 // Horizontal dilution of precision. Altitude float64 // Altitude. Separation float64 // Geoidal separation DGPSAge string // Age of differential GPD data. DGPSId string // DGPS reference station ID. }
GGA is the Time, position, and fix related data of the receiver. http://aprs.gids.nl/nmea/#gga https://gpsd.gitlab.io/gpsd/NMEA.html#_gga_global_positioning_system_fix_data
Format: $--GGA,hhmmss.ss,ddmm.mm,a,ddmm.mm,a,x,xx,x.x,x.x,M,x.x,M,x.x,xxxx*hh<CR><LF> Example: $GNGGA,203415.000,6325.6138,N,01021.4290,E,1,8,2.42,72.5,M,41.5,M,,*7C
type GLGSV
deprecated
type GLGSV = GSV
GLGSV represents the GPS Satellites in view http://aprs.gids.nl/nmea/#glgsv
Deprecated: Use GSV instead
type GLL ¶ added in v1.2.0
type GLL struct { BaseSentence Latitude float64 // Latitude Longitude float64 // Longitude Time Time // Time Stamp Validity string // validity - A=valid, V=invalid FFAMode string // FAA mode indicator (filled in NMEA 2.3 and later) }
GLL is Geographic Position, Latitude / Longitude and time. http://aprs.gids.nl/nmea/#gll https://gpsd.gitlab.io/gpsd/NMEA.html#_gll_geographic_position_latitudelongitude
Format : $--GLL,ddmm.mm,a,dddmm.mm,a,hhmmss.ss,a*hh<CR><LF> Format (NMEA 2.3+): $--GLL,ddmm.mm,a,dddmm.mm,a,hhmmss.ss,a,m*hh<CR><LF> Example: $IIGLL,5924.462,N,01030.048,E,062216,A*38 Example: $GNGLL,4404.14012,N,12118.85993,W,001037.00,A,A*67
type GNRMC
deprecated
type GNRMC = RMC
GNRMC is the Recommended Minimum Specific GNSS data. http://aprs.gids.nl/nmea/#rmc
Deprecated: Use RCM instead
type GNS ¶ added in v1.2.0
type GNS struct { BaseSentence Time Time // UTC of position Latitude float64 Longitude float64 // FAA mode indicator for each satellite navigation system (constellation) supported by device. // // May be up to six characters (according to GPSD). // '1' - GPS // '2' - GLONASS // '3' - Galileo // '4' - BDS // '5' - QZSS // '6' - NavIC (IRNSS) Mode []string SVs int64 // Total number of satellites in use, 00-99 HDOP float64 // Horizontal Dilution of Precision Altitude float64 // Antenna altitude, meters, re:mean-sea-level(geoid). Separation float64 // Geoidal separation meters Age float64 // Age of differential data Station int64 // Differential reference station ID }
GNS is standard GNSS sentance that combined multiple constellations https://gpsd.gitlab.io/gpsd/NMEA.html#_gns_fix_data
Format: $--GNS,hhmmss.ss,ddmm.mm,a,dddmm.mm,a,c--c,xx,x.x,x.x,x.x,x.x,x.x*hh<CR><LF> Example: $GNGNS,014035.00,4332.69262,S,17235.48549,E,RR,13,0.9,25.63,11.24,,*70
$GPGNS,224749.00,3333.4268304,N,11153.3538273,W,D,19,0.6,406.110,-26.294,6.0,0138,S*6A
type GPGGA
deprecated
type GPGGA = GGA
GPGGA represents fix data. http://aprs.gids.nl/nmea/#gga
Deprecated: Use GGA instead
type GPGLL
deprecated
type GPGLL = GLL
GPGLL is Geographic Position, Latitude / Longitude and time. http://aprs.gids.nl/nmea/#gll
Deprecated: Use GLL instead
type GPGSA
deprecated
type GPGSA = GSA
GPGSA represents overview satellite data. http://aprs.gids.nl/nmea/#gsa
Deprecated: Use GSA instead
type GPGSV
deprecated
type GPGSV = GSV
GPGSV represents the GPS Satellites in view http://aprs.gids.nl/nmea/#gpgsv
Deprecated: Use GSV instead
type GPHDT
deprecated
added in
v1.1.0
type GPHDT = HDT
GPHDT is the Actual vessel heading in degrees True. http://aprs.gids.nl/nmea/#hdt
Deprecated: Use HDT instead
type GPRMC
deprecated
type GPRMC = RMC
GPRMC is the Recommended Minimum Specific GNSS data. http://aprs.gids.nl/nmea/#rmc
Deprecated: Use RMC instead
type GPVTG
deprecated
type GPVTG = VTG
GPVTG represents track & speed data. http://aprs.gids.nl/nmea/#vtg
Deprecated: Use VTG instead
type GPZDA
deprecated
type GPZDA = ZDA
GPZDA represents date & time data. http://aprs.gids.nl/nmea/#zda
Deprecated: Use ZDA instead
type GSA ¶ added in v1.2.0
type GSA struct { BaseSentence Mode string // The selection mode. FixType string // The fix type. SV []string // List of satellite PRNs used for this fix. PDOP float64 // Dilution of precision. HDOP float64 // Horizontal dilution of precision. VDOP float64 // Vertical dilution of precision. // SystemID is (GNSS) System ID (NMEA 4.1+) // 1 - GPS // 2 - GLONASS // 3 - Galileo // 4 - BeiDou // 5 - QZSS // 6 - NavID (IRNSS) SystemID int64 }
GSA represents overview satellite data. http://aprs.gids.nl/nmea/#gsa https://gpsd.gitlab.io/gpsd/NMEA.html#_gsa_gps_dop_and_active_satellites
Format: $--GSA,a,a,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x.x,x.x,x.x*hh<CR><LF> Format (NMEA 4.1+): $--GSA,a,a,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x.x,x.x,x.x,x*hh<CR><LF> Example: $GNGSA,A,3,80,71,73,79,69,,,,,,,,1.83,1.09,1.47*17 Example (NMEA 4.1+): $GNGSA,A,3,13,12,22,19,08,21,,,,,,,1.05,0.64,0.83,4*0B
type GSV ¶ added in v1.2.0
type GSV struct { BaseSentence TotalMessages int64 // Total number of messages of this type in this cycle MessageNumber int64 // Message number NumberSVsInView int64 // Total number of SVs in view Info []GSVInfo // visible satellite info (0-4 of these) // SystemID is (GNSS) System ID (NMEA 4.1+) // 1 - GPS // 2 - GLONASS // 3 - Galileo // 4 - BeiDou // 5 - QZSS // 6 - NavID (IRNSS) SystemID int64 }
GSV represents the GPS Satellites in view http://aprs.gids.nl/nmea/#glgsv https://gpsd.gitlab.io/gpsd/NMEA.html#_gsv_satellites_in_view
Format: $--GSV,x,x,x,x,x,x,x,...*hh<CR><LF> Format (NMEA 4.1+): $--GSV,x,x,x,x,x,x,x,...,x*hh<CR><LF> Example: $GPGSV,3,1,11,09,76,148,32,05,55,242,29,17,33,054,30,14,27,314,24*71 Example (NMEA 4.1+): $GAGSV,3,1,09,02,00,179,,04,09,321,,07,11,134,11,11,10,227,,7*7F
type GSVInfo ¶ added in v1.2.0
type GSVInfo struct { SVPRNNumber int64 // SV PRN number, pseudo-random noise or gold code Elevation int64 // Elevation in degrees, 90 maximum Azimuth int64 // Azimuth, degrees from true north, 000 to 359 SNR int64 // SNR, 00-99 dB (null when not tracking) }
GSVInfo represents information about a visible satellite
type HBT ¶ added in v1.8.0
type HBT struct { BaseSentence // Interval is configured repeat interval in seconds (1 - 999, null) Interval float64 // OperationStatus is equipment operation status: A = ok, V = not ok OperationStatus string // MessageID is sequential message identifier (0 - 9). Counts to 9 and resets to 0. MessageID int64 }
HBT is heartbeat supervision sentence to indicate if equipment is operating normally. https://fcc.report/FCC-ID/ADB9ZWRTR100/2768717.pdf (page 1) FURUNO MARINE RADAR, model FAR-15XX manual
Format: $--HBT,x.x,A,x*hh<CR><LF> Example: $HCHBT,98.3,0.0,E,12.6,W*57
type HDG ¶ added in v1.5.0
type HDG struct { BaseSentence Heading float64 // Heading in degrees Deviation float64 // Magnetic Deviation in degrees DeviationDirection string // Magnetic Deviation direction, E = Easterly, W = Westerly Variation float64 // Magnetic Variation in degrees VariationDirection string // Magnetic Variation direction, E = Easterly, W = Westerly }
HDG is vessel heading (in degrees), deviation and variation with respect to magnetic north produced by any device or system producing magnetic reading. https://gpsd.gitlab.io/gpsd/NMEA.html#_hdg_heading_deviation_variation
Format: $--HDG,x.x,y.y,a,z.z,a*hr<CR><LF> Example: $HCHDG,98.3,0.0,E,12.6,W*57
type HDM ¶ added in v1.5.0
type HDM struct { BaseSentence Heading float64 // Heading in degrees MagneticValid bool // Heading is respect to magnetic north }
HDM is vessel heading in degrees with respect to magnetic north produced by any device or system producing magnetic heading. https://gpsd.gitlab.io/gpsd/NMEA.html#_hdm_heading_magnetic
Format: $--HDM,xxx.xx,M*hh<CR><LF> Example: $HCHDM,093.8,M*2B
type HDT ¶ added in v1.2.0
type HDT struct { BaseSentence Heading float64 // Heading in degrees True bool // Heading is relative to true north }
HDT is the Actual vessel heading in degrees True. http://aprs.gids.nl/nmea/#hdt https://gpsd.gitlab.io/gpsd/NMEA.html#_gsv_satellites_in_view
Format: $--HDT,x.x,T*hh<CR><LF> Example: $GPHDT,274.07,T*03
type HSC ¶ added in v1.6.0
type HSC struct { BaseSentence TrueHeading float64 // Heading Degrees, True TrueHeadingType string // T = True MagneticHeading float64 // Heading Degrees, Magnetic MagneticHeadingType string // M = Magnetic }
HSC - Heading steering command https://gpsd.gitlab.io/gpsd/NMEA.html#_hsc_heading_steering_command https://www.tronico.fi/OH6NT/docs/NMEA0183.pdf (page 11)
Format: $--HSC, x.x, T, x.x, M,a*hh<CR><LF> Example: $FTHSC,40.12,T,39.11,M*5E
type MDA ¶ added in v1.4.0
type MDA struct { BaseSentence PressureInch float64 InchesValid bool // I PressureBar float64 BarsValid bool // B AirTemp float64 AirTempValid bool // C or empty if no data WaterTemp float64 WaterTempValid bool // C or empty if no data RelativeHum float64 // percent to .1 AbsoluteHum float64 // percent to .1 DewPoint float64 DewPointValid bool // C or empty if no data WindDirectionTrue float64 TrueValid bool // T WindDirectionMagnetic float64 MagneticValid bool // M WindSpeedKnots float64 KnotsValid bool // N WindSpeedMeters float64 MetersValid bool // M }
MDA is the Meteorological Composite Data of air pressure, air and water temperatures and wind speed and direction https://gpsd.gitlab.io/gpsd/NMEA.html#_mda_meteorological_composite https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn:opencpn_user_manual:advanced_features:nmea_sentences#mda
Format: $--MDA,n.nn,I,n.nnn,B,n.n,C,n.C,n.n,n,n.n,C,n.n,T,n.n,M,n.n,N,n.n,M*hh<CR><LF> Example: $WIMDA,3.02,I,1.01,B,23.4,C,,,40.2,,12.1,C,19.3,T,20.1,M,13.1,N,1.1,M*62
type MTA ¶ added in v1.6.0
type MTA struct { BaseSentence Temperature float64 // temperature Unit string // unit of temperature, should be degrees Celsius }
MTA - Air Temperature (obsolete, use XDR instead) https://www.nmea.org/Assets/100108_nmea_0183_sentences_not_recommended_for_new_designs.pdf (page 7)
Format: $--MTA,x.x,C*hh<CR><LF> Example: $IIMTA,13.3,C*04
type MTK
deprecated
added in
v1.2.0
type MTK struct { BaseSentence Cmd, Flag int64 }
MTK is sentence for NMEA embedded command packet protocol, command type 001 - ACK. https://www.rhydolabz.com/documents/25/PMTK_A11.pdf https://www.sparkfun.com/datasheets/GPS/Modules/PMTK_Protocol.pdf
The maximum length of each packet is restricted to 255 bytes which is longer than NMEA0183 82 bytes.
Format: $PMTKxxx,c-c*hh<CR><LF> Example: $PMTK000*32<CR><LF>
$PMTK001,101,0*33<CR><LF>
Deprecated: use PMTK001 instead. PMTK protocol contains actually many commands. This struct is for MTK 001 ACK command.
type MTW ¶ added in v1.5.0
type MTW struct { BaseSentence Temperature float64 // Temperature, degrees CelsiusValid bool // Is unit of measurement Celsius }
MTW is sentence for mean temperature of water. https://gpsd.gitlab.io/gpsd/NMEA.html#_mtw_mean_temperature_of_water
Format: $--MTW,TT.T,C*hh<CR><LF> Example: $INMTW,17.9,C*1B
type MWD ¶ added in v1.4.0
type MWD struct { BaseSentence WindDirectionTrue float64 TrueValid bool WindDirectionMagnetic float64 MagneticValid bool WindSpeedKnots float64 KnotsValid bool WindSpeedMeters float64 MetersValid bool }
MWD Wind Direction and Speed, with respect to north. https://www.tronico.fi/OH6NT/docs/NMEA0183.pdf http://gillinstruments.com/data/manuals/OMC-140_Operator_Manual_v1.04_131117.pdf
Format: $--MWD,x.x,T,x.x,M,x.x,N,x.x,M*hh<CR><LF> Example: $WIMWD,10.1,T,10.1,M,12,N,40,M*5D
type MWV ¶ added in v1.4.0
type MWV struct { BaseSentence WindAngle float64 Reference string WindSpeed float64 WindSpeedUnit string StatusValid bool }
MWV is the Wind Speed and Angle, in relation to the vessel’s bow/centerline. https://gpsd.gitlab.io/gpsd/NMEA.html#_mwv_wind_speed_and_angle
Format: $--MWV,x.x,a,x.x,a*hh<CR><LF> Example: $WIMWV,12.1,T,10.1,N,A*27
type NotSupportedError ¶ added in v1.4.2
type NotSupportedError struct {
Prefix string
}
NotSupportedError is returned when parsed sentence is not supported
func (*NotSupportedError) Error ¶ added in v1.4.2
func (p *NotSupportedError) Error() string
Error returns error message
type OSD ¶ added in v1.7.0
type OSD struct { BaseSentence // Heading is Heading in degrees Heading float64 // HeadingStatus is Heading status // * A - data valid // * V - data invalid HeadingStatus string // VesselTrueCourse is Vessel Course, degrees True VesselTrueCourse float64 // CourseReference is Course Reference, B/M/W/R/P // * B - bottom tracking log // * M - manually entered // * W - water referenced // * R - radar tracking of fixed target // * P - positioning system ground reference CourseReference string // VesselSpeed is Vessel Speed VesselSpeed float64 // SpeedReference is Speed Reference, B/M/W/R/P // * B - bottom tracking log // * M - manually entered // * W - water referenced // * R - radar tracking of fixed target // * P - positioning system ground reference. SpeedReference string // VesselSetTrue is Vessel Set, degrees True - Manually entered VesselSetTrue float64 // VesselDrift is Vessel drift (speed) - Manually entered VesselDrift float64 // SpeedUnits is Speed Units // * K - km/h // * N - Knots // * S - statute miles/h SpeedUnits string }
OSD - Own Ship Data https://gpsd.gitlab.io/gpsd/NMEA.html#_osd_own_ship_data https://github.com/nohal/OpenCPN/wiki/ARPA-targets-tracking-implementation#osd---own-ship-data
Format: $--OSD,x.x,A,x.x,a,x.x,a,x.x,x.x,a*hh<CR><LF> Example: $RAOSD,179.0,A,179.0,M,00.0,M,,,N*76
type PCDIN ¶ added in v1.9.0
type PCDIN struct { BaseSentence PGN uint32 // PGN of NMEA2000 packet Timestamp uint32 // ticks since something Source uint8 // 0-255 Data []byte // can be more than 8 bytes i.e can contain assembled fast packets }
PCDIN - SeaSmart.Net Protocol transfers NMEA2000 message as NMEA0183 sentence http://www.seasmart.net/pdf/SeaSmart_HTTP_Protocol_RevG_043012.pdf (SeaSmart.Net Protocol Specification Version 1.7)
Note: older SeaSmart.Net Protocol versions have different amount of fields
Format: $PCDIN,hhhhhh,hhhhhhhh,hh,h--h*hh<CR><LF> Example: $PCDIN,01F112,000C72EA,09,28C36A0000B40AFD*56
type PGN ¶ added in v1.9.0
type PGN struct { BaseSentence PGN uint32 // PGN of NMEA2000 packet IsSend bool // is this sentence received or for sending Priority uint8 // 0-7 Address uint8 // depending on the IsSend field this is Source Address of received packet or Destination for send packet Data []byte // 1-8 bytes. This is single N2K frame. N2K Fast-packets should be assembled from individual frames }
PGN - transferring single NMEA2000 frame as NMEA0183 sentence https://opencpn.org/wiki/dokuwiki/lib/exe/fetch.php?media=opencpn:software:mxpgn_sentence.pdf
Format: $--PGN,pppppp,aaaa,c--c*hh<CR><LF> Example: $MXPGN,01F112,2807,FC7FFF7FFF168012*11
type PGRME ¶
type PGRME struct { BaseSentence Horizontal float64 // Estimated horizontal position error (HPE) in metres Vertical float64 // Estimated vertical position error (VPE) in metres Spherical float64 // Overall spherical equivalent position error in meters }
PGRME is Estimated Position Error (Garmin proprietary sentence) http://aprs.gids.nl/nmea/#rme https://gpsd.gitlab.io/gpsd/NMEA.html#_pgrme_garmin_estimated_error
Format: $PGRME,hhh,M,vvv,M,ttt,M*hh<CR><LF> Example: $PGRME,3.3,M,4.9,M,6.0,M*25
type PHTRO ¶ added in v1.5.0
type PHTRO struct { BaseSentence Pitch float64 // Pitch in degrees Bow string // "M" for bow up and "P" for bow down (2 digits after the decimal point) Roll float64 // Roll in degrees Port string // "B" for port down and "T" for port up (2 digits after the decimal point) }
PHTRO is proprietary sentence for vessel pitch and roll. https://www.igp.de/manuals/7-INS-InterfaceLibrary_MU-INSIII-AN-001-O.pdf (page 172)
Format: $PHTRO,x.xx,a,y.yy,b*hh<CR><LF> Example: $PHTRO,10.37,P,177.62,T*65
type PMTK001 ¶ added in v1.9.0
type PMTK001 struct { BaseSentence // Cmd is command/packet acknowledgement is sent for. // Three bytes character string. From "000" to "999". Cmd int64 // Flag is acknowledgement status for previously sent command/packet // 0 = invalid command/packet type // 1 = unsupported command packet type // 2 = valid command/packet, but action failed // 3 = valid command/packet and action succeeded Flag int64 }
PMTK001 is sentence for acknowledgement of previously sent command/packet https://www.rhydolabz.com/documents/25/PMTK_A11.pdf https://www.sparkfun.com/datasheets/GPS/Modules/PMTK_Protocol.pdf
The maximum length of each packet is restricted to 255 bytes which is longer than NMEA0183 82 bytes.
Format: $PMTK001,c-c,d*hh<CR><LF> Example: $PMTK001,101,0*33<CR><LF>
type PRDID ¶ added in v1.5.0
type PRDID struct { BaseSentence Pitch float64 // Pitch in degrees (positive bow up) Roll float64 // Roll in degrees (positive port up) Heading float64 // True heading in degrees }
PRDID is proprietary sentence for vessel pitch, roll and heading. https://www.xsens.com/hubfs/Downloads/Manuals/MT_Low-Level_Documentation.pdf (page 37)
Format: $PRDID,aPPP.PP,bRRR.RR,HHH.HH*hh<CR><LF> Example: $PRDID,-10.37,2.34,230.34*AA
type PSKPDPT ¶ added in v1.8.0
type PSKPDPT struct { BaseSentence // Depth is water depth relative to transducer, meters Depth float64 // Offset from transducer, meters Offset float64 // RangeScale is Maximum range scale in use, meters RangeScale float64 // BottomEchoStrength is Bottom echo strength (0,9) BottomEchoStrength int64 // ChannelNumber is Echo sounder channel number (0-99) (1 = 38 kHz. 2 = 50 kHz. 3 = 200 kHz) ChannelNumber int64 // TransducerLocation is Transducer location. Text string, indicating transducer position: FWD/AFT/PORT/STB. // If position is not preset by operator, empty field is provided. TransducerLocation string }
PSKPDPT - Depth of Water for multiple transducer installation https://www.alphatronmarine.com/files/products/120-echonav-skipper-gds101-instoper-manual-12-6-2017_1556099135_47f5f8d1.pdf (page 56, Edition: 2017.06.12) https://www.kongsberg.com/globalassets/maritime/km-products/product-documents/164821aa_rd301_instruction_manual_lr.pdf (page 2, 857-164821aa)
Format: $PSKPDPT,x.x,x.x,x.x,xx,xx,c--c*hh<CR><LF> Example: $PSKPDPT,0002.5,+00.0,0010,10,03,*77
type PSONCMS ¶ added in v1.5.0
type PSONCMS struct { BaseSentence Quaternion0 float64 // q0 from quaternions Quaternion1 float64 // q1 from quaternions Quaternion2 float64 // q2 from quaternions Quaternion3 float64 // q3 from quaternions AccelerationX float64 // acceleration X in m/s2 AccelerationY float64 // acceleration Y in m/s2 AccelerationZ float64 // acceleration Z in m/s2 RateOfTurnX float64 // rate of turn X in rad/s RateOfTurnY float64 // rate of turn Y in rad/s RateOfTurnZ float64 // rate of turn Z in rad/s MagneticFieldX float64 // magnetic field X in a.u. MagneticFieldY float64 // magnetic field Y in a.u. MagneticFieldZ float64 // magnetic field Z in a.u. SensorTemperature float64 // sensor temperature in degrees Celsius }
PSONCMS is proprietary Xsens IMU/VRU/AHRS device sentence for quaternion, acceleration, rate of turn, magnetic Field, sensor temperature. https://www.xsens.com/hubfs/Downloads/Manuals/MT_Low-Level_Documentation.pdf (page 37)
Format: $PSONCMS,Q.QQQQ,P.PPPP,R.RRRR,S.SSSS,XX.XXXX,YY.YYYY,ZZ.ZZZZ,
FF.FFFF,GG.GGGG,HH.HHHH,NN.NNNN,MM,MMMM,PP.PPPP,TT.T*hh<CR><LF>
Example: $PSONCMS,0.0905,0.4217,0.9020,-0.0196,-1.7685,0.3861,-9.6648,-0.0116,0.0065,-0.0080,0.0581,0.3846,0.7421,33.1*76
type Parser ¶ added in v1.2.0
type Parser struct { BaseSentence // contains filtered or unexported fields }
Parser provides a simple way of accessing and parsing sentence fields
func (*Parser) AssertType ¶ added in v1.2.0
AssertType makes sure the sentence's type matches the provided one.
func (*Parser) Date ¶ added in v1.2.0
Date returns the Date value at the specified index. If the value is empty, the Date is marked as invalid.
func (*Parser) EnumChars ¶ added in v1.2.0
EnumChars returns an array of strings that are matched in the Mode field. It will only match the number of characters that are in the Mode field. If the value is empty, it will return an empty array
func (*Parser) EnumString ¶ added in v1.2.0
EnumString returns the field value at the specified index. An error occurs if the value is not one of the options and not empty.
func (*Parser) Err ¶ added in v1.2.0
Err returns the first error encountered during the parser's usage.
func (*Parser) Float64 ¶ added in v1.2.0
Float64 returns the float64 value at the specified index. If the value is an empty string, 0 is returned.
func (*Parser) HexInt64 ¶ added in v1.8.0
HexInt64 returns the hex encoded int64 value at the specified index. If the value is an empty string, 0 is returned.
func (*Parser) Int64 ¶ added in v1.2.0
Int64 returns the int64 value at the specified index. If the value is an empty string, 0 is returned.
func (*Parser) LatLong ¶ added in v1.2.0
LatLong returns the coordinate value of the specified fields.
func (*Parser) ListString ¶ added in v1.2.0
ListString returns a list of all fields from the given start index. An error occurs if there is no fields after the given start index.
func (*Parser) NullFloat64 ¶ added in v1.8.0
NullFloat64 returns the Float64 value at the specified index. If the value is an empty string, Valid is set to false.
func (*Parser) NullInt64 ¶ added in v1.8.0
NullInt64 returns the int64 value at the specified index. If the value is an empty string, Valid is set to false
func (*Parser) SetErr ¶ added in v1.2.0
SetErr assigns an error. Calling this method has no effect if there is already an error.
func (*Parser) SixBitASCIIArmour ¶ added in v1.2.0
SixBitASCIIArmour decodes the 6-bit ascii armor used for VDM and VDO messages
type ParserFunc ¶ added in v1.2.0
type ParserFunc func(s BaseSentence) (Sentence, error)
ParserFunc callback used to parse specific sentence variants
type Query ¶ added in v1.9.0
type Query struct { BaseSentence DestinationTalkerID string RequestedSentence string }
Query sentences is special type of sentence for a listener to request a particular sentence from a talker. https://www.tronico.fi/OH6NT/docs/NMEA0183.pdf (page 3)
Format: $ttllQ,sss*hh<CR><LF> Example: $CCGPQ,GGA*2B<CR><LF>
type RMB ¶ added in v1.6.0
type RMB struct { BaseSentence // DataStatus is status of data, // * A = OK // * V = Navigation receiver warning DataStatus string // Cross Track error (nautical miles, 9.9 max) CrossTrackErrorNauticalMiles float64 // DirectionToSteer is Direction to steer, // * L = left // * R = right DirectionToSteer string // OriginWaypointID is origin (FROM) waypoint ID OriginWaypointID string // DestinationWaypointID is destination (TO) waypoint ID DestinationWaypointID string // DestinationLatitude is destination waypoint latitude DestinationLatitude float64 // DestinationLongitude is destination waypoint longitude DestinationLongitude float64 // RangeToDestinationNauticalMiles is range to destination, nautical miles (999,9 max) RangeToDestinationNauticalMiles float64 // TrueBearingToDestination is true bearing to destination, degrees TrueBearingToDestination float64 // VelocityToDestinationKnots is velocity towards destination, knots VelocityToDestinationKnots float64 // ArrivalStatus is Arrival Status // * A = arrival circle entered // * V = not arrived ArrivalStatus string // FAA mode indicator (filled in NMEA 2.3 and later) FFAMode string }
RMB - Recommended Minimum Navigation Information. To be sent by a navigation receiver when a destination waypoint is active. Alternative to BOD and BWW sentences. https://gpsd.gitlab.io/gpsd/NMEA.html#_rmb_recommended_minimum_navigation_information http://aprs.gids.nl/nmea/#rmb
Format: $--RMB,A,x.x,a,c--c,c--c,llll.ll,a,yyyyy.yy,a,x.x,x.x,x.x,A*hh<CR><LF> Format (NMEA2.3+): $--RMB,A,x.x,a,c--c,c--c,llll.ll,a,yyyyy.yy,a,x.x,x.x,x.x,A,m*hh<CR><LF> Example: $GPRMB,A,0.66,L,003,004,4917.24,N,12309.57,W,001.3,052.5,000.5,V*0B
type RMC ¶ added in v1.2.0
type RMC struct { BaseSentence Time Time // Time Stamp Validity string // validity - A-ok, V-invalid Latitude float64 // Latitude Longitude float64 // Longitude Speed float64 // Speed in knots Course float64 // True course Date Date // Date Variation float64 // Magnetic variation FFAMode string // FAA mode indicator (filled in NMEA 2.3 and later) }
RMC is the Recommended Minimum Specific GNSS data. http://aprs.gids.nl/nmea/#rmc https://gpsd.gitlab.io/gpsd/NMEA.html#_rmc_recommended_minimum_navigation_information
Format: $--RMC,hhmmss.ss,A,ddmm.mm,a,dddmm.mm,a,x.x,x.x,xxxx,x.x,a*hh<CR><LF> Format NMEA 2.3: $--RMC,hhmmss.ss,A,ddmm.mm,a,dddmm.mm,a,x.x,x.x,xxxx,x.x,a,m*hh<CR><LF> Format NMEA 4.1: $--RMC,hhmmss.ss,A,ddmm.mm,a,dddmm.mm,a,x.x,x.x,xxxx,x.x,a,m,s*hh<CR><LF> Example: $GNRMC,220516,A,5133.82,N,00042.24,W,173.8,231.8,130694,004.2,W*6E
$GNRMC,142754.0,A,4302.539570,N,07920.379823,W,0.0,,070617,0.0,E,A*21 $GNRMC,102014.00,A,5550.6082,N,03732.2488,E,000.00000,092.9,300518,,,A,V*3B
type ROT ¶ added in v1.5.0
type ROT struct { BaseSentence RateOfTurn float64 // rate of turn Z in deg/min (- means bow turns to port) Valid bool // "A" data valid, "V" invalid data }
ROT is sentence for rate of turn. https://gpsd.gitlab.io/gpsd/NMEA.html#_rot_rate_of_turn
Format: $HEROT,-xxx.x,A*hh<CR><LF> Example: $HEROT,-11.23,A*07
type RPM ¶ added in v1.6.0
type RPM struct { BaseSentence Source string // Source, S = Shaft, E = Engine EngineNumber int64 // Engine or shaft number SpeedRPM float64 // Speed, Revolutions per minute PitchPercent float64 // Propeller pitch, % of maximum, "-" means astern Status string // Status, A = Valid, V = Invalid }
RPM - Engine or Shaft revolutions and pitch https://gpsd.gitlab.io/gpsd/NMEA.html#_rpm_revolutions
Format: $--RPM,a,x,x.x,x.x,A*hh<CR><LF> Example: $RCRPM,S,0,74.6,30.0,A*56
type RSA ¶ added in v1.6.0
type RSA struct { BaseSentence StarboardRudderAngle float64 // Starboard (or single) rudder sensor, "-" means Turn To Port StarboardRudderAngleStatus string // Status, A = valid, V = Invalid PortRudderAngle float64 // Port rudder sensor PortRudderAngleStatus string // Status, A = valid, V = Invalid }
RSA - Rudder Sensor Angle https://gpsd.gitlab.io/gpsd/NMEA.html#_rsa_rudder_sensor_angle
Format: $--RSA,x.x,A,x.x,A*hh<CR><LF> Example: $IIRSA,10.5,A,,V*4D
type RSD ¶ added in v1.7.0
type RSD struct { BaseSentence Origin1Range float64 // Origin 1 range Origin1Bearing float64 // Origin 1 bearing (degrees from 0°) VariableRangeMarker1 float64 // Variable Range Marker 1 BearingLine1 float64 // Bearing Line 1 Origin2Range float64 // Origin 2 range Origin2Bearing float64 // Origin 2 bearing (degrees from 0°) VariableRangeMarker2 float64 // Variable Range Marker 2 BearingLine2 float64 // Bearing Line 2 CursorRangeFromOwnShip float64 // Cursor Range From Own Ship CursorBearingDegrees float64 // Cursor Bearing (degrees clockwise from 0°) RangeScale float64 // Range scale RangeUnit string // Range units (K = kilometers, N = nautical miles, S = statute miles) DisplayRotation string // Display rotation (C = course up, H = heading up, N - North up) }
RSD - RADAR System Data https://gpsd.gitlab.io/gpsd/NMEA.html#_rsd_radar_system_data https://github.com/nohal/OpenCPN/wiki/ARPA-targets-tracking-implementation#rsd---radar-system-data
Format: $--RSD,x.x,x.x,x.x,x.x,x.x,x.x,x.x,x.x,x.x,x.x,x.x,a,a*hh<CR><LF> Example: $RARSD,0.00,,2.50,005.0,0.00,,4.50,355.0,,,3.0,N,H*51 Example: $RARSD,,,,,,,,,0.808,326.9,0.750,N,N*58 Example: $RARSD,0.00,,0.40,,,,,,,,3.0,N,N*53
type RTE ¶ added in v1.2.0
type RTE struct { BaseSentence NumberOfSentences int64 // Number of sentences in sequence SentenceNumber int64 // Sentence number ActiveRouteOrWaypointList string // Current active route or waypoint list Name string // Name or number of active route Idents []string // List of ident of waypoints }
RTE is a route of waypoints http://aprs.gids.nl/nmea/#rte https://gpsd.gitlab.io/gpsd/NMEA.html#_rte_routes
Format: $--RTE,x.x,x.x,a,c--c,c--c, ..... c--c*hh<CR><LF> Example: $GPRTE,2,1,c,0,PBRCPK,PBRTO,PTELGR,PPLAND,PYAMBU,PPFAIR,PWARRN,PMORTL,PLISMR*73
type SentenceParser ¶ added in v1.9.0
type SentenceParser struct { // CustomParsers allows registering additional parsers CustomParsers map[string]ParserFunc // ParsePrefix takes in the sentence first field (NMEA0183 address) and splits it into a talker id and sentence type ParsePrefix func(prefix string) (talkerID string, sentence string, err error) // CheckCRC allows custom handling of checksum checking based on parsed sentence CheckCRC func(sentence BaseSentence, rawFields string) error // OnTagBlock is callback to handle all parsed tag blocks even for lines containing only a tag block and // allows to track multiline tag group separate lines. Logic how to combine/assemble multiline tag group // should be implemented outside SentenceParser // OnTagBlock is called before actual sentence part is parsed. When callback returns an error sentence parsing will // not be done and Parse returns early with the returned error. // // Example of group of 3: // \g:1-3-1234,s:r3669961,c:1120959341*hh\ // \g:2-3-1234*hh\!ABVDM,1,1,1,B,.....,0*hh // \g:3-3-1234*hh\$ABVSI,r3669961,1,013536.96326433,1386,-98,,*hh OnTagBlock func(tagBlock TagBlock) error // OnBaseSentence is a callback for accessing/modifying the base sentence // before further parsing is done. OnBaseSentence func(sentence *BaseSentence) error }
SentenceParser is configurable parser instance to parse raw input into NMEA0183 Sentence
SentenceParser fields/methods are not co-routine safe!
type THS ¶ added in v1.2.0
type THS struct { BaseSentence Heading float64 // Heading in degrees Status string // Heading status }
THS is the Actual vessel heading in degrees True with status. http://www.nuovamarea.net/pytheas_9.html http://manuals.spectracom.com/VSP/Content/VSP/NMEA_THSmess.htm
Format: $--THS,xxx.xx,c*hh<CR><LF> Example: $GPTHS,338.01,A*36
type TLB ¶ added in v1.8.0
type TLB struct { BaseSentence Targets []TLBTarget }
TLB is sentence for target label. https://fcc.report/FCC-ID/ADB9ZWRTR100/2768717.pdf (page 8) FURUNO MARINE RADAR, model FAR-15XX manual
Format: $--TLB,x.x,c--c,x.x,c--c,...x.x,c--c*hh<CR><LF> Example: $CDTLB,1,XXX,2.0,YYY*41
type TLBTarget ¶ added in v1.8.0
type TLBTarget struct { // TargetNumber is target number “n” reported by the device (1 - 1023) TargetNumber float64 // TargetLabel is label assigned to target “n” (TT=000 - 999, AIS=000000000 - 999999999). Could be empty. TargetLabel string }
TLBTarget is instance of target for TLB sentence
type TLL ¶ added in v1.7.0
type TLL struct { BaseSentence TargetNumber int64 // Target number 00 – 99 TargetLatitude float64 // Target latitude + N/S TargetLongitude float64 // Target longitude + E/W TargetName string // Target name TimeUTC Time // UTC of data, hh is hours, mm is minutes, ss.ss is seconds. TargetStatus string // Target status (L=lost, Q=acquisition, T=tracking) ReferenceTarget string // Reference target, R= reference target; null (,,)= otherwise }
TLL - Target latitude and longitude https://gpsd.gitlab.io/gpsd/NMEA.html#_tll_target_latitude_and_longitude https://github.com/nohal/OpenCPN/wiki/ARPA-targets-tracking-implementation#tll---target-latitude-and-longitude
Format: $--TLL,xx,llll.ll,a,yyyyy.yy,a,c--c,hhmmss.ss,a,a*hh<CR><LF> Example: $RATLL,,3647.422,N,01432.592,E,,,,*58
type TTD ¶ added in v1.8.0
type TTD struct { BaseSentence // NumFragments is total hex number of fragments/sentences need to transfer the message (1 - FF) NumFragments int64 // 0 // FragmentNumber is current fragment/sentence number (1 - FF) FragmentNumber int64 // 1 // MessageID is sequential message identifier (0 - 9, null) MessageID int64 // 2 // Payload is encapsulated tracked target data (6 bit binary-converted data) Payload []byte // 3 }
TTD is sentence used by radars to transmit tracked targets data. https://fcc.report/FCC-ID/ADB9ZWRTR100/2768717.pdf (page 1) FURUNO MARINE RADAR, model FAR-15XX manual
Format: !--TTD,hh,hh,x,s--s,x*hh<CR><LF> Example: !RATTD,1A,01,1,177KQJ5000G?tO`K>RA1wUbN0TKH,0*5C
type TTM ¶ added in v1.7.0
type TTM struct { BaseSentence TargetNumber int64 // Target number 00 – 99 TargetDistance float64 // Target Distance Bearing float64 // Bearing from own ship, degrees BearingType string // Type of target Bearing, T = True, R = Relative TargetSpeed float64 // Target Speed TargetCourse float64 // Target Course CourseType string // target course type, T = True, R = Relative DistanceCPA float64 // Distance of closest-point-of-approach TimeCPA float64 // Time until closest-point-of-approach "-" means increasing SpeedUnits string // Speed/distance units, K/N/S TargetName string // Target name TargetStatus string // Target status (L=lost, Q=acquisition, T=tracking) ReferenceTarget string // Reference target, R= reference target; null (,,)= otherwise TimeUTC Time // UTC of data, hh is hours, mm is minutes, ss.ss is seconds. TypeOfAcquisition string // Type, A = Auto, M = Manual, R = Reported }
TTM - Tracked Target Message https://gpsd.gitlab.io/gpsd/NMEA.html#_ttm_tracked_target_message https://github.com/nohal/OpenCPN/wiki/ARPA-targets-tracking-implementation#ttm---tracked-target-message
Format: $--TTM,xx,x.x,x.x,a,x.x,x.x,a,x.x,x.x,a,c--c,a,a*hh<CR><LF> Format: $--TTM,xx,x.x,x.x,a,x.x,x.x,a,x.x,x.x,a,c--c,a,a,hhmmss.ss,a*hh<CR><LF> Example: $RATTM,02,1.43,170.5,T,0.16,264.4,T,1.42,36.9,N,,T,,,M*2A
type TXT ¶ added in v1.5.0
type TXT struct { BaseSentence TotalNumber int64 // total number of sentences, 01 to 99 Number int64 // number of current sentences, 01 to 99 ID int64 // identifier of the text message, 01 to 99 // Message contains ASCII characters, and code delimiters if needed, up to the maximum permitted sentence length // (i.e., up to 61 characters including any code delimiters) Message string }
TXT is sentence for the transmission of short text messages, longer text messages may be transmitted by using multiple sentences. This sentence is intended to convey human readable textual information for display purposes. The TXT sentence shall not be used for sending commands and making device configuration changes. https://www.nmea.org/Assets/20160520%20txt%20amendment.pdf
Format: $--TXT,xx,xx,xx,c-c*hh<CR><LF> Example: $GNTXT,01,01,02,u-blox AG - www.u-blox.com*4E
type TagBlock ¶ added in v1.3.0
type TagBlock struct { Time int64 // TypeUnixTime unix timestamp (unit is likely to be s, but might be ms, YMMV), parameter: -c RelativeTime int64 // TypeRelativeTime relative time, parameter: -r Destination string // TypeDestinationID destination identification 15 char max, parameter: -d Grouping string // TypeGrouping sentence grouping, parameter: -g LineCount int64 // TypeLineCount line count, parameter: -n Source string // TypeSourceID source identification 15 char max, parameter: -s Text string // TypeTextString valid character string, parameter -t }
TagBlock struct
func ParseTagBlock ¶ added in v1.9.0
ParseTagBlock parses tag blocks from a sentence string. The second return value is the length of the tag block prefix. See: https://gpsd.gitlab.io/gpsd/AIVDM.html#_nmea_tag_blocks
type Time ¶
Time type
type VBW ¶ added in v1.7.0
type VBW struct { BaseSentence LongitudinalWaterSpeedKnots float64 // longitudinal water speed, "-" means astern, knots TransverseWaterSpeedKnots float64 // transverse water speed, "-" means port, knots WaterSpeedStatusValid bool // A = true WaterSpeedStatus string // A = valid, V = invalid LongitudinalGroundSpeedKnots float64 // longitudinal ground speed, "-" means astern, knots TransverseGroundSpeedKnots float64 // transverse ground speed, "-" means port, knots GroundSpeedStatusValid bool // A = true GroundSpeedStatus string // A = valid, V = invalid SternTraverseWaterSpeedKnots float64 // Stern traverse water speed, knots (NMEA 3 and above) SternTraverseWaterSpeedStatusValid bool // A = true SternTraverseWaterSpeedStatus string // A = valid, V = invalid (NMEA 3 and above) SternTraverseGroundSpeedKnots float64 // Stern traverse ground speed, knots (NMEA 3 and above) SternTraverseGroundSpeedStatusValid bool // A = true SternTraverseGroundSpeedStatus string // A = valid, V = invalid (NMEA 3 and above) }
VBW - Dual Ground/Water Speed https://gpsd.gitlab.io/gpsd/NMEA.html#_vbw_dual_groundwater_speed
Format: $--VBW,x.x,x.x,A,x.x,x.x,A,x.x,A,x.x,A*hh<CR><LF> Example: $VMVBW,-7.1,0.1,A,,,V,,V,,V*65
type VDMVDO ¶ added in v1.2.0
type VDMVDO struct { BaseSentence NumFragments int64 FragmentNumber int64 MessageID int64 Channel string Payload []byte }
VDMVDO is sentence ($--VDM or $--VDO) used to encapsulate generic binary payloads. It is most commonly used with AIS data. https://gpsd.gitlab.io/gpsd/AIVDM.html
Format: !--VDO,x,x,x,a,s--s,x*hh<CR><LF> Format: !--VDM,x,x,x,a,s--s,x*hh<CR><LF> Example: !AIVDM,1,1,,B,177KQJ5000G?tO`K>RA1wUbN0TKH,0*5C
type VDR ¶ added in v1.6.0
type VDR struct { BaseSentence SetDegreesTrue float64 // Direction degrees, True SetDegreesTrueUnit string // T = True SetDegreesMagnetic float64 // Direction degrees, True SetDegreesMagneticUnit string // M = Magnetic DriftKnots float64 // Current speed, knots DriftUnit string // N = Knots }
VDR - Set and Drift In navigation, set and drift are characteristics of the current and velocity of water over the ground in which a ship is sailing. Set is the bearing the current is flowing. Drift is the magnitude of the current. https://gpsd.gitlab.io/gpsd/NMEA.html#_vdr_set_and_drift
Format: $--VDR,x.x,T,x.x,M,x.x,N*hh<CR><LF> Example: $IIVDR,10.1,T,12.3,M,1.2,N*3A
type VHW ¶ added in v1.2.0
type VHW struct { BaseSentence TrueHeading float64 MagneticHeading float64 SpeedThroughWaterKnots float64 SpeedThroughWaterKPH float64 }
VHW contains information about water speed and heading https://gpsd.gitlab.io/gpsd/NMEA.html#_vhw_water_speed_and_heading
Format: $--VHW,x.x,T,x.x,M,x.x,N,x.x,K*hh<CR><LF> Example: $VWVHW,45.0,T,43.0,M,3.5,N,6.4,K*56
type VLW ¶ added in v1.6.0
type VLW struct { BaseSentence TotalInWater float64 // Total cumulative water distance, nm TotalInWaterUnit string // N = Nautical Miles SinceResetInWater float64 // Water distance since Reset, nm SinceResetInWaterUnit string // N = Nautical Miles TotalOnGround float64 // Total cumulative ground distance, nm (NMEA 3 and above) TotalOnGroundUnit string // N = Nautical Miles (NMEA 3 and above) SinceResetOnGround float64 // Ground distance since reset, nm (NMEA 3 and above) SinceResetOnGroundUnit string // N = Nautical Miles (NMEA 3 and above) }
VLW - Distance Traveled through Water https://gpsd.gitlab.io/gpsd/NMEA.html#_vlw_distance_traveled_through_water
Format: $--VLW,x.x,N,x.x,N*hh<CR><LF> Format (NMEA 3+): $--VLW,x.x,N,x.x,N,x.x,N,x.x,N*hh<CR><LF> Example: $IIVLW,10.1,N,3.2,N*7C Example: $IIVLW,10.1,N,3.2,N,0,N,0,N*7C
type VPW ¶ added in v1.6.0
type VPW struct { BaseSentence SpeedKnots float64 // Speed, "-" means downwind, knots SpeedKnotsUnit string // N = knots SpeedMPS float64 // Speed, "-" means downwind, m/s SpeedMPSUnit string // M = m/s }
VPW - Speed Measured Parallel to Wind https://gpsd.gitlab.io/gpsd/NMEA.html#_vpw_speed_measured_parallel_to_wind
Format: $--VPW,x.x,N,x.x,M*hh<CR><LF> Example: $IIVPW,4.5,N,6.7,M*52
type VSD ¶ added in v1.8.0
type VSD struct { BaseSentence // From: https://www.itu.int/rec/R-REC-M.1371-5-201402-I/en (page 113) // * null means unchanged // * 0 = not available or no ship = default // * 1-99 = as defined in § 3.3.2 // * 100-199 = reserved, for regional use // * 200-255 = reserved, for future use TypeOfShipAndCargo Int64 // 0 // StaticDraughtMeters is maximum present static draught in meters (0 - 25.5, null). null means unchanged, 0 means not available StaticDraughtMeters Float64 // 1 // Persons on-board (0 - 8191, null) PersonsOnBoard Int64 // 2 // Destination (Alphanumeric character, null) Destination string // 3 // Estimated UTC of arrival at destination (000000.00 - 246000.00*, null), null means unchanged EstimatedArrivalTime Int64 // 4 // Estimated day of arrival at destination (00 - 31) (UTC), null means unchanged EstimatedArrivalDay Int64 // 5 // Estimated month of arrival at destination (00 - 12) (UTC), null means unchanged EstimatedArrivalMonth Int64 // 6 // Source: https://www.itu.int/dms_pubrec/itu-r/rec/m/R-REC-M.1371-5-201402-I!!PDF-E.pdf (page 111) // null - unchanged // 0 - Under way using engine // 1 - At anchor // 2 - Not under command // 3 - Restricted maneuverability // 4 - Constrained by her draught // 5 - Moored // 6 - Aground // 7 - Engaged in Fishing // 8 - Under way sailing // 9 - HSC // 10 - WIG // 11 - Power-driven vessel towing astern // 12 - Power-driven vessel pushing ahead or towing alongside // 13 - Reserved for future use // 14 - AIS-SART (active), MOB-AIS, EPIRB-AIS // 15 - Undefined = default (also used by AIS-SART, MOB-AIS and EPIRB AIS under test) NavigationalStatus Int64 // 7 // RegionalApplication is Regional application flags, null means unchanged. Reference ITU-R M.1371, Message 1, reserved for regional applications. RegionalApplication Int64 // 8 }
VSD is sentence for AIS voyage static data. https://fcc.report/FCC-ID/ADB9ZWRTR100/2768717.pdf (page 10) FURUNO MARINE RADAR, model FAR-15XX manual http://www.annoyingdesigns.com/vsd/VSDControl.pdf
Format: $--VSD,x.x,x.x,x.x,c--c,hhmmss.ss,xx,xx,x.x,x.x*hh<CR><LF> Example: $RAVSD,0,4.5,6,@@@@@@@@@@@@@@@@@@@@,220516,01,02,8,*12<CR><LF>
type VTG ¶ added in v1.2.0
type VTG struct { BaseSentence TrueTrack float64 MagneticTrack float64 GroundSpeedKnots float64 GroundSpeedKPH float64 FFAMode string // FAA mode indicator (filled in NMEA 2.3 and later) }
VTG represents track & speed data. http://aprs.gids.nl/nmea/#vtg https://gpsd.gitlab.io/gpsd/NMEA.html#_vtg_track_made_good_and_ground_speed
Format: $--VTG,x.x,T,x.x,M,x.x,N,x.x,K*hh<CR><LF> Format (NMEA 2.3+): $--VTG,x.x,T,x.x,M,x.x,N,x.x,K,m*hh<CR><LF> Example: $GPVTG,45.5,T,67.5,M,30.45,N,56.40,K*4B
$GPVTG,220.86,T,,M,2.550,N,4.724,K,A*34
type VWR ¶ added in v1.6.0
type VWR struct { BaseSentence MeasuredAngle float64 // Measured Wind direction magnitude in degrees (0 to 180 deg) MeasuredDirectionBow string // Measured Wind direction Left/Right of bow SpeedKnots float64 // Measured wind Speed, knots SpeedKnotsUnit string // N = knots SpeedMPS float64 // Wind speed, meters/second SpeedMPSUnit string // M = m/s SpeedKPH float64 // Wind speed, km/hour SpeedKPHUnit string // M = km/h }
VWR - Relative Wind Speed and Angle. Speed is measured relative to the moving vessel. According to NMEA: use of $--MWV is recommended. https://gpsd.gitlab.io/gpsd/NMEA.html#_vwr_relative_wind_speed_and_angle https://www.nmea.org/Assets/100108_nmea_0183_sentences_not_recommended_for_new_designs.pdf (page 16)
Format: $--VWR,x.x,a,x.x,N,x.x,M,x.x,K*hh<CR><LF> Example: $IIVWR,75,R,1.0,N,0.51,M,1.85,K*6C
$IIVWR,024,L,018,N,,,,*5e $IIVWR,,,,,,,,*53
type VWT ¶ added in v1.6.0
type VWT struct { BaseSentence TrueAngle float64 // true Wind direction magnitude in degrees (0 to 180 deg) TrueDirectionBow string // true Wind direction Left/Right of bow SpeedKnots float64 // true wind Speed, knots SpeedKnotsUnit string // N = knots SpeedMPS float64 // Wind speed, meters/second SpeedMPSUnit string // M = m/s SpeedKPH float64 // Wind speed, km/hour SpeedKPHUnit string // M = km/h }
VWT - True Wind Speed and Angle https://www.nmea.org/Assets/100108_nmea_0183_sentences_not_recommended_for_new_designs.pdf https://www.rubydoc.info/gems/nmea_plus/1.0.20/NMEAPlus/Message/NMEA/VWT https://lists.gnu.org/archive/html/gpsd-dev/2012-04/msg00048.html
Format: $--VWT,x.x,a,x.x,N,x.x,M,x.x,K*hh<CR><LF> Example: $IIVWT,75,x,1.0,N,0.51,M,1.85,K*40
type WPL ¶ added in v1.2.0
type WPL struct { BaseSentence Latitude float64 // Latitude Longitude float64 // Longitude Ident string // Ident of nth waypoint }
WPL contains information about a waypoint location http://aprs.gids.nl/nmea/#wpl https://gpsd.gitlab.io/gpsd/NMEA.html#_wpl_waypoint_location
Format: $--WPL,llll.ll,a,yyyyy.yy,a,c--c*hh<CR><LF> Example: $IIWPL,5503.4530,N,01037.2742,E,411*6F
type XDR ¶ added in v1.6.0
type XDR struct { BaseSentence Measurements []XDRMeasurement }
XDR - Transducer Measurement https://gpsd.gitlab.io/gpsd/NMEA.html#_xdr_transducer_measurement https://www.eye4software.com/hydromagic/documentation/articles-and-howtos/handling-nmea0183-xdr/
Format: $--XDR,a,x.x,a,c--c, ..... *hh<CR><LF> Example: $HCXDR,A,171,D,PITCH,A,-37,D,ROLL,G,367,,MAGX,G,2420,,MAGY,G,-8984,,MAGZ*41
$SDXDR,C,23.15,C,WTHI*70
type XDRMeasurement ¶ added in v1.6.0
type XDRMeasurement struct { // TransducerType is type of transducer // * A - Angular displacement // * C - Temperature // * D - Depth // * F - Frequency // * H - Humidity // * N - Force // * P - Pressure // * R - Flow // * B - Absolute humidity // * G - Generic // * I - Current // * L - Salinity // * S - Switch, valve // * T - Tachometer // * U - Voltage // * V - Volume // could be more TransducerType string // Value of measurement Value float64 // Unit of measurement // * "" - could be empty! // * A - Amperes // * B - Bars | Binary // * C - Celsius // * D - Degrees // * H - Hertz // * I - liters/second // * K - Kelvin | Density, kg/m3 kilogram per cubic metre // * M - Meters | Cubic Meters (m3) // * N - Newton // * P - percent of full range | Pascal // * R - RPM // * S - Parts per thousand // * V - Volts // could be more Unit string // TransducerName is name of transducer where measurement was recorded TransducerName string }
XDRMeasurement is measurement recorded by transducer
type XTE ¶ added in v1.6.0
type XTE struct { BaseSentence // StatusGeneralWarning is used for warnings // * V = LORAN-C Blink or SNR warning // * A = general warning flag or other navigation systems when a reliable fix is not available StatusGeneralWarning string // StatusLockWarning is used for lock warning // * V = Loran-C Cycle Lock warning flag // * A = OK or not used StatusLockWarning string // CrossTrackErrorMagnitude is Cross Track Error Magnitude CrossTrackErrorMagnitude float64 // DirectionToSteer is Direction to steer, // * L = left // * R = right DirectionToSteer string // CrossTrackUnits is cross track units // * N = nautical miles // * K = for kilometers CrossTrackUnits string // FAA mode indicator (filled in NMEA 2.3 and later) FFAMode string }
XTE - Cross-track error, measured https://gpsd.gitlab.io/gpsd/NMEA.html#_xte_cross_track_error_measured
Format: $--XTE,A,A,x.x,a,N*hh<CR><LF> Format (NMEA 2.3): $--XTE,A,A,x.x,a,N,m*hh<CR><LF> Example: $GPXTE,V,V,,,N,S*43
type ZDA ¶ added in v1.2.0
type ZDA struct { BaseSentence Time Time Day int64 Month int64 Year int64 OffsetHours int64 // Local time zone offset from GMT, hours OffsetMinutes int64 // Local time zone offset from GMT, minutes }
ZDA represents date & time data. http://aprs.gids.nl/nmea/#zda https://gpsd.gitlab.io/gpsd/NMEA.html#_zda_time_date_utc_day_month_year_and_local_time_zone
Format: $--ZDA,hhmmss.ss,xx,xx,xxxx,xx,xx*hh<CR><LF> Example: $GPZDA,172809.456,12,07,1996,00,00*57
Source Files ¶
- aam.go
- abm.go
- ack.go
- acn.go
- ala.go
- alc.go
- alf.go
- alr.go
- apb.go
- arc.go
- bbm.go
- bec.go
- bod.go
- bwc.go
- bwr.go
- bww.go
- dbk.go
- dbs.go
- dbt.go
- deprecated.go
- dor.go
- dpt.go
- dsc.go
- dse.go
- dtm.go
- eve.go
- fir.go
- gga.go
- gll.go
- gns.go
- gsa.go
- gsv.go
- hbt.go
- hdg.go
- hdm.go
- hdt.go
- hsc.go
- mda.go
- mta.go
- mtk.go
- mtw.go
- mwd.go
- mwv.go
- osd.go
- parser.go
- pcdin.go
- pgn.go
- pgrme.go
- phtro.go
- pmtk.go
- prdid.go
- pskpdpt.go
- psoncms.go
- query.go
- rmb.go
- rmc.go
- rot.go
- rpm.go
- rsa.go
- rsd.go
- rte.go
- sentence.go
- tagblock.go
- ths.go
- tlb.go
- tll.go
- ttd.go
- ttm.go
- txt.go
- types.go
- vbw.go
- vdmvdo.go
- vdr.go
- vhw.go
- vlw.go
- vpw.go
- vsd.go
- vtg.go
- vwr.go
- vwt.go
- wpl.go
- xdr.go
- xte.go
- zda.go