Writing OEM XML is missing acceleration tags?

I’m not quite sure if I’m missing something. I have a list of pre-computed ephemeris which I have form AbsolutePVCoordinates then added them into the SpaceCraftState list (with position, velocity, and acceleration). I then added a new segment and added the states list. The output XML looks prefect, except it is missing all the acceleration tag. Could I be missing something?

I have confirmed that the AbsolutePVCoordinates does include acceleration as well. Here is the code it’s just a modified version of what I see from the example code. Here I passed in the states, then use the “satellite.addNewSegment(states)” to add the states list.

        OrekitEphemerisFile ephemerisFile = new OrekitEphemerisFile();
        OrekitEphemerisFile.OrekitSatelliteEphemeris satellite = ephemerisFile.addSatellite("SATELLITE1");
        satellite.addNewSegment(states);

        // Create temp file
        String tempOem = Files.createTempFile("OrekitEphemerisFileTest", ".oem").toString();

        // OemWriter
        String satId = "SATELLITE1";

        Header headerTemplate = new Header(3);
        headerTemplate.setOriginator(theOriginator);

        OemMetadata template = new OemMetadata(2);
        template.setTimeSystem(TimeSystem.UTC);
        template.setObjectID(satId);
        template.setObjectName(satId);
        template.setCenter(new BodyFacade("EARTH", CelestialBodyFactory.getCelestialBodies().getEarth()));
        template.setReferenceFrame(FrameFacade.map(eme2000));


        EphemerisWriter writer = new EphemerisWriter(new WriterBuilder().buildOemWriter(),
                headerTemplate,
                template,
                FileFormat.XML,
                "dummy",
                60);

        writer.write(tempOem, ephemerisFile);

This created a output XML file just fine, but missing acceleration tag. Am I missing something? Thanks.

It seems that if at least one data point misses accelerations, we shut them down for the whole segment. Could you check all points have accelerations data?
The reason is that all points must be consistent.

So following your advice I decided to shorten the ephemeris to a shorter set (to make sure I’m not misreading any lines), then ultimately to just shorten it to a single PVT.

For example:

{P(-3336251.153313256, -2546426.356977887, 5770472.471909881), V(5270.178321515446, 2972.474214675532, 4475.655942956622), A(3.660968990138551, 2.769456515102485, -4.292015272400273)}

(note, mock data might not be physically possible)

the OME XML file is still unable to create XML with acceleration tag.

I think I found the problem. That’s because the method getAvailableDerivatives() of OrekitEphemerisFile returns USE_PV and not USE_PVA. Therefore the OEM only contains position and velocity.

Maybe you could try to use the Oem class instead of OrekitEphemerisFile?

Bryan

Thank you! Sorry just had a chance to test and I believe this is the right class to use.

I have a follow up question, what is the purpose of the IERS in the:

final Oem oem = new Oem(header, segments, IERSConventions.IERS_2010, DataContext.getDefault(), states.get(0).getMu());

What sort of impact does this have to the OEM XML output?

The IERS conventions are needed for frames transform. I agree that in the OEM case this may seem moot, but it is required in the base classes all CCSDS messages inherit from.

Understood, thanks for the feedback!