Also instead of using a loop with a 10 seconds steps, there are builtins events detection in Orekit to find accurately access time using ElevationDetector
. There is also an ElevationExtremumDetector
to get the maximum/minimum elevation (beware that it doesn’t care about the satellite is visible or not, in other words, if the max elevation is -10 degrees and the satellite does not raise above horizon, this detector will happily notify about this -10 degrees maximum).
Here is a code snippet (in Java) that I used to compute AOS/LOS and max elevation in your case (I have added an if statement to avoid printing minimum elevation or maximum elevation below horizon).
Propagator propagator =
TLEPropagator.selectExtrapolator(new TLE("1 27424U 02022A 21307.66666667 .00000236 00000-0 52390-4 0 00004",
"2 27424 098.2183 247.0537 0000565 346.9863 173.2636 14.57126477037344"));
final TopocentricFrame hawaii = new TopocentricFrame(new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS,
Constants.WGS84_EARTH_FLATTENING,
FramesFactory.getITRF(IERSConventions.IERS_2010, true)),
new GeodeticPoint(FastMath.toRadians(27.5207),
FastMath.toRadians(-157.996),
402),
"Hawaii");
propagator.addEventDetector(new ElevationDetector(hawaii).
withConstantElevation(FastMath.toRadians(5.0)).
withMaxCheck(10).
withThreshold(1.0e-6).
withHandler((state, detector, increasing) -> {
double az = hawaii.getAzimuth(state.getPVCoordinates().getPosition(),
state.getFrame(),
state.getDate());
double el = hawaii.getElevation(state.getPVCoordinates().getPosition(),
state.getFrame(),
state.getDate());
System.out.format(Locale.US, "%s %s %8.3f azimuth %8.3f elevation%n",
state.getDate(),
increasing ? "AOS" : "LOS",
FastMath.toDegrees(az),
FastMath.toDegrees(el));
return Action.CONTINUE;
}));
propagator.addEventDetector(new ElevationExtremumDetector(hawaii).
withMaxCheck(10).
withThreshold(1.0e-6).
withHandler((state, detector, increasing) -> {
double az = hawaii.getAzimuth(state.getPVCoordinates().getPosition(),
state.getFrame(),
state.getDate());
double el = hawaii.getElevation(state.getPVCoordinates().getPosition(),
state.getFrame(),
state.getDate());
if (el > 0 && !increasing) {
System.out.format(Locale.US, "%s %s %8.3f azimuth %8.3f elevation%n",
state.getDate(),
"max",
FastMath.toDegrees(az),
FastMath.toDegrees(el));
}
return Action.CONTINUE;
}));
propagator.propagate(propagator.getInitialState().getDate().shiftedBy(Constants.JULIAN_DAY));
And here are the outputs I get:
2021-11-03T22:01:25.3569976565963Z max 63.012 azimuth 2.702 elevation
2021-11-03T23:32:30.60807440875259Z AOS 158.421 azimuth 5.000 elevation
2021-11-03T23:38:12.26524566086642Z max 75.881 azimuth 64.511 elevation
2021-11-03T23:43:55.64607641178647Z LOS 353.666 azimuth 5.000 elevation
2021-11-04T01:13:32.35773494114144Z AOS 238.900 azimuth 5.000 elevation
2021-11-04T01:16:11.70008915333878Z max 266.940 azimuth 7.924 elevation
2021-11-04T01:18:51.74122360404815Z LOS 295.032 azimuth 5.000 elevation
2021-11-04T11:39:31.40094139323974Z AOS 30.984 azimuth 5.000 elevation
2021-11-04T11:44:49.79226691338459Z max 98.135 azimuth 29.783 elevation
2021-11-04T11:50:05.98247890673792Z LOS 165.066 azimuth 5.000 elevation
2021-11-04T13:17:36.73031889279732Z AOS 344.374 azimuth 5.000 elevation
2021-11-04T13:22:17.49462556985657Z max 289.707 azimuth 19.467 elevation
2021-11-04T13:26:57.91398095657832Z LOS 234.794 azimuth 5.000 elevation
Computing time differences with respect to epoch and between AOS and LOS, these results show first access at 27150.608s after epoch and access durations of 685.038s, 319.384s, 634.581s and 561.184s, which is consistent with STK results.
Most probably the EME2000/TEME frame msimatch is the culprit (and I don’t understand how you could get results with a latitude at -157 degrees