node-gps-reader
basic nodejs gps parser.
Available sentences:
- GGA - Global Positioning System Fix Data.
- VTG - Track Made Good and Ground Speed.
- HDT - Heading, True.
- RMC - Track Made Good and Ground Speed.
- GLL - Geographic Position, Latitude / Longitude and time.
Function:
- parse(nmea_sentence) - return parsed data object.
- getChecksum(nmea_sentence) - return checksum in DEC (use toString(16) to convert to HEX if needed).
Remarks:
- NMEA checksum comprised of everything between (EXCLUSIVELY) the start delimiter (!/$) and the asterisk (*).
Usage:
- Check example.js
const nmea = /* Result################################################################Testing GGA decoder.Raw: $GPGGA,012906.00,2741.79668,N,12226.25185,E,1,11,0.86,14.2,M,15.5,M,,*60Checksum valid: trueTime: 01,29,06,00Position: φ 27.69661 - λ 122.43753Fix Type: GPS fix (SPS)Satellite Count: 11 - Hdop: 0.86Altitude: 14.2 m - Geoid Separation: 15.5 mDGPS Age: null - DGPS Station: nullFAA Mode: nullEnd of GGA decoder test.################################################################Testing VTG decoder.Raw: $GPVTG,211.63,T,,M,12.947,N,23.977,K,A*3BChecksum valid: trueTrue Track: 211.63 - Magnetic Track: nullSpeed: 12.947 kn (23.977 km/h)FAA Mode: AutonomousEnd of VTG decoder test.################################################################Testing RMC decoder.Raw: $GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6AChecksum valid: trueTime: 12,35,19,0Date: 94,03,23Position: φ 48.11730 - λ 11.51667Fix Status: ATrue Track: 84.4Speed: 22.4 knMagnetic Variation: -3.1End of RMC decoder test.################################################################Testing GLL decoder.Raw: $GPGLL,4916.45,N,12311.12,W,225444,A*31Checksum valid: trueTime: 22,54,44,0Position: φ 49.27417 - λ -123.18533Fix Status: AEnd of GLL decoder test.################################################################*/
New decoder can be registered manually in src/decoder.js
Regular expression tested on regexr.com