lagrange-points
v0.1.0
Published
Calculate Lagrangian libration points
Downloads
14
Maintainers
Readme
lagrange-points
Install via npm
$ npm install lagrange-points
Usage
var Lagrange = require( 'lagrange-points' )
// Masses is kg
var moon = 7.3477 * 1e22
var earth = 5.97219 * 1e24
// Distance in km
var distance = 384399
var params = Lagrange.getParameters( earth, moon, distance )
Result:
{
distance: 384399,
massRatio: 81.27972018454756,
barycenter: 4671.85594625043,
x1: 58023.627116674485,
x2: 64520.474068579846,
x3: 174776.59760000271,
h: 38380.30836459083,
z: 382084.4941699412,
r: 4.144102486825536
}