A stream of ICE positions, taken from the on-board WiFi.
npm install wifi-on-ice-position-stream
const createStream = require('wifi-on-ice-position-stream')
const positions = createSteam()
positions.once('data', (position) => {
console.log(position)
positions.destroy()
})
createStream()
returns a readable stream in object mode.
Each position/chunk is in the format of wifi-on-ice-portal-client
with an additional clientTime
field:
{
ok: true,
speed: 245,
gpsOk: true,
latitude: 51.86973533333333,
longitude: 9.989614166666666,
servicelevel: 'AVAILABLE_SERVICE',
wagonClass: 'FIRST',
serverTime: 1504698041985,
clientTime: 1504698041872
}
If you have a question or have difficulties using wifi-on-ice-position-stream
, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.