Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/karlbeecken/icedata
https://github.com/karlbeecken/icedata
Last synced: 19 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/karlbeecken/icedata
- Owner: karlbeecken
- Created: 2021-08-12T15:45:22.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-08-14T17:06:03.000Z (over 3 years ago)
- Last Synced: 2024-10-16T15:19:06.776Z (about 1 month ago)
- Language: JavaScript
- Size: 71.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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
```javascript
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,
};
```