I am writing a code in Orekit to do orbit determination from the gcrf data of position and velocity data. I have some data that was recorded on orbit and I am also generating measurements in Orekit. however the measurements I generate when I use that data batchleastsquares is not able to converge. keeping everything the same and using the data from on orbit I am able to converge the solution. any help? I am attaching the code orbit-det.py (10.0 KB)
I am beginner in Orekit. please let me know if I am doing something really wrong and there is better way to do it
I just skimmed over your code, so my advice may be way off.
It seems to me you use very few and widely separated position-velocity points with huge noise. If I count well, you have less than 15 points, each one separated for its neighbor by 50 minutes which i more than one half orbit of your satellite, 100m of noise on position and 10m/s of noise on velocity (which is inconsistent with the noise on position, it should rather be 0.1m/s to be consistent, using the traditional 1/1000 factor between position and velocity accuracy data in SI units).
So I would suggest to reduce your T sampling rate from 3000s to something much lower (say 300s, or even 60s), to reduce position noise to 10m and to reduce velocity noise to 0.01m/s).
Also in order to generate your data, there are three other ways you could use. The first one would be to replace the loop with a single propagation, using a step handler to sample the dates. The second one would be to keep the ephemeris generator you are already using, but run it only once before the loop and use the loop only to sample points out of it. The third method is much more involved, it would require using the measurements generation feature, but it is also much more features rich as it would allow generating other types of measurements (range, range-rate, angular, turn-around, TDOA, FDOA…) taking into account all physical effects (signal tiume of flight,tropospheric effects…)