Global

Members

Celsius

# constant ABSOLUTE_ZERO_TEMPERATURE_CELSIUS

View Source constants.ts, line 109

Day

# constant AVERAGE_ANOMALISTIC_YEAR

View Source constants.ts, line 43

Day

# constant AVERAGE_ECLIPSE_YEAR

View Source constants.ts, line 47

Day

# constant AVERAGE_GREGORIAN_YEAR

View Source constants.ts, line 39

Day

# constant AVERAGE_JULIAN_YEAR

View Source constants.ts, line 37

Day

# constant AVERAGE_SIDEREAL_YEAR

View Source constants.ts, line 41

Day

# constant AVERAGE_TROPICAL_YEAR

View Source constants.ts, line 45

Day

# constant BESSELIAN_YEAR

View Source constants.ts, line 59

number

# constant CONSTANT_OF_ABERRATION

View Source constants.ts, line 33

MiliSecond

# constant DAYMS

View Source constants.ts, line 9

Kilometer

# constant EARTH_EQUATORIAL_RADIUS

View Source constants.ts, line 67

number

# constant EARTH_MERIDIAN_ECCENTRICITY

View Source constants.ts, line 71

number

# constant EARTH_RADIUS_FLATTENING_FACTOR

View Source constants.ts, line 69

Degree

# constant ECLIPTIC_OBLIQUITY_B1950_0

View Source constants.ts, line 55

Degree

# constant ECLIPTIC_OBLIQUITY_J2000_0

View Source constants.ts, line 53

Degree

# constant GALACTIC_NORTH_POLE_ALPHA_B1950_0

View Source constants.ts, line 63

Degree

# constant GALACTIC_NORTH_POLE_DELTA_B1950_0

View Source constants.ts, line 65

JulianDay

# constant J1970

View Source constants.ts, line 3

JulianDay

# constant J2000

View Source constants.ts, line 5

JulianDay

# constant JULIAN_DAY_B1950_0

View Source constants.ts, line 61

Day

# constant JULIAN_YEAR

View Source constants.ts, line 57

Kilogram

# constant MEARTH

View Source constants.ts, line 101

JulianDay

# constant MJD_START

View Source constants.ts, line 7

Kilogram

# constant MJUP

View Source constants.ts, line 97

Kilogram

# constant MNEP

View Source constants.ts, line 99

Day

# constant MOON_SYNODIC_PERIOD

View Source constants.ts, line 143

Kilogram

# constant MSUN

View Source constants.ts, line 95

string

# constant MoonPhase

View Source constants.ts, line 153

string

# constant MoonPhaseQuarter

View Source constants.ts, line 145

Second

# constant ONE_DAY_IN_SECONDS

View Source constants.ts, line 49

Kilometer

# constant ONE_UA_IN_KILOMETERS

View Source constants.ts, line 73

Second

# constant ONE_YEAR_IN_SECONDS

View Source constants.ts, line 51

Radian

# constant PI

View Source constants.ts, line 11

Radian

# constant PIHALF

View Source constants.ts, line 15

Radian

# constant PITWO

View Source constants.ts, line 13

Day

# constant SIDEREAL_OVER_SOLAR_RATE

View Source constants.ts, line 35

KilometerPerSecond

# constant SPEED_OF_LIGHT

View Source constants.ts, line 29

KilometerPerSecond

# constant SPEED_OF_LIGHT_APPROX

View Source constants.ts, line 31

Degree

# constant STANDARD_ALTITUDE_MOON

View Source constants.ts, line 138

Degree

# constant STANDARD_ALTITUDE_STARS

View Source constants.ts, line 136

Degree

# constant STANDARD_ALTITUDE_SUN

View Source constants.ts, line 140

Methods

# getAccurateRiseTransitSetTimes(jd, equCoords, geoCoords, alt, iterations) → {RiseTransitSet}

