https://github.com/derhuerst/live-gomedia-position
Live vehicle geolocation, taken from the GoMedia on-board WiFi entertainment system.
https://github.com/derhuerst/live-gomedia-position
flix flixbus public-transport transit
Last synced: 8 months ago
JSON representation
Live vehicle geolocation, taken from the GoMedia on-board WiFi entertainment system.
- Host: GitHub
- URL: https://github.com/derhuerst/live-gomedia-position
- Owner: derhuerst
- License: isc
- Created: 2022-09-19T08:43:26.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-19T08:46:16.000Z (about 3 years ago)
- Last Synced: 2025-02-08T04:34:18.010Z (8 months ago)
- Topics: flix, flixbus, public-transport, transit
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
# live-gomedia-position
**Live vehicle geolocation, taken from the [*GoMedia* on-board WiFi entertainment system](https://gomedia.io/service/entertainment-for-public-transport/).**
[](https://www.npmjs.com/package/live-gomedia-position)


[](https://github.com/sponsors/derhuerst)
[](https://twitter.com/derhuerst)## Installation
```shell
npm install live-gomedia-position
```## Usage
`positions()` returns an [async iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols) of geolocation data points.
```js
const {positions} = require('live-gomedia-position')const sleep = ms => new Promise(resolve => setTimeout(resolve, ms))
for await (const pos of positions()) {
console.log(pos)
await sleep(5000)
}
// {
// latitude: 52.715446,
// longitude: 12.995633,
// speed: 27.43, // km/h
// }
// {
// latitude: 52.715805,
// longitude: 12.992863,
// speed: 27.323,
// }
```## Related
- [`live-icomera-position`](https://github.com/derhuerst/live-icomera-position) – Live vehicle geolocation, taken from the on-board Icomera WiFi system.
- [`live-cd-wifi-position`](https://github.com/derhuerst/live-cd-wifi-position) – Live vehicle geolocation of Czech Railways trains, taken from the on-board WiFi system.
- [`wifi-on-ice-position-stream`](https://github.com/derhuerst/wifi-on-ice-position-stream) – A stream of positions of German Railways ICE trains, taken from the on-board WiFi.## Contributing
If you have a question or need support using `live-gomedia-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](https://github.com/derhuerst/live-gomedia-position/issues).