1
$\begingroup$

I'm trying to get the geographic location (longitude & latitude of a satellite) converted from the position in space for example: position = (7033.45648791, 178.93192295, 0.00290722) Km. longitude = 165.285, latitude = 0.000 degrees i tried to use skyfield

from skyfield.api import wgs84

position = (7033.45648791, 178.93192295, 0.00290722)

geo = wgs84.geographic_position_of(position)

print(geo)

here the position is a tuple but it raises an AttributeError: 'tuple' object has no attribute 'center'. so I don't know what object type to use and the documentation is not helping

$\endgroup$
7
  • 2
    $\begingroup$ Based on this position appears to be an object with some attributes (like centre) and not a plain tuple. Are you following code example from somewhere? If so, please provide a link to that also. (Disclaimer: I have not used skyfield). $\endgroup$
    – AJN
    Commented Feb 15, 2022 at 12:14
  • 1
    $\begingroup$ you are right it should have the attribute (center) but unfortunately the code is of my one mind cause I can't find an example that does so $\endgroup$
    – abdalla
    Commented Feb 15, 2022 at 12:33
  • 1
    $\begingroup$ @AJN I love Skyfield but it has always been a bit mysterious to me because there are so many classes and methods, and if there isn't a specific example for what you want to do, it's hard to guess where to begin. I wish Skyfield had a single page graphical guide to the whole class structure. This "position" business is really vexing. $\endgroup$
    – uhoh
    Commented Feb 15, 2022 at 13:31
  • $\begingroup$ @uhoh is there any other library or any way that I could use to calculate the satellite ground track $\endgroup$
    – abdalla
    Commented Feb 15, 2022 at 13:42
  • 1
    $\begingroup$ There is, see my previous comment to you Generally Stack Exchange is not a place to make contact with people individually. If you have questions the best way is to formulate good Stack Exchange questions and post them on the site here. $\endgroup$
    – uhoh
    Commented Feb 15, 2022 at 13:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.