Performing Residuals vs. Reference Analysis Using Orekit

Hello All,

I want to determine if/how to perform a sensor Residuals vs. Reference Analysis (also called an RvR run) using Orekit. Such an analysis is necessary for new sensors to be calibrated. The goal is to validate the sensor information and modeling decisions and get a general sense of the sensor performance.

Using a high-accuracy reference ephemeris from a calibration class satellite, an RvR run generates measurement residuals.

I am using the following paper as a reference, specifically Section 3.4.

ODTK has a built-in RvR run feature. Does Orekit have such a feature? If not, does anybody have any recommendations to help me build one?

Thank you for your time. I would greatly appreciate any feedback, comments, or corrections.

Hi @cjm

Welcome to the Orekit forum!

Yes it is possible to perform such analysis using Orekit. It is an ephemeris-based orbit determination. In other words, it is an “orbit” determination for which the dynamical model is an Ephemeris propagator instead of a NumericaPropagator and the orbit estimation is disable to only estimate measurement parameters.

Unfortunately, we don’t have any tutorial to present it. It is a big missed… But we an some interesting unit test that you can use as starting point.
These tests are available here : src/test/java/org/orekit/estimation/leastsquares/ · develop · Orekit / Orekit · GitLab

Best regards,

Please note that you can also use a Kalman estimator instead of a batch least square as estimator. Some unit tests are available here: src/test/java/org/orekit/estimation/sequential/ · develop · Orekit / Orekit · GitLab

Hi @bcazabonne,

Thank you for your response. This is a really helpful place to start.

Do you know if similar tests exist for optical/angles-only measurements?

Yes, in the provided links you can look at testAzElWithBias.


Thank you @bcazabonne,

I promise I did look through that code before sending my prior reply! I suppose I should have asked how the residuals of the azimuth and elevation could be converted to residuals of the right ascension and declination.

I know azimuth and elevation can be converted to right ascension and declination so long as you know the observer’s latitude, longitude, and the local sidereal time. I can perform this conversion and then use the code you’ve provided to perform the RvR run. However, I’d like to consider my analysis in terms of the original measurements.

Does Orekit have a feature that can convert the residuals of the azimuth and elevation to residuals of the right ascension and declination? Is there a standard that you are aware of?

Thank you,

Hi @cjm,

You can use AngularRaDec measurements instead of AngularAzEl in your code, that way you won’t have to convert the residuals from AZEL to RADEC.


1 Like

Hi @bcazabonne and @cjm ,

In my opinion, the estimation(ephemeris-based orbit determination) is not needed, if only the residuals are needed.

Here’s the steps:

  1. Create a proper ObservedMeasurement using the observations, i.e. AngularRaDec or AngularAzEl , and add related modifiers in demand.
  2. Calculate the SpacecraftState at the related date using the high-accuracy ref ephemeris.
  3. Call the method estimateWithoutDerivatives() of ObservedMeasurement to fetch a EstimatedMeasurement. So that both observed and theoretical are known.
  4. Calculate residuals by subtracting the theoretical from the observed.

Now we get the residuals, further analysis can be done.

WoW! EphemerisBatchLSEstimator is a so powerful. So I can estimate site coordinates by using this.

1 Like

Thanks @lirw1984,

I’m reposting here a ResidualsHandler that I posted a few years ago on the forum: (3.8 KB)

It’s single-satellite, I have a multi-satellite version if needed.

It does point 1, 2 and 3 of @lirw1984 method and outputs a Map<ObservedMeasurement<?>, EstimatedMeasurement<?>> ready for performing point 4. (So the name is not adapted…)

It seems to be a question that comes back once in a while, shall we add a similar handler directly in the library?