tz-parser

3.1.3 • Public • Published

tz-parser

npm version npm downloads Build Status Coverage Status Maintainability dependency Status devDependency Status

Parse raw data from TZ-AVL devices (AVL-05, AVL-08, AVL-201)

Installation

npm i -S tz-parser

Use

Try on RunKit

const tz = require('tz-parser')
 
const raw = Buffer.from('$$B6869444005480041|AA$GPRMC,194329.000,A,3321.6735,S,07030.7640,W,0.00,0.00,090216,,,A*6C|02.1|01.3|01.7|000000000000|20160209194326|13981188|00000000|32D3A03F|0000|0.6376|0100|995F\r\n')
const data = tz.parse(raw)
/*{
  raw: '$$B6869444005480041|AA$GPRMC,194329.000,A,3321.6735,S,07030.7640,W,0.00,0.00,090216,,,A*6C|02.1|01.3|01.7|000000000000|20160209194326|13981188|00000000|32D3A03F|0000|0.6376|0100|995F\r\n',
  manufacturer: 'tz',
  device: 'tz',
  model: 'TZ-AVL05',
  type: 'data',
  imei: '869444005480041',
  alarm: {type: 'Gps'},
  loc: {
    type: 'Point',
    coordinates: [-70.51273333333333, -33.361225]
  },
  speed: 0,
  gpsStatus: true,
  azimuth: 0,
  magneticVariation: null,
  gpsMode: 'Autonomous',
  pdop: 2.1,
  hdop: 1.3,
  vdop: 1.7,
  status: {
    raw: '000000000000',
    sos: false,
    input: {'1': false, '2': false, '3': false, '4': false, '5': false},
    output: {'1': false, '2': false},
    charge: true
  },
  datetime: 2016-02-09T19:43:26.000Z,
  voltage: {battery: 3.98, inputCharge: 11.88, ada: 0, adb: 0},
  lac: 13011,
  cid: 41023,
  temperature: 0,
  odometer: 0.6376,
  serialId: 100,
  valid: true
}*/

License

MIT

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.1.33latest

Version History

VersionDownloads (Last 7 Days)Published
3.1.33
3.1.21
3.1.12
3.1.01
3.0.71
3.0.61
3.0.52
3.0.41
3.0.31
3.0.11
3.0.02
2.6.31
2.6.21
2.6.10
2.6.01
2.5.01
2.4.41
2.4.30
2.4.21
2.4.11
2.4.01
2.3.11
2.3.01
2.2.12
2.2.02
2.1.21
2.1.12
2.1.00
2.0.02
1.2.00
1.1.20
1.1.10
1.1.00
1.0.11
1.0.01

Package Sidebar

Install

npm i tz-parser

Weekly Downloads

1

Version

3.1.3

License

MIT

Last publish

Collaborators

  • lgatica