# Details on how stateToTLE() works

Hello,
I’m currently using the function stateToTLE() to convert an osculating orbit into a TLE and it works well.
I’ve read about issues for GEO, but since I am using it only for a LEO satellite, I should be fine.

My question is, if someone might be able to explain me how the function manages to approximate the mean orbit from the osculating orbit.
Specifically, how do these lines:

``````// update state
sma += deltaSma;
ex  += deltaEx;
ey  += deltaEy;
hx  += deltaHx;
hy  += deltaHy;
lv  += deltaLv;
``````

with the delta values being computed ahead like this:

``````// adapted parameters residuals
final double deltaSma = equiOrbit.getA() - recovEquiOrbit.getA();
final double deltaEx  = equiOrbit.getEquinoctialEx() - recovEquiOrbit.getEquinoctialEx();
final double deltaEy  = equiOrbit.getEquinoctialEy() - recovEquiOrbit.getEquinoctialEy();
final double deltaHx  = equiOrbit.getHx() - recovEquiOrbit.getHx();
final double deltaHy  = equiOrbit.getHy() - recovEquiOrbit.getHy();
final double deltaLv  = MathUtils.normalizeAngle(equiOrbit.getLv() - recovEquiOrbit.getLv(), 0.0);
``````

make it work?
From how I’ve understood, it roughly works like this:
Step 1: initializes a TLEPropagator with the initial osculating orbit as a TLE, which returns an osculating orbit.
Step 2: compute delta values “initial_osculating_orbit - current_osculating_orbit”
Step 3: check if delta is lower than the set threshold and stop here if it’s the case.
Step 4: add delta values to the last osculating values (starting from the initial orbit).
Step 5: create a new TLE with the updated osculating orbit and use it as input for a new TLEPropagator, which returns a new osculating orbit. Redo steps 2 to 5 until convergence criteria is met.

So, somehow, we start with our initial osculating orbit as a “fake TLE”. And the more we iterate through our loop and add deltas to our initial osculating orbit, it becomes the mean orbit.
How comes, just adding these deltas makes it work? Is it based on a mathematical model and if so, which?
In the comments of the code, it says it uses Newton Iteration. But to be honest, I can’t identify Newton Iteration from this part.
Also, authors for the class TLE are Fabien Maussion and Luc Maisonobe. Do you think I could @ them here to ask them directly or should I rather not bother them…

As this function is basically the core of my Bachelor Thesis, which I am writing at the moment, I would like to understand the idea behind it and the mathematics. I am thankful for any advise or explanatory comments.

~Tanki

No. LEO dynamics are more noisy than GEO dynamics. Problems are worse in LEO.

Yes

It’s not Newton iteration it is a fixed point method.

Fabien worked on TLE in 2006, as my intern. He was really a great intern by the way. He has not worked on Orekit or on space flight dynamics since then. I am still there, and still answer questions on the forum. Also we are not the only ones here, the forum is full of nice people ready to help, so do not hesitate asking questions here as you did, you are welcome!

2 Likes

Hi Tanki,

I think the fixed point method that Luc is talking about is the usual way averaging models (not just SGP4) handle the osculating to mean conversion. Basically, the (semi)-analytical theory gives you the mean to osculating transformation (addition of short period terms) and you use it iteratively to obtain the inverse.

I would really love to see somebody improve the convergence issues we’re having in `stateToTLE` though. I know people like @dgondelach have been investigating. Any hope of coming up with improvements?

Cheers,
Romain.

Okay, I wasn’t sure because in some constructors it said Fixed Point Iteration, in one constructor it said Newton Method.

Yeah, I found some papers where they explain how you come to the method. That’s what I was looking for

This is what I meant by “I should be fine with LEO satellites”, since many users reported convergence issues for some GEO satellites but not for LEO. As long as it converges, it’s the desired outcome.

~Tanki