Hello, I am a relatively novice user of Orekit, and have come across an external API I’ve having trouble making sense of, which is probably more a testament to my layman’s understanding of the intricacies of reference frames than anything else, but I’m hoping someone can help me out. For everything I’ve done so far, I have used an ECEF reference frame for propagation and event detection defined by
Frame ECEF = FramesFactory.getITRF(ITRFVersion.ITRF_2020, IERSConventions.IERS_2010, false);
One of the APIs I’m starting to interact with requests an ephemeris point in ECI-TOD frame, but also includes a parameter for Greenwich Hour Angle.
I am converting my ECEF ephemerris point to ECI-TOD using code along the lines of:
TimeStampedPVCoordinates ecefEph = new TimeStampedPVCoordinates(absDate, posEcef, velEcef, Vector3D.ZERO);
Transform xform = ECEF.getTransformTo(FramesFactory.getTOD(IERSConventions.IERS_2010, false);
TimeStampedPVCoordinates eciEph = xform.transformPVCoordinates(ecefEph);
This seems to work well, and gets me within a few meters accuracy from a reference test case in terms of position and velocity, but the API asks for a Greenwich Heading Angle to go along with the ECI ephemeris point, and I’ve not been able to figure out what they are looking for in this parameter. I have played around with TimeScalarFunctions, e.g.,
TimeScalarFunction f1 = IERSConventions.IERS_2010.getGMSTFunction(TimeScalesFactory.getUTC());
double isThisGha = f1.value(absDate);
I have not been able to figure out what the API is really looking for, though, and the scalar function above seems to give me answers in degrees (172.00555) when documentation says it is in radians. I’m also quite sure I’m missing something in terms of what the API is asking for and in terms of how to find GHA for an ephemeris point. Any nudges in the right direction are appreciated!
EDIT
Through fiddling around, and not through any actual understanding, I’ve arrived at the conclusion that the value the API is looking for in the GHA field is equivalent to the value returned if I do:
double gha = xform.getRotation.getAngle();
in my transformation above. Is this a reasonable conclusion I’ve reached?