Home

Awesome

orb

orb offers a few simple methods for several common problems of orbital mechanics, like transformations between various coordinate systems and simple orbit propagation using Keplerian elements.

npm version Build Status

Installation

npm install orbjs

Usage

ES5 - CommonJS

var orb = require('orbjs');

ES6

import orb from 'orbjs';

ES5 - Browser

<script src="dist/orb.min.js"></script>

API

orb.constants

# orb.constants.common

# orb.constants.time

# orb.constants.earth

# orb.constants.earth.wgs84

# orb.constants.earth.grs80

orb.common

# orb.common.deg2rad(deg) Converts degree to radian

# orb.common.rad2deg(rad) Converts radian to degree

orb.time

# orb.time.JDtoMJD(jd) JD to MJD [days]

# orb.time.MJDtoJD(mjd) MJD to JD [days]

# orb.time.TAItoTT(tai) TAI to TT

# orb.time.TTtoTAI(tt) TT to TAI

# orb.time.TAItoUTC(tai) TAI to UTC

# orb.time.UTCtoTAI(utc) UTC to TAI

# orb.time.TAItoGPS(tai) TAI to GPS

# orb.time.GPStoTAI(gps) GPS to TAI

# orb.time.UTCtoGPS(utc) UTC to GPS

# orb.time.GPStoUTC(gps) GPS to UTC

# orb.time.leapSeconds(date) Amount of leap seconds that occurred before date. date is a JS Date object.

# orb.time.dateToJD(date) Convert a date to Julian Date. date is either a Date object, or an array of the form [Y, M, D, h, m, s, ms].

orb.transformations

# orb.transformations.sphericalToCartesian(x)

# orb.transformations.cartesianToSpherical(x)

# orb.transformations.ellipsoidalToCartesian(x, a, e)

# orb.transformations.cartesianToEllipsoidal(x, a, e)

# orb.transformations.geodeticToCartesian(x, a, e)

# orb.transformations.cartesianToGeodetic(x, a, e)

# orb.transformations.orbitalPlaneToInertial(x, Ω, ω, i)

# orb.transformations.inertialToFixed(x, α, axis)

# orb.transformations.fixedToInertial(x, α, axis)

# orb.transformations.fixedToTopocentric(x, obs, a, e, nwu)

# orb.transformations.topocentricToFixed(x, obs, a, e, nwu)

# orb.transformations.topocentricToHorizontal(x)

# orb.transformations.horizontalToTopocentric(x)

orb.position

# orb.position.keplerEquation(e, M)

# orb.position.keplerian(a, e, i, Ω, ω, t, t0, M0, m1, m2)

# orb.position.stateToKepler(x, xDot, t, m1, m2)

orb.functions

# orb.functions.era(days)

orb.vector

Common vector and matrix operations, these are only included to make dependencies unnecessary. Don’t use these, there are a lot of better, more comprehensive and well tested libraries to do this.

License

MIT