source: trunk/FACT++/scripts/doc/Moon.js@ 15884

Last change on this file since 15884 was 14696, checked in by tbretz, 12 years ago
Updated
File size: 3.5 KB
Line 
1throw new Error("Description for built in functions. Must not be included!");
2/**
3 * @fileOverview
4 * Documentation of Moon class built into dimctrl.
5 */
6
7/**
8 * @class
9 *
10 * Calculates the moon's sky position at a given time.
11 *
12 * When instantiated, the class members are set to the sky position
13 * of the moon at the given time. The calculation is done using
14 * libnova's ln_get_lunar_equ_coords. A different time can be provided
15 * by the user. The sky coordinates are stored together with the time.
16 * A function is provided to convert the moon's position to celestial
17 * coordinates. A function to calculate the illuminated fraction of
18 * the moon's disk.
19 *
20 * @param {Date} [time=new Date()]
21 * Reference time for the calculation of the moon's position.
22 *
23 * @example
24 * var moon = new Moon();
25 * var local = moon.toLocal();
26 *
27 * @author <a href="mailto:thomas.bretz@epfl.ch">Thomas Bretz</a>
28 */
29function Moon(time)
30{
31 /**
32 * Right ascension of the moon in hours.
33 *
34 * @type Number
35 * @constant
36 *
37 */
38 this.ra = 0;
39
40 /**
41 * Declination of the moon in degrees.
42 *
43 * @type Number
44 * @constant
45 *
46 */
47 this.dec = 0;
48
49 /**
50 * Time corresponding to the calculated sky coordinates of the moon.
51 *
52 * @type Date
53 * @constant
54 */
55 this.time = time;
56
57 /**
58 * Converts the moon's sky coordinates to celestial coordinates.
59 * As observatory location the FACT telescope is assumed. For the
60 * time, the time corresponding to the stored sky coordinates is used.
61 * The conversion is done using libnova's ln_get_hrz_from_equ.
62 *
63 * @returns {Local}
64 * A Local object with the converted coordinates and
65 * the corresponding time.
66 */
67 this.toLocal = function() { /* [native code] */ }
68}
69
70/**
71 * Calculates the illuminated fraction of the moon's disk.
72 *
73 * Calculates the illuminated fraction of the moon's disk for the
74 * provided time. If no time is provided, the current system time
75 * is used. The calculation is done using libnova's ln_get_lunar_disk.
76 *
77 * @param {Date} [time=new Date()]
78 * Time for which the moon disk should be calculated. If no time is
79 * given, the current time is used.
80 *
81 * @type Number
82 *
83 * @returns
84 * The illuminated fraction of the moon's disk corresponding
85 * to the time argument
86 *
87 */
88Moon.disk = function() { /* [native code] */ }
89
90/**
91 * Calculate moon rise, set and transit times.
92 *
93 * Calculates the moon rise and set time, above and below horizon,
94 * and the time of culmination (transit time) for the given time.
95 * The calculation is done using libnova's ln_get_lunar_rst and is
96 * always performed for the FACT site at La Palma.
97 *
98 * @param {Date} [time=new Date()]
99 * Date for which the times should be calculated. Note that the date
100 * is converted to UTC and the times are calculated such that the
101 * Date (yy/mm/dd) is identical for all returned values.
102 *
103 * @type {Object}
104 *
105 * @returns
106 * An object with the following properties is returned: time {Date}
107 * the provided time; rise, transit, set {Date} times of rise, set and
108 * transit; isUp {Boolean} whether the moon is above or below horizon
109 * at the provided time. If the moon does not rise or set, the properties
110 * rise, transit and set will be undefined.
111 *
112 * @example
113 * var date = new Date("2012-10-25 16:30 GMT"); // Date in UTC
114 * console.out(JSON.stringify(Moon.horizon(date));
115 */
116Moon.horizon = function() { /* [native code] */ }
Note: See TracBrowser for help on using the repository browser.