source: Sophya/trunk/Poubelle/archTOI.old/templocator.cc@ 419

Last change on this file since 419 was 419, checked in by ansari, 26 years ago

nouvelles tois

File size: 798 bytes
Line 
1#include "templocator.h"
2#include <math.h>
3extern "C" {
4#include "aa_hadec.h"
5}
6
7#ifndef M_PI
8#define M_PI 3.14159265358979323846
9#endif
10
11TempLocator tempLocator;
12
13TempLocator::TempLocator()
14{
15 lon = lat = ts = 0;
16}
17
18void TempLocator::setEarthPos(double lon, double lat) {
19 this->lon = lon;
20 this->lat = lat;
21}
22void TempLocator::setTSid(double ts) {
23 this->ts = ts;
24}
25
26double 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
34double 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.