Commit 032b865c authored by Luc Maisonobe's avatar Luc Maisonobe
Browse files

Merge branch 'issue-474' into develop

parents c68502bf 2f98cf02
Pipeline #1112 passed with stages
in 30 minutes and 33 seconds
......@@ -29,7 +29,7 @@ public enum OcmDataSubStructureKey {
TRAJ((token, parser) -> parser.manageTrajectoryStateSection(token.getType() == TokenType.START)),
/** Trajectory state time history section. */
orb((token, parser) -> parser.manageTrajectoryStateSection(token.getType() == TokenType.START)),
traj((token, parser) -> parser.manageTrajectoryStateSection(token.getType() == TokenType.START)),
/** Physical properties section. */
PHYS((token, parser) -> parser.managePhysicalPropertiesSection(token.getType() == TokenType.START)),
......
......@@ -42,8 +42,8 @@ public class OcmFile extends NdmConstituent<Header, Segment<OcmMetadata, OcmData
/** Key for format version. */
public static final String FORMAT_VERSION_KEY = "CCSDS_OCM_VERS";
/** Orbit line element for XML messages. */
public static final String ORB_LINE = "orbLine";
/** Trajectory line element for XML messages. */
public static final String TRAJ_LINE = "trajLine";
/** Covariance line element for XML messages. */
public static final String COV_LINE = "covLine";
......
......@@ -472,7 +472,7 @@ public class OcmParser extends OdmParser<OcmFile, OcmParser> implements Ephemeri
* @return true if token was processed, false otherwise
*/
private boolean processTrajectoryStateToken(final ParseToken token) {
if (token.getName() != null && !token.getName().equals(OcmFile.ORB_LINE)) {
if (token.getName() != null && !token.getName().equals(OcmFile.TRAJ_LINE)) {
// we are in the section metadata part
try {
return TrajectoryStateHistoryMetadataKey.valueOf(token.getName()).
......
......@@ -45,7 +45,7 @@ class TrajectoryStateHistoryWriter extends AbstractWriter {
*/
TrajectoryStateHistoryWriter(final TrajectoryStateHistory trajectoryStateHistory,
final TimeConverter timeConverter) {
super(OcmDataSubStructureKey.orb.name(), OcmDataSubStructureKey.TRAJ.name());
super(OcmDataSubStructureKey.traj.name(), OcmDataSubStructureKey.TRAJ.name());
this.history = trajectoryStateHistory;
this.timeConverter = timeConverter;
}
......@@ -98,7 +98,7 @@ class TrajectoryStateHistoryWriter extends AbstractWriter {
line.append(AccurateFormatter.format(units.get(i).fromSI(elements[i])));
}
if (generator.getFormat() == FileFormat.XML) {
generator.writeEntry(OcmFile.ORB_LINE, line.toString(), null, true);
generator.writeEntry(OcmFile.TRAJ_LINE, line.toString(), null, true);
} else {
generator.writeRawData(line);
generator.newLine();
......
......@@ -16,13 +16,13 @@
<UT1MUTC_AT_TZERO units="s">.357</UT1MUTC_AT_TZERO>
</metadata>
<data>
<orb>
<traj>
<COMMENT>GEOCENTRIC, CARTESIAN, EARTH FIXED</COMMENT>
<TRAJ_BASIS>PREDICTED</TRAJ_BASIS >
<TRAJ_REF_FRAME>EFG</TRAJ_REF_FRAME>
<TRAJ_TYPE>CARTPVA</TRAJ_TYPE>
<orbLine>0.0 2854.5 -2916.2 -5360.7 5.90 4.86 0.52 0.0037 -0.0038 -0.0070</orbLine>
</orb>
<trajLine>0.0 2854.5 -2916.2 -5360.7 5.90 4.86 0.52 0.0037 -0.0038 -0.0070</trajLine>
</traj>
<userDef>
<USER_DEFINED parameter="EARTH_MODEL">WGS-84</USER_DEFINED>
</userDef>
......
......@@ -26,14 +26,14 @@
<UT1MUTC_AT_TZERO units="s">.357</UT1MUTC_AT_TZERO>
</metadata>
<data>
<orb>
<traj>
<COMMENT>GEOCENTRIC, CARTESIAN, EARTH FIXED</COMMENT>
<COMMENT>THIS IS MY SECOND COMMENT LINE</COMMENT>
<TRAJ_BASIS>PREDICTED</TRAJ_BASIS >
<TRAJ_REF_FRAME>EFG</TRAJ_REF_FRAME>
<TRAJ_TYPE>CARTPVA</TRAJ_TYPE>
<orbLine>0.0 2854.5 -2916.2 -5360.7 5.90 4.86 0.52 0.0037 -0.0038 -0.0070</orbLine>
</orb>
<trajLine>0.0 2854.5 -2916.2 -5360.7 5.90 4.86 0.52 0.0037 -0.0038 -0.0070</trajLine>
</traj>
<phys>
<COMMENT>Spacecraft Physical Characteristics</COMMENT>
<WET_MASS units="kg">100.0</WET_MASS>
......
Markdown is supported
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