Compute the times of rise, set and transit of an object at a given date, and observer's location on Earth. It runs multiple iterations to obtain an accurate result which should be below the minute.
Parameters:
Name Type Description
jd JulianDay The julian day
equCoords LengthArray.<EquatorialCoordinates, 3> A series of consecutive apparent equatorial coordinates separated by one day, centered on day of interest, at midnight Dynamical Time (see juliandays.getJulianDayMidnightDynamicalTime).
geoCoords GeographicCoordinates The observer's location.
alt Degree The local altitude of the object's center to consider for rise and set times. It's value isn't 0. For stars, it is affected by aberration (value = -0.5667 degree)
iterations number Positive number of iterations to use in computations, Default = 1.

View Source risetransitset/accurate.ts, line 23

# getDeclinationFromEcliptic(coords, epsilon) → {Degree}

Equatorial declination from ecliptic coordinates
Parameters:
Name Type Description
coords EclipticCoordinates The ecliptic coordinates
epsilon Degree The obliquity of the ecliptic; that is, the angle between the ecliptic and the celestial equator. The mean obliquity (epsilon0) is given by nutation.getMeanObliquityOfEcliptic(jd). If however the *apparent* R.A. and Dec. are required (that is, affected by aberration and nutation), the true obliquity epsilon + Delta epsilon should be used. One can use nutation.getTrueObliquityOfEcliptic(jd) If R.A. and Dec. are referred to the standard equinox of J2000, epsilon must be that of ECLIPTIC_OBLIQUITY_J2000_0.

View Source coordinates/ecliptic2equatorial.ts, line 29

Degree

# getDeclinationFromHorizontal(geoCoords, horCoords) → {Degree}

Equatorial declination from horizontal coordinates
Parameters:
Name Type Description
geoCoords GeographicCoordinates The geographic coordinates of the observer's location.
horCoords HorizontalCoordinates The horizontal coordinates of the target

View Source coordinates/horizontal2equatorial.ts, line 34

Degree

# getEclipticLatitudeFromEquatorial(coords, epsilon)

Ecliptic latitude from equatorial coordinates
Parameters:
Name Type Description
coords EquatorialCoordinates The equatorial coordinates (in degrees)
epsilon Degree The obliquity of the ecliptic; that is, the angle between the ecliptic and the celestial equator. The mean obliquity (epsilon0) is given by nutation.getMeanObliquityOfEcliptic(jd). If however the *apparent* R.A. and Dec. are required (that is, affected by aberration and nutation), the true obliquity epsilon + Delta epsilon should be used. One can use nutation.getTrueObliquityOfEcliptic(jd) If R.A. and Dec. are referred to the standard equinox of J2000, epsilon must be that of ECLIPTIC_OBLIQUITY_J2000_0.

View Source coordinates/equatorial2ecliptic.ts, line 32

# getEclipticLongitudeFromEquatorial(coords, epsilon) → {Degree}

Ecliptic longitude from equatorial coordinates
Parameters:
Name Type Description
coords EquatorialCoordinates The equatorial coordinates (in degrees)
epsilon Degree The obliquity of the ecliptic; that is, the angle between the ecliptic and the celestial equator. The mean obliquity (epsilon0) is given by nutation.getMeanObliquityOfEcliptic(jd). If however the *apparent* R.A. and Dec. are required (that is, affected by aberration and nutation), the true obliquity epsilon + Delta epsilon should be used. One can use nutation.getTrueObliquityOfEcliptic(jd) If R.A. and Dec. are referred to the standard equinox of J2000, epsilon must be that of ECLIPTIC_OBLIQUITY_J2000_0.

View Source coordinates/equatorial2ecliptic.ts, line 14

Degree

# getEquationOfTheCenter(T, M) → {Degree}

Get the Sun's Equation of the center See AA p 164
Parameters:
Name Type Description
T JulianCentury The julian century
M Degree

View Source sun/sun.ts, line 38

Degree

# getEquatorialDeclinationB1950FromGalactic(coords) → {Degree}

Equatorial declination in epoch B1950 from galactic coordinates See AA p.94
Parameters:
Name Type Description
coords GalacticCoordinates The galactic coordinates

View Source coordinates/galactic2equatorial.ts, line 25

Degree

# getEquatorialRightAscensionB1950FromGalactic(coords) → {Degree}

Equatorial right ascension in epoch B1950 from galactic coordinates See AA p.94
Parameters:
Name Type Description
coords GalacticCoordinates The galactic coordinates

