Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

flight-plan-converter

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flight-plan-converter

Converts Flight Plans from and to various file formats.

  • 0.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
increased by300%
Maintainers
1
Weekly downloads
 
Created
Source

Flight-Plan converter

Build Status

Converts Flight Plans from and to various file formats.

Supported formats:

  • X-Planes .fms V3
  • X-Planes .fms V1100
  • ForeFlight .fpl (import only)
  • KML (export only)

Usage

On the command line:

$ npm install
$ npm run convert [source] [dest]

or bypassing npm to use directly:

$ npm install
$ flight-plan-converter [source] [dest]

or programatically:

var converter = require('flight-plan-converter');

var msFpl = fs.readFileSync('some-microsoft-flight-sim-flight-plan.fpl', 'utf8');

fs.writeFileSync('x-plane-flight-plan.fms',
  // converts parsed/normalized flight plan to specifique format
  converter.convert(
    // parsed/normalized flight plan
    converter.parse(
      // raw input flight plan
      msFpl,
      // input format
      converter.formats.MS_FPL // -> 'ms_fpl'
    ),
    // output format
    converter.formats.XPLANE_FMS // -> 'xplane_fms'
  ),
  'utf8'
);

// or create a normalized flight plan

var fpl = {
  waypoints: [
    {
      lat: 50, lon: 11,
      elevation: 100, // elevation in ft
      type: converter.types.GPS // -> 'gps'
    },
    {
      lat: 52.24196492666667, lon: 11.85835872,
      elevation: 172,
      type: converter.types.AIRPORT // -> 'airport'
      airport: {
        icao: "EDBG"
      }
    },
    {
      lat: 52.074078, lon: 11.648333,
      elevation: 0,
      type: converter.types.NDB // -> 'ndb'
      ndb: {
        identifier: "MU"
      }
    },
    {
      lat: 52.546944, lon: 11.099722,
      elevation: 0,
      type: converter.types.FIX // -> 'fix'
      fix: {
        name: "BATEL"
      }
    }
  ]
};

fs.writeFileSync('my-xplane-fpl.fms',
  converter.convert(
    fpl,
    converter.formats.XPLANE_FMS
  ),
  'utf8'
);

Keywords

FAQs

Package last updated on 29 May 2019

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc