skyfielders / python-skyfield

Elegant astronomy for Python
MIT License
1.43k stars 213 forks source link

Compute ITRF coordinates from Topos #354

Closed bobbyfrasier closed 4 years ago

bobbyfrasier commented 4 years ago

Hi,

Would it be possible to add a method to compute ITRF coordinates directly from Topos ?

In the current version, the only way I found to do this was to first compute the ICRF at a random date and then extract the ITRF from the ICRF :

Date

date = ts.utc(2020, 4, 10, 10, 54, 0.0)

Topos coordinates

topos_coords = Topos(latitude_degrees=48.8534100, longitude_degrees=2.3488000, elevation_m=52.0)

ICRF coordinates

ICRF_coord = topos_coords.at(date)

ITRF coordinates

ITRF_coord = ICRF_coord.itrf_xyz()

Since the conversion between ITRF and Topos is independent from the date, it would be nice to have for example a method "itrf_xyz()" directly in the Topos class !

Have a good day

brandon-rhodes commented 4 years ago

Great idea! I've just added that features, and it should appear in the next release of Skyfield. In the meantime you could test it out by installing master:

pip install https://github.com/skyfielders/python-skyfield/archive/master.zip

Thanks for the idea!