View Source coordinates/galactic2equatorial.ts, line 11

Degree

# getExoplanetTransitDetails(orbitalPeriod, lambdaAngle, timeOfPeriastron, eccentricity, radius, semiMajorAxis, parentStarRadius)

Compute the details of an exoplanet transit
Parameters:
Name Type Description
orbitalPeriod
lambdaAngle
timeOfPeriastron
eccentricity
radius
semiMajorAxis
parentStarRadius

View Source exoplanets.ts, line 27

# getGreatCircleAngularDistance(coords1, coords2) → {Degree}

The Great Circle angular distance between two spherical coordinates. It uses the alternative formula of AA p115, which works well for small and large angles.
Parameters:
Name Type Description
coords1 EquatorialCoordinates
coords2 EquatorialCoordinates

View Source coordinates/angles.ts, line 39

Degree

# getHorizontalAltitude(jd, geoCoords, equCoords) → {Degree}

Horizontal (local) altitude (where horizon is zero degrees)
Parameters:
Name Type Description
jd JulianDay The julian day
geoCoords GeographicCoordinates The geographic coordinates of the observer's location.
equCoords EquatorialCoordinates The equatorial coordinates of the target

View Source coordinates/equatorial2horizontal.ts, line 12

Degree

# getHorizontalAzimuth(jd, geoCoords, equCoords) → {Degree}

Horizontal (local) azimuth.
Parameters:
Name Type Description
jd JulianDay The julian day
geoCoords GeographicCoordinates The geographic coordinates of the observer's location.
equCoords EquatorialCoordinates The equatorial coordinates of the target

View Source coordinates/equatorial2horizontal.ts, line 34

Degree

# getMeanAnomaly(jd) → {Degree}

Computes the Sun mean anomaly which is equal to the mean anomaly of the Earth.
Parameters:
Name Type Description
jd JulianDay The julian day

View Source sun/sun.ts, line 10

The sun mean anomaly
Degree

# getMeanLongitudeReferredToMeanEquinoxOfDate(T) → {Degree}

Mean Longitude referred to the Mean Equinox of the Date See AA p 164
Parameters:
Name Type Description
T JulianCentury The julian century

View Source sun/sun.ts, line 49

Degree

# getParallacticAngle(jd, geoCoords, equCoords) → {Degree}

Paralactic angle of an object at given equatorial coordinates, at a given time and observer's location.
Parameters:
Name Type Description
jd JulianDay The julian day of the observation.
geoCoords GeographicCoordinates The geographic coordinates of the observer's location.
equCoords EquatorialCoordinates The object equatorial coordinates

View Source coordinates/angles.ts, line 11

The paralactic angle
Degree

# getRightAscensionFromEcliptic(coords, epsilon) → {Degree}

Equatorial right ascension from ecliptic coordinates
Parameters:
Name Type Description
coords EclipticCoordinates The ecliptic coordinates
epsilon Degree The ecliptic obliquity (default = obliquity of J2000)

View Source coordinates/ecliptic2equatorial.ts, line 10

Degree (v3.2+), not HOURS (< v3.2)
Degree

# getRightAscensionFromHorizontal(jd, geoCoords, horCoords) → {Degree}

Equatorial right ascension from horizontal coordinates
Parameters:
Name Type Description
jd JulianDay The julian day
geoCoords GeographicCoordinates The geographic coordinates of the observer's location.
horCoords HorizontalCoordinates The horizontal coordinates of the target

View Source coordinates/horizontal2equatorial.ts, line 12

Degree

# getRiseTransitSetTimes(jd, equCoords, geoCoords, alt) → {RiseTransitSet}

Compute the times of rise, set and transit of an object at a given date, and observer's location on Earth. It runs a low accuracy algoritm (very similar to the accurate ones, but without iterations).
Parameters:
Name Type Description
jd JulianDay The julian day
equCoords EquatorialCoordinates The apparent equatorial coordinates of the day of interest, at midnight Dynamical Time (see juliandays.getJulianDayMidnightDynamicalTime)
geoCoords GeographicCoordinates The observer's location.
alt Degree The local altitude of the object's center to consider for rise and set times. It's value isn't 0. For stars, it is affected by aberration (value = -0.5667 degree)
See:

