Hi,
I have a working low thrust maneuver generation script. However i wanted to experiment with the Apside detector as I might possibly use it in my script.
I simply initialized the apside detector and added it to my propagator hoping to be able to plot the event times, to start with. However mid-way during the propagation i get ValueError: math domain error
. To be noted that the only extra lines i added to my code were:
event_detector = ApsideDetector(initialOrbit).withMaxCheck(60.0).withHandler(ContinueOnEvent())
event_logger = EventsLogger()
event_detector = event_logger.monitorDetector(event_detector)
propagator_num.addEventDetector(event_detector)
I am NOT using a near-circular orbit in this case.
initialOrbit = KeplerianOrbit(7000000., 0.01, 1, 0., 0., 0., PositionAngleType.TRUE, FramesFactory.getEME2000(), initialEpoch, mu)
I also constructed an alternate apside detector extending AbstractDetector
whose switching function is based on zero crossing of the spacecraft’s radial velocity as follows. However that also runs into the same error.
To be noted that, NodeDetector used the same way works as expected.
Can someone help me understand what might be going on? Does the MaxCheck interval for the event detector have to do anything with the propagation step size? Can applying low-thrust maneuvers to the propagation cause this?
For reference, i set up my propagator as follows:
initialOrbit = KeplerianOrbit(7000000., 0.01, 1, 0., 0., 0., PositionAngleType.TRUE,
FramesFactory.getEME2000(), initialEpoch, mu)
initialOrbit = CartesianOrbit(initialOrbit)
minStep = 0.001
maxstep = 60.0
initStep = 60.0
positionTolerance = .01
tolerances = NumericalPropagator.tolerances(positionTolerance,
initialOrbit,
initialOrbit.getType())
integrator = DormandPrince853Integrator(minStep, maxstep,
JArray(JDouble)(tolerances[0]),
JArray(JDouble)(tolerances[1]))
integrator.setInitialStepSize(initStep)
initialState = SpacecraftState(initialOrbit, satellite_mass)
propagator_num = NumericalPropagator(integrator)
propagator_num.setOrbitType(OrbitType.CARTESIAN)
propagator_num.setInitialState(initialState)
Any help will be much appreciated.