Commit c5842738 authored by Luc Maisonobe's avatar Luc Maisonobe

Fixed wrong class renaming.

parent f812d73f
Pipeline #934 passed with stage
in 24 minutes and 40 seconds
......@@ -40,7 +40,7 @@ public class OmmData implements Data {
private final SpacecraftParameters spacecraftParameters;
/** TLE block. */
private final OemTle tleBlock;
private final OmmTle tleBlock;
/** Covariance matrix logical block being read. */
private final Covariance covarianceBlock;
......@@ -61,7 +61,7 @@ public class OmmData implements Data {
*/
public OmmData(final KeplerianElements keplerianElementsBlock,
final SpacecraftParameters spacecraftParameters,
final OemTle tleBlock,
final OmmTle tleBlock,
final Covariance covarianceBlock,
final UserDefined userDefinedBlock,
final double mass) {
......@@ -120,7 +120,7 @@ public class OmmData implements Data {
/** Get the TLE logical block.
* @return TLE block
*/
public OemTle getTLEBlock() {
public OmmTle getTLEBlock() {
return tleBlock;
}
......
......@@ -96,7 +96,7 @@ public class OmmFile extends NdmFile<OdmHeader, Segment<OmmMetadata, OmmData>> i
public TLE generateTLE() {
final CommonMetadata metadata = getMetadata();
final KeplerianElements kep = getData().getKeplerianElementsBlock();
final OemTle tle = getData().getTLEBlock();
final OmmTle tle = getData().getTLEBlock();
return new TLE(tle.getNoradID(), tle.getClassificationType(),
metadata.getLaunchYear(), metadata.getLaunchNumber(), metadata.getLaunchPiece(),
tle.getEphemerisType(), tle.getElementSetNumber(), kep.getEpoch(),
......
......@@ -89,7 +89,7 @@ public class OmmParser extends CommonParser<OmmFile, OmmParser> {
private SpacecraftParameters spacecraftParametersBlock;
/** TLE logical block being read. */
private OemTle tleBlock;
private OmmTle tleBlock;
/** Covariance matrix logical block being read. */
private Covariance covarianceBlock;
......@@ -336,7 +336,7 @@ public class OmmParser extends CommonParser<OmmFile, OmmParser> {
*/
private boolean processTLEToken(final ParseToken token) {
if (tleBlock == null) {
tleBlock = new OemTle();
tleBlock = new OmmTle();
if (moveCommentsIfEmpty(spacecraftParametersBlock, tleBlock)) {
// get rid of the empty logical block
spacecraftParametersBlock = null;
......@@ -345,7 +345,7 @@ public class OmmParser extends CommonParser<OmmFile, OmmParser> {
setFallback(getFileFormat() == FileFormat.XML ? structureProcessor : this::processCovarianceToken);
try {
return token.getName() != null &&
OemTleKey.valueOf(token.getName()).process(token, context, tleBlock);
OmmTleKey.valueOf(token.getName()).process(token, context, tleBlock);
} catch (IllegalArgumentException iae) {
// token has not been recognized
return false;
......
......@@ -23,7 +23,7 @@ import org.orekit.files.ccsds.section.CommentsContainer;
* @author sports
* @since 6.1
*/
public class OemTle extends CommentsContainer {
public class OmmTle extends CommentsContainer {
/** Ephemeris Type, only required if MEAN_ELEMENT_THEORY = SGP/SGP4. Some sources suggest the coding for
* the EPHEMERIS_TYPE keyword: 1 = SGP, 2 = SGP4, 3 = SDP4, 4 = SGP8, 5 = SDP8. Default value = 0.
......@@ -57,7 +57,7 @@ public class OemTle extends CommentsContainer {
/** Create an empty data set.
*/
public OemTle() {
public OmmTle() {
ephemerisType = 0;
classificationType = 'U';
noradID = -1;
......@@ -72,11 +72,11 @@ public class OemTle extends CommentsContainer {
@Override
public void checkMandatoryEntries() {
super.checkMandatoryEntries();
checkNotNaN(meanMotionDot, OemTleKey.MEAN_MOTION_DOT);
checkNotNaN(meanMotionDotDot, OemTleKey.MEAN_MOTION_DDOT);
checkNotNegative(noradID, OemTleKey.NORAD_CAT_ID);
checkNotNegative(elementSetNo, OemTleKey.ELEMENT_SET_NO);
checkNotNegative(revAtEpoch, OemTleKey.REV_AT_EPOCH);
checkNotNaN(meanMotionDot, OmmTleKey.MEAN_MOTION_DOT);
checkNotNaN(meanMotionDotDot, OmmTleKey.MEAN_MOTION_DDOT);
checkNotNegative(noradID, OmmTleKey.NORAD_CAT_ID);
checkNotNegative(elementSetNo, OmmTleKey.ELEMENT_SET_NO);
checkNotNegative(revAtEpoch, OmmTleKey.REV_AT_EPOCH);
}
/** Get the ephemeris type.
......
......@@ -21,11 +21,11 @@ import org.orekit.files.ccsds.utils.lexical.ParseToken;
import org.orekit.files.ccsds.utils.parsing.ParsingContext;
/** Keys for {@link OemTle TLE} entries.
/** Keys for {@link OmmTle TLE} entries.
* @author Luc Maisonobe
* @since 11.0
*/
public enum OemTleKey {
public enum OmmTleKey {
/** Ephemeris Type, only required if MEAN_ELEMENT_THEORY = SGP/SGP4. */
EPHEMERIS_TYPE((token, context, data) -> token.processAsInteger(data::setEphemerisType)),
......@@ -59,7 +59,7 @@ public enum OemTleKey {
/** Simple constructor.
* @param processor processing method
*/
OemTleKey(final TokenProcessor processor) {
OmmTleKey(final TokenProcessor processor) {
this.processor = processor;
}
......@@ -69,7 +69,7 @@ public enum OemTleKey {
* @param data data to fill
* @return true of token was accepted
*/
public boolean process(final ParseToken token, final ParsingContext context, final OemTle data) {
public boolean process(final ParseToken token, final ParsingContext context, final OmmTle data) {
return processor.process(token, context, data);
}
......@@ -81,7 +81,7 @@ public enum OemTleKey {
* @param data data to fill
* @return true of token was accepted
*/
boolean process(ParseToken token, ParsingContext context, OemTle data);
boolean process(ParseToken token, ParsingContext context, OmmTle data);
}
}
......@@ -100,7 +100,7 @@ public class OMMParserTest {
// Check TLE Related Parameters data block;
OemTle tle = file.getData().getTLEBlock();
OmmTle tle = file.getData().getTLEBlock();
Assert.assertEquals(0, tle.getEphemerisType());
Assert.assertEquals('U', tle.getClassificationType());
int[] noradIDExpected = new int[23581];
......
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