source: trunk/FACT++/scripts/doc/Local.js@ 18877

Last change on this file since 18877 was 18829, checked in by tbretz, 8 years ago
Updated with the latest changes in the astromtry interface of the JavaScript interpreter.
File size: 3.9 KB
Line 
1throw new Error("Description for built in functions. Must not be included!");
2/**
3 * @fileOverview
4 * Documentation of Local class built into dimctrl.
5 */
6
7/**
8 * @class
9 *
10 * A set of coordinates on the celestial sphere.
11 *
12 * The class stores a set of coordinates on the celestial, i.e. local,
13 * sky. If the data was the result of a coordinate transformation, the
14 * corresponding time is stored in addition. Functions to convert to sky
15 * coordinates and to measure distances on th sky are included.
16 *
17 * @param {Number} zenithDistance
18 * Zenith angle in degree (Zenith=0deg)
19 *
20 * @param {Date} [time]
21 * Time for which the coordinates are valid.
22 * The order of time and observatory is arbitrary.
23 *
24 * @param {String} [observatory]
25 * Observatory location for which the coordinates are valid.
26 * The order of time and observatory is arbitrary.
27 *
28 *
29 * @param {Number} azimuth
30 * Azimuth angle in degree (North=0deg, East=90deg)
31 *
32 * @example
33 * var date = new Date("2012-10-25 16:30 GMT"); // Date in UTC
34 * var local = new Local(12, 45);
35 * var local = new Local(12, 45, date);
36 * var local = new Local(12, 45, "ORM");
37 * var local = new Local(12, 45, "SPM", date);
38 * var local = new Local(12, 45, date, "HAWC");
39 * var sky = local.toSky();
40 * var sky = local.toSky(date);
41 * var sky = local.toSky("ORM");
42 * var sky = local.toSky("HAWC", date);
43 * var sky = local.toSky(date, "SPM");
44 *
45 * @author <a href="mailto:tbretz@physik.rwth-aachen.de">Thomas Bretz</a>
46 *
47 */
48function Local(zenithDistance, azimuth)
49{
50 /**
51 * Zenith distance in degree (Zenith=0deg)
52 *
53 * @constant
54 *
55 * @type Number
56 */
57 this.zd = zenithDistance;
58
59 /**
60 * Azimuth in degree (North=0deg, East=90deg)
61 *
62 * @constant
63 *
64 * @type Number
65 */
66 this.az = azimuth;
67
68 /**
69 * Time corresponding to ra and dec if they are the result of
70 * a conversion.
71 *
72 * @constant
73 * @default undefined
74 *
75 * @type Date
76 */
77 this.time = undefined;
78
79
80 /**
81 * Convert celestial coordinats to sky coordinates.
82 * As observatory location the FACT telescope is assumed.
83 * The conversion is done using libnova's ln_get_equ_from_hrz.
84 *
85 * @constant
86 *
87 * @param {Date} [time=new Date()]
88 * Time for which the coordinates will be tranfromed.
89 * The order of time and observatory is arbitrary.
90 * If none is given, the value given in the constructor is used.
91 * If none was given there, the default is used.
92 *
93 * @param {String} [observatory='ORM']
94 * Observatory location as defined in nova.h as a string for which
95 * the coordinate conversion is done.
96 * The order of time and observatory is arbitrary.
97 * If none is given, the value given in the constructor is used.
98 * If none was given there, the default is used.
99 *
100 * @returns {Sky}
101 * A Sky object with the converted coordinates plus a
102 * a correspnding object local of type {Local}.
103 */
104 this.toSky = function() { /* [native code] */ }
105}
106
107/**
108 * Calculate the distance between two celestial sky positions.
109 *
110 * The distance between the two provided objects is calculated.
111 * The returned value is an absolute distance (angle) between
112 * the two positions.
113 *
114 * @constant
115 *
116 * @param {Local} local1
117 * Celestial coordinates for one of the two objects for which
118 * the distance on the sky should be calculated. In principle
119 * every object with the properties 'zd' and 'az' can be provided.
120 *
121 * @param {Local} local2
122 * Celestial coordinates for one of the two objects for which
123 * the distance on the sky should be calculated. In principle
124 * every object with the properties 'zd' and 'az' can be provided.
125 *
126 * @returns {Number}
127 * Absolute distance between both positions on the sky in degrees.
128 */
129Local.dist = function() { /* [native code] */}
Note: See TracBrowser for help on using the repository browser.