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)
25 lines
493 B
JavaScript
25 lines
493 B
JavaScript
/*
|
|
ZDA product info
|
|
1 2 3 4 5
|
|
| | | | |
|
|
$GPTXT,xx,yy,zz,info*hh
|
|
1) The total number of statements in the current message, 01 to 99
|
|
2) Statement number, 01 to 99
|
|
3) Text identifier
|
|
4) Text information
|
|
5) Checksum
|
|
*/
|
|
|
|
exports.ID = 'TXT';
|
|
exports.TYPE = 'product-info';
|
|
|
|
exports.decode = function(fields) {
|
|
return {
|
|
sentence: exports.ID,
|
|
type: exports.TYPE,
|
|
xx: fields[1],
|
|
yy: fields[2],
|
|
zz: fields[3],
|
|
info: fields[4]
|
|
};
|
|
} |