Socket
Socket
Sign inDemoInstall

wifi-on-ice-position-stream

Package Overview
Dependencies
1
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    wifi-on-ice-position-stream

A stream of ICE positions, taken from the on-board WiFi.


Version published
Weekly downloads
0
Maintainers
1
Install size
7.61 MB
Created
Weekly downloads
 

Readme

Source

wifi-on-ice-position-stream

A stream of ICE positions, taken from the on-board WiFi.

npm version ISC-licensed chat with me on Gitter support me on Patreon

Installation

npm install wifi-on-ice-position-stream

Usage

const createStream = require('wifi-on-ice-position-stream')

const positions = createStream()
positions.once('data', (position) => {
	console.log(position)
	positions.destroy()
})

createStream() returns a readable stream in object mode.

Each position/chunk is in the format of wifi-on-ice-portal-client with an additional clientTime field:

{
	ok: true,
	speed: 245,
	gpsOk: true,
	latitude: 51.86973533333333,
	longitude: 9.989614166666666,
	servicelevel: 'AVAILABLE_SERVICE',
	wagonClass: 'FIRST',
	serverTime: 1504698041985,
	clientTime: 1504698041872
}

API

createPositionsStream(interval = 5 * 1000, closeOnTrainChange = false)

Contributing

If you have a question or have difficulties using wifi-on-ice-position-stream, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.

Keywords

FAQs

Last updated on 25 Jan 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc