Finite time maneuver at orbital nodes

Hello,

I’m trying to implement a code that performs a maneuver centered around each of the nodes. What I do at the moment is propagate the orbit using a logged NodeDetector.withHandler(ContinueOnEvent()) to identify the time instants when the nodes are crossed and use these two dates to define the maneuvers as:

for event in logger.getLoggedEvents():
     date = event.getDate().shiftedBy(-duration/2)
     firing = ConstantThrustManeuver(date, duration, thrust, isp, direction)
     propagator.addForceModel(firing)

stateNow = propagator.propagate(initDate.shiftedBy(tSpan))

My question is this: is there a way to avoid to propagate twice the orbit (one to identify the nodes and the other to actually apply the maneuvers)? I was looking at EventBasedManeuverTriggers but I think this would allow me to create a maneuver that starts as the node gets crossed, and not centered around the node. Is there a way to avoid the double propagation?

Hi @Emiliano,

I’ve never tried it myself but maybe you could achieve what you’re looking for by using an EventBasedManeuverTriggers and EventShifter that would shift the NodeDetector events by respectively -duration/2 and +duration/2 ?
Or design your own triggers that would do that internally.