This feature will be very easy to implement! I will do this!
5 Likes
Hi @minetest2048 !
Can you please test the main
branch of SatelliteToolboxPropagators.jl? Now, you can do this:
julia> using SatelliteToolboxPropagators
julia> f = create_tle_fetcher(CelestrakTleFetcher)
CelestrakTleFetcher("https://celestrak.org/NORAD/elements/gp.php")
julia> tles = fetch_tles(f; satellite_name = "ISS (ZARYA)")
[ Info: Fetch TLEs from Celestrak using satellite name: "ISS (ZARYA)" ...
1-element Vector{TLE}:
TLE: ISS (ZARYA) (Epoch = 2024-12-27T11:52:08.200)
julia> iss_tle = tles[1]
TLE:
Name : ISS (ZARYA)
Satellite number : 25544
International designator : 98067A
Epoch (Year / Day) : 24 / 362.49453935 (2024-12-27T11:52:08.200)
Element set number : 999
Eccentricity : 0.00057970
Inclination : 51.63830000 deg
RAAN : 77.61300000 deg
Argument of perigee : 11.65550000 deg
Mean anomaly : 348.45670000 deg
Mean motion (n) : 15.50310083 revs / day
Revolution number : 48853
B* : 0.00045083 1 / er
ṅ / 2 : 0.00025652 rev / day²
n̈ / 6 : 0 rev / day³
julia> orbp = Propagators.init(Val(:SGP4), iss_tle)
OrbitPropagatorSgp4{Float64, Float64}:
Propagator name : SGP4 Orbit Propagator
Propagator epoch : 2024-12-27T11:52:08.200
Last propagation : 2024-12-27T11:52:08.200
julia> sv_teme = Propagators.propagate!(orbp, 0, OrbitStateVector)
OrbitStateVector{Float64, Float64}:
epoch : 2.46067e6 (2024-12-27T11:52:08.200)
r : [1456.71, 6632.76, 0.0224472] km
v : [-4.647, 1.0129, 6.01325] km/s
The last argument in Propagators.propagate!
is now a “sink” option and it can be Tuple
(default) to obtain the old behavior or OrbitStateVector
to obtain the state vector as you wanted.
I only need to add the documentation and test cases before tagging the new version.