Hi again,
That is quite impossible to isolate the use case as it happens in a complex simulation involving a lot of mechanisms on maneuvers, at least 20 classes are involved.
So I will provide as many details as possible
Propagator numerical :
public static double minStep = 1e-2;
public static double maxPropagationStep = 100;
public static double[] vecAbsoluteTolerance = { 1e-5, 1e-5, 1e-5, 1e-8, 1e-8, 1e-8, 1e-5 };
public static double[] vecRelativeTolerance = { 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
public NumericalPropagator createPropagator(Orbit orbit) {
DormandPrince54Integrator integrator = new DormandPrince54Integrator(minStep,
maxPropagationStep, vecAbsoluteTolerance, vecRelativeTolerance);
final NumericalPropagator propagator = new NumericalPropagator(integrator);
SpacecraftState iniState = new SpacecraftState(orbit, totalMass);
propagator.resetInitialState(iniState);
return propagator;
}
2 maneuvers with each one a start and stop detector.
Detectors on maneuvers : Boolean detectors using Eclipse detector, and 2 custom detectors (position on orbit, revolution counter)
When the problem occurs, here are the debug traces :
-------- eventLoop -----
occurringEvents (hashcodes) : [1583079430 1518671028 ]
for (state : eventsStates)
state.hashCode() : 1343109757
currentEvent.hashCode() : 1583079430
state.getEventTime() : Infinity
> tryAdvance 1681422435
g = -0.004960705022253478
pendingEventTime = NaN
t = 4256.814376977759
positive = false
g0Positive = false
=> tryAdvance false
state.hashCode() : 1518671028
currentEvent.hashCode() : 1583079430
state.getEventTime() : 4256.814376977759
>>>> tryAdvance 1681422435
g = 0.13349433239971395
pendingEventTime = 4256.814376977759
t = 4256.814376977759
positive = true
g0Positive = false
=> tryAdvance true
-------- eventLoop -----
occurringEvents (hashcodes) : [1518671028 1583079430 ]
for (state : eventsStates)
state.hashCode() : 1343109757
currentEvent.hashCode() : 1518671028
state.getEventTime() : Infinity
> tryAdvance 1709371186
g = -0.004960705022253478
pendingEventTime = NaN
t = 4256.814376977759
positive = false
g0Positive = false
=> tryAdvance false
=> tryAdvance false
state.hashCode() : 1583079430
currentEvent.hashCode() : 1518671028
state.getEventTime() : 4256.814376977759
> tryAdvance 1709371186
g = -0.13349433239971395
pendingEventTime = 4256.814376977759
t = 4256.814376977759
positive = false
g0Positive = true
=> tryAdvance true
-------- eventLoop -----
occurringEvents (hashcodes) : [1583079430 1518671028 ]
for (state : eventsStates)
state.hashCode() : 1343109757
currentEvent.hashCode() : 1583079430
state.getEventTime() : Infinity
> tryAdvance 389052302
g = -0.004960705022253478
pendingEventTime = NaN
t = 4256.814376977759
positive = false
g0Positive = false
=> tryAdvance false
state.hashCode() : 1518671028
currentEvent.hashCode() : 1583079430
state.getEventTime() : 4256.814376977759
>>>> tryAdvance 389052302
g = 0.13349433239971395
pendingEventTime = 4256.814376977759
t = 4256.814376977759
positive = true
g0Positive = false
=> tryAdvance true
-------- eventLoop -----
occurringEvents (hashcodes) : [1518671028 1583079430 ]
for (state : eventsStates)
state.hashCode() : 1343109757
currentEvent.hashCode() : 1518671028
state.getEventTime() : Infinity
> tryAdvance 910977735
g = -0.004960705022253478
pendingEventTime = NaN
t = 4256.814376977759
positive = false
g0Positive = false
=> tryAdvance false
=> tryAdvance false
state.hashCode() : 1583079430
currentEvent.hashCode() : 1518671028
state.getEventTime() : 4256.814376977759
> tryAdvance 910977735
g = -0.13349433239971395
pendingEventTime = 4256.814376977759
t = 4256.814376977759
positive = false
g0Positive = true
=> tryAdvance true
-------- eventLoop -----
occurringEvents (hashcodes) : [1583079430 1518671028 ]
for (state : eventsStates)
state.hashCode() : 1343109757
currentEvent.hashCode() : 1583079430
state.getEventTime() : Infinity
> tryAdvance 294713101
g = -0.004960705022253478
pendingEventTime = NaN
t = 4256.814376977759
positive = false
g0Positive = false
=> tryAdvance false
state.hashCode() : 1518671028
currentEvent.hashCode() : 1583079430
state.getEventTime() : 4256.814376977759
> tryAdvance 294713101
g = 0.13349433239971395
pendingEventTime = 4256.814376977759
t = 4256.814376977759
positive = true
g0Positive = false
=> tryAdvance true
-------- eventLoop -----
occurringEvents (hashcodes) : [1518671028 1583079430 ]
for (state : eventsStates)
state.hashCode() : 1343109757
currentEvent.hashCode() : 1518671028
state.getEventTime() : Infinity
> tryAdvance 1668878706
g = -0.004960705022253478
pendingEventTime = NaN
t = 4256.814376977759
positive = false
g0Positive = false
=> tryAdvance false
=> tryAdvance false
state.hashCode() : 1583079430
currentEvent.hashCode() : 1518671028
state.getEventTime() : 4256.814376977759
> tryAdvance 1668878706
g = -0.13349433239971395
pendingEventTime = 4256.814376977759
t = 4256.814376977759
positive = false
g0Positive = true
=> tryAdvance true
-------- eventLoop -----
occurringEvents (hashcodes) : [1583079430 1518671028 ]
for (state : eventsStates)
state.hashCode() : 1343109757
currentEvent.hashCode() : 1583079430
state.getEventTime() : Infinity
> tryAdvance 2011272852
g = -0.004960705022253478
pendingEventTime = NaN
t = 4256.814376977759
positive = false
g0Positive = false
=> tryAdvance false
state.hashCode() : 1518671028
currentEvent.hashCode() : 1583079430
state.getEventTime() : 4256.814376977759
> tryAdvance 2011272852
g = 0.13349433239971395
pendingEventTime = 4256.814376977759
t = 4256.814376977759
positive = true
g0Positive = false
=> tryAdvance true
-------- eventLoop -----
occurringEvents (hashcodes) : [1518671028 1583079430 ]
for (state : eventsStates)
state.hashCode() : 1343109757
currentEvent.hashCode() : 1518671028
state.getEventTime() : Infinity
> tryAdvance 581882109
g = -0.004960705022253478
pendingEventTime = NaN
t = 4256.814376977759
positive = false
g0Positive = false
=> tryAdvance false
=> tryAdvance false
state.hashCode() : 1583079430
currentEvent.hashCode() : 1518671028
state.getEventTime() : 4256.814376977759
> tryAdvance 581882109
g = -0.13349433239971395
pendingEventTime = 4256.814376977759
t = 4256.814376977759
positive = false
g0Positive = true
=> tryAdvance true
-------- eventLoop -----
occurringEvents (hashcodes) : [1583079430 1518671028 ]
for (state : eventsStates)
state.hashCode() : 1343109757
currentEvent.hashCode() : 1583079430
state.getEventTime() : Infinity
> tryAdvance 873489210
g = -0.004960705022253478
pendingEventTime = NaN
t = 4256.814376977759
positive = false
g0Positive = false
=> tryAdvance false
state.hashCode() : 1518671028
currentEvent.hashCode() : 1583079430
state.getEventTime() : 4256.814376977759
> tryAdvance 873489210
g = 0.13349433239971395
pendingEventTime = 4256.814376977759
t = 4256.814376977759
positive = true
g0Positive = false
=> tryAdvance true
I hope this helps, let me know if I can provide more details.
Edit : additionnal element forgotten : in the propagation there is also detactors that will stop the propagation when the target is met (eccentricity with a precision of 1e-5). One of the eventState in the debug log above is related to this detector. But the target will be met later