Added documentation for JavaScript function Constellation.

This commit is contained in:
Don Cross
2020-05-04 13:37:11 -04:00
parent 4d81c4324f
commit 9df1a7a128
3 changed files with 55 additions and 0 deletions

View File

@@ -4180,6 +4180,23 @@ class ConstellationInfo {
}
/**
* Determines the constellation that contains the given point in the sky.
*
* Given J2000 equatorial (EQJ) coordinates of a point in the sky,
* determines the constellation that contains that point.
*
* @param {number} ra
* The right ascension (RA) of a point in the sky, using the J2000 equatorial system.
*
* @param {number} dec
* The declination (DEC) of a point in the sky, using the J2000 equatorial system.
*
* @returns {Astronomy.ConstellationInfo}
* An object that contains the 3-letter abbreviation and full name
* of the constellation that contains the given (ra,dec), along with
* the converted B1875 (ra,dec) for that point.
*/
Astronomy.Constellation = function(ra, dec) {
if (dec < -90 || dec > +90) {
throw 'Invalid declination angle. Must be -90..+90.';

View File

@@ -1711,6 +1711,27 @@ Target: ECL = ecliptic system, using equator at J2000 epoch.
| observer | [<code>Observer</code>](#Astronomy.Observer) | The location of the horizontal observer. |
* * *
<a name="Astronomy.Constellation"></a>
### Astronomy.Constellation(ra, dec) ⇒ [<code>ConstellationInfo</code>](#Astronomy.ConstellationInfo)
Determines the constellation that contains the given point in the sky.
Given J2000 equatorial (EQJ) coordinates of a point in the sky,
determines the constellation that contains that point.
**Kind**: static method of [<code>Astronomy</code>](#Astronomy)
**Returns**: [<code>ConstellationInfo</code>](#Astronomy.ConstellationInfo) - An object that contains the 3-letter abbreviation and full name
of the constellation that contains the given (ra,dec), along with
the converted B1875 (ra,dec) for that point.
| Param | Type | Description |
| --- | --- | --- |
| ra | <code>number</code> | The right ascension (RA) of a point in the sky, using the J2000 equatorial system. |
| dec | <code>number</code> | The declination (DEC) of a point in the sky, using the J2000 equatorial system. |
* * *
<a name="Astronomy.ContinuousFunction"></a>

View File

@@ -5701,6 +5701,23 @@ class ConstellationInfo {
}
/**
* Determines the constellation that contains the given point in the sky.
*
* Given J2000 equatorial (EQJ) coordinates of a point in the sky,
* determines the constellation that contains that point.
*
* @param {number} ra
* The right ascension (RA) of a point in the sky, using the J2000 equatorial system.
*
* @param {number} dec
* The declination (DEC) of a point in the sky, using the J2000 equatorial system.
*
* @returns {Astronomy.ConstellationInfo}
* An object that contains the 3-letter abbreviation and full name
* of the constellation that contains the given (ra,dec), along with
* the converted B1875 (ra,dec) for that point.
*/
Astronomy.Constellation = function(ra, dec) {
if (dec < -90 || dec > +90) {
throw 'Invalid declination angle. Must be -90..+90.';