The NMEA protocol handler parses the NMEA 0183 protocol (f.e. from GPS devices). For input both GenericPush and GenericPull can be used in combination with File or UDP transport handler. This protocol can also be used for output, to write NMEA sentences.

Supported Sentences

IDDescriptionFields
DPTDepth of Waterdepth, offset
GGAGlobal Positioning System Fix Data. Time, Position and fix related datatime, latitude, latitudeHem, longitude, longitudeHem, gpsQuality, numberOfSattelites, horizontalDilution, antennaAltitude, antennaAltUnits, geoidalSeparation, geoidalSepUnits, ageOfDgps, differentialRefId
GLLGeographic Position – Latitude/Longitudelatitude, latitudeHem, longitude, longitudeHem, time, status
HDGHeading - Deviation & Variationheading, deviation, deviationDir, variation, variationDir
MTWWater Temperaturedegrees, unit
MWVWind Speed and Angleangle, reference, speed, speedUnit, status
RMCRecomended Minimum Navigation Informationtime, status, latitude, latitudeHem, longitude, longitudeHem, speedOverGround, trackMadeGood, date, magneticVariation, magneticHem, signalIntegrity
RPMRevolutionssource, number, speed, pitch, status
RSARudder Sensor Anglestarboard, sbStatus, portboard, pbStatus
TTMTracked Target MessagetargetNumber, targetDistance, bearing, bearingUnit, targetSpeed, targetCourse, courseUnit, closestPointOfApproach, timeUntilClosestPoint, distanceUnit, targetLabel, targetStatus, referenceTarget, time, typeAcquisition

VDM

AIS (Automatic Identification System) MessagefragmentsCount, fragmentId, messageId, channel, message, fillBits
VDOSame as VDM for own shipsee VDM
VTGTrack Made Good and Ground SpeedheadingTrack, trackReference, headingMagnetic, magneticReference, speedKnots, speedKnotsUnits, speedKilometers, speedKilometersUnits
EXTX, Y and Z acceleration data (Proprietary sentence)Acceleration X, Acceleration Y, Acceleration Z
ASHRAiding Ship Heading Rotation (Proprietary sentence)time, heading, roll angle, pitch angle, heave, roll angle accuracy, pitch angle accuracy, heading angle accuracy, aiding status, IMU status
OSDOwn Ship Dataheading, status, course, course reference, vessel speed, speed reference, vessel set, vessel drift, speed units

Default Fields

All above mentioned sentences have default fields derieved from Sentence.

FieldTypeDescription
beginCharcharThe first character, the nmea sentence starts with (e.g. $ or !)
talkerIdStringThe two digit talker ID (Single character 'P' for proprietary sentence types)
sentenceIdStringMostly three digit sentence ID for standard types mentioned in first column in table above. (Or proprietary sentences, starting with three digit manufacturer code)

 

Options

  • delay: Delay of reading in milliseconds (Only in GenericPull mode)

Example

PQL

NMEA Protocol Handler
/// Read from File
input = ACCESS({source='FileInput', wrapper='GenericPull',
	transport='File', protocol='NMEA', dataHandler='KeyValueObject',
	options=[['filename','...'], ['delay','100']]
})
 
/// Read from UDP on Port 4711
inputGps = ACCESS({source='GpsInput', wrapper='GenericPush',
	transport='UDPServer', protocol='NMEA', dataHandler='KeyValueObject',
	options=[['port', '4711']]
})
 
/// UDP Broadcast on Port 6003 
output = SENDER({sink='SinkGps', wrapper='GenericPush',
	transport='UDPClient', protocol='NMEA', dataHandler='KeyValueObject',
	options=[['host', '255.255.255.255'],['port', '6003']]
}, inputGps)

CQL

NMEA Protocol Handler
TODO

Selection/Projection

If only GPS Positions are needed, only latitude and longitude informations can be extracted from the sentences. In "Supported Sentences" table can be seen, that the sentences GGA, GLL and RMC do have the needed information. To extract this information a Selection can be done, to get only these sentence types and a Projection, to extract only the needed informations.

PQL

NMEA Selection/Projection
/// Listen on UDP prot 4711
input = ACCESS({source='input', wrapper='GenericPush',
	transport='UDPServer', protocol='NMEA', dataHandler='KeyValueObject',
	options=[['port', '4711']]
})
 
/// Select GGA, GLL, RMC
gps = SELECT({predicate=KeyValuePredicate('sentenceId="GGA" OR sentenceId="GLL" OR sentenceId="RMC"')}, input)
 
/// Project only the latitude and longitude 
latLon = PROJECT({paths = [['latitude', 'String'], ['longitude', 'String']]}, gps)
  • No labels