[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*To*: orekit-users@orekit.org*Subject*: Re: [Orekit Users] Fwd: Problem with additional equations*From*: MAISONOBE Luc <luc.maisonobe@c-s.fr>*Date*: Mon, 04 Dec 2017 18:37:29 +0100*In-reply-to*: <20171204182938.Horde.zsvdd0yyzVcKh6zJz0QRwQ1@messagerie.c-s.fr>*References*: <CAAv=LsNmxH=D=FiEki3sceNBzvYt6MDB7qUXxGwJECcz+ttD=Q@mail.gmail.com> <CAAv=LsOxHZd8dtVchcxKGFA6ESnkbZXL7qa0dnMxPKbkeyrsAA@mail.gmail.com> <20171204182938.Horde.zsvdd0yyzVcKh6zJz0QRwQ1@messagerie.c-s.fr>*User-agent*: Internet Messaging Program (IMP) H5 (6.2.3)

MAISONOBE Luc <luc.maisonobe@c-s.fr> a écrit :

For the sake of separation of concerns, I would prefer to have realythe primaryequations completely computed by one part of the code, and secondaryequationsby another part and not messing with the primary. So if you removethe secondaryequations, you only don't get the secondary state they compute, butyou do not changeat all the premary equations. When the secondary equations do changethe primaryderivatives, they are not secondary anymore: they are needed to compute the primary state.

Well, I wrote the previous looking almost only at Hipparchus and Apache Common Math and not at Orekit. And i see that we indeed explicitly allowed what you intend to do in the Orekit AdditionalEquations interface which reads: /** Compute the derivatives related to the additional state parameters. * <p> * When this method is called, the spacecraft state contains the main * state (orbit, attitude and mass), all the states provided through * the {@link org.orekit.propagation.AdditionalStateProvider additional * state providers} registered to the propagator, and the additional state * integrated using this equation. It does <em>not</em> contains any other * states to be integrated alongside during the same propagation. * </p> * @param s current state information: date, kinematics, attitude, and * additional state

* should be put

* equations do not change main state at all) * @exception OrekitException if some specific error occurs */ double[] computeDerivatives(SpacecraftState s, double[] pDot) throws OrekitException; So the return value was foreseen as a way to change the primary state. I now consider this a bad design decision, but its a decision we (and probably me) did some time ago :-( So we indeed have to fix this. I'll look if this is possible without modifying Hipparchus and allowing users to return values both as a returned array and by modifying an argument array. Could you open a bug report on the Orekit forge? best regards, Luc

**References**:**[Orekit Users] Problem with additional equations***From:*Christophe Le Bris <chris.lebris@gmail.com>

**[Orekit Users] Fwd: Problem with additional equations***From:*Christophe Le Bris <chris.lebris@gmail.com>

**Re: [Orekit Users] Fwd: Problem with additional equations***From:*MAISONOBE Luc <luc.maisonobe@c-s.fr>

- Prev by Date:
**Re: [Orekit Users] Fwd: Problem with additional equations** - Next by Date:
**Re: [Orekit Users] Fwd: Problem with additional equations** - Previous by thread:
**Re: [Orekit Users] Fwd: Problem with additional equations** - Next by thread:
**Re: [Orekit Users] Fwd: Problem with additional equations** - Index(es):