Problem with CCSDS Export

Good morning !

I can’t figure out how to include a “COMMENT” in the headers of my CCSDS OEM/AEM exports.
I think it is because the write(final Appendable writer, final AEMFile aemFile) method from AEMWriter.class does not put any Keyword.COMMENT content inside the header metadata that is later fed to the StreamingAemWriter. I think it is very easy to fix because the AEMFile class provides many ways to include comments inside the header and inside attitude data blocks.

Also it is quite complicated to build an AEM file export from an actual simulation (and not from an already existing file, as it is done in all Orekit tests). I had to create an AEMFile and to populate it with data from my simulation by imitating what has already been done in the AEMParser class from Orekit. Maybe there is a simpler way to achieve this, but I think I missed it.

Thanks in advance for your help !

Paul Dewost (Exotrail)

Hi @PaulDewost

The only way to add comments in the header is to use directly StreamingAemWriter and not AEMWriter. However, it is an issue. Indeed, it could be very useful to take into consideration header comments when calling the write(final Appendable writer, final AEMFile aemFile) method from AEMWriter. As you said, it is easy to fix since the AEMFile in the method signature has a method getHeaderComment(). Therefore, it is possible to use that method to set the comments in the header metadata before calling aemWriter.writeHeader() in the write method;

Can you open an issue on the bug tracker? Contributions welcome :slightly_smiling_face:

Did you try to fill the AEM file dynamically during the orbit propagation? Here an example.

Best regards,

Hi @bcazabonne

Thank you for your detailed answer.
I will open an issue on the bug tracker.

Also thanks for for the example. I have a different approach which is to collect all the spacecraft states at the end of the propagation and to fill the AEM file in one method call.

Best regards,

Issue is fixed in develop branch. Thank you for reporting the issue :slightly_smiling_face: :+1: