0

I want to convert a Skyfield Topos object (lat/lon/altitude) to Earth Centered Earth Fixed (ECEF) coordinates.

[][1]https://rhodesmill.org/skyfield/positions.html#coordinates-in-other-reference-frames

gives the example:

from skyfield.framelib import itrs
a = earth.at(t).observe(planets['moon']).apparent()
x = a.frame_xyz(itrs)

to use the itrs frame of reference. However, this import statement is an error in skyfield version 1.33. I cannot find where itrs is now located, or if there is a simpler method to perform this conversion.

burningbright
  • 152
  • 1
  • 8

1 Answers1

1

The frame of reference was added in 1.34, so an upgrade should fix the import error. Here is the CHANGELOG entry:

https://rhodesmill.org/skyfield/installation.html#v1-34-2020-december-10

Brandon Rhodes
  • 83,755
  • 16
  • 106
  • 147
  • Did a conda update. 'conda list skyfield' now shows version 1.35. But skyfield.__version__ still says 1.33, and skyfield.framelib is still missing the reference frames such as itrs. Odd. – burningbright Jan 05 '21 at 17:59
  • Alas, that means the Python you are running is probably not the Python that conda is in charge of. Some web searches for "conda install import not working" should hopefully help. Good luck! – Brandon Rhodes Jan 06 '21 at 01:51
  • Well my Anaconda distro is a separate install from the system Python, so I have total control. I'll keep checking, but it looks like the Anaconda repository (conda-forge channel) updated the version number but not the actual code base. Or else miniconda is confused. – burningbright Jan 06 '21 at 22:48
  • OK, found that my distro was using old path directory. Now seeing the 1.35 version and all is well. – burningbright Jan 08 '21 at 23:00