Allow writing an AEM file from a list of SpacecraftStates
This issue is related to this thread on the forum.
A list of positions/velocities can be written to an OEM file as follows :
OrekitEphemerisFile ephemerisFile = new OrekitEphemerisFile();
OrekitEphemerisFile.OrekitSatelliteEphemeris satelliteEphemeris = ephemerisFile.addSatellite(satelliteId);
satelliteEphemeris.addNewSegment(spacecraftStates);
OEMWriter ephemerisFileWriter = new OEMWriter(OEMWriter.InterpolationMethod.HERMITE, originator, satelliteId, spaceObjectName);
ephemerisFileWriter.write(outputFilePath, ephemerisFile);
However, @bryan explained in the thread that this method doesn't work for AEM files, because AEMFile
doesn't implement EphemerisFile
and AemSatelliteEphemeris
doesn't implement SatelliteEphemeris
. The reason for that is these interfaces have methods that are specific to position/velocity ephemeris, and incompatible with attitude files. He suggested adding exceptions for those cases.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information