Adding Additional Equation to an Ephemeris read from a file

Hi Forum,

I have an ephemeris file (which contains position, velocity and some additional states) which I read and convert to Ephemeris propagator. Is there any way to add additional equation to this propagator (since this is not an IntegratedPropagator)?

If not possible, what could be the solution to recreate an IntegratedPropagator or a NumericalPropagator from the ephemeris file which then can be used to add some AdditionalEquations? Basically I am looking for some ways in which the position, velocity and other additional states need not be recomputed to find this new additional state (via AdditionalEquations)

(I am aware of the recent API change from AdditionalEquations to AdditionalDerivativeProvider but for this question I want to talk in terms of AdditionalEquations)

Thanks in advance!

No, it is not possible. AdditionalEquations (and the new interface AdditionalDerivativeProvider) provide only a differential equation, so they must be managed by an integrator in order to promote the derivatives to state. What is possible on the other hand is to add an AdditionalStateProvider, which computes directly the state, without any need for an integrator to do the job.

One way could be to use the ephemeris to generate a series of PV measurements and to use orbit determination. The estimate method from BatchLSEstimator returns an array of propagators (contining only one propagator if you have only one satellite). This will be a NumericalPropagator if the orbit determination process has been configured with NumericalPropagatorBuilder. Note that if the force model configured for orbit determination is different from the force models used to generate the ephemeris file, you will have non-zero residuals, i.e. the propagator would not give you exactly the same trajectory as the file. When you get the propagator from the orbit determination, you can cast it to NumericalPropagator and call its addAdditionalEquations (or addAdditionalDerivativesProvider) to have it integrate your derivatives.

Thank you @luc for the answer.

I understand AdditionalStateProvider can be added to an Ephemeris but unfortunately the AdditionalStateProvider in our case (for example, Solar Power Generation from the panels) can only give the rate/derivative of the state. And that needs to be integrated to get the actual state (for example, battery capacity or charge available) which is of interest to us.

The way to get NumericalPropagator via orbit determination seems very interesting. We will surely try that out but what about the additional states from the file (only PV can be read and used in orbit determination right?). And will the estimate be very quick (suppose we are using the same models to generate the ephemeris and do the orbit determination)?

On a side note, you can also use the propagation.conversion package instead of orbit determination, but it is basically the same (I guess we will at some time in future deprecate conversion as orbit determination is more general).

I think you can add the additional states present in the file by creating your own PropagatorBuilder that would extend NumericalPropagatorBuilder and override just its buildPropagator method, with something like:

public NumericalPropagator buildPropagator(final double[] normalizedParameters) {
    final NumericalPropagator propagator = super.buildPropagator(normalizedParameters);
    propagator.addAdditionalStateProvider(myProviderThatKnowsTheEphemerisAdditionalStates);
    return propagator;
}

Perhaps this could also be a way to add your AdditionalEquations directly from within the orbit determination instead of adding them a posteriori to the estimated propagator, but I think there would be some state dimensions issues or uninitialized additional state because I don’t remember how orbit determination set up the initial state. But it should work for already integrated states.