GenericTimeStampedCache may be locked at infinity.
I wrote the example below to demonstrate an issue I saw. When a TLE propagator is made and used to propagate a TLE across an impossibly large time frame, the propagation throws an ArithmeticException. That is fine, but it then prevents future TLE propagations from taking place. It appears that something in the first propagator is getting cached and preventing future calculations from completing.
public void example() {
TLE aTle = new TLE("1 27424U 02022A 23173.43403823 .00001056 00000+0 23935-3 0 9994",
"2 27424 98.2874 117.8299 0001810 103.6635 5.7337 14.58117998124128");
GeodeticPoint site = new GeodeticPoint(0.0, 0.0, 0.0);
TopocentricFrame siteFrame = new TopocentricFrame(getEarth(), site, "site");
ElevationDetector siteVisDetector =
new ElevationDetector(60, 0.001, siteFrame).withConstantElevation(5.0);
// Create TLE propagator
TLEPropagator tlePropagator = TLEPropagator.selectExtrapolator(aTle);
tlePropagator.setStepHandler(new BasicStepHandler());
tlePropagator.addEventDetector(siteVisDetector);
// Some ridiculous dates that throw exception
AbsoluteDate ephemerisStartDate = AbsoluteDate.PAST_INFINITY;
AbsoluteDate ephemerisEndDate = AbsoluteDate.FUTURE_INFINITY;
try {
// Propagation throws an exception
tlePropagator.propagate(ephemerisStartDate, ephemerisEndDate);
} catch (ArithmeticException e) {
System.out.println("Error #1");
}
// *******************************************************
// Make a new propagator
tlePropagator = TLEPropagator.selectExtrapolator(aTle);
tlePropagator.setStepHandler(new BasicStepHandler());
tlePropagator.addEventDetector(siteVisDetector);
TimeScale utc = TimeScalesFactory.getUTC();
ephemerisStartDate = new AbsoluteDate(Date.from(Instant.parse("2023-06-15T00:00:00.000Z")), utc);
ephemerisEndDate = new AbsoluteDate(Date.from(Instant.parse("2023-06-22T00:00:00.000Z")), utc);
// Propagation unexpectedly throws ArithmeticException
tlePropagator.propagate(ephemerisStartDate, ephemerisEndDate);
}
Possible I am just missing something and this makes sense. But my expectation would be that a new propagator can independently propagate
Edited by Vincent CUCCHIETTI