Skip to content

Live vehicle geolocation, taken from the GoMedia on-board WiFi entertainment system.

License

Notifications You must be signed in to change notification settings

derhuerst/live-gomedia-position

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

live-gomedia-position

Live vehicle geolocation, taken from the GoMedia on-board WiFi entertainment system.

npm version ISC-licensed minimum Node.js version support me via GitHub Sponsors chat with me on Twitter

Installation

npm install live-gomedia-position

Usage

positions() returns an async iterable of geolocation data points.

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

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.

About

Live vehicle geolocation, taken from the GoMedia on-board WiFi entertainment system.

Topics

Resources

License

Stars

Watchers

Forks