Internal error on DateEvent capture events in v11.1.2
Hi there I am sorry but I may have found an error on version 11.1.2. I have a scenario that captures 2 events based on date, one at the beginning of the propagation and one at the end using TLE propagation. The test I have was successful with version 11.1, while it fails with version 11.1.2
Here the test.
// TLE
val tleOrbit = new OrbitElement(
"1 43197U 18015F 19284.07336221 .00000533 00000-0 24811-4 0 9998",
"2 43197 97.4059 50.1428 0017543 265.5429 181.0400 15.24136761 93779");
// startTime, endTime
val start = 1570802400000L;
val end = 1570838399000L;
//Build propagator
TLE tle = new TLE("1 43197U 18015F 19284.07336221 .00000533 00000-0 24811-4 0 9998",
"2 43197 97.4059 50.1428 0017543 265.5429 181.0400 15.24136761 93779");
Propagator propagator = TLEPropagator.selectExtrapolator(tle);
//Create logger
EventsLogger orbitalLogger = new EventsLogger();
//Max check to seconds
int maxCheck = (int) ((end - start) / 2000);
DateDetector dateDetector = new DateDetector(
maxCheck ,
oneMicrosInSec,
Time.getAbsoluteDateFromTimestamp(start))
.withHandler(new GenericEventHandler<>());
dateDetector.addEventDate(Time.getAbsoluteDateFromTimestamp(end));
//Add event detectors to orbit
propagator.addEventDetector(orbitalLogger.monitorDetector(dateDetector));
//Propagate
SpacecraftState lastState = propagator.propagate(
Time.getAbsoluteDateFromTimestamp(start),
Time.getAbsoluteDateFromTimestamp(end).shiftedBy(1));
where
public static AbsoluteDate getAbsoluteDateFromTimestamp(long timestamp) {
LocalDateTime utcDate = LocalDateTime.ofInstant(Instant.ofEpochMilli(timestamp), UTC_ZONE_ID);
val year = utcDate.getYear();
val month = utcDate.getMonthValue();
val day = utcDate.getDayOfMonth();
val hour = utcDate.getHour();
val minute = utcDate.getMinute();
val second = utcDate.getSecond();
val millis = utcDate.getNano() / 1e9;
return new AbsoluteDate(year, month, day, hour, minute, second, TimeScalesFactory.getUTC()).shiftedBy(millis);
Here the error
internal error, please notify development team by creating a new topic at https://forum.orekit.org
org.orekit.errors.OrekitInternalError: internal error, please notify development team by creating a new topic at https://forum.orekit.org
at app//org.orekit.propagation.events.EventState.check(EventState.java:586)
at app//org.orekit.propagation.events.EventState.findRoot(EventState.java:384)
at app//org.orekit.propagation.events.EventState.evaluateStep(EventState.java:220)
at app//org.orekit.propagation.analytical.AbstractAnalyticalPropagator.acceptStep(AbstractAnalyticalPropagator.java:212)
at app//org.orekit.propagation.analytical.AbstractAnalyticalPropagator.propagate(AbstractAnalyticalPropagator.java:148)
The test fails due to:
- maxCheck big, half of the propagation period, set to speed up the calculation as I am interested only in first and last moments
- .shiftedBy(1) adding a second to the last timestamp so to extend the propagation period, so to capture with the event the last moment
The test does not fail if:
- I set the maxCheck to a smaller number (like 100 sec)
- I do not add the additional second
- I add a big interval to the last moment
I stated, this test was not failing with previous version.
Thanks for the follow up Kindly Alberto