mirror of
https://github.com/cosinekitty/astronomy.git
synced 2026-04-15 20:18:54 -04:00
Added documentation for JavaScript function Constellation.
This commit is contained in:
@@ -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.';
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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.';
|
||||
|
||||
Reference in New Issue
Block a user