View Source risetransitset/standard.ts, line 19

# getTrueAnomaly(jd) → {Degree}

Computes the Sun true anomaly
Parameters:
Name Type Description
jd JulianDay The julian day

View Source sun/sun.ts, line 25

The Sun true anomaly
Degree

# julianDayOfNextTransit(lowerJD, orbitalPeriod, tZeroOfTransit) → {Number}

Simple helper to find the Julian Day of the next transit after the given lower Julian Day
Parameters:
Name Type Description
lowerJD Number The lower julian day limit
orbitalPeriod Number The orbital period of the system, in days.
tZeroOfTransit Number The Julian Day of the primary|secondary transit.

View Source exoplanets.ts, line 13

The Julian Day of the next transit.
Number

# precessEquatorialCoordinates(coords, initialEpoch, finalEpoch) → {EquatorialCoordinates}

Precess equatorial coordinates from aa given epoch to another one See AA p.134
Parameters:
Name Type Description
coords EquatorialCoordinates The equatorial coordinates (in degrees)
initialEpoch JulianDay The initial epoch
finalEpoch JulianDay The initial epoch

View Source coordinates/precession.ts, line 11

The precessed coordinates

# precessEquatorialCoordinatesFromB1950ToJ2000(coords) → {EquatorialCoordinates}

Precess equatorial coordinates from an assumed B1950 epoch to that of J2000.
Parameters:
Name Type Description
coords EquatorialCoordinates The equatorial coordinates (in degrees)

View Source coordinates/precession.ts, line 54

The precessed coordinates

# precessEquatorialCoordinatesFromJ2000ToB1950(coords) → {EquatorialCoordinates}

Precess equatorial coordinates from an assumed J2000 epoch to that of B1950.
Parameters:
Name Type Description
coords EquatorialCoordinates The equatorial coordinates (in degrees)

View Source coordinates/precession.ts, line 46

The precessed coordinates

# transformEclipticToEquatorial(coords, epsilon) → {EquatorialCoordinates}

Transform ecliptic longitude and latitude to equatorial coordinates.
Parameters:
Name Type Description
coords EclipticCoordinates The ecliptic coordinates
epsilon Degree The obliquity of the ecliptic; that is, the angle between the ecliptic and the celestial equator. The mean obliquity (epsilon0) is given by nutation.getMeanObliquityOfEcliptic(jd). If however the *apparent* R.A. and Dec. are required (that is, affected by aberration and nutation), the true obliquity epsilon + Delta epsilon should be used. One can use nutation.getTrueObliquityOfEcliptic(jd) If R.A. and Dec. are referred to the standard equinox of J2000, epsilon must be that of ECLIPTIC_OBLIQUITY_J2000_0.

View Source coordinates/ecliptic2equatorial.ts, line 49

# transformEquatorialToEcliptic(coords, epsilon)

Transform equatorial coordinates to ecliptic coordinates
Parameters:
Name Type Description
coords EquatorialCoordinates The equatorial coordinates (in degrees)
epsilon Degree The obliquity of the ecliptic; that is, the angle between the ecliptic and the celestial equator. The mean obliquity (epsilon0) is given by nutation.getMeanObliquityOfEcliptic(jd). If however the *apparent* R.A. and Dec. are required (that is, affected by aberration and nutation), the true obliquity epsilon + Delta epsilon should be used. One can use nutation.getTrueObliquityOfEcliptic(jd) If R.A. and Dec. are referred to the standard equinox of J2000, epsilon must be that of ECLIPTIC_OBLIQUITY_J2000_0.

View Source coordinates/equatorial2ecliptic.ts, line 51

# transformEquatorialToHorizontal(jd, geoCoords, equCoords) → {HorizontalCoordinates}

Transform equatorial coordinates to horizontal coordinates.
Parameters:
Name Type Description
jd JulianDay The julian day
geoCoords GeographicCoordinates The geographic coordinates of the observer's location.
equCoords EquatorialCoordinates The equatorial coordinates of the target

View Source coordinates/equatorial2horizontal.ts, line 55

# transformEquatorialToTopocentric(jd, coords, distance, geoCoords) → {TopocentricCoordinates}

