XML OEM file missing data tags
Exporting an OEM file in XML format is missing the <data>...</data>
tags around the state vectors.
As discussed in this forum post.
Generating an XML-formatted OEM file as follows
OrekitEphemerisFile ephemerisFile = new OrekitEphemerisFile();
OrekitEphemerisFile.OrekitSatelliteEphemeris satelliteEphemeris = ephemerisFile.addSatellite(satId);
satelliteEphemeris.addNewSegment(states);
OemMetadata template = new OemMetadata(8);
template.setTimeSystem(TimeSystem.UTC);
template.setObjectID(satId);
template.setObjectName(satId);
template.setCenter(new BodyFacade("EARTH", CelestialBodyFactory.getCelestialBodies().getEarth()));
template.setReferenceFrame(FrameFacade.map(FramesFactory.getGCRF()));
EphemerisWriter writer = new EphemerisWriter(new WriterBuilder().buildOemWriter(),
null, template, FileFormat.XML, "dummy", 60);
writer.write("output.oem", ephemerisFile);
fails to be imported using the OEM parser:
Exception in thread “main” org.orekit.errors.OrekitException: unexpected keyword in CCSDS line number 21 of file output.oem:
stateVector