Class Local
A set of coordinates on the celestial sphere.
The class stores a set of coordinates on the celestial, i.e. local,
sky. If the data was the result of a coordinate transformation, the
corresponding time is stored in addition. Functions to convert to sky
coordinates and to measure distances on th sky are included.
Defined in: Local.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Local(zenithDistance, azimuth)
|
Field Attributes | Field Name and Description |
---|---|
<constant> |
Azimuth in degree (North=0deg, East=90deg)
|
<constant> |
Time corresponding to ra and dec if they are the result of
a conversion.
|
<constant> |
Zenith distance in degree (Zenith=0deg)
|
Method Attributes | Method Name and Description |
---|---|
<static> |
Local.dist(local1, local2)
Calculate the distance between two celestial sky positions.
|
toSky(time)
Convert celestial coordinats to sky coordinates.
|
Class Detail
Local(zenithDistance, azimuth)
Author: Thomas Bretz.
var local = new Local(12, 45); var sky = local.toSky();
- Parameters:
- {Number} zenithDistance
- Zenith angle in degree (Zenith=0deg)
- {Number} azimuth
- Azimuth angle in degree (North=0deg, East=90deg)
Field Detail
<constant>
{Number}
az
Azimuth in degree (North=0deg, East=90deg)
<constant>
{Date}
time
Time corresponding to ra and dec if they are the result of
a conversion.
- Default Value:
- undefined
<constant>
{Number}
zd
Zenith distance in degree (Zenith=0deg)
Method Detail
<static>
{Number}
Local.dist(local1, local2)
Calculate the distance between two celestial sky positions.
The distance between the two provided objects is calculated.
The returned value is an absolute distance (angle) between
the two positions.
- Parameters:
- {Local} local1
- Celestial coordinates for one of the two objects for which the distance on the sky should be calculated. In principle every object with the properties 'zd' and 'az' can be provided.
- {Local} local2
- Celestial coordinates for one of the two objects for which the distance on the sky should be calculated. In principle every object with the properties 'zd' and 'az' can be provided.
- Returns:
- {Number} Absolute distance between both positions on the sky in degrees.
{Sky}
toSky(time)
Convert celestial coordinats to sky coordinates.
As observatory location the FACT telescope is assumed.
The conversion is done using libnova's ln_get_equ_from_hrz.
- Parameters:
- {Date} time Optional, Default: new Date()
- Reference time for the conversion
- Returns:
- {Sky} A Sky object with the converted coordinates and the corresponding time.