Hi!
I recently updated Orekit from 10.3 to 11.3. So I changed the way I was parsing OEMs.
In order to get the segments (or blocks) from the OEM, before I did .getEphemeridesBlock() from a OEMfile.
Now, I’m doing the following:
oem_parser = ParserBuilder().buildOemParser()
oem_f = DataSource(file)
oem = oem_parser.parse(oem_f)
segments=oem.getSegments()
print(segments)
It seems that I actually get the segments on an ArrayList()
[org.orekit.files.ccsds.ndm.odm.oem.OemSegment@65bb9029, org.orekit.files.ccsds.ndm.odm.oem.OemSegment@1bfe3203, ... ]
but then when I try to access the methods of the OemSegment this is what I get for example for the .getMetadata().
print(segments.get(0).getMetadata())
AttributeError: 'Object' object has no attribute 'getMetadata'
Same for every other method.
In order to really have access to the segments of the OEM, I have to do the following:
sats=oem.getSatellites()
segments = sats.get('XXX').getSegments()
And with this I have access to the OemSegment methods.
However, doesn’t make sense that I need to know the ID of the satellite to get the segments in a OEM, so I had to hardcode it, because I was not being able to get the keys on ‘sats’.
I never have more than 1 satellite ephemerides in a OEM, don’t know actually if that can happen.
I’m attaching here the OEM file I’m parsing
file.oem (1.1 MB)
So my questions are:
- Am I doing something wrong on the first approach where I don’t get the satellites?
- Is there a way to get the keys on ‘sats’?
- Shouldn’t we be able to get the segments directly, without doing the getSatellites() first?