Socket
Book a DemoInstallSign in
Socket

flight-stream

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flight-stream

A readable stream that tracks nearby aircrafts

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

flight-stream

Dependency Status unstable

This is a readable stream in objectMode that will provide flight information near your area matching certain conditions. By default it looks for A380s near Heathrow airport.

Usage

The library exposes only a readable stream that you may use however you like. The helper file irc.js uses it to pipe the information to an IRC channel via irc-stream.

Here is a simple way to just dump all matching planes spotted to console:

var config = {
  location: {
    latitude: 51.5083818,
    longitude: -0.5596166
  },
  maxDistance: 5*1000
};
var PlaneStream = require('plane-stream');
new PlaneStream(config).on('data', function (plane) {
  console.log("%j", plane);
});

Configuration

For the config object, the only thing you need to set is your location. But additionally you can set:

  • aircraft if want to filter by a single aircraft using ICAO codes
  • maxDistance the size of the bounding box to search for planes in meters
  • maxAltitude of a plane in feet
  • clockShift if you would not want to use relative north for direction output
  • throttleInterval in seconds if you feel you get too many updates

License

MIT-Licensed. See LICENSE file for details.

FAQs

Package last updated on 29 Apr 2014

Did you know?

Socket

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