aapponi
aapponi

Reputation: 116

How do you obtain the astrometric RA and Dec for earthsatellite objects

Below is an example provided in the Pyephem documentation:

    iss = ephem.readtle("ISS (ZARYA)","1 25544U 98067A   03097.78853147  .00021906  00000-0  28403-3 0  8652","2 25544  51.6361  13.7980 0004256  35.6671  59.2566 15.58778559250029")
    gatech = ephem.Observer()
    gatech.lon, gatech.lat = '-84.39733', '33.775867'
    gatech.date = '2003/3/23'
    iss.compute(gatech)
    print iss.rise_time, iss.transit_time, iss.set_time
    2003/3/23 00:00:44 2003/3/23 00:03:22 2003/3/23 00:06:00

I have obtained the exact same result when I run the example, so I expect that I am doing at least this part correct. What I want to find out is the astrometric position of the satellite in J2000 coordinates, so I can compare it against a star chart. I tried the following code and the answer is dubious since a_ra and ra are identical. I believe both a_ra and ra are given in the epoch-of-date instead of the a_ra being the astrometric solution in J2000.

    print iss.a_ra, iss.ra, iss.g_ra
    8:50:10.99 8:50:10.99 6:54:40.64

Is there a way to apply the precession/nutation to the topocentric ra and dec in pyephem?

Upvotes: 1

Views: 383

Answers (1)

Brandon Rhodes
Brandon Rhodes

Reputation: 89462

Excellent question! Having reviewed the C code that underlies PyEphem, it looks like both the ra and a_ra values are already precessed to the epoch of your observer object (which in your case is the default of J2000). For your reference, this is the libastro code in question from earthsat.c:

if (epoch != EOD && mjd != epoch)
    precess (mjd, epoch, &ra, &dec);
op->s_ra = ra;
op->s_dec = dec;

It looks to me like this .ra and .dec value are already precessed. Letting this code stand was probably an omission on my part; it is likely that what I really ought to have done, but failed to see at the time, was to move those assignment statements to a position before the if statement, so that they would be un-precessed and therefore distinct from the astrometric RA and dec that get set a few lines later by code that I myself added.

So: for the moment, you are actually — if I am understanding PyEphem correctly — getting exactly the RA and dec you want, and can proceed with your project. Meanwhile, I will pursue that ticket and try to get .ra and .dec to start giving different numbers than .a_ra and .a_dec!

Upvotes: 1

Related Questions