Newly Purchased Memories

    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

    Last publish

    Collaborators

    • bhalash