Lunar ground station error

Hi all,

Trying to set up a ground station on the Moon at the moment and having a problem defining it. My code is

    moon = CelestialBodyFactory.getMoon()
    moon_body_frame = moon.getBodyOrientedFrame()
    moon_equitorial_radius = 1738.1e3
    moon_flattening_parameter = 0.0012
    moon_oae = OneAxisEllipsoid(moon_equitorial_radius, moon_flattening_parameter, moon_body_frame)
    geodetic_point = GeodeticPoint(radians(location["lat"]), radians(location["long"]), location["alt"])
    station_frame = TopocentricFrame(moon_oae, geodetic_point, location["name"])
    station = GroundStation(station_frame)

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>(
	at org.orekit.estimation.measurements.GroundStation.<init>(

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?


Hi @Paul1

That’s very interesting! I never tried creating a Moon ground station :laughing:
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 import PythonStationDisplacement
from 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().addEOPHistoryLoader(...) # The provider

Maybe the implementation of the GroundStation class should be more “generic” too…

Best regards,

Hi @bcazabonne

I know right, quite a fun little project for a conference paper!

Thanks for your answer, that sorted my problem out enough for the meantime. I’ll have a think if I need MOPs for future precision improvements.