Propagation Validation

Hello,

I am trying to get PVcordinates for a specific TLE and then validate with the results from research paper, but it is not getting the same, i have also looked into the frame . everyhtin seems to be correct. can someone help me in this??

here is the code:
def propagate_tle_orekit(tle_line1, tle_line2, days, step=6): # Using 60-sec step for accuracy
“”"
Propagates the TLE using Orekit’s SGP4 propagator and converts to TEME of Date.
:param tle_line1: First line of TLE
:param tle_line2: Second line of TLE
:param days: Number of days to propagate
:param step: Time step in seconds (default: 60 seconds)
:return: List of propagated state vectors (time, x, y, z, vx, vy, vz)
“”"
tle = TLE(tle_line1, tle_line2)
propagator = TLEPropagator.selectExtrapolator(tle) # Uses SGP4 or SDP4 based on orbital period
epoch = tle.getDate()
target_date = epoch.shiftedBy(float(days*86400))

print(f"Epoch from TLE: {epoch}")  # Debugging step

propagated_data = []
   
for t in range(0, days * 86400, step):
    propagation_time = epoch.shiftedBy(float(t))
    state = propagator.propagate(propagation_time)
    pv = state.getPVCoordinates(FramesFactory.getTEME())  # State vector in TEME frame
    
    
    position = pv.getPosition()
    velocity = pv.getVelocity()
    
    propagated_data.append((
        propagation_time.toString(), 
        position.getX() / 1000.0, position.getY() / 1000.0, position.getZ() / 1000.0,  # Convert meters to km
        velocity.getX() / 1000.0, velocity.getY() / 1000.0, velocity.getZ() / 1000.0   # Convert m/s to km/s
    ))

return propagated_data

Example usage

if name == “main”:
tle_line1 = “1 00005U 58002B 00179.78495062 +.00000023 +00000-0 +28098-4 0 9994”
tle_line2 = “2 00005 034.2682 348.7242 1859667 331.7664 019.3264 10.82419157413667”

days = int(input("Enter the number of days to propagate: "))
results = propagate_tle_orekit(tle_line1, tle_line2, days)

print("Time (UTC), X (km), Y (km), Z (km), VX (km/s), VY (km/s), VZ (km/s)")
for entry in results:
    print(entry)

My answer for 3 days is : (‘2000-06-30T18:50:13.733568Z’, -7916.898691774212, 3773.2206830023106, 585.5920667066741, -2.5886222539053194, -4.889439484896841, -3.734013243397058)

according to paper using orekit should be :
3 days -9060.473736 4658.709525 813.686732 -2.232833 -4.110453 -3.157345

Hello,

I did not have time to check your code entirely but a very minimalistic example as shown below would already do the trick. I seems something with the way you propagate. Maybe this example already helps you. One thing to look at its the for t in range(0, days * 86400, step): loop. Your last datapoint will not include the end date, but the enddate minus your stepsize.

from org.orekit.propagation.analytical.tle import TLEPropagator,TLE

line1 = "1 00005U 58002B   00179.78495062  .00000023  00000-0  28098-4 0  9994"
line2 = "2 00005 034.2682 348.7242 1859667 331.7664 019.3264 10.82419157413667"
tle = TLE(line1,line2)
prop = TLEPropagator.selectExtrapolator(tle)
state = prop.propagate(tle.getDate().shiftedBy(3.0*86400))
print(state)
print(state.getPVCoordinates(FramesFactory.getTEME()))
SpacecraftState{orbit=Cartesian parameters: {P(-9060473.735698981, 4658709.525020993, 813686.7315326952), V(-2232.8327827397598, -4110.453489937611, -3157.345433457055)}, attitude=org.orekit.attitudes.Attitude@319c3a25, mass=1000.0, additional={}, additionalDot={}}
{2000-06-30T18:50:19.733568, P(-9060473.735698981, 4658709.525020993, 813686.7315326952), V(-2232.8327827397598, -4110.453489937611, -3157.345433457055), A(3.3828090188248567, -1.7393709266252284, -0.30379722895522226)}

Thanks, found the error was in the loop

2 Likes