Setting AemMetadata's Reference Frame

Hi forum,

I’m trying to write some Attitude Ephemeris Message files in CCSDS format. This has brought me to an error:

org.orekit.errors.OrekitException: value for key REF_FRAME_A has not been initialized

I guess I have two questions here-

  1. I see a function to getAttitudeEndpoints but not a setAttitudeEndpoints function. How should I set those so the REF_FRAME_A could be set.
  2. Is it possible, or even a good idea, to use the MetadataKey class to set these parameters? I could see in the source code that these classes are used by the Metadata class directly. Is there a way to set these from a user end?

In fact, the attitude endpoints is a mutable container that is built right in AemMetadata constructor.
So you can just do metadata.getEndpoints().setFrameA(yourFrame).

[edit] and using MetadataKey is probably not straightforward either as it requires low level objects like ContextBinding that are tricky to set up.

1 Like

Thank you! That worked like a charm! :smiley: