icedata
v1.0.3
Published
A library to fetch telemetry data from German highspeed trains
Downloads
4
Readme
ICEdata
A simple library to fetch the data from German highspeed trains ICE
Note: This only works from the WiFi onboard the ICEs (often called "WIFIonICE" or "WIFI@DB")
Installation
- npm:
npm install icedata
- yarn:
yarn add icedata
Usage
const ice = require("icedata");
ice.fetchAll();
// returns something like this:
let result = {
connection: true,
serviceLevel: "AVAILABLE_SERVICE",
gpsStatus: "LAST_KNOWN_POSITION",
internet: "HIGH",
latitude: 51.312399666666664,
longitude: 9.446855,
tileY: 145,
tileX: -11,
series: "803",
serverTime: 1628798106501,
speed: 53,
trainType: "ICE",
tzn: "Tz103",
wagonClass: "SECOND",
connectivity: {
currentState: "HIGH",
nextState: "UNSTABLE",
remainingTimeSeconds: 637,
},
bapInstalled: true,
};