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

Last change on this file since 14649 was 14644, checked in by tbretz, 12 years ago
File size: 2.2 KB
Line 
1/**
2 * @fileOverview
3 * Documentation of Moon class built into dimctrl.
4 */
5
6/**
7 * @class
8 *
9 * Calculates the moon's sky position at a given time.
10 *
11 * When instantiated, the class members are set to the sky position
12 * of the moon at the given time. The calculation is done using
13 * libnova's ln_get_lunar_equ_coords. A different time can be provided
14 * by the user. The sky coordinates are stored together with the time.
15 * A function is provided to convert the moon's position to celestial
16 * coordinates. A function to calculate the illuminated fraction of
17 * the moon's disk.
18 *
19 * @param {Date} [time=new Date()]
20 * Reference time for the calculation of the moon's position.
21 *
22 * @example
23 * var moon = new Moon();
24 * var local = moon.toLocal();
25 *
26 * @author <a href="mailto:thomas.bretz@epfl.ch">Thomas Bretz</a>
27 */
28function Moon(time)
29{
30 /**
31 * Right ascension of the moon in hours.
32 *
33 * @type Number
34 * @constant
35 *
36 */
37 this.ra = 0;
38
39 /**
40 * Declination of the moon in degrees.
41 *
42 * @type Number
43 * @constant
44 *
45 */
46 this.dec = 0;
47
48 /**
49 * Time corresponding to the calculated sky coordinates of the moon.
50 *
51 * @type Date
52 * @constant
53 */
54 this.time = time;
55
56 /**
57 * Converts the moon's sky coordinates to celestial coordinates.
58 * As observatory location the FACT telescope is assumed. For the
59 * time, the time corresponding to the stored sky coordinates is used.
60 * The conversion is done using libnova's ln_get_hrz_from_equ.
61 *
62 * @returns {Local}
63 * A Local object with the converted coordinates and
64 * the corresponding time.
65 */
66 this.toLocal = function() { /* [native code] */ }
67}
68
69/**
70 * Calculates the illuminated fraction of the moon's disk for the
71 * provided time. If no time is provided, the current system time
72 * is used. The calculation is done using libnova's ln_get_lunar_disk.
73 *
74 * @param {Date} [time=new Date()]
75 * Time for which the moon disk should be calculated. If no time is
76 * given, the current time is used.
77 *
78 * @type Number
79 *
80 * @returns
81 * The illuminated fraction of the moon's disk corresponding
82 * to the time argument
83 *
84 */
85Moon.disk = function() { /* [native code] */ }
Note: See TracBrowser for help on using the repository browser.