Hi everyone,
First, I wish an happy new year to all of you.
I am trying to use the ConfigurableLowThrustManeuver with two PositionAngleDetector: one for the beginning and another for the end of the maneuver. Bellow an example:
initial_state = get_initial_state(date_start)
propagator = get_propagator(initial_state, rso)
isp = 318.0
direction = Vector3D(float(0), float(1), float(0))
thrust = 0.06
thruster_axis = Vector3D(float(0), float(1), float(0))
thrust_direction_provider = ConstantThrustDirectionProvider(direction)
thrust_direction_and_attitude_provider = ThrustDirectionAndAttitudeProvider.buildFromDirectionInLOF(
LOFType.QSW,
thrust_direction_provider,
thruster_axis)
trigger_start = PositionAngleDetector(OrbitType.EQUINOCTIAL, PositionAngle.MEAN, float(np.radians(0.0)))
#trigger_start.init(propagator.getInitialState(), date_end)
trigger_end = PositionAngleDetector(OrbitType.EQUINOCTIAL, PositionAngle.MEAN, float(np.radians(90.0)))
#trigger_end.init(propagator.getInitialState(), date_end)
configurable_low_thrust_maneuver = ConfigurableLowThrustManeuver(thrust_direction_and_attitude_provider,
trigger_start,
trigger_end,
thrust,
isp)
propagator.addForceModel(configurable_low_thrust_maneuver)
list_spacecraft_state = propagator.propagate(date_end)
Unfortunately, I encounter the following error message:
---------------------------------------------------------------------------
JavaError Traceback (most recent call last)
<ipython-input-39-8c3ffcccd0ab> in <module>
23 propagator.addForceModel(configurable_low_thrust_maneuver)
24
---> 25 list_spacecraft_state = propagator.propagate(date_end)
JavaError: <super: <class 'JavaError'>, <JavaError object>>
Java stacktrace:
java.lang.NullPointerException
at org.orekit.propagation.events.PositionAngleDetector.g(PositionAngleDetector.java:203)
at org.orekit.forces.maneuvers.trigger.EventBasedManeuverTriggers.isFiringOnInitialState(EventBasedManeuverTriggers.java:152)
at org.orekit.forces.maneuvers.trigger.EventBasedManeuverTriggers.checkInitialFiringState(EventBasedManeuverTriggers.java:138)
at org.orekit.forces.maneuvers.trigger.EventBasedManeuverTriggers.init(EventBasedManeuverTriggers.java:126)
at org.orekit.forces.maneuvers.Maneuver.init(Maneuver.java:131)
at org.orekit.propagation.numerical.NumericalPropagator$Main.init(NumericalPropagator.java:506)
at org.orekit.propagation.integration.AbstractIntegratedPropagator$ConvertedMainStateEquations.init(AbstractIntegratedPropagator.java:656)
at org.hipparchus.ode.ExpandableODE.init(ExpandableODE.java:110)
at org.hipparchus.ode.AbstractIntegrator.initIntegration(AbstractIntegrator.java:212)
at org.hipparchus.ode.nonstiff.EmbeddedRungeKuttaIntegrator.integrate(EmbeddedRungeKuttaIntegrator.java:196)
at org.orekit.propagation.integration.AbstractIntegratedPropagator.integrateDynamics(AbstractIntegratedPropagator.java:416)
at org.orekit.propagation.integration.AbstractIntegratedPropagator.propagate(AbstractIntegratedPropagator.java:372)
at org.orekit.propagation.integration.AbstractIntegratedPropagator.propagate(AbstractIntegratedPropagator.java:340)
This error seems to be similar to the one in [Python] Error using ImpulseManeuver with PositionAngleDetector - Orekit usage - Orekit. However, even when I try to init the detector as suggest in the mentioned topic, it does not help.
Could someone help me with this issue?
Kind regards,
Stéfan