Everything works well until the final call to GroundStation() where I get the following error
JavaError: <super: <class 'JavaError'>, <JavaError object>>
Java stacktrace:
org.orekit.errors.OrekitException: missing Earth Orientation Parameters
at org.orekit.estimation.measurements.GroundStation.<init>(GroundStation.java:189)
at org.orekit.estimation.measurements.GroundStation.<init>(GroundStation.java:160)
I understand that normally it would be a problem not to have EOPs available but in this case I don’t have a need for them. Is there a way to just work without them / is there a standard way of including MOPs/LOPs? If they are even a known thing?
That’s very interesting! I never tried creating a Moon ground station
I found a workaround. The workaround is to create an empty EOP history. You can do it using the following code:
from java.util import ArrayList
from orekit import JArray
from org.orekit.frames import EOPEntry, EOPHistory
from org.orekit.utils import IERSConventions
from org.orekit.models.earth.displacement import PythonStationDisplacement
from org.orekit.data import DataContext
# EOP History
entries = ArrayList()
history = EOPHistory(IERSConventions.IERS_2010, entries, True, DataContext.getDefault().getTimeScales())
# Station Displacement
displacements = []
# Station
point = GeodeticPoint(radians(location["lat"]), radians(location["long"]), location["alt"]);
topo = TopocentricFrame(moon_oae, geodetic_point, location["name"]);
station = GroundStation(station_frame, history, JArray('object')(displacements, PythonStationDisplacement));
Howerver, that’s just a workaround to have your example working.
I have no idea if orientation parameters exist for the Moon… (I guess yes) If yes, the best solution is to update the default data context to use this file for “EOP” (or MOP) provider.
Updating the provider for orientation parameters can be done like that:
# Update Data context for orientation parameters
DataContext.getDefault().getFrames().clearEOPHistoryLoaders()
DataContext.getDefault().getFrames().addEOPHistoryLoader(...) # The provider
Maybe the implementation of the GroundStation class should be more “generic” too…