# PseudoTLE creation

I am developing a script in python to obtain pseudo TLEs of a satellite, starting from its state vector. I have always used TLEs to propagate the satellite and predict its next pass over a ground station, for example, so this is the first time that I try to do the opposite, basically. I have discovered that a good way to proceed would be the following:

Direct method: it starts with the keplerian elements in any frame (EME2000 should work well). You also will need the corresponding state vector X0, in the same frame. Then, if T (x) is a function to convert a state vector from the TEME frame to whichever frame you started from (say, EME2000), you can build the equation T (SGP4(M)) = X0, where M is your desired set of TLE elements. This equation can be solver iteratively, starting from a M0 you can easily build from the keplerian elements you started from. Of course, these elements can't be assumed to be the same as the TLE elements, but they should be close enough to get a convergence in a few iterations. FROM THIS ANSWER: How to generate TLE file?

Still, it is unclear for me how to set up the equation and how I can converge to the final TLEs.

Does someone has any tips, or can indicate me a good resource?

Thank you.

• One short version of David Hammen's excellent answer is, TLEs make everything harder, so try to do your stuff without ever touching TLEs. Apr 20, 2023 at 21:31
• I have no idea how to achieve what you are planning, but I would recommend caution: a couple of years ago, I recall a Dragon II flight to the ISS had to perform a debris avoidance manoeuvre. It was later discovered that the object it had avoided did not actually exist - someone had generated it as an example TLE, and it had somehow ended up in an official database. Apr 21, 2023 at 5:03

I would recommend against using Keplerian elements as TLEs are not Keplerian.

If you do insist on doing so (not recommended), I would first make a 3DOF (or maybe even 6DOF) propagator that advances Cartesian state, inertial position and velocity for a 3DOF propagator, that plus attitude and attitude rate for a 6DOF propagator. To do this you will need

• A model of Earth gravitation (non-spherical, as that is part of what the SGP4 algorithm tries to model,
• A model of third body perturbations from the Moon and the Sun (the SGP4 algorithm accounts for these as well). This in turn means you will need an ephemeris. JPL's SPICE does this somewhat nicely.
• A model of the Earth's atmosphere. Some of the SGP4 terms are ad hoc models of the affects of the Earth's atmosphere on a spacecraft.
• Predictions of the Sun's behavior over the time period of interest. How the Sun behaves or will behave has a huge impact on the behavior of the Earth's upper atmosphere.
• A model of the spacecraft's interaction with the Earth's atmosphere. This might not be as simple as TLEs. For example, the ISS typically reorients its solar arrays so that they reduce drag during the 40 minutes or so shadowing period, and then reorient them again to be orthogonal to the Sun when lit by the Sun.
• Finally, a good propagator. Using Euler's method is not a good idea (and that's an understatement). Even fourth order Runge Kutta (RK4) might not be a good idea. As TLEs are not good for much more than a week or so, RK4 might be okay, but there are much better techniques.

This by itself is a nontrivial undertaking.

The next issue is how to use these propagated states to produce a "pseudo TLE". This is by no means a non-trivial undertaking. Your initial state is not perfect. and to make it more interesting, there are significant correlations between elements of the state estimate. Your prediction of the atmosphere's future behavior is not perfect, either. You might want to perform a set of Monte Carlo runs with your propagator to obtain an idea (a guess) regarding the covariance matrix at various points in time in the future. You can use these growing uncertainties and covariances to weight how future predictions impact changes in your "pseudo TLE".