New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

e6b-lib

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

e6b-lib

E6B library - mostly for flight training and traditional flight plans and preflight planning

latest
Source
npmnpm
Version
1.1.6
Version published
Weekly downloads
5
25%
Maintainers
1
Weekly downloads
 
Created
Source

segevsh segevsh

e6b-lib

E6B library is a lightweight Javscript / Typescript library to perform E6B calculations.

Some of the calculations included:

Features

  • Groundspeed calculator
  • ETE (estimated time enroute)
  • Fuel consumption
  • Wind correction calculator
  • Wind components
  • Converters (distances, measurements, etc...)

Getting started

Installation

Installing using npm

npm install e6b-lib

Installing using yarn

yarn add e6b-lib

Usage

Calculating wind correction


import { windCorrection } from "e6b-lib";

const wc = windCorrection({
  trueAirSpeed: 80,
  trueCourse: 300,
  windDir: 280,
  windVelocity: 10,
  magneticVariation: 12,
});

console.log(wc.windCorrectionAngle); // -2
console.log(wc.trueHeading); // 298
console.log(wc.magneticHeading); // 310 
console.log(wc.groundSpeed); // 77 

Calculating wind components (crosswind / headwind)


import { windComponents } from "e6b-lib";

 const wc = windComponents({
    runway: 4, // runway 04
    windDirection: 50, 
    windSpeed: 10
});

console.log(wc.crossWind); // 1.74
console.log(wc.headWind); // 9.85

Conversions

You can convert between different unites in different categories : pressure, temperature, mass, length, time

import { convert, utils } from 'e6b-lib';

console.log(utils.round(convert(1).from('mile').to('km'), 2)); // 1.61
console.log(utils.round(convert(1).from('km').to('m'), 2)); // 1000
console.log(utils.round(convert(0).from('C').to('F'), 2)); // 32
console.log(utils.round(convert(32).from('fahrenheit').to('celsius'), 2)); // 0
console.log(utils.round(convert(32).from('fahrenheit').to('kelvins'), 2)); // 273.15

Keywords

e6b

FAQs

Package last updated on 19 Oct 2020

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