0

I'm trying to determine the latitude-longitude position on Earth of a position using the skifield python package

from skyfield.api import wgs84
position = [7033.45648791, 178.93192295, 0.00290722]
ground = wgs84.geographic_position_of(position)
print(ground)

but it raises AttributeError so I don't know what sort of Object type to use in this situation

  • did you try a tuple instead? The API page is not really helpful, as it only says you need the `position` but not what format it should be in. https://rhodesmill.org/skyfield/api-topos.html#skyfield.toposlib.GeographicPosition – Mahrkeenerh Feb 14 '22 at 20:50
  • But if it needs the `.center` attribute, you might have to use `ITRSPosition`. Yeah, I have no idea (as the authors didn't use type hinting), but here is the source code, you might be able to figure it out: https://github.com/skyfielders/python-skyfield/blob/master/skyfield/toposlib.py – Mahrkeenerh Feb 14 '22 at 20:56
  • that's great but unfortunately i already tried using ITRSPosition but also have problems – abdalla hannora Feb 14 '22 at 21:33
  • and the issue with that was? – Mahrkeenerh Feb 14 '22 at 21:37
  • What coordinate system is that vector measured against? – Brandon Rhodes Feb 27 '22 at 03:39

0 Answers0