Line | |
---|
1 | /**
|
---|
2 | * @fileOverview
|
---|
3 | * Documentation of Sky class built into dimctrl.
|
---|
4 | */
|
---|
5 |
|
---|
6 |
|
---|
7 | /**
|
---|
8 | * @class
|
---|
9 | *
|
---|
10 | * This class represents a set of sky coordinates.
|
---|
11 | *
|
---|
12 | * If the data was the result of a coordinate transformation, the
|
---|
13 | * corresponding time is stored in addition. A function to convert
|
---|
14 | * to local coordinates is included.
|
---|
15 | *
|
---|
16 | * @param {Number} rightAscension
|
---|
17 | * Right ascension in hours
|
---|
18 | *
|
---|
19 | * @param {Number} declination
|
---|
20 | * Declination in degree
|
---|
21 | *
|
---|
22 | * @example
|
---|
23 | * var sky = new Sky(12, 45);
|
---|
24 | * var local = sky.toLocal();
|
---|
25 | *
|
---|
26 | * @author <a href="mailto:thomas.bretz@epfl.ch">Thomas Bretz</a>
|
---|
27 | *
|
---|
28 | */
|
---|
29 | function Sky()
|
---|
30 | {
|
---|
31 |
|
---|
32 | /**
|
---|
33 | * Right ascension in hours
|
---|
34 | *
|
---|
35 | * @constant
|
---|
36 | * @type Number
|
---|
37 | */
|
---|
38 | this.ra = rightAscension
|
---|
39 |
|
---|
40 | /**
|
---|
41 | * Declination in degrees
|
---|
42 | *
|
---|
43 | * @constant
|
---|
44 | * @type Number
|
---|
45 | */
|
---|
46 | this.dec = declination;
|
---|
47 |
|
---|
48 | /**
|
---|
49 | * Time corresponding to ra and dec if they are the result of
|
---|
50 | * a conversion.
|
---|
51 | *
|
---|
52 | * @constant
|
---|
53 | * @type Date
|
---|
54 | */
|
---|
55 | this.time = undefined;
|
---|
56 |
|
---|
57 | /**
|
---|
58 | * Convert sky coordinates to celestial coordinates.
|
---|
59 | * As observatory location the FACT telescope is assumed.
|
---|
60 | * The conversion is done using libnova's ln_get_hrz_from_equ.
|
---|
61 | *
|
---|
62 | * @param {Date} [time=new Date()]
|
---|
63 | * Reference time for the converstion.
|
---|
64 | *
|
---|
65 | * @type Local
|
---|
66 | *
|
---|
67 | * @returns
|
---|
68 | * A Local object with the converted coordinates and
|
---|
69 | * the conversion time.
|
---|
70 | */
|
---|
71 | this.toLocal = function() { /* [native code] */ }
|
---|
72 | }
|
---|
73 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.