With respect to what orbit propagator you should use, it depends. If you are designing a space mission that will operate in a Sun-syncrhounous orbit, then usually a J2 is better. In those cases, the mission usually have ways to keep itself on the designed orbit, avoiding the all perturbations but J2. Hence, a J2 propagator is better. On the other hand, if you are propagating a real satellite using a real TLE, then SGP4 is much more accurate.
If you use Julia and SatelliteToolbox.jl, then you can very easily select the propagator. For example, for a pure J2 propagator:
julia> orbp = init_orbit_propagator(Val{:J2}, Orbit(0.0,7130982.0,0.001111,98.405*pi/180,pi/2,0.0,0.0))
julia> (o,r,v) = propagate!(orbp, collect(0:3:24)*60*60)
julia> r
9-element Array{Array{T,1} where T,1}:
[5.30372e-7, 7.12306e6, 3.58655e-6]
[-9.98335e5, 2.14179e6, -6.72549e6]
[-5.75909e5, -5.83674e6, -4.06734e6]
[6.65317e5, -5.69201e6, 4.2545e6]
[9.62557e5, 2.37418e6, 6.65228e6]
[-1.10605e5, 7.11845e6, -231186.0]
[-1.02813e6, 1.90664e6, -6.79145e6]
[-4.82921e5, -5.97389e6, -3.87579e6]
[750898.0, -5.53993e6, 4.43709e6]
This propagated the orbit for 24h and stored the information every 3 hours. For SGP4, then you can do the following:
julia> orbp = init_orbit_propagator(Val{:sgp4}, Orbit(0.0,7130982.0,0.001111,98.405*pi/180,pi/2,0.0,0.0))
julia> (o,r,v) = propagate!(orbp, collect(0:3:24)*60*60)
julia> r
9-element Array{Array{T,1} where T,1}:
[-2159.7, 7.13166e6, -14607.2]
[-1.00096e6, 2.1411e6, -6.73899e6]
[-5.78906e5, -5.83897e6, -4.08451e6]
[6.64614e5, -5.70129e6, 4.24735e6]
[9.6287e5, 2.37768e6, 6.64987e6]
[-1.12629e5, 7.12679e6, -2.45705e5]
[-1.03066e6, 1.90639e6, -6.80469e6]
[-4.86132e5, -5.97626e6, -3.89338e6]
[7.5014e5, -5.54932e6, 4.42998e6]
If your orbit is defined in the file sat.tle
, then you can propagate the orbit using:
julia> tle = read_tle("sat.tle")
1-element Array{SatelliteToolbox.TLE,1}:
TLE
==========================================================
Name: Test
Satellite number: 6251
International designator: 62025E
Epoch (Year): 6
Epoch (Day): 176.82412014
Element set number: 398
Inclination: 58.05790000 deg
RAAN: 54.04250000 deg
Argument of perigee: 139.15680000 deg
Mean anomaly: 221.18540000 deg
Mean motion (n): 15.56387291 revs/day
Revolution number: 677
B*: 0.000000 1/[er]
1 d
---.--- n: 0.000000 rev/day²
2 dt
1 d²
---.--- n: 0.000000 rev/day³
6 dt²
==========================================================
julia> orbp = init_orbit_propagator(Val{:sgp4}, tle[1])
julia> (o,r,v) = propagate!(orbp, collect(0:3:24)*60*60)
julia> r
9-element Array{Array{T,1} where T,1}:
[3.98829e6, 5.49898e6, 928.983]
[4.77232e6, 4.45027e6, -1.90764e6]
[4.99362e6, 2.89039e6, -3.60054e6]
[4.62067e6, 1.00698e6, -4.88731e6]
[3.69211e6, -9.77058e5, -5.62356e6]
[2.31243e6, -2.82934e6, -5.72624e6]
[6.40617e5, -4.33414e6, -5.18251e6]
[-1.1272e6, -5.31664e6, -4.05161e6]
[-2.77972e6, -5.66325e6, -2.45952e6]