Hello everyone!
I have some questions on consistency. I am producing a program in orekit which simulates the process of producing and correlating uncorrelated tracks.
I simulate a satellite orbit and take data when it passes though a radar fov. These “tracks” are on the order of 2-5 minutes long and the radar records the range and angular position every ten seconds while in the fov. The data points have random error associated with them ( 0.015 degrees, 40 m of std dev).
The first, last and middle radar data for each track is then plugged into a herrick-gibbs script I wrote to produce an initial orbital guess. That orbit is then cast into the EquinoctialOrbit type, as that suits well for bls.
To refine the guess I use the orekit batch-leasts-quares estimation package. I take that initial herrick-gibbs equinoctial orbit and use it as the initial guess. The rest of the tracks range and angular measurements are then fed into the bls estimator and a refined orbital guess is produced.
For each track from the same satellite, one would expect the bls estimator to produce relatively similar orbits. To check, I am using the mahalanobis distance like in this paper (Comparison of Covariance Based Track Association Approaches Using Simulated Radar Data | The Journal of the Astronautical Sciences)
To compare two tracks and see if they correlate, I take the covariance and state of the first occurring track and propagate it to the epoch of the second track. This is where my questions lie and where I believe I am having issues.
The propagation of the the epoch 1 state to the second is not an issue. The state vector I use is (a, ex,ey,hx,hy,lv) since those are the orekit elements. To propagate the covariance, however, I need the state transition matrix which I get from the propagation of epoch 1 to epoch 2 shown in the following code block:
NumericalPropagatorBuilder numPropBuild = getPropagatorEq(orb1.getOrbit()); double[] normalizedParameters = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; NumericalPropagator numProp = numPropBuild.buildPropagator(normalizedParameters); PartialDerivativesEquations PDE = new PartialDerivativesEquations("dYdY0", numProp); orb1 = PDE.setInitialJacobians(orb1); numProp.setInitialState(orb1); SpacecraftState orbf = (numProp.propagate(dt2)); Array2DRowRealMatrix dYdY0 = new Array2DRowRealMatrix(6, 6); PDE.getMapper().getStateJacobian(orbf, dYdY0.getDataRef()); //PDE.getMapper().getParametersJacobian(orbf, dYdY0.getDataRef()); System.out.println("\n\n Final Jacobian: " + dYdY0);
Then I get the covariance using estimator.getPhysicalCovariance
Then the mahalanobis distance is calculated in the following manor:
Pm(tn) = stm(tn,tm) *Pm( tm) *stm(tn,tm)^T
Pmn(tn) = Pn(tn) + Pm(tn)
z(tn) = xn(tn) - xm(tn), tn>tm
(km,n)^2 = z^T *Pmn(tn)^(-1) *z(tn)
where km,n is the mahalanobis distance. The more related the track the lower this value. tn is the later epoch and tm the earlier. x is the state and n or m mean which track they belong to, and finally stm is the state transition matrix.
Unfortunately, the output I am getting is wrong by orders of magnitude, and points towards an error. I believe that the error arises from the state transition matrix, the covariance or both. From browsing the archived mailing list it seems to me that the stm I’m producing likely might be the cartesian state transition matrix. Additionally, I’ve found both the optimum covariance and the physicalcovariance. I get the feeling the physical covariance may also be for cartesian elements.
Are my hunches correct or is something else happening?
Here I’ve posted the rest of my code, if anyone is interested or thinks something deeper is happening: https://pastebin.com/YfC2v0Cd
Thanks anyone for their help and I hope everyone has a great week!
Sincerely,
Paul