live-cd-wifi-position
v1.0.0
Published
Live vehicle geolocation of Czech Railways trains, taken from the on-board WiFi system.
Downloads
17
Maintainers
Readme
live-cd-wifi-position
Live vehicle geolocation of České dráhy (Czech Railways) trains, taken from the on-board WiFi system.
Installation
npm install live-cd-wifi-position
Usage
asStream()
returns a readable stream in object mode.
const {asStream} = require('live-cd-wifi-position')
const ndjson = require('ndjson')
const positions = asStream()
positions.on('error', console.error)
positions
.pipe(ndjson.stringify())
.pipe(process.stdout)
An individual data point will look like this:
{
latitude: 50.62498,
longitude: 14.055638,
altitude: 143,
speed: 88, // km/h
}
You can also use the EventEmitter
-based API:
const {asEventEmitter} = require('live-cd-wifi-position')
const positions = asEventEmitter()
positions.on('error', console.error)
positions.on('data', data => console.log(data))
Related
cd-wifi-client
– A client for the WiFi portal of Czech Railways trains.wifi-on-ice-position-stream
– A stream of positions of German Railways ICE trains, taken from the on-board WiFi.wifi-on-ice-portal-client
– Query information from the WiFi portal in German ICE trains.
Contributing
If you have a question or need support using live-cd-wifi-position
, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, use the issues page.