Skip to content

Commit

Permalink
Updated Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
reyespaolo committed Sep 21, 2017
1 parent 032346c commit ec7fa0c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ A parser for TK-103A and TK-103B GPS Tracker Protocol.
import tk103 from 'tk-103-parser';
const test = new Buffer('lat:14.632742\nlong:121.001790\nspeed:0.00\nT:17/06/05 16:21\nhttp://maps.google.com/maps?f=q&q=6.226433,125.075470&z=16\nPwr: ON Door: OFF ACC: OFF')
const smsrawSOSAlert = new Buffer('help me!\nlat:6.319640\nlong:124.975628\nspeed:0.00\nT:17/06/05 16:42\nhttp://maps.google.com/maps?f=q&q=6.319640,124.975628&z=16');
console.log(tk103.parseTK103(test));
console.log(tk103.parseTK103(smsrawSOSAlert));
```

Expand Down Expand Up @@ -40,6 +43,29 @@ console.log(tk103.parseTK103(test));
vehicleBattery: null,
status: 'Success'
}
{ alert: 'SOSAlert',
latitude: '6.319640',
longitude: '124.975628',
speed: '0.00',
date: '17/06/05',
parsedDate: '2017-06-05',
dateTime: [Function: Date],
time: '16:42',
power: null,
door: null,
acc: null,
lastlatitude: null,
lastlongitude: null,
mnc: null,
mcc: null,
timestampsent: null,
direction: null,
GPSPosition: null,
GPSSIgnal: null,
vehicleBattery: null,
status: 'Success' }
```

## SMS Protocol Format
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tk-103-parser",
"version": "1.0.24",
"version": "1.0.25",
"description": "Parser for TK-103 GPS Devices",
"main": "tk-103/",
"scripts": {
Expand Down
2 changes: 2 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ const smsrawTest = new Buffer('lat:14.836857\nlong:120.852707\nspeed:0.00 \nT:17
const test = new Buffer('lat:14.632742\nlong:121.001790\nspeed:0.00\nT:17/06/05 16:21\nhttp://maps.google.com/maps?f=q&q=6.226433,125.075470&z=16\nPwr: ON Door: OFF ACC: OFF')

console.log(tk103.parseTK103(test));
console.log(tk103.parseTK103(smsrawSOSAlert));

// //
// console.log(tk103.parseTK103(smsrawOilAlert));
// console.log(tk103.parseTK103(smsrawSpeedingAlert));
Expand Down

0 comments on commit ec7fa0c

Please sign in to comment.