How to find satellite relative velocity in skyfield?

863 views Asked by At

I need to find how fast a satellite is moving relative to me. I was thinking about using the Python package 'skyfield' but I don't see how I can calculate this:

from skyfield.api import EarthSatellite, Topos
import skyfield.api

sat = EarthSatellite('1 43700U 18090A   18335.89431171 +.00000133 +00000-0 +00000-0 0  9993',
                 '2 43700 000.0858 245.4352 0001094 006.6237 164.6135 01.00274015000309')
time_scale = skyfield.api.load.timescale()
time0 = time_scale.utc(2018, 12, 1, 21, 0, 0)
position0 = sat.at(time0)
position0_ITRF = sat.ITRF_position_velocity_error(time0)[:2]

my_loc = Topos('39.0 N', '105.0 W')

I am not sure how to convert my_loc to a corresponding location so I can compute a relative satellite velocity. Should I use a different package that has more functions implemented?

1

There are 1 answers

0
Brandon Rhodes On BEST ANSWER

If you ask “Where is my_loc at time0:

position1 = my_loc.at(time0)

then you will have another position object with a .velocity that you should be able to compare to your satellite's velocity. You could also do the subtraction beforehand:

relative_position = (sat - my_loc).at(time0)

Then both the .position and .velocity of the resulting object should be relative to your location, without your having to subtract them yourself.