Class Index | File Index

Classes


Class Sky

This class represents a set of sky coordinates. If the data was the result of a coordinate transformation, the corresponding time is stored in addition. A function to convert to local coordinates is included.
Defined in: Sky.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Sky(rightAscension, declination)
Field Summary
Field Attributes Field Name and Description
<constant>  
dec
Declination in degrees
<constant>  
ra
Right ascension in hours
<constant>  
Time corresponding to ra and dec if they are the result of a conversion.
Method Summary
Method Attributes Method Name and Description
<static>  
Sky.dist(sky1, sky2)
Calculate the distance between two sky positions.
 
toLocal(time)
Convert sky coordinates to celestial coordinates.
Class Detail
Sky(rightAscension, declination)

Author: Thomas Bretz.
    var sky   = new Sky(12, 45);
    var local = sky.toLocal();
Parameters:
{Number} rightAscension
Right ascension in hours
{Number} declination
Declination in degree
Field Detail
<constant> {Number} dec
Declination in degrees

<constant> {Number} ra
Right ascension in hours

<constant> {Date} time
Time corresponding to ra and dec if they are the result of a conversion.
Method Detail
<static> {Number} Sky.dist(sky1, sky2)
Calculate the distance between two sky positions. The distance between the two provided objects is calculated. The returned value is an absolute distance (angle) between the two positions.
Parameters:
{Sky} sky1
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 'ra' and 'dec' can be provided.
{Sky} sky2
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 'ra' and 'dec' can be provided.
Returns:
{Number} Absolute distance between both positions on the sky in degrees.

{Local} toLocal(time)
Convert sky coordinates to celestial coordinates. As observatory location the FACT telescope is assumed. The conversion is done using libnova's ln_get_hrz_from_equ.
Parameters:
{Date} time Optional, Default: new Date()
Reference time for the converstion.
Returns:
A Local object with the converted coordinates and the conversion time.

Documentation generated by JsDoc Toolkit 2.4.0 on Sun Sep 18 2016 20:50:08 GMT+0100 (WEST)