Members
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. |
# 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. |
# 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 |
# 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. |
# 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. |
# 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
|
# getEquatorialDeclinationB1950FromGalactic(coords) → {Degree}
Equatorial declination in epoch B1950 from galactic coordinates
See AA p.94
Parameters:
Name | Type | Description |
---|---|---|
coords |
GalacticCoordinates
|
The galactic coordinates |
# 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 |
# 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 |
# 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
|
# 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 |
# 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 |
# 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 |
The sun mean anomaly
# 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 |
# 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 |
The paralactic angle
# 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) |
Degree (v3.2+), not HOURS (< v3.2)
# 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 |
# 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) |
# getTrueAnomaly(jd) → {Degree}
Computes the Sun true anomaly
Parameters:
Name | Type | Description |
---|---|---|
jd |
JulianDay
|
The julian day |
The Sun true anomaly
# 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. |
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 |
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) |
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) |
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. |
# 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. |
# 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 |
# 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. |
# 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. |
# 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 |
# 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. |
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. |
Type Definitions
number
# AstronomicalUnit
Astronomical unit, that is mean distance between the centers of the Sun and the Earth.
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:
object
# EquatorialCoordinates
Coordinates in the Equatorial system, that is in the system formed by
projecting the Earth equator onto the spherical sky.
Properties:
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:
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.
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
|
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>
|
object
# RiseTransitSet
The various elements of the rise, set and transit of an object