source: branches/FACT++_scripts_refactoring/doc/Sky.js@ 18403

Last change on this file since 18403 was 14704, checked in by tbretz, 12 years ago
Updated.
File size: 2.4 KB
Line 
1throw new Error("Description for built in functions. Must not be included!");
2/**
3 * @fileOverview
4 * Documentation of Sky class built into dimctrl.
5 */
6
7
8/**
9 * @class
10 *
11 * This class represents a set of sky coordinates.
12 *
13 * If the data was the result of a coordinate transformation, the
14 * corresponding time is stored in addition. A function to convert
15 * to local coordinates is included.
16 *
17 * @param {Number} rightAscension
18 * Right ascension in hours
19 *
20 * @param {Number} declination
21 * Declination in degree
22 *
23 * @example
24 * var sky = new Sky(12, 45);
25 * var local = sky.toLocal();
26 *
27 * @author <a href="mailto:thomas.bretz@epfl.ch">Thomas Bretz</a>
28 *
29 */
30function Sky()
31{
32
33 /**
34 * Right ascension in hours
35 *
36 * @constant
37 * @type Number
38 */
39 this.ra = rightAscension
40
41 /**
42 * Declination in degrees
43 *
44 * @constant
45 * @type Number
46 */
47 this.dec = declination;
48
49 /**
50 * Time corresponding to ra and dec if they are the result of
51 * a conversion.
52 *
53 * @constant
54 * @type Date
55 */
56 this.time = undefined;
57
58 /**
59 * Convert sky coordinates to celestial coordinates.
60 * As observatory location the FACT telescope is assumed.
61 * The conversion is done using libnova's ln_get_hrz_from_equ.
62 *
63 * @param {Date} [time=new Date()]
64 * Reference time for the converstion.
65 *
66 * @type Local
67 *
68 * @returns
69 * A Local object with the converted coordinates and
70 * the conversion time.
71 */
72 this.toLocal = function() { /* [native code] */ }
73}
74
75/**
76 * Calculate the distance between two sky positions.
77 *
78 * The distance between the two provided objects is calculated.
79 * The returned value is an absolute distance (angle) between
80 * the two positions.
81 *
82 * @constant
83 *
84 * @param {Sky} sky1
85 * Celestial coordinates for one of the two objects for which
86 * the distance on the sky should be calculated. In principle
87 * every object with the properties 'ra' and 'dec' can be provided.
88 *
89 * @param {Sky} sky2
90 * Celestial coordinates for one of the two objects for which
91 * the distance on the sky should be calculated. In principle
92 * every object with the properties 'ra' and 'dec' can be provided.
93 *
94 * @returns {Number}
95 * Absolute distance between both positions on the sky in degrees.
96 */
97Sky.dist = function() { /* [native code] */}
Note: See TracBrowser for help on using the repository browser.