Line | |
---|
1 | #include "templocator.h"
|
---|
2 | #include <math.h>
|
---|
3 | extern "C" {
|
---|
4 | #include "aa_hadec.h"
|
---|
5 | }
|
---|
6 |
|
---|
7 | #ifndef M_PI
|
---|
8 | #define M_PI 3.14159265358979323846
|
---|
9 | #endif
|
---|
10 |
|
---|
11 | TempLocator tempLocator;
|
---|
12 |
|
---|
13 | TempLocator::TempLocator()
|
---|
14 | {
|
---|
15 | lon = lat = ts = 0;
|
---|
16 | }
|
---|
17 |
|
---|
18 | void TempLocator::setEarthPos(double lon, double lat) {
|
---|
19 | this->lon = lon;
|
---|
20 | this->lat = lat;
|
---|
21 | }
|
---|
22 | void TempLocator::setTSid(double ts) {
|
---|
23 | this->ts = ts;
|
---|
24 | }
|
---|
25 |
|
---|
26 | double TempLocator::getAlphaZenith() {
|
---|
27 | double ha, dec;
|
---|
28 | aa_hadec (lat * M_PI/180, .5 * M_PI, 0, &ha, &dec);
|
---|
29 | double ra = - (ha * 180. / M_PI / 15) + (ts/3600.);
|
---|
30 | //dec = dec * 180. / M_PI;
|
---|
31 | return ra;
|
---|
32 | }
|
---|
33 |
|
---|
34 | double TempLocator::getDeltaZenith() {
|
---|
35 | double ha, dec;
|
---|
36 | aa_hadec (lat * M_PI/180, .5 * M_PI, 0, &ha, &dec);
|
---|
37 | //double ra = - (ha * 180. / M_PI / 15) + (ts/3600.);
|
---|
38 | dec = dec * 180. / M_PI;
|
---|
39 | return dec;
|
---|
40 | }
|
---|
41 |
|
---|
42 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.