Not Providing Milkshakes
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

esg

3.0.4 • Public • Published

ESG

ESG-short for Equatorial Surface Gravity-is a small functionally-programmed library which returns the surface gravity of a spherical body as derived from the Newton's gravitational constant.

Build Status

Installation

npm install esg

Usage

var esg = require('esg').ESG;

// Surface gravity in m/s.
esg.gravity(5.972E+24, 6.371E+6) // 9.91810989409835

// Relative surface gravity to Earth's, expressed as a ratio.
esg.relative(5.972E+24, 6.371E+6); // 1

// Escape velocity in m/s.
esg.escape(5.972E+24, 6.371E+6); // 11241.732796619975

// Orbital velocity in m/s.
esg.orbit(5.972E+24, 6.371E+6); // 7949.105492777197

Testing

npm test

Contributing

Pull requests welcome.

License

The code is under the MIT license.

install

npm i esg

Downloadsweekly downloads

6

version

3.0.4

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability