Hello all,
I’m using the EclipseDetector
class in a somewhat unorthodox way: setting up a problem to determine if two satellites in orbit around a Celestial Body (almost always just Earth) have line of sight to each other. When the detector enters an eclipse, that would mean the satellites no longer have line of sight to each other, and vice versa exiting an eclipse. While this appears to work, I’ve noticed that the eclipse intervals produced by the detector change depending on which satellite I specify as occulted. I don’t understand why the results would be different depending on the direction? Line of sight from one object to another should be bi-directional, no?
To illustrate the issue, I’ve written a JUnit test, using NASA’s AQUA and TDRS11 satellites.
class OrekitEclipseDetectorTest {
@ParameterizedTest
@ValueSource(strings = { "normal", "flipped" })
void testEclipseDetector(final String direction) {
final TLE aqua = new TLE("1 27424U 02022A 21313.14695569 .00000258 00000-0 67388-4 0 9991",
"2 27424 98.2230 252.4718 0001124 115.1964 333.9728 14.57104099 38140");
final TLE tdrs11 = new TLE("1 39070U 13004A 24114.79713111 .00000092 00000-0 00000+0 0 9998",
"2 39070 2.7257 9.7253 0006016 35.9948 279.1885 1.00268265 38822");
final TLEPropagator aquaPropagator = TLEPropagator.selectExtrapolator(aqua);
final TLEPropagator tdrs11Propagator = TLEPropagator.selectExtrapolator(tdrs11);
final OneAxisEllipsoid earth = new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS, 0.0, FramesFactory.getITRF(IERSConventions.IERS_2010, true));
final List<AbsoluteDate> events = new ArrayList<>();
if (direction.equals("normal")) {
final EclipseDetector eventDetector = new EclipseDetector(tdrs11Propagator, 3.0, earth).withUmbra().withHandler((s, detector, increasing) -> {
events.add(s.getDate());
return Action.CONTINUE;
});
aquaPropagator.addEventDetector(eventDetector);
aquaPropagator.propagate(new AbsoluteDate(DateTimeComponents.parseDateTime("2024-05-03T06:00:00Z"), DataContext.getDefault().getTimeScales().getUTC()),
new AbsoluteDate(DateTimeComponents.parseDateTime("2024-05-03T12:00:00Z"), DataContext.getDefault().getTimeScales().getUTC()));
}
else {
final EclipseDetector eventDetector = new EclipseDetector(aquaPropagator, 3.0, earth).withUmbra().withHandler((s, detector, increasing) -> {
events.add(s.getDate());
return Action.CONTINUE;
});
tdrs11Propagator.addEventDetector(eventDetector);
tdrs11Propagator.propagate(new AbsoluteDate(DateTimeComponents.parseDateTime("2024-05-03T06:00:00Z"), DataContext.getDefault().getTimeScales().getUTC()),
new AbsoluteDate(DateTimeComponents.parseDateTime("2024-05-03T12:00:00Z"), DataContext.getDefault().getTimeScales().getUTC()));
}
assertEquals(4, events.size());
}
}
You can see in the code above, I’ve switched which satellite is the occulted body (using the same spherical radius in both cases). I then have the simplest of assertions: that the number of crossings detected is equal to 4. I’ve validated that 4 is the correct number of crossings using STK, the access intervals are linked below:
stk_output.txt (305 Bytes)
When the “direction” is from the AQUA satellite to the TDRS11 satellite, I get the right number of crossings (furthermore, I’ve been able to validate that the crossings are correct!). The other way, I get 7.
Any help/advice is much appreciated!! I’m on Orekit v11.3.3