Files
nmea/codecs/GRMT.js
hyzl b0a1993169
Some checks failed
Node.js CI / build (10.x) (push) Has been cancelled
Node.js CI / build (12.x) (push) Has been cancelled
Node.js CI / build (14.x) (push) Has been cancelled
Node.js CI / build (15.x) (push) Has been cancelled
feat: 导入 NMEA-0183 GPS 协议解析库(node-nmea)
NMEA-0183 语句解析器,含 21 个语句类型 codec 与配套单元测试。

- codecs/:APB/BWC/DBT/GGA/GLL/GRMT/GSA/GSV/HDG/HDM/HDT/MWV/RDID/
  RMB/RMC/ROT/RSA/TXT/VTG/VWR/ZDA
- test/:各 codec 对应的 mocha 用例
- .github/workflows/:node与 npm-publish 流水线

许可证:MIT(原作者 James Penn)
2026-10-19 09:54:44 +08:00

49 lines
1.8 KiB
JavaScript

exports.ID = 'GRMT';
exports.TYPE = 'sensor-information';
exports.decode = function(fields) {
/*
=== PGRMT - Garmin Proprietary Sensor Status Information ===
The Garmin Proprietary sentence $PGRMT gives information concerning the status of a GPS sensor. This
sentence is transmitted once per minute regardless of the selected baud rate.
------------------------------------------------------------------------------
1 2 3 4 5 6 7 8 9
| | | | | | | | |
$PGRMT,GPS19x-HVS Software Version 2.20,P,P,R,R,P,C,15,R*hh<CR><LF>
------------------------------------------------------------------------------
Field Number:
1. Product, model and software version (variable length field, e.g., “GPS 10 SW VER 2.01 BT VER 1.27 764”)
2. ROM checksum test, P = pass, F = fail
3. Receiver failure discrete, P = pass, F = fail
4. Stored data lost, R = retained, L = lost
5. Real time clock lost, R = retained, L = lost
6. Oscillator drift discrete, P = pass, F = excessive drift detected
7. Data collection discrete, C = collecting, null if not collecting
8. GPS sensor temperature in degrees C
9. GPS sensor configuration data, R = retained, L = lost
Note: Some sensors have been seen to not provide all information above, in some cases just the product
model during boot. Example:
$PGRMT,GPS19x-HVS Software Version 2.20,,,,,,,,*6F
*/
return {
sentence: exports.ID,
type: exports.TYPE,
product : fields[1],
rom_checksum : fields[2],
receiver_failure : fields[3],
stored_data_lost : fields[4],
rtc_lost: fields[5],
oscillator_drift: fields[6],
data_collection: fields[7],
sensor_temperature: fields[8],
sensor_configuration: fields[9]
}
}