I’m trying to do generate a TLE using gps data. Basically I have the ephemerides of the GPS data I convert them into a list of SpacecraftState and then using the FiniteDifferencePropagatorConverter I convert this list into a TLEPropagator from which I get the fitted TLE.
The only difference from the examples you mentioned is that I’m using gps data instead of creating the samples with a numerical Propagator. My gps data covers 3h with a time step of 6 min, since it’s a LEO satellite, it’s gps data of more than one orbit.
My Initial guess for the tle is obtained by transforming one timestamptedPVCoordinates of the SpacecraftState into a KeplerianOrbit and then create the TLE with the elements of the Keplerian Orbit
This is my code:
fitter=FiniteDifferencePropagatorConverter(builder, float(threshold), max_iterations)
tle_propagator = TLEPropagator.cast_(fitter.getAdaptedPropagator())
tle_fitted = tle_propagator.getTLE()
I’m using the Python wrapper, the problem I’m finding is in
The error I got is this one:
org.hipparchus.exception.MathIllegalStateException: unable to perform Q.R decomposition on the 6x7 jacobian matrix at
However, when I run the code but with this
The code works when I’m using True instead of False, which means I’m considering just the position info for the fitting. However, the position and velocity should be both included in the fitting, just like in your examples and also on this Jupyter Notebook Viewer
Why when I use both position and velocity in the fitting it can not perform the QR decomposition of the jacobian matrix?