Hi,
I am doing some orbit conversions from statevector to TLE, in line with:
MAX_ITERATIONS = 1000 # Default from orekit
tle_algorithm = LeastSquaresTleGenerationAlgorithm(MAX_ITERATIONS)
# tle_algorithm = FixedPointTleGenerationAlgorithm()
builder = TLEPropagatorBuilder(ref_tle, PositionAngleType.MEAN, 1.0, tle_algorithm)
fitter = FiniteDifferencePropagatorConverter(builder, 0.0001, 1000)
fitter.convert(states_list, True, "BSTAR") # Second argument is to use onlyPosition
prop = TLEPropagator.cast_(fitter.getAdaptedPropagator())
fitted_tle = prop.getTLE()
rms = fitter.getRMS()
evaluations = fitter.getEvaluations()
I am trying to understand the physical meaning of RMS, have browsed the java source but not concluded. If onlyPosition is True on convert call, can the RMS be assumed to be difference RMS in meters between the original and the fitted? I assume that combining velocity and position gives a faster fitting, but is it then somehow possible to physically interpret the RMS?
Any other comments in this area of TLE generation welcome 
Many thanks!
/Petrus
Hi @petrus.hyvonen,
Sorry for the delay!
I’ll try to answer but I’m not very familiar with the converters (@pascal.parraud if you’re around
…)
I do think so yes: RMS = \sqrt{\frac{1}{N} \sum_{k=1}^{k=N} \sum_{i=0}^{i=2} (tle_{pos}[i] - converted_{pos}[i])²} according to here.
And if you’re using the velocity: RMS = \sqrt{\frac{1}{N} \sum_{k=1}^{k=N} \sum_{i=0}^{i=5} (tle_{pv}[i] - converted_{pv}[i])²}
I think there’s a problem here (unless I missed something…) because we’re summing meters with meters per second, so it doesn’t have a physical meaning anymore.
We should probably use the weights
from AbstractPropagator
defined here to normalize the RMS and output a “weighted” RMS instead.
Personally I tend to avoid the converters and do a batch least-square OD on a sample of TLE osculating states instead 
But that’s probably because I’m more used to the OD architecture and usage.
Hope this helps,
Maxime
Thanks Maxime,
That is a bit what I expected, but good to get confirmation that if position only is used, the RMS can actually be interpreted as a physical measure. This makes interpretation much easier, I may transition over to use position only just for that reason. Interesting note is that when I have tested the both, the value has been quite similar between position-only and PV, a pure guess is that the diff in velocity is much less than position for a good fit.
I should indeed start looking into the OD for a more generic approach to this.