 # Partial derivatives of a range measurement with respect to the initial PV coordinates

Hey there,

I am writing a Python code using your dedicated wrapper. I have created a KeplerianOrbit object in a standard way as

orbit = KeplerianOrbit(pvCoordinates, inertialFrame, initialDate, Constants.WGS84_EARTH_MU).

The aim of my work is to compute a range (in particular a one-way distance) measure between my satellite and a reference point, which is assumed to be fixed in time. This task is very easy and I already get my range measurements by simply considering the norm of r = r_sat - r_p, where r_sat is the 3D vector representing the satellite position in the inertialFrame and r_p is that of the reference point. So the code is able to collect a set of ranges r_1, r_2, … r_n, where a single range is computed every s seconds, while the satellite orbit is propagated through the propagator defined as

propagator = KeplerianPropagator(orbit).

Now, I would like to estimate the derivatives of my measurements r_1, r_2, … r_n with respect to the initial pvCoordinates I have chosen for the orbit. My problem here is that I don’t
know how to compute the derivatives of the satellite positions at the time instants t_1, t_2,… t_n in which the original range measurements were calculated.

Can you please tell me which is the most convenient way to carry out this step? I must admit I am new to Orekit and I don’t know if there is already a method allowing it. This code is related to a Batch estimator and the partial derivatives of the ranges have to be taken with respect to an integration function G, which depends on the initial pvCoordinates

Many thanks,
Samuele

Hi @samuele,

Welcome to the Orekit community!

First of all:

Are you aware that Orekit already provides classes and methods for batch least-squares orbit determination ?
If not, you should have a look the estimation package of the Orekit tutorials in Java. Starting for example with the NumericalOrbitDetermination tutorial.
For Python, here is a very good example written by @yzokras of Satellite Laser Ranging Orbit Determination.

That is indeed an effective way to do it but beware that you won’t be able to have corrections to your measurements with this. Here you will miss the light time delay correction and latter on, if you want to add more complexity to your models, you won’t be able to add tropospheric/ionospheric delays, station biases etc.
Note that Orekit also provides a measurement generation package. You’ll find an example of how to use it in the MeasurementGenerator tutorial in the estimation/performance package of the Orekit tutorials, written by @bcazabonne.

For this, I advise you to have a look at the AbstractBatchLSModel.fetchEvaluatedMeasurements which performs the calculation of the Jacobian of the batch LS OD problem, i.e. the matrix of the derivatives of the measurements (range measurements in your case) with respect to the estimated parameters (the initial orbital parameters in your case).