Eclipse Detector Usage Question

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

I am not sure, but maybe this is due to the relationship between distance to Earth and the fake radius you use (you put 3m if I read your code correctly). As the radius of the emitting body is used and the receiver body is considered a point, it is not exactly symetrical.

Also on a side note, there is a dedicated event detector for that: InterSatDirectViewDetector, and since 12.0 it also includes a skimming altitude (if for example you want to avoid atmosphere or ionosphere), but this setting is not avaliable in version 11.3.3.

2 Likes

FWIW, I tried a ton of different spherical radius values, all the way from 1e-16 m to 1000 m and was not able to resolve the issue. I would think that approximating the satellite using a 1e-16 meter radius would solve the problem if it’s what you’re describing. I did not know about this detector and will work on implementing it!

Got everything working with the InterSatDirectViewDetector. Thanks!

1 Like