Transform equatorial coordinates to topocentric coordinates.
Parameters:
Name Type Description
jd JulianDay The julian day
coords EquatorialCoordinates The equatorial coordinates
distance AstronomicalUnit The object geocentric distance
geoCoords GeographicCoordinates The geographic coordinates of the observer's location.

View Source coordinates/equatorial2topocentric.ts, line 14

# transformGalacticToEquatorial(coords, epoch) → {EquatorialCoordinates}

Transform galactic coordinates to equatorial coordinates.
Parameters:
Name Type Description
coords GalacticCoordinates The galactic coordinates
epoch Degree The initial epoch of the equatorial coordinates. By default, J2000.

View Source coordinates/galactic2equatorial.ts, line 37

# transformHorizontalToEquatorial(jd, geoCoords, horCoords) → {EquatorialCoordinates}

Transform horizontal coordinates to equatorial coordinates.
Parameters:
Name Type Description
jd JulianDay The julian day
geoCoords GeographicCoordinates The geographic coordinates of the observer's location.
horCoords HorizontalCoordinates The horizontal coordinates of the target

View Source coordinates/horizontal2equatorial.ts, line 54

# transformHorizontalToPoint(horCoords, center, radius) → {Point}

Transform horizontal coordinates to a point (x,y) of the sky projected on a disk.
Parameters:
Name Type Description
horCoords HorizontalCoordinates The horizontal coordinates of the target
center Point The center of the disk, relative to a relative origin
radius number The radius of the disk.

View Source coordinates/pointsHorizontal.ts, line 27

Point

# transformPointToHorizontal(point, center, radius) → {HorizontalCoordinates}

Transform a point (x,y) of the sky projected on a disk to horizontal coordinates.
Parameters:
Name Type Description
point Point The point on the disk, relative to its center
center Point The center of the disk, relative to a relative origin
radius number The radius of the disk.

View Source coordinates/pointsHorizontal.ts, line 11

Type Definitions

number

# Albedo

Albedo

View Source types/units.ts, line 108

number

# AstronomicalUnit

Astronomical unit, that is mean distance between the centers of the Sun and the Earth.

View Source types/units.ts, line 76

number

# Celsius

Celsius degrees

View Source types/units.ts, line 144

number

# Day

Terrestrial day (= 24 Hours)

View Source types/units.ts, line 24

number

# Degree

Angular degree

View Source types/units.ts, line 4

object

# EclipticCoordinates

Coordinates in the Ecliptic (a.k.a. Celestial) system, that is the system formed by projecting the plane of Earth's orbit (the ecliptic) onto the spherical sky.
Properties:
Name Type Description
longitude Degree
latitude Degree

View Source types/coordinates.ts, line 27

object

# EquatorialCoordinates

Coordinates in the Equatorial system, that is in the system formed by projecting the Earth equator onto the spherical sky.
Properties:
Name Type Attributes Description
rightAscension Degree
declination Degree
epoch JulianDay <optional>

View Source types/coordinates.ts, line 5

number

# GYr

Giga-year = 10^9 terrestrial years.

View Source types/units.ts, line 12

object

# GeographicCoordinates

Geographic coordinates, East Positive!
Properties:
Name Type Attributes Description
longitude Degree
latitude Degree
height Meter <optional>

View Source types/coordinates.ts, line 20

number

# GigaParsec3

Gpc^3.

View Source types/units.ts, line 92

number

# GramPerCubicCentimeter

g cm^-3

View Source types/units.ts, line 132

object

# HorizontalCoordinates

Coordinates of an object as seen from an observer's location, at a given time. The altitude is counted from the (idealistic) plane horizon. The azimuth is the angle counted from the geographical north or south.
Properties:
Name Type Description
azimuth Degree
altitude Degree

View Source types/coordinates.ts, line 36

number

# Hour

Time hour

View Source types/units.ts, line 28

number

# JulianCentury

Julian century (= time interval of 36525 days)

View Source types/units.ts, line 54

number

# JulianDay

Julian day The Julian Day is a continuous count of days and fractions thereof from the beginning of the year -4712. By tradition, the Julian Day begins at Greenwich mean noon, that is, 12h Universal Time.

View Source types/units.ts, line 48

number

# JulianEphemerisDay

Julian Ephemeris Day

View Source types/units.ts, line 62

number

# JulianMillenium

Julian millenium (= time interval of 365250 days)

View Source types/units.ts, line 58

number

# JupiterRadius

Mean radius of Jupiter

View Source types/units.ts, line 68

number

# KiloParsec

Kiloparsec. Of course.

View Source types/units.ts, line 84

number

# Kilogram

Kilogram

View Source types/units.ts, line 124

number

# Kilogram24

10^24 kilograms

View Source types/units.ts, line 128

number

# Kilometer

Kilometer

View Source types/units.ts, line 116

number

# KilometerPerSecond

km s^-1

View Source types/units.ts, line 140

number

# KilometerPerSecondPerMegaParsec

KilometerPerSecondPerMegaParsec (for the Hubble constant)

View Source types/units.ts, line 104

number

# KiloparsecPerArcsecond

kpc/".

View Source types/units.ts, line 96

number

# LightYear

Light-Year

View Source types/units.ts, line 120

number

# Magnitude

Logarithmic scale of luminosity

View Source types/units.ts, line 100

number

# MegaParsec

Megaparsec.

View Source types/units.ts, line 88

number

# Meter

Meter

View Source types/units.ts, line 112

number

# MeterPerSquareSecond

m s^-2

View Source types/units.ts, line 136

number

# MiliSecond

Time milisecond

View Source types/units.ts, line 40

number

# Minute

Time second

View Source types/units.ts, line 32

number

# Month

Terrestrial month

View Source types/units.ts, line 20

number

# Parsec

Parsec

View Source types/units.ts, line 80

number

# Pixel

Pixel

View Source types/units.ts, line 44

object

# PlanetConstants

Common constants of planets
Properties:
Name Type Description
equatorialRadius Kilometer Radius at the equator
meanRadius Kilometer Mean radius
mass Kilogram24 Mass
bulkDensity GramPerCubicCentimeter
siderealRotationPeriod Day
siderealOrbitPeriod Year
visualMagnitude Magnitude
geometricAlbedo Albedo
equatorialGravity MeterPerSquareSecond
escapeVelocity KilometerPerSecond

View Source types/planets.ts, line 7

object

# PlanetOrbitalElements

Elements of Planetary Orbits
Properties:
Name Type Description
semiMajorAxis LengthArray.<AstronomicalUnit, 4>
eccentricity LengthArray.<number, 4>
undefined object
meanLongitude LengthArray.<Degree, 4>
inclination LengthArray.<Degree, 4>
longitudeOfAscendingNode LengthArray.<Degree, 4>
longitudeOfPerihelion LengthArray.<Degree, 4>
undefined object
meanLongitude LengthArray.<Degree, 4>
inclination LengthArray.<Degree, 4>
longitudeOfAscendingNode LengthArray.<Degree, 4>
longitudeOfPerihelion LengthArray.<Degree, 4>

View Source types/planets.ts, line 31

number

# Radian

Angular radian

View Source types/units.ts, line 8

object

# RiseTransitSet

The various elements of the rise, set and transit of an object
Properties:
Name Type Description
rise object
utc Hour | undefined
julianDay JulianDay | undefined
transit Transit
set object
utc Hour | undefined
julianDay JulianDay | undefined

View Source types/risetransitset.ts, line 18

number

# Second

Time minute

View Source types/units.ts, line 36

number

# SolarRadius

Mean radius of the Sun

View Source types/units.ts, line 72

object

# TopocentricCoordinates

Topocentric coordinates.
Properties:
Name Type Attributes Description
rightAscension Hour
declination Degree
epoch JulianDay <optional>

View Source types/coordinates.ts, line 13

object

# Transit

The various elements of the transit of an object
Properties:
Name Type Description
utc Hour | undefined
julianDay JulianDay | undefined
altitude Degree | undefined
refAltitude Degree
isAboveHorizon boolean
isAboveAltitude boolean
isCircumpolar boolean
internals TransitInternals

View Source types/risetransitset.ts, line 6

number

# Year

Terrestrial year = (365 or 366 Days)

View Source types/units.ts, line 16