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

Re: [Orekit Users] Add force models during propagation



Hi John,

Welcome to Orekit.

On Mon, 2018-03-05 at 14:01 +0100, John Reilly wrote:
> I have inherited a large program built upon Orekit a long time ago.
> I'm trying
> to architect the best way to add a feature.
> 
> What we need to do is to add force perturbations during propagation.
> Right
> now, I have an event detector which, at the appropriate time, calls
> an
> external process to request control forces. The way I understand it,
> the usual
> path would be for me to add a ForceModel to the numerical propagator
> at
> configuration, prior to propagation starting. At propagation start,
> the
> propagator would then ask the ForceModel for start/stop event
> detectors. Since
> my control forces are unknown a priori, I cannot do this. (I don't
> think).

Implementing a ForceModel with it's own event detector(s) is probably
the best way to do it, if it works. Since you already have a working
event detector what specifically is preventing you from using that in
the ForceModel? 

If you haven't seen it, take a look at how ConstantThrustManeuver is
implemented. The force is zero until the first event is handled which
sets a control variable (this.firing) and then ForceModel always
returns a constant acceleration. I.e. the acceleration returned by the
ForceModel does not depend on time, only the control variable. This is
important because when there is a discontinuous change in position,
velocity, or acceleration the integrator needs to place a step boundary
at the discontinuity in order to integrate the function accurately. In
other words, only make discontinuous changes to your control force as a
result of a event handler returning RESET_DERIVATIVES or RESET_STATE.

Hope this helps.

Best Regards,
Evan

Attachment: smime.p7s
Description: S/MIME cryptographic signature