Skip to content

Commit a365eec

Browse files
authored
TLE to cartesian conversion fix
1 parent 31a061c commit a365eec

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

kessler/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ def from_cartesian_to_tle_elements(state):
8989
inclination = kepl_el[2]
9090
argument_of_perigee = kepl_el[4]
9191
raan = kepl_el[3]
92-
mean_anomaly = kepl_el[5] - kepl_el[1]*np.sin(kepl_el[5])+np.pi
92+
mean_anomaly = kepl_el[5] - kepl_el[1]*np.sin(kepl_el[5])
93+
mean_anomaly = mean_anomaly%(2*np.pi)
9394
return mean_motion, eccentricity, inclination, argument_of_perigee, raan, mean_anomaly
9495

9596

0 commit comments

Comments
 (0)