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

Re: [Orekit Users] Add force models during propagation



On Mon, 2018-03-05 at 17:14 +0100, John Reilly wrote:
> 
> I'm assuming that addContribution() is not called at all unless the
> event
> detector g() has a zero-crossing?

addContribution() will be called before and after g() has a zero
crossing. It will even be called with an AbsoluteDate after the root of
the g function but before the event is delivered to the event handler.
Anytime before the event is delivered (the eventOccured(...) method of
you handler is called) just add a zero acceleration.

The propagator will propagate past your event date (the root of g(), it
needs to do this in order to detect the event), adding contributions
from all force models, deliver the event to the event handler, then
when the event handler returns RESET_* the propagator will throw out
everything it computed past the event date, and finally the propagator
will continue from the state at the event date.

> 
> Do you know if addContribution() is called before or after the event
> detector's resetState()? 

It is called both before and after resetState(...), but not between
eventOccured(...) and resetState(...).

> I need to call the external controller to get the
> force. I need to do that just once at the zero-crossing.

Then is sounds like the call to the external controller should go in
your eventOccured(...) method and store the computed acceleration
profile to a instance variable in the ForceModel.

Best Regards,
Evan

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