PositionAngleDetector not initialized when using in ImpulseManeuver
When adding an ImpulseManeuver
with a PositionAngleDetector
as trigger to a propagator, a NullPointerException
is raised.
The problem is that the PositionAngleDetector is not initialized. Therefore, the offsetEstimators parameter of the PositionAngleDetector is not initialized too. That’s why you have a NullPointerException. I wonder if the init() method of the ImpulseManeuverDetector should call the init() method of the trigger parameter to make sure it is initialized. Something like:
/** {@inheritDoc} */ public void init(final SpacecraftState s0, final AbsoluteDate t) { trigger.init(s0, t); forward = t.durationFrom(s0.getDate()) >= 0; }
I’m also wondering why we’re not calling
super.init(s0, t)
inImpulseManeuver#init
instead of repeating the lineforward = t.durationFrom(s0.getDate()) >= 0;