source: trunk/Cosy/catalog/SlaPlanets.cc@ 10009

Last change on this file since 10009 was 9523, checked in by tbretz, 15 years ago
*** empty log message ***
File size: 1.3 KB
Line 
1#include "SlaPlanets.h"
2
3#include <iostream>
4
5#include "slalib.h"
6
7ClassImp(SlaPlanets);
8
9using namespace std;
10
11SlaPlanets::SlaPlanets(MObservatory::LocationName_t key) : SlaStars(key)//, fDt(slaDt(2000.0)/60./60./24.)
12{
13}
14
15void SlaPlanets::SetMjd(double mjd)
16{
17 SlaStars::SetMjd(mjd);
18
19 //
20 // coordinates of earth: heliocentric, equatorial, J2000
21 //
22 /*
23 double veb[3]; // barycentric velocity
24 double ceb[3]; // barycentric coordinates
25 double veh[3]; // heliocentric velocity
26
27 slaEvp(GetMjd() + fDt, 2000.0, veb, ceb, veh, fEarth);
28 */
29}
30
31// --------------------------------------------------------------------------
32//
33// coordinates of planet: topocentric, equatorial, J2000
34//
35RaDec SlaPlanets::CalcPlanetRaDec(ePlanets_t planet)
36{
37 // coordinates of planet: topocentric, equatorial, J2000
38 double ra, dec, diam;
39
40 // One can use TT instead of TDB for all planets (except the moon?)
41 // TDB, planet, elong, phi, *ra, *dec, *diam
42 slaRdplan(GetTT(), planet, GetElong(), GetPhi(), &ra, &dec, &diam);
43
44 return RaDec(ra, dec);
45}
46
47void SlaPlanets::UpdatePlanetPos(ePlanets_t planet)
48{
49 // coordinates of planet: topocentric, equatorial, J2000
50 const RaDec rd = CalcPlanetRaDec(planet);
51
52 double az, el;
53 slaDe2h(GetAlpha()-rd.Ra(), rd.Dec(), GetPhi(), &az, &el);
54
55 fZdAz[planet].Set(TMath::Pi()/2-el, az);
56}
57
Note: See TracBrowser for help on using the repository browser.