Hello,
I tried to reproduce the behavior exposed in my previous email with a minimal test.
I integrate numerically a trajectory with only central force and an additional equation that increases the value of an additional state of 1/sec. The "Additional equation" should also increase the SMA of 2m/sec but, after integration for the duration of one keplerian orbit, my additional state changed to the value of the initial orbital period but the orbit did not changed => the increase of 2m/sec has not been taken into account.
Initial orbit = Keplerian parameters: {a: 7800000.0; e: 0.001; i: 28.0; pa: 0.0; raan: 0.0; v: 0.0;}
Initial keplerian period = 6855.717044697212 sec
Final value of added state = 6855.717044697215
Final orbit = Keplerian parameters: {a: 7800000.000000003; e: 0.001000000000000334; i: 28.000000000000007; pa: -1.1173044601630712E-25; raan: 2.925205344836198E-29; v: -5.234453515214931E-13;}
I expect the problem to be in Hipparchus 1.2 (at least) and not Orekit. In org.hipparchus.ode.ExpandableODE, I think the line 137 "mapper.insertEquationData(index, primaryStateDot, yDot);" should be placed just before the "return".
If I execute the same program with Orekit 7.0/Commons Math 3.4.1, the behavior is different and is ok:
Initial orbit = keplerian parameters: {a: 7800000.0; e: 0.001; i: 28.0; pa: 0.0; raan: 0.0; v: 0.0;}
Initial keplerian period = 6855.717044697212 sec
Final value of added state = 6855.717044697215
Final orbit = keplerian parameters: {a: 7813711.434089395; e: 0.0010000000000002728; i: 27.999999999999993; pa: -1.3080031127518713E-13; raan: 3.7263393091775305E-17; v: -0.4748813935419053;}
Thank you!
Christophe
---------- Forwarded message ----------
From:
Christophe Le Bris <chris.lebris@gmail.com>Date: 2017-11-30 18:21 GMT+01:00
Subject: Problem with additional equations
To: "
orekit-users@orekit.org" <
orekit-users@orekit.org>
Hello,
I have a problem when integrating "additional equations" that impact the derivatives of the primary state (ie: value returned by "computeDerivative" method is not null).
I have the feeling that these values are not taken into account during the integration.
I use Orekit 9.1 with Hipparchus 1.2.
It seems that the origin of my problem is located in Hipparchus library (in the "computeDerivative" method of the class "ExpandableODE") and not in Orekit but I would like to know if someone already used this functionality with the last versions of Orekit/Hipparchus ?
Thank you.