Commit 3c94ebb6 authored by Maxime Journot's avatar Maxime Journot
Browse files

Merge remote-tracking branch 'origin/merge-requests/282' into

release-11.2
parents 9d847e61 6630750b
......@@ -42,7 +42,7 @@ public enum AdditionalParametersKey {
/** The effective area of the object exposed to solar radiation pressure. */
AREA_SRP((token, context, container) -> token.processAsDouble(Units.M2, context.getParsedUnitsBehavior(),
container::setAreaDRG)),
container::setAreaSRP)),
/** The mass of the object. */
MASS((token, context, container) -> token.processAsDouble(Unit.KILOGRAM, context.getParsedUnitsBehavior(),
......
......@@ -1075,4 +1075,24 @@ public class CdmParserTest {
Assert.assertEquals(Maneuvrable.NO, file.getMetadataObject2().getManeuverable());
}
@Test
public void test_issue_944() {
// File
final String ex = "/ccsds/cdm/CDMExample_issue_944.xml";
// Initialize the parser
final CdmParser parser = new ParserBuilder().buildCdmParser();
final DataSource source = new DataSource(ex, () -> getClass().getResourceAsStream(ex));
// Generated CDM file
final Cdm file = parser.parseMessage(source);
// Check AREA_DRG
Assert.assertEquals(3, file.getDataObject1().getAdditionalParametersBlock().getAreaDRG(), 0.0);
// Check AREA_SRP
Assert.assertEquals(10, file.getDataObject1().getAdditionalParametersBlock().getAreaSRP(), 0.0);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<cdm xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://sanaregistry.org/r/ndmxml/ndmxml-1.0-master.xsd"
id="CCSDS_CDM_VERS" version="1.0">
<header>
<COMMENT>Sample CDM - XML version</COMMENT>
<CREATION_DATE>2010-03-12T22:31:12.000</CREATION_DATE>
<ORIGINATOR>JSPOC</ORIGINATOR>
<MESSAGE_FOR>SATELLITE A</MESSAGE_FOR>
<MESSAGE_ID>20111371985</MESSAGE_ID>
</header>
<body>
<relativeMetadataData>
<COMMENT>Relative Metadata/Data</COMMENT>
<TCA>2010-03-13T22:37:52.618</TCA>
<MISS_DISTANCE units="m">715</MISS_DISTANCE>
<RELATIVE_SPEED units="m/s">14762</RELATIVE_SPEED>
<relativeStateVector>
<RELATIVE_POSITION_R units="m">27.4</RELATIVE_POSITION_R>
<RELATIVE_POSITION_T units="m">-70.2</RELATIVE_POSITION_T>
<RELATIVE_POSITION_N units="m">711.8</RELATIVE_POSITION_N>
<RELATIVE_VELOCITY_R units="m/s">-7.2</RELATIVE_VELOCITY_R>
<RELATIVE_VELOCITY_T units="m/s">-14692.0</RELATIVE_VELOCITY_T>
<RELATIVE_VELOCITY_N units="m/s">-1437.2</RELATIVE_VELOCITY_N>
</relativeStateVector>
<START_SCREEN_PERIOD>2010-03-12T18:29:32.212</START_SCREEN_PERIOD>
<STOP_SCREEN_PERIOD>2010-03-15T18:29:32.212</STOP_SCREEN_PERIOD>
<SCREEN_VOLUME_FRAME>RTN</SCREEN_VOLUME_FRAME>
<SCREEN_VOLUME_SHAPE>ELLIPSOID</SCREEN_VOLUME_SHAPE>
<SCREEN_VOLUME_X units="m">200</SCREEN_VOLUME_X>
<SCREEN_VOLUME_Y units="m">1000</SCREEN_VOLUME_Y>
<SCREEN_VOLUME_Z units="m">1000</SCREEN_VOLUME_Z>
<SCREEN_ENTRY_TIME>2010-03-13T20:25:43.222</SCREEN_ENTRY_TIME>
<SCREEN_EXIT_TIME>2010-03-13T23:44:29.324</SCREEN_EXIT_TIME>
<COLLISION_PROBABILITY>4.835E-05</COLLISION_PROBABILITY>
<COLLISION_PROBABILITY_METHOD>FOSTER-1992</COLLISION_PROBABILITY_METHOD>
</relativeMetadataData>
<segment>
<metadata>
<COMMENT>Object1 Metadata</COMMENT>
<OBJECT>OBJECT1</OBJECT>
<OBJECT_DESIGNATOR>12345</OBJECT_DESIGNATOR>
<CATALOG_NAME>SATCAT01</CATALOG_NAME>
<OBJECT_NAME>SATELLITE A</OBJECT_NAME>
<INTERNATIONAL_DESIGNATOR>1997-030E</INTERNATIONAL_DESIGNATOR>
<OBJECT_TYPE>PAYLOAD</OBJECT_TYPE>
<OPERATOR_CONTACT_POSITION>OSA</OPERATOR_CONTACT_POSITION>
<OPERATOR_ORGANIZATION>EUMETSAT</OPERATOR_ORGANIZATION>
<OPERATOR_PHONE>+49615130312</OPERATOR_PHONE>
<OPERATOR_EMAIL>JOHN.DOE@SOMEWHERE>NET</OPERATOR_EMAIL>
<EPHEMERIS_NAME>EPHEMERIS SATELLITE A</EPHEMERIS_NAME>
<COVARIANCE_METHOD>CALCULATED</COVARIANCE_METHOD>
<MANEUVERABLE>YES</MANEUVERABLE>
<REF_FRAME>EME2000</REF_FRAME>
<GRAVITY_MODEL>EGM-96: 36D 36O</GRAVITY_MODEL>
<ATMOSPHERIC_MODEL>JACCHIA 70 DCA</ATMOSPHERIC_MODEL>
<N_BODY_PERTURBATIONS>MOON,SUN</N_BODY_PERTURBATIONS>
<SOLAR_RAD_PRESSURE>NO</SOLAR_RAD_PRESSURE>
<EARTH_TIDES>NO</EARTH_TIDES>
<INTRACK_THRUST>NO</INTRACK_THRUST>
</metadata>
<data>
<COMMENT>Object1 Data</COMMENT>
<odParameters>
<COMMENT>Object1 OD Parameters</COMMENT>
<TIME_LASTOB_START>2010-03-12T02:14:12.746</TIME_LASTOB_START>
<TIME_LASTOB_END>2010-03-12T02:14:12.746</TIME_LASTOB_END>
<RECOMMENDED_OD_SPAN units="d">7.88</RECOMMENDED_OD_SPAN>
<ACTUAL_OD_SPAN units="d">5.50</ACTUAL_OD_SPAN>
<OBS_AVAILABLE>592</OBS_AVAILABLE>
<OBS_USED>59</OBS_USED>
<TRACKS_AVAILABLE>123</TRACKS_AVAILABLE>
<TRACKS_USED>119</TRACKS_USED>
<RESIDUALS_ACCEPTED units="%">97.8</RESIDUALS_ACCEPTED>
<WEIGHTED_RMS>0.864</WEIGHTED_RMS>
</odParameters>
<additionalParameters>
<COMMENT>Object 1 Additional Parameters</COMMENT>
<AREA_PC units="m**2">5.2</AREA_PC>
<AREA_DRG units="m**2">3.0</AREA_DRG>
<AREA_SRP units="m**2">10.0</AREA_SRP>
<MASS units="kg">2516</MASS>
<CD_AREA_OVER_MASS units="m**2/kg">0.045663</CD_AREA_OVER_MASS>
<CR_AREA_OVER_MASS units="m**2/kg">0.000000</CR_AREA_OVER_MASS>
<THRUST_ACCELERATION units="m/s**2">0.0</THRUST_ACCELERATION>
<SEDR units="W/kg">4.54570E-05</SEDR>
</additionalParameters>
<stateVector>
<COMMENT>Object1 State Vector</COMMENT>
<X units="km">2570.097065</X>
<Y units="km">2244.654904</Y>
<Z units="km">6281.497978</Z>
<X_DOT units="km/s">4.418769571</X_DOT>
<Y_DOT units="km/s">4.833547743</Y_DOT>
<Z_DOT units="km/s">-3.526774282</Z_DOT>
</stateVector>
<covarianceMatrix>
<COMMENT>Object1 Covariance in the RTN Coordinate Frame</COMMENT>
<CR_R units="m**2">4.142E+01</CR_R>
<CT_R units="m**2">-8.579E+00</CT_R>
<CT_T units="m**2">2.533E+03</CT_T>
<CN_R units="m**2">-2.313E+01</CN_R>
<CN_T units="m**2">1.336E+01</CN_T>
<CN_N units="m**2">7.098E+01</CN_N>
<CRDOT_R units="m**2/s">2.520E-03</CRDOT_R>
<CRDOT_T units="m**2/s">-5.476E+00</CRDOT_T>
<CRDOT_N units="m**2/s">8.626E-04</CRDOT_N>
<CRDOT_RDOT units="m**2/s**2">5.744E-03</CRDOT_RDOT>
<CTDOT_R units="m**2/s">-1.006E-02</CTDOT_R>
<CTDOT_T units="m**2/s">4.041E-03</CTDOT_T>
<CTDOT_N units="m**2/s">-1.359E-03</CTDOT_N>
<CTDOT_RDOT units="m**2/s**2">-1.502E-05</CTDOT_RDOT>
<CTDOT_TDOT units="m**2/s**2">1.049E-05</CTDOT_TDOT>
<CNDOT_R units="m**2/s">1.053E-03</CNDOT_R>
<CNDOT_T units="m**2/s">-3.412E-03</CNDOT_T>
<CNDOT_N units="m**2/s">1.213E-02</CNDOT_N>
<CNDOT_RDOT units="m**2/s**2">-3.004E-06</CNDOT_RDOT>
<CNDOT_TDOT units="m**2/s**2">-1.091E-06</CNDOT_TDOT>
<CNDOT_NDOT units="m**2/s**2">5.529E-05</CNDOT_NDOT>
</covarianceMatrix>
</data>
</segment>
<segment>
<metadata>
<COMMENT>Object2 Metadata</COMMENT>
<OBJECT>OBJECT2</OBJECT>
<OBJECT_DESIGNATOR>30337</OBJECT_DESIGNATOR>
<CATALOG_NAME>SATCAT</CATALOG_NAME>
<OBJECT_NAME>FENGYUN 1C DEB</OBJECT_NAME>
<INTERNATIONAL_DESIGNATOR>1999-025AA</INTERNATIONAL_DESIGNATOR>
<OBJECT_TYPE>DEBRIS</OBJECT_TYPE>
<EPHEMERIS_NAME>NONE</EPHEMERIS_NAME>
<COVARIANCE_METHOD>CALCULATED</COVARIANCE_METHOD>
<MANEUVERABLE>NO</MANEUVERABLE>
<REF_FRAME>EME2000</REF_FRAME>
<GRAVITY_MODEL>EGM-96: 36D 36O</GRAVITY_MODEL>
<ATMOSPHERIC_MODEL>JACCHIA 70 DCA</ATMOSPHERIC_MODEL>
<N_BODY_PERTURBATIONS>MOON,SUN</N_BODY_PERTURBATIONS>
<SOLAR_RAD_PRESSURE>YES</SOLAR_RAD_PRESSURE>
<EARTH_TIDES>NO</EARTH_TIDES>
<INTRACK_THRUST>NO</INTRACK_THRUST>
</metadata>
<data>
<COMMENT>Object2 Data</COMMENT>
<odParameters>
<COMMENT>Object2 OD Parameters</COMMENT>
<TIME_LASTOB_START>2010-03-12T01:14:12.746</TIME_LASTOB_START>
<TIME_LASTOB_END>2010-03-12T03:14:12.746</TIME_LASTOB_END>
<RECOMMENDED_OD_SPAN units="d">2.63</RECOMMENDED_OD_SPAN>
<ACTUAL_OD_SPAN units="d">2.63</ACTUAL_OD_SPAN>
<OBS_AVAILABLE>59</OBS_AVAILABLE>
<OBS_USED>58</OBS_USED>
<TRACKS_AVAILABLE>15</TRACKS_AVAILABLE>
<TRACKS_USED>15</TRACKS_USED>
<RESIDUALS_ACCEPTED units="%">97.8</RESIDUALS_ACCEPTED>
<WEIGHTED_RMS>0.864</WEIGHTED_RMS>
</odParameters>
<additionalParameters>
<COMMENT>Object2 Additional Parameters</COMMENT>
<COMMENT>Apogee Altitude=768 km</COMMENT>
<COMMENT>Perigee Altitude=414 km</COMMENT>
<COMMENT>Inclination=98.8 deg</COMMENT>
<AREA_PC units="m**2">0.9</AREA_PC>
<AREA_DRG units="m**2">0.3</AREA_DRG>
<AREA_SRP units="m**2">0.5</AREA_SRP>
<CD_AREA_OVER_MASS units="m**2/kg">0.118668</CD_AREA_OVER_MASS>
<CR_AREA_OVER_MASS units="m**2/kg">0.075204</CR_AREA_OVER_MASS>
<THRUST_ACCELERATION units="m/s**2">0.0</THRUST_ACCELERATION>
<SEDR units="W/kg">5.40900E-03</SEDR>
</additionalParameters>
<stateVector>
<COMMENT>Object2 State Vector</COMMENT>
<X units="km">2569.540800</X>
<Y units="km">2245.093614</Y>
<Z units="km">6281.599946</Z>
<X_DOT units="km/s">-2.888612500</X_DOT>
<Y_DOT units="km/s">-6.007247516</Y_DOT>
<Z_DOT units="km/s">3.328770172</Z_DOT>
</stateVector>
<covarianceMatrix>
<COMMENT>Object2 Covariance in the RTN Coordinate Frame</COMMENT>
<CR_R units="m**2">1.337E+03</CR_R>
<CT_R units="m**2">-4.806E+04</CT_R>
<CT_T units="m**2">2.492E+06</CT_T>
<CN_R units="m**2">-3.298E+01</CN_R>
<CN_T units="m**2">-7.5888E+02</CN_T>
<CN_N units="m**2">7.105E+01</CN_N>
<CRDOT_R units="m**2/s">2.591E-03</CRDOT_R>
<CRDOT_T units="m**2/s">-4.152E-02</CRDOT_T>
<CRDOT_N units="m**2/s">-1.784E-06</CRDOT_N>
<CRDOT_RDOT units="m**2/s**2">6.886E-05</CRDOT_RDOT>
<CTDOT_R units="m**2/s">-1.016E-02</CTDOT_R>
<CTDOT_T units="m**2/s">-1.506E-04</CTDOT_T>
<CTDOT_N units="m**2/s">1.637E-03</CTDOT_N>
<CTDOT_RDOT units="m**2/s**2">-2.987E-06</CTDOT_RDOT>
<CTDOT_TDOT units="m**2/s**2">1.059E-05</CTDOT_TDOT>
<CNDOT_R units="m**2/s">4.400E-03</CNDOT_R>
<CNDOT_T units="m**2/s">8.482E-03</CNDOT_T>
<CNDOT_N units="m**2/s">8.633E-05</CNDOT_N>
<CNDOT_RDOT units="m**2/s**2">-1.903E-06</CNDOT_RDOT>
<CNDOT_TDOT units="m**2/s**2">-4.594E-06</CNDOT_TDOT>
<CNDOT_NDOT units="m**2/s**2">5.178E-05</CNDOT_NDOT>
</covarianceMatrix>
</data>
</segment>
</body>
</cdm>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment