skyfielders / python-skyfield

Elegant astronomy for Python
MIT License
1.41k stars 211 forks source link

subpoint() on satellite.at(t) not working #298

Closed sckanberg closed 4 years ago

sckanberg commented 4 years ago

Hello! So i followed the example given here: https://rhodesmill.org/skyfield/earth-satellites.html#generating-a-satellite-position

I run this (satellite is an EarthSatellite and t is a valid time object): geocentric = satellite.at(t) subpoint = geocentric.subpoint()

and get:

File "", line 1, in Satellite_subpoint = Satellite_geo.subpoint()

File "C:\Users\David\Miniconda3\envs\OPT\lib\site-packages\skyfield\positionlib.py", line 518, in subpoint elevation_m=elevation_m)

File "C:\Users\David\Miniconda3\envs\OPT\lib\site-packages\skyfield\toposlib.py", line 36, in init raise TypeError('please provide either latitude_degrees='

TypeError: please provide either latitude_degrees= or latitude= with north being positive

This worked previously on version 1.10 but not after I updated to 1.13. My guess is that there is a bug in one of the "if clauses" in "toposlib" so that the program determines that no latitude is given when instead it should calculate the latitude.

sckanberg commented 4 years ago

Reboot to the rescue. Worked out after simply reopening a new console.

brandon-rhodes commented 4 years ago

I'm glad it started working!