Modifying maneuver delta-v at trigger-time, after instantiating the class

Hello,

I’m trying to experiment with setting up a prototype maneuver object that will be able to change the delta-v (magnitude and direction) AT trigger-time, instead of fixing it while instantiating the class, and before adding it to the propagation.

The trigger will be based on something like another satellite’s position/orbital state, so I won’t necessarily know ahead of time which way to direct the maneuver, eg, depending on starting conditions.

Is there any maneuver type that would allow this dynamically determined delta-v? No luck so far with ImpulsiveManeuvers, and the rest look to behave the same. If not, what would be another approach to set up maneuvers who’s dv could be dynamic throughout the propagation?

Another angle I’ve tried is creating all the maneuver objects separately with their own triggers to cover all the dv possibilities. This works in principle, however I’m running into a different issue down that track which would be another post.

Another idea, is it possible/reasonable to have the maneuver created by a trigger, then manually triggered immediately so as to reverse the maneuver/trigger relationship? That way a new maneuver instance would be created for every maneuver situation, and the dv could be dynamically determined, but clearly not how the maneuver classes were designed to function.

Thanks!

Hello @ShikaDing,

As far as I know there is no built-in class in Orekit that can provide the behavior you’re looking for.

You will need to implement your own version of the ImpulseManeuver.Handler class.
The class will be very similar. You will need to:

  • Add a PVCoordinatesProvider as attribute to get the other satellite position/orbital state
  • Compute your DV at the start of the resetState method
  • Still in this method, apply the DV to your state in the same fashion it is done in ImpulseManeuver.Handler class.

Then you can instantiate the ImpulseManeuver object using that Handler and a dummy DV. It is not the most elegant thing to do but I think it should work.

There is also the possibility to do it by implementing your own PropulsionModel and use it in the Maneuver class. But it would be a bit harder I think.

Hope this helps,
Maxime

Actually, scrap this, I just realized the handler is not settable in the ImpulseManeuver class.
You will need to copy the whole ImpulseManeuver class and replace the original Handler with yours.
Maybe we should add the possibility to set a custom Handler in the ImpulseManeuver constructor. What do you think?

Hi @MaximeJ ,

Thanks for your response. Re-implementing the ImpulseManeuver class may be tricky in my case as I’m working in python and only have very basic experience in Java.

However, I do not mean to constrain the question to just that class. I’m open to using basically any type of maneuver class that could take an event based (not time) trigger, and be able to modify dv on the fly.

I found this thread that you actually replied to over a year ago, and it sounds like this gives a pseudo-example of what I’m trying to implement, in this case using the ConstantThrustManeuver class, and modifying the dv using the ParameterDriver. Have I understood this right? I dont’ 100% follow the documentation of this ParameterDriver yet, but if this is the design intention, I could probably figure it out.

As an aside, is there a design reason why attributes such as ‘deltaVSat’ of a maneuver object are not public/able to be modified? Set-access to that would also be a hypothetical solution.

Hi ShikaDing,

I’m no an expert in Python but it should be doable. I’ve spotted three examples from @petrus.hyvonen that might help : EventHandlerTest, EventDetectorTest and AbstractDetectorTest.

I understand, but I don’t think you’ll be able to do it without at least implementing your own event handler.

ParameterDriver are containers that are used to access/modify values in models on the fly. They were originally designed for orbit determination needs.
In the example you found the DV computation was not done automatically during propagation but manually by the user between 2 propagations.
I don’t think that it is what you need.
But if it is ok for you then there is a simple solution:

  • Propagate until the event triggering the maneuver and stop the propagation;
  • Compute the DV and add the corresponding ImpulseManeuver to the propagator;
  • Continue the propagation

Not sure about the reasons. The EventHandler are by design immutable objects (i.e. that cannot be changed once built); so this may explain why the attributes cannot be modified.

Thinking about this made me realize I told you something wrong in my second comment.
You can change the EventHandler of an ImpulseManeuver using the method withHandler(MyHandler). So the first solution I proposed should actually be the simplest.

Maxime