Closed tmamedzadeh closed 5 years ago
Skyfield can make the computation more convenient by letting you describe the problem using a Time
vector instead of making you do a loop; but under the hood it will still call SGP4 that many times, which will not be fast. I would be tempted to use SGP4 in one of its native languages (like C++) and do a quick loop there; the official source code can be downloaded here:
What is the syntax to pass the vector of times to the sgp4 function (today + 7 days with 1-second interval)?
How do you think, how much time would it take to calculate in the interval [0, 7 24 60* 60] seconds?
The raw sgp4 function doesn't accept a vector, because its internal calculations use iterations which can take different numbers of steps for each different input time, so it isn't designed to process numbers in a batch, it has to tackle each time separately. (At least that my understanding of it — but I only translated it into Python, it's the original authors who of course are the experts!)
(And: I'm not sure about runtime because that would depend on the satellites — different orbits kick off different subroutines in sgp4 — and on your processor; so testing it out will be the only way to find how expensive it is on your platform.)
I'm using SGP4 to propagate the trajectories of 2 satellites in 1 week. I need to achieve the distance between 2 satellites for each second.
Is there an optimal way to do it with Skyfield? Or, I have to initialize the SGP4 propagation 7 24 60* 60 times?