Skip to content

Commit

Permalink
Remove extra gprmc data, remove async data.
Browse files Browse the repository at this point in the history
  • Loading branch information
lgaticaq committed Mar 2, 2016
1 parent 41080f8 commit 686ca0b
Show file tree
Hide file tree
Showing 4 changed files with 695 additions and 1,603 deletions.
29 changes: 11 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,16 @@ const raw = new Buffer('$$B6869444005480041|91$GPRMC,194329.000,A,3321.6735,S,07
const data = tz.parse(raw);
/*{
raw: '$$B6869444005480041|91$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|7B20\r\n',
type: 'TZ-AVL05',
imei: 869444005480041,
alarmType: { type: 'Sleep', status: true },
gprmcData: {
raw: '$GPRMC,194329.000,A,3321.6735,S,07030.7640,W,0.00,0.00,090216,,,A*6C',
valid: true,
type: 'RMC',
datetime: Tue Feb 09 2016 19:43:29 GMT+0000 (UTC),
loc: { type: 'Point', coordinates: [ -70.51273333, -33.361225 ] },
gps: true,
speed: 0,
track: '0.00',
magneticVariation: null,
mode: 'Autonomous'
},
device: 'TZ-AVL05',
type: 'data',
imei: '869444005480041',
alarm: { type: 'Sleep', status: true },
loc: { type: 'Point', coordinates: [ -70.51273333, -33.361225 ] },
gpsStatus: true,
speed: 0,
track: '0.00',
magneticVariation: null,
gpsMode: 'Autonomous'
pdop: 2.1,
hdop: 1.3,
vdop: 1.7,
Expand All @@ -57,8 +52,6 @@ const data = tz.parse(raw);
temperature: 0,
odometer: 0.6376,
serialId: 100,
valid: true,
currentData: { isCurrent: false, diff: '13 días' },
gps: 'enable'
valid: true
}*/
```
2 changes: 1 addition & 1 deletion example.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const tz = require('tz-parser');

const raw = new Buffer('$$B6869444005480041|91$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|7B20\r\n');
const data = await tz.parse(raw);
const data = tz.parse(raw);
Loading

0 comments on commit 686ca0b

Please sign in to comment.