Parsing of REF_FRAME in CDM message

Hello,

I try to parse a CDM message emitted by CAESAR (it’s the same for CDMs from CSpOC) and I have a problem with the parsing of the REF_FRAME field in the metadata.

Example:

<metadata>
<OBJECT>OBJECT2</OBJECT>
<OBJECT_DESIGNATOR>13600</OBJECT_DESIGNATOR>
<CATALOG_NAME>SATCAT</CATALOG_NAME>
<OBJECT_NAME>COSMOS 1412</OBJECT_NAME>
<INTERNATIONAL_DESIGNATOR>1982-099A</INTERNATIONAL_DESIGNATOR>
<OBJECT_TYPE>PAYLOAD</OBJECT_TYPE>
<OPERATOR_CONTACT_POSITION>https://www.space-track.org/expandedspacedata/query/class/organization/object/~~13600/orderby/ORG_NAME,INFO_ID/format/html/emptyresult/show/</OPERATOR_CONTACT_POSITION>
<OPERATOR_ORGANIZATION>- Whitelist-Show public CDMs</OPERATOR_ORGANIZATION>
<OPERATOR_PHONE>https://www.space-track.org/expandedspacedata/query/class/organization/object/~~13600/orderby/ORG_NAME,INFO_ID/format/html/emptyresult/show/</OPERATOR_PHONE>
<OPERATOR_EMAIL>https://www.space-track.org/expandedspacedata/query/class/organization/object/~~13600/orderby/ORG_NAME,INFO_ID/format/html/emptyresult/show/</OPERATOR_EMAIL>
<EPHEMERIS_NAME>NONE</EPHEMERIS_NAME>
<COVARIANCE_METHOD>CALCULATED</COVARIANCE_METHOD>
<MANEUVERABLE>N/A</MANEUVERABLE>
<REF_FRAME>ITRF</REF_FRAME>
<GRAVITY_MODEL>EGM-96: 36D 36O</GRAVITY_MODEL>
<ATMOSPHERIC_MODEL>JBH09</ATMOSPHERIC_MODEL>
<N_BODY_PERTURBATIONS>MOON,SUN</N_BODY_PERTURBATIONS>
<SOLAR_RAD_PRESSURE>YES</SOLAR_RAD_PRESSURE>
<EARTH_TIDES>YES</EARTH_TIDES>
<INTRACK_THRUST>NO</INTRACK_THRUST>
</metadata>

In my CDM message, the REF_FRAME field is set to “ITRF” without any date (“ITRF2020” or “ITRF-97” for example) and it isn’t recognized during the parsing. The parsing can’t be done correctly by the “parse” method of the CelestialBodyFrame class with only “ITRF” as the frame because there is no enum entry for just ITRF.

Is it a problem in the parsing or do I missed something in the configuration of the CDM parser ?

CdmParser parser = new ParserBuilder()
    .withConventions(IERSConventions.IERS_2010)
    .withSimpleEOP(false)
    .withDataContext(DataContext.getDefault())
    .buildCdmParser();

final DataSource source = new DataSource(input.CdmFilename);
Cdm message = parser.parseMessage(source);

The call of parseMessage goes well but, when I call message.getMetadataObject2().getRefFrame().asFrame(), I don’t get a correct frame.

Is anybody already parsed correctly this kind of message with ITRF as the REF_FRAME ?

Thank you!

HI @Christophe

I don’t think “ITRF” is an accepted key for REF_FRAME value. According to sana website, it looks like the ITRF realization year must be specified.

Regards,
Bryan

It seems ITRF alone is in the SANA table, near the end.

What frame do you obtain? Could you print its name?

Oh yes! I missed it!

In fact, I get a “null” frame.

Hi,

Looks like a bug.
Wouldn’t adding ITRF in CelestialBodyFrame enum fix this?

Hi everyone,

I’ve opened another issue related to the CDM so I used this opportunity to open an issue for this thread as well.

I’ll fix this ASAP.

Cheers,
Vincent

Hey again everyone,

Forgot to tell you yesterday but the issue has been fixed.

Cheers,
Vincent

Patch release? :slight_smile:

1 Like

My bad, I’ve already merged it in develop. The fix is small so I could rebase it on the latest release if needed.

Sorry :grimacing: