...
 
Commits (12)
......@@ -149,6 +149,7 @@ public enum OrekitMessages implements Localizable {
CCSDS_DATE_INVALID_PREAMBLE_FIELD("invalid preamble field in CCSDS date: {0}"),
CCSDS_DATE_INVALID_LENGTH_TIME_FIELD("invalid time field length in CCSDS date: {0}, expected {1}"),
CCSDS_DATE_MISSING_AGENCY_EPOCH("missing agency epoch in CCSDS date"),
CCSDS_MISSING_KEYWORD("missing mandatory key {0} in CCSDS file {1}"),
CCSDS_UNEXPECTED_KEYWORD("unexpected keyword in CCSDS line number {0} of file {1}:\n{2}"),
CCSDS_UNKNOWN_GM("the central body gravitational coefficient cannot be retrieved from the ODM"),
CCSDS_UNKNOWN_SPACECRAFT_MASS("there is no spacecraft mass associated with this ODM file"),
......
/* Copyright 2002-2019 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.orekit.files.ccsds;
/** Orbit element set type used in CCSDS {@link OCMFile Orbit Comprehensive Messages}.
* @see <a href="https://sanaregistry.org/r/orbital_elements">SANA registry for orbital elements</a>
* @author Luc Maisonobe
* @since 10.1
*/
public enum CCSDSElementsType {
/** Spherical 6-element set (α,δ,β,A,r,v). */
ADBARV("Spherical 6-element set (α,δ,β,A,r,v)",
CCSDSUnit.DEG, CCSDSUnit.DEG, CCSDSUnit.DEG,
CCSDSUnit.DEG, CCSDSUnit.KM, CCSDSUnit.KM),
/** Cartesian 3-element position (X, Y, Z). */
CARTP("Cartesian 3-element position (X, Y, Z)",
CCSDSUnit.KM, CCSDSUnit.KM, CCSDSUnit.KM),
/** Cartesian 6-element position and velocity (X, Y, Z, XD, YD, ZD). */
CARTPV(" Cartesian 6-element position and velocity (X, Y, Z, XD, YD, ZD)",
CCSDSUnit.KM, CCSDSUnit.KM, CCSDSUnit.KM,
CCSDSUnit.KM_S, CCSDSUnit.KM_S, CCSDSUnit.KM_S),
/** Cartesian 9-element position, velocity and acceleration (X, Y, Z, XD, YD, ZD, XDD, YDD, ZDD). */
CARTPVA("Cartesian 9-element position, velocity and acceleration (X, Y, Z, XD, YD, ZD, XDD, YDD, ZDD)",
CCSDSUnit.KM, CCSDSUnit.KM, CCSDSUnit.KM,
CCSDSUnit.KM_S, CCSDSUnit.KM_S, CCSDSUnit.KM_S,
CCSDSUnit.KM_S2, CCSDSUnit.KM_S2, CCSDSUnit.KM_S2),
/** Delaunay elements (L, G, H, l, g, h). */
DELAUNAY("Delaunay elements (L, G, H, l, g, h)",
CCSDSUnit.KM2_S, CCSDSUnit.KM2_S, CCSDSUnit.KM2_S,
CCSDSUnit.DEG, CCSDSUnit.DEG, CCSDSUnit.DEG),
/** Modified Delaunay elements (Lm, Gm, Hm, lm, gm, hm). */
DELAUNAYMOD("Delaunay elements (Lm, Gm, Hm, lm, gm, hm)",
CCSDSUnit.SQKM, CCSDSUnit.SQKM, CCSDSUnit.SQKM,
CCSDSUnit.DEG, CCSDSUnit.DEG, CCSDSUnit.DEG),
/** 12 elements eigenvalue/eigenvectors (EigMaj, EigMed, EigMin, EigVecMaj, EigVecMed, EigVecMin). */
EIGVAL3EIGVEC3("12 elements eigenvalue/eigenvectors (EigMaj, EigMed, EigMin, EigVecMaj, EigVecMed, EigVecMin)",
CCSDSUnit.KM, CCSDSUnit.KM, CCSDSUnit.KM,
CCSDSUnit.DIMENSIONLESS, CCSDSUnit.DIMENSIONLESS, CCSDSUnit.DIMENSIONLESS,
CCSDSUnit.DIMENSIONLESS, CCSDSUnit.DIMENSIONLESS, CCSDSUnit.DIMENSIONLESS,
CCSDSUnit.DIMENSIONLESS, CCSDSUnit.DIMENSIONLESS, CCSDSUnit.DIMENSIONLESS),
/** Equinoctial elements (a, af, ag, L=M+ω+frΩ, χ, ψ, fr). */
EQUINOCTIAL(" Equinoctial elements (a, af, ag, L=M+ω+frΩ, χ, ψ, fr)",
CCSDSUnit.KM, CCSDSUnit.DIMENSIONLESS, CCSDSUnit.DIMENSIONLESS,
CCSDSUnit.DEG, CCSDSUnit.DIMENSIONLESS, CCSDSUnit.DIMENSIONLESS,
CCSDSUnit.DIMENSIONLESS),
/** Modified equinoctial elements (p=a(1−e²), af, ag, L'=υ+ω+frΩ, χ, ψ, fr). */
EQUINOCTIALMOD("Modified equinoctial elements (p=a(1−e²), af, ag, L'=υ+ω+frΩ, χ, ψ, fr)",
CCSDSUnit.KM, CCSDSUnit.DIMENSIONLESS, CCSDSUnit.DIMENSIONLESS,
CCSDSUnit.DEG, CCSDSUnit.DIMENSIONLESS, CCSDSUnit.DIMENSIONLESS,
CCSDSUnit.DIMENSIONLESS),
/** Geodetic elements (λ, ΦGD, β, A, h, vre). */
GEODETIC("Geodetic elements (λ, ΦGD, β, A, h, vre)",
CCSDSUnit.DEG, CCSDSUnit.DEG, CCSDSUnit.DEG,
CCSDSUnit.DEG, CCSDSUnit.KM, CCSDSUnit.KM_S),
/** Keplerian 6-elemnt classical set (a, e, i, Ω, ω, ν). */
KEPLERIAN("Keplerian 6-elemnt classical set (a, e, i, Ω, ω, ν)",
CCSDSUnit.KM, CCSDSUnit.DIMENSIONLESS, CCSDSUnit.DEG,
CCSDSUnit.DEG, CCSDSUnit.DEG, CCSDSUnit.DEG),
/** Keplerian 6-elemnt classical set (a, e, i, Ω, ω, M). */
KEPLERIANMEAN("Keplerian 6-elemnt classical set (a, e, i, Ω, ω, M)",
CCSDSUnit.KM, CCSDSUnit.DIMENSIONLESS, CCSDSUnit.DEG,
CCSDSUnit.DEG, CCSDSUnit.DEG, CCSDSUnit.DEG),
/** Modified spherical 6-element set (λ, δ, β, A, r, v). */
LDMARV(" Modified spherical 6-element set (λ, δ, β, A, r, v)",
CCSDSUnit.DEG, CCSDSUnit.DEG, CCSDSUnit.DEG,
CCSDSUnit.DEG, CCSDSUnit.KM, CCSDSUnit.KM_S),
/** Geosynchronous on-station tailored set (a, ex, ey, ix, iy, λ). */
ONSTATION("Geosynchronous on-station tailored set (a, ex, ey, ix, iy, λ)",
CCSDSUnit.KM, CCSDSUnit.DIMENSIONLESS, CCSDSUnit.DIMENSIONLESS,
CCSDSUnit.DIMENSIONLESS, CCSDSUnit.DIMENSIONLESS, CCSDSUnit.DEG),
/** Canonical counterpart of equinoctial 6-element set (λM=M+ω+Ω, gp, hp, Lp, Gp, Hp). */
POINCARE("Canonical counterpart of equinoctial 6-element set (λM=M+ω+Ω, gp, hp, Lp, Gp, Hp)",
CCSDSUnit.DEG, CCSDSUnit.KM_SQS, CCSDSUnit.KM_SQS,
CCSDSUnit.KM2_S, CCSDSUnit.KM_SQS, CCSDSUnit.KM_SQS);
/** Description. */
private final String description;
/** Elements units. */
private final CCSDSUnit[] units;
/** Simple constructor.
* @param description description
* @param units elements units
*/
CCSDSElementsType(final String description, final CCSDSUnit... units) {
this.description = description;
this.units = units.clone();
}
/** Get the elements units.
* @return elements units
*/
public CCSDSUnit[] getUnits() {
return units.clone();
}
/** {@inheritDoc} */
@Override
public String toString() {
return description;
}
}
......@@ -42,6 +42,17 @@ public enum CCSDSFrame {
},
/** Earth Mean Equator and Equinox of J2000. */
J2000(null) {
/** {@inheritDoc} */
@Override
public Frame getFrame(final IERSConventions conventions, final boolean simpleEOP) {
return FramesFactory.getEME2000();
}
},
/** Geocentric Celestial Reference Frame. */
GCRF(null) {
......
/* Copyright 2002-2019 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.orekit.files.ccsds;
/** Object type used in CCSDS {@link OCMFile Orbit Comprehensive Messages}.
* @author Luc Maisonobe
* @since 10.1
*/
public enum CCSDSObjectType {
/** Payload. */
PL("Payload"),
/** Payload mission-related. */
PM("Payload mission-related"),
/** Payload fragmentation debris. */
PF("Payload fragmentation debris"),
/** Payload debris. */
PD("Payload debris"),
/** Rocket body. */
RB("Rocket body"),
/** Rocket mission-related. */
RM("Rocket mission-related"),
/** Rocket fragmentation debris. */
RF("Rocket fragmentation debris"),
/** Rocket debris. */
RD("Rocket debris"),
/** Unidentified. */
UI("Unidentified");
/** Description. */
private final String description;
/** Simple constructor.
* @param description description
*/
CCSDSObjectType(final String description) {
this.description = description;
}
/** {@inheritDoc} */
@Override
public String toString() {
return description;
}
}
/* Copyright 2002-2019 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.orekit.files.ccsds;
/** Operational status used in CCSDS {@link OCMFile Orbit Comprehensive Messages}.
* @author Luc Maisonobe
* @since 10.1
*/
public enum CCSDSOpsStatus {
/** Operational object. */
OPERATIONAL("Operational"),
/** Non-operational object. */
NONOPERATIONAL("Non-operational"),
/** partially operational object. */
PARTIALLY_OPERATIONAL("Partially operational"),
/** Backup object. */
BACKUP("Backup"),
/** Object in stand-by. */
STANBY("Stand-by"),
/** Object in extended mission. */
EXTENDED_MISSION("Extended mission"),
/** Object in reentry mode. */
REENTRY_MODE("Reentry mode"),
/** Decayed object. */
DECAYED("Decayed"),
/** Unknown status. */
UNKNOWN("Unknown");
/** Description. */
private final String description;
/** Simple constructor.
* @param description description
*/
CCSDSOpsStatus(final String description) {
this.description = description;
}
/** {@inheritDoc} */
@Override
public String toString() {
return description;
}
}
/* Copyright 2002-2019 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.orekit.files.ccsds;
/** Basis of orbit state time history data {@link OCMFile Orbit Comprehensive Messages}.
* @author Luc Maisonobe
* @since 10.1
*/
public enum CCSDSOrbitBasis {
/** Predicted. */
PREDICTED("Predicted"),
/** Estimated from orbit determination. */
DETERMINED_OD("Estimated from orbit determination"),
/** Estimated from telemetry. */
DETERMINED_TLM("Estimated from telemetry"),
/** Hypothetical. */
HYPOTHETICAL("Hypothetical");
/** Description. */
private final String description;
/** Simple constructor.
* @param description description
*/
CCSDSOrbitBasis(final String description) {
this.description = description;
}
/** {@inheritDoc} */
@Override
public String toString() {
return description;
}
}
/* Copyright 2002-2019 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.orekit.files.ccsds;
/** Orbit type used in CCSDS {@link OCMFile Orbit Comprehensive Messages}.
* @author Luc Maisonobe
* @since 10.1
*/
public enum CCSDSOrbitType {
/** Extended Geostationary Orbit, 37948 < a < 46380 km, e < 0.25, i < 25°. */
EGO("Extended Geostationary Orbit"),
/** Escape Orbit. */
ESO("Escape Orbit"),
/** GEO-superGEO, Crossing Orbit 31570 < hp < 40002 km, 40002 km < ha. */
GHO("GEO-superGEO, Crossing Orbit"),
/** Geosynchronous Earth Orbit, with i > 3°, 35586 < hp < 35986 km, 35586 < ha < 35986 km. */
GEO("Geosynchronous Earth Orbit"),
/** GeoStationary Orbit, with 3° < i < 25°, 35586 < hp < 35986 km, 35586 < ha < 35986 km. */
GSO("GeoStationary Orbit"),
/** Geosynchronous Transfer Orbit, i < 90°, hp < 2000 km, 31570 < ha < 40002 km. */
GTO("Geosynchronous Transfer Orbit"),
/** High Altitude Earth Orbit, 40002 km < hp, 40002 km < ha. */
HAO("High Altitude Earth Orbit"),
/** Highly Eccentric Earth Orbit, hp < 31570 km, 40002 km < ha. */
HEO("Highly Eccentric Earth Orbit"),
/** Inclined Geosynchronous Orbit, 37948 < a < 46380 km, e < 0.25, 25° < i < 180°. */
IGO("Inclined Geosynchronous Orbit"),
/** Low Earth Orbit, hp < 2000 km, ha < 2000 km. */
LEO("Low Earth Orbit"),
/** LEO-MEO Crossing Orbit, hp < 2000 km, 2000 < ha < 31570 km. */
LMO("LEO-MEO Crossing Orbit"),
/** Medium Earth Orbit, 2000 < hp < 31570 km, 2000 < ha < 31570 km. */
MEO("Medium Earth Orbit"),
/** MEO-GEO Crossing Orbit, 2000 < hp < 31570 km, 31570 < ha < 40002 km. */
MGO("MEO-GEO Crossing Orbit"),
/** Navigation Satellites Orbit 50° < i < 70°, 18100 < hp < 24300 km, 18100 < ha < 4300 km. */
NSO("Navigation Satellites Orbit"),
/** UFO: Undefined Orbit. */
UFO("Undefined Orbit");
/** Description. */
private final String description;
/** Simple constructor.
* @param description description
*/
CCSDSOrbitType(final String description) {
this.description = description;
}
/** {@inheritDoc} */
@Override
public String toString() {
return description;
}
}
/* Copyright 2002-2019 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.orekit.files.ccsds;
import org.hipparchus.util.FastMath;
/** CCSDS/SANA units (km, km/s, degrees...).
* @author Luc Maisonobe
* @since 10.1
*/
public enum CCSDSUnit {
/** Kilometers. */
KM() {
/** {@inheritDoc} */
@Override
public double toSI(final double value) {
return value * 1000.0;
}
},
/** Kilometers per seconds. */
KM_S() {
/** {@inheritDoc} */
@Override
public double toSI(final double value) {
return value * 1000.0;
}
},
/** Kilometers per squared seconds. */
KM_S2() {
/** {@inheritDoc} */
@Override
public double toSI(final double value) {
return value * 1000.0;
}
},
/** Square kilometers. */
KM2() {
/** {@inheritDoc} */
@Override
public double toSI(final double value) {
return value * 1000000.0;
}
},
/** Square kilometers per second. */
KM2_S() {
/** {@inheritDoc} */
@Override
public double toSI(final double value) {
return value * 1000000.0;
}
},
/** Kilometers square roots. */
SQKM() {
/** {@inheritDoc} */
@Override
public double toSI(final double value) {
return value * FastMath.sqrt(1000.0);
}
},
/** Kilometers per seconds square roots. */
KM_SQS() {
/** {@inheritDoc} */
@Override
public double toSI(final double value) {
return value * 1000.0;
}
},
/** Degrees. */
DEG() {
/** {@inheritDoc} */
@Override
public double toSI(final double value) {
return FastMath.toRadians(value);
}
},
/** Dimensionless values. */
DIMENSIONLESS() {
/** {@inheritDoc} */
@Override
public double toSI(final double value) {
return value;
}
};
/** Convert a value from CCSDS/SANA units to SI units.
* @param value value in CCSDS/SANA units
* @return value in SI units
*/
public abstract double toSI(double value);
}
......@@ -192,4 +192,17 @@ public enum CcsdsTimeScale {
return false;
}
/** Parse a value from a key=value entry.
* @param value value to parse
* @return CCSDS time system corresponding to the value
*/
public static CcsdsTimeScale parse(final String value) {
for (final CcsdsTimeScale scale : values()) {
if (scale.name().equals(value)) {
return scale;
}
}
throw new OrekitException(OrekitMessages.CCSDS_TIME_SYSTEM_NOT_IMPLEMENTED, value);
}
}
......@@ -16,6 +16,8 @@
*/
package org.orekit.files.ccsds;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
......@@ -50,6 +52,9 @@ class KeyValue {
private final Pattern USER_DEFINED_KEYWORDS =
Pattern.compile("USER_DEFINED_[A-Z][A-Z_]*");
/** Regular expression for splitting comma-separated lists. */
private final String COMMA_SEPARATORS = "\\s*,\\s*";
/** Line from which pair is extracted. */
private final String line;
......@@ -146,6 +151,14 @@ class KeyValue {
this.fileName = fileName;
}
/** Get the line where the keyword was found.
* @return line where the keyword was found
* @since 10.1
*/
public String getLine() {
return line;
}
/** Keyword corresponding to the parsed key.
* @return keyword corresponding to the parsed key
* (null if not recognized)
......@@ -175,8 +188,7 @@ class KeyValue {
try {
return Double.parseDouble(value);
} catch (NumberFormatException nfe) {
throw new OrekitException(OrekitMessages.UNABLE_TO_PARSE_LINE_IN_FILE,
lineNumber, fileName, line);
throw generateException();
}
}
......@@ -187,9 +199,24 @@ class KeyValue {
try {
return Integer.parseInt(value);
} catch (NumberFormatException nfe) {
throw new OrekitException(OrekitMessages.UNABLE_TO_PARSE_LINE_IN_FILE,
lineNumber, fileName, line);
throw generateException();
}
}
/** Get the value as a list.
* @return value
* @since 10.1
*/
public List<String> getListValue() {
return Arrays.asList(value.split(COMMA_SEPARATORS));
}
/** Generate a parse exception for this key value pair.
* @return exception for this key value pair
*/
public OrekitException generateException() {
return new OrekitException(OrekitMessages.UNABLE_TO_PARSE_LINE_IN_FILE,
lineNumber, fileName, line);
}
}
......@@ -37,10 +37,18 @@ public enum Keyword {
/** Comments specific to a ODM file. */
COMMENT,
/** CCSDS OEM format version. */
/** File creation date in UTC. */
CREATION_DATE,
/** Creating agency or operator. */
ORIGINATOR,
/** Unique ID identifying a message from a given originator.
* @since 10.0
*/
MESSAGE_ID,
/** Classification of this message.
* @since 10.0
*/
MESSAGE_CLASSIF,
/** Time system used for state vector, maneuver, and covariance data. */
TIME_SYSTEM,
/** Epoch of state vector and optional Keplerian elements.
......@@ -74,10 +82,341 @@ public enum Keyword {
CCSDS_OPM_VERS,
/** CCSDS OMM format version. */
CCSDS_OMM_VERS,
/** File creation date in UTC. */
/** CCSDS OEM format version. */
CCSDS_OEM_VERS,
/** CCSDS OCM format version.
* @since 10.0
*/
CCSDS_OCM_VERS,
/** Programmatic Point Of Contact at originator.
* @since 10.0
*/
ORIGINATOR_POC,
/** Position of Programmatic Point Of Contact at originator.
* @since 10.0
*/
ORIGINATOR_POSITION,
/** Phone number of Programmatic Point Of Contact at originator.
* @since 10.0
*/
ORIGINATOR_PHONE,
/** Address of Programmatic Point Of Contact at originator.
* @since 10.0
*/
ORIGINATOR_ADDRESS,
/** Creating agency or operator.
* @since 10.0
*/
TECH_ORG,
/** Technical Point Of Contact at originator.
* @since 10.0
*/
TECH_POC,
/** Position of Technical Point Of Contact at originator.
* @since 10.0
*/
TECH_POSITION,
/** Phone number of Technical Point Of Contact at originator.
* @since 10.0
*/
TECH_PHONE,
/** Address of Technical Point Of Contact at originator.
* @since 10.0
*/
TECH_ADDRESS,
/** Unique ID identifying previous message from a given originator.
* @since 10.0
*/
PREV_MESSAGE_ID,
/** Creation date of previous message from a given originator.
* @since 10.0
*/
PREV_MESSAGE_EPOCH,
/** Unique ID identifying next message from a given originator.
* @since 10.0
*/
NEXT_MESSAGE_ID,
/** Creation date of next message from a given originator.
* @since 10.0
*/
NEXT_MESSAGE_EPOCH,
/** Names of Attitude Data Messages link to this Orbit Data Message.
* @since 10.0
*/
ATT_MESSAGE_LINK,
/** Names of Conjunction Data Messages link to this Orbit Data Message.
* @since 10.0
*/
CDM_MESSAGE_LINK,
/** Names of Pointing Request Messages link to this Orbit Data Message.
* @since 10.0
*/
PRM_MESSAGE_LINK,
/** Names of Reentry Data Messages link to this Orbit Data Message.
* @since 10.0
*/
RDM_MESSAGE_LINK,
/** Names of Tracking Data Messages link to this Orbit Data Message.
* @since 10.0
*/
TDM_MESSAGE_LINK,
/** Spacecraft name for which the orbit state is provided. */
OBJECT_NAME,
/** International designator for the object as assigned by the UN Committee
* on Space Research (COSPAR) and the US National Space Science Data Center (NSSDC).
* @since 10.0
*/
INTERNATIONAL_DESIGNATOR,
/** Operator of the space object.
* @since 10.0
*/
OPERATOR,
/** Owner of the space object.
* @since 10.0
*/
OWNER,
/** Name of the space object mission.
* @since 10.0
*/
MISSION,
/** Name of the constellation this space object belongs to.
* @since 10.0
*/
CONSTELLATION,
/** Epoch of initial launch.
* @since 10.0
*/
LAUNCH_EPOCH,
/** Country of launch.
* @since 10.0
*/
LAUNCH_COUNTRY,
/** Site of launch.
* @since 10.0
*/
LAUNCH_SITE,
/** Provider of launch.
* @since 10.0
*/
LAUNCH_PROVIDER,
/** Integrator of launch.
* @since 10.0
*/
LAUNCH_INTEGRATOR,
/** Pad of launch.
* @since 10.0
*/
LAUNCH_PAD,
/** Launch platform.
* @since 10.0
*/
LAUNCH_PLATFORM,
/** Epoch of the <em>most recent</em> deployement of this space object in the parent/child deployement sequence.
* @since 10.0
*/
RELEASE_EPOCH,
/** Epoch of the beginning of mission operations.
* @since 10.0
*/
MISSION_START_EPOCH,
/** Epoch of the cessation of mission operations.
* @since 10.0
*/
MISSION_END_EPOCH,
/** Epoch (actual or estimated) of the space object reentry.
* @since 10.0
*/
REENTRY_EPOCH,
/** Estimated remaining lifetime in days.
* @since 10.0
*/
LIFETIME,
/** Specification of satellite catalog source.
* @since 10.0
*/
CATALOG_NAME,
/** Type of object.
* @see CCSDSObjectType
* @since 10.0
*/
OBJECT_TYPE,
/** Operational status.
* @see CCSDSOpsStatus
* @since 10.0
*/
OPS_STATUS,
/** Orbit type.
* @see CCSDSOrbitType
* @since 10.0
*/
ORBIT_TYPE,
/** List of elements of information data blocks included in this message.
* @since 10.0
*/
OCM_DATA_ELEMENTS,
/** Default epoch to which <em>all</em> relative times are referenced in data blocks,
* unless overridden by block-specific {@link #EPOCH_TZERO} values.
* @since 10.0
*/
DEF_EPOCH_TZERO,
/** Time system in which {@link #DEF_EPOCH_TZERO} is defined.
* @since 10.0
*/
DEF_TIME_SYSTEM,
/** Number of clock seconds occurring during one SI second.
* @since 10.0
*/
SEC_CLK_PER_SI_SEC,
/** Number of SI seconds in the chosen central body’s “day”.
* @since 10.0
*/
SEC_PER_DAY,
/** Time of the earliest data contained in the OCM.
* @since 10.0
*/
EARLIEST_TIME,
/** Time of the latest data contained in the OCM.
* @since 10.0
*/
LATEST_TIME,
/** Span of time that the OCM covers.
* @since 10.0
*/
TIME_SPAN,
/** Difference (TAI – UTC) in seconds at epoch {@link #DEF_EPOCH_TZERO}.
* @since 10.0
*/
TAIMUTC_AT_TZERO,
/** Difference (UT1 – UTC) in seconds at epoch {@link #DEF_EPOCH_TZERO}.
* @since 10.0
*/
UT1MUTC_AT_TZERO,
/** Source and version of Earth Orientation Parameters.
* @since 10.0
*/
EOP_SOURCE,
/** Interpolation method for Earth Orientation Parameters.
* @since 10.0
*/
INTERP_METHOD_EOP,
/** Start of orbit data section.
* @since 10.0
*/
ORB_START,
/** Stop of orbit data section.
* @since 10.0
*/
ORB_STOP,
/** Orbit identification number.
* @since 10.0
*/
ORB_ID,
/** Identification number of previous orbit.
* @since 10.0
*/
ORB_PREV_ID,
/** Identification number of next orbit.
* @since 10.0
*/
ORB_NEXT_ID,
/** Basis of this orbit state time history data.
* @see CCSDSOrbitBasis
* @since 10.0
*/
ORB_BASIS,
/** Identification number of the orbit determination or simulation upon which this orbit is based.
* @since 10.0
*/
ORB_BASIS_ID,
/** Type of averaging (Osculating, mean Brouwer, other...).
* @since 10.0
*/
ORB_AVERAGING,
/** Reference epoch for all relative times in the orbit state block.
* @since 10.0
*/
ORB_EPOCH_TZERO,
/** Time system for {@link #ORB_EPOCH_TZERO}.
* @since 10.0
*/
ORB_TIME_SYSTEM,
/** Reference frame of the orbit.
* @since 10.0
*/
ORB_REF_FRAME,
/** Epoch of the {@link #ORB_REF_FRAME orbit reference frame}.
* @since 10.0
*/
ORB_FRAME_EPOCH,
/** Orbit element set type.
* @see CCSDSElementsType
* @since 10.0
*/
ORB_TYPE,
/** Number of elements (excluding time) contain in the element set.
* @since 10.0
*/
ORB_N,
/** Definition of orbit elements.
* @since 10.0
*/
ORB_ELEMENTS,
/** Start of object physical characteristics data section.
* @since 10.0
*/
PHYS_START,
/** Stop of object physical characteristics data section.
* @since 10.0
*/
PHYS_STOP,
/** Start of covariance data section.
* @since 10.0
*/
COV_START,
/** Stop of covariance data section.
* @since 10.0
*/
COV_STOP,
/** Start of state transition matrix data section.
* @since 10.0
*/
STM_START,
/** Stop of state transition matrix data section.
* @since 10.0
*/
STM_STOP,
/** Start of maneuver data section.
* @since 10.0
*/
MAN_START,
/** Stop of maneuver data section.
* @since 10.0
*/
MAN_STOP,
/** Start of perturbations data section.
* @since 10.0
*/
PERT_START,
/** Stop of perturbations data section.
* @since 10.0
*/
PERT_STOP,
/** Start of orbit determination data section.
* @since 10.0
*/
OD_START,
/** Stop of orbit determination data section.
* @since 10.0
*/
OD_STOP,
/** Start of user-defined parameters data section.
* @since 10.0
*/
USER_START,
/** Stop of user-defined parameters data section.
* @since 10.0
*/
USER_STOP,
/** Object identifier of the object for which the orbit state is provided. */
OBJECT_ID,
/** Origin of reference frame. */
......
This diff is collapsed.
This diff is collapsed.
......@@ -132,7 +132,7 @@ public abstract class ODMFile {
}
/**
* Set the gravitational coefficient created from the knowledge of the central body.
* Set the gravitational coefficient to use.
* In order of decreasing priority, finalMU is set equal to:
* <ol>
* <li>the coefficient parsed in the file,</li>
......
......@@ -37,6 +37,16 @@ public class ODMMetaData {
/** ODM file to which these meta-data belong. */
private final ODMFile odmFile;
/** Unique ID identifying this message from a given originator.
* @since 10.1
*/
private String messageID;
/** Classification for this message.
* @since 10.1
*/
private String messageClassification;
/** Time System: used for metadata, orbit state and covariance data. */
private CcsdsTimeScale timeSystem;
......@@ -99,6 +109,38 @@ public class ODMMetaData {
return odmFile;
}
/** Get the message ID.
* @return unique (wrt originator) message ID.
* @since 10.1
*/
public String getMessageID() {
return messageID;
}
/** Set the message ID.
* @param messageID unique (wrt originator) message ID
* @since 10.1
*/
void setMessageID(final String messageID) {
this.messageID = messageID;
}
/** Get the message classification.
* @return message classification.
* @since 10.1
*/
public String getMessageClassification() {
return messageClassification;
}
/** Set the message classification.
* @param messageClassification message classification
* @since 10.1
*/
void setMessageClassification(final String messageClassification) {
this.messageClassification = messageClassification;
}
/** Get the Time System that: for OPM, is used for metadata, state vector,
* maneuver and covariance data, for OMM, is used for metadata, orbit state
* and covariance data, for OEM, is used for metadata, ephemeris and
......
......@@ -19,7 +19,9 @@ package org.orekit.files.ccsds;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
......@@ -71,6 +73,11 @@ public abstract class ODMParser {
/** Piece of launch (from "A" to "ZZZ"). */
private String launchPiece;
/** Indicators for expected keywords.
* @since 10.1
*/
private Set<Keyword> expected;
/** Complete constructor.
* @param missionReferenceDate reference date for Mission Elapsed Time or Mission Relative Time time systems
* @param mu gravitational coefficient
......@@ -90,6 +97,7 @@ public abstract class ODMParser {
this.launchYear = launchYear;
this.launchNumber = launchNumber;
this.launchPiece = launchPiece;
this.expected = new HashSet<>();
}
/** Set initial date.
......@@ -269,6 +277,15 @@ public abstract class ODMParser {
protected boolean parseMetaDataEntry(final KeyValue keyValue,
final ODMMetaData metaData, final List<String> comment) {
switch (keyValue.getKeyword()) {
case MESSAGE_ID:
metaData.setMessageID(keyValue.getValue());
return true;
case MESSAGE_CLASSIF:
metaData.setMessageClassification(keyValue.getValue());
return true;
case OBJECT_NAME:
if (!comment.isEmpty()) {
metaData.setComment(comment);
......@@ -318,13 +335,7 @@ public abstract class ODMParser {
return true;
case TIME_SYSTEM:
if (!CcsdsTimeScale.contains(keyValue.getValue())) {
throw new OrekitException(
OrekitMessages.CCSDS_TIME_SYSTEM_NOT_IMPLEMENTED,
keyValue.getValue());
}
final CcsdsTimeScale timeSystem =
CcsdsTimeScale.valueOf(keyValue.getValue());
final CcsdsTimeScale timeSystem = CcsdsTimeScale.parse(keyValue.getValue());
metaData.setTimeSystem(timeSystem);
if (metaData.getFrameEpochString() != null) {
metaData.setFrameEpoch(parseDate(metaData.getFrameEpochString(), timeSystem));
......@@ -353,6 +364,8 @@ public abstract class ODMParser {
return true;
case SEMI_MAJOR_AXIS:
// as we have found semi major axis we don't expect mean motion anymore
declareFound(Keyword.MEAN_MOTION);
general.setKeplerianElementsComment(comment);
comment.clear();
general.setA(keyValue.getDoubleValue() * 1000);
......@@ -546,4 +559,32 @@ public abstract class ODMParser {
return timeSystem.parseDate(date, conventions, missionReferenceDate);
}
/** Declare a keyword to be expected later during parsing.
* @param keyword keyword that is expected
* @since 10.1
*/
protected void declareExpected(final Keyword keyword) {
expected.add(keyword);
}
/** Declare a keyword as found during parsing.
* @param keyword keyword found
* @since 10.1
*/
protected void declareFound(final Keyword keyword) {
expected.remove(keyword);
}
/** Check if all expected keywords have been found.
* @param fileName name of the file
* @exception OrekitException if some expected keywords are missing
* @since 10.1
*/
protected void checkExpected(final String fileName) throws OrekitException {
if (!expected.isEmpty()) {
throw new OrekitException(OrekitMessages.CCSDS_MISSING_KEYWORD,
expected.iterator().next(), fileName);
}
}
}
......@@ -45,6 +45,16 @@ import org.orekit.utils.TimeStampedPVCoordinates;
*/
public class OEMParser extends ODMParser implements EphemerisFileParser {
/** Mandatory keywords.
* @since 10.1
*/
private static final Keyword[] MANDATORY_KEYWORDS = {
Keyword.CCSDS_OEM_VERS, Keyword.CREATION_DATE, Keyword.ORIGINATOR,
Keyword.OBJECT_NAME, Keyword.OBJECT_ID, Keyword.CENTER_NAME,
Keyword.REF_FRAME, Keyword.TIME_SYSTEM,
Keyword.START_TIME, Keyword.STOP_TIME, Keyword.META_START, Keyword.META_STOP
};
/** Simple constructor.
* <p>
* This class is immutable, and hence thread safe. When parts
......@@ -149,6 +159,11 @@ public class OEMParser extends ODMParser implements EphemerisFileParser {
@Override
public OEMFile parse(final BufferedReader reader, final String fileName) {
// declare the mandatory keywords as expected
for (final Keyword keyword : MANDATORY_KEYWORDS) {
declareExpected(keyword);
}
try {
// initialize internal data structures
......@@ -170,6 +185,9 @@ public class OEMParser extends ODMParser implements EphemerisFileParser {
if (pi.keyValue.getKeyword() == null) {
throw new OrekitException(OrekitMessages.CCSDS_UNEXPECTED_KEYWORD, pi.lineNumber, pi.fileName, line);
}
declareFound(pi.keyValue.getKeyword());
switch (pi.keyValue.getKeyword()) {
case CCSDS_OEM_VERS:
file.setFormatVersion(pi.keyValue.getDoubleValue());
......@@ -234,6 +252,10 @@ public class OEMParser extends ODMParser implements EphemerisFileParser {
}
}
}
// check all mandatory keywords have been found
checkExpected(fileName);
file.checkTimeSystems();
return file;
} catch (IOException ioe) {
......
......@@ -37,6 +37,18 @@ import org.orekit.utils.IERSConventions;
*/
public class OMMParser extends ODMParser {
/** Mandatory keywords.
* @since 10.1
*/
private static final Keyword[] MANDATORY_KEYWORDS = {
Keyword.CCSDS_OMM_VERS, Keyword.CREATION_DATE, Keyword.ORIGINATOR,
Keyword.OBJECT_NAME, Keyword.OBJECT_ID, Keyword.CENTER_NAME,
Keyword.REF_FRAME, Keyword.TIME_SYSTEM, Keyword.MEAN_ELEMENT_THEORY,
Keyword.EPOCH, Keyword.SEMI_MAJOR_AXIS, Keyword.MEAN_MOTION,
Keyword.ECCENTRICITY, Keyword.INCLINATION, Keyword.RA_OF_ASC_NODE,
Keyword.ARG_OF_PERICENTER, Keyword.MEAN_ANOMALY
};
/** Simple constructor.
* <p>
* This class is immutable, and hence thread safe. When parts
......@@ -137,10 +149,13 @@ public class OMMParser extends ODMParser {
/** {@inheritDoc} */
public OMMFile parse(final InputStream stream, final String fileName) {
try {
// declare the mandatory keywords as expected
for (final Keyword keyword : MANDATORY_KEYWORDS) {
declareExpected(keyword);
}
final BufferedReader reader =
new BufferedReader(new InputStreamReader(stream, StandardCharsets.UTF_8));
try (InputStreamReader isr = new InputStreamReader(stream, StandardCharsets.UTF_8);
BufferedReader reader = new BufferedReader(isr)) {
// initialize internal data structures
final ParseInfo pi = new ParseInfo();
......@@ -164,16 +179,17 @@ public class OMMParser extends ODMParser {
if (pi.keyValue.getKeyword() == null) {
throw new OrekitException(OrekitMessages.CCSDS_UNEXPECTED_KEYWORD, pi.lineNumber, pi.fileName, line);
}
declareFound(pi.keyValue.getKeyword());
switch (pi.keyValue.getKeyword()) {
case CCSDS_OMM_VERS:
file.setFormatVersion(pi.keyValue.getDoubleValue());
break;
case MEAN_ELEMENT_THEORY:
file.getMetaData().setMeanElementTheory(pi.keyValue.getValue());
break;
case MEAN_MOTION:
// as we have found mean motion, we don't expect semi majar axis anymore
declareFound(Keyword.SEMI_MAJOR_AXIS);
file.setMeanMotion(pi.keyValue.getDoubleValue() * FastMath.PI / 43200.0);
break;
......@@ -223,13 +239,28 @@ public class OMMParser extends ODMParser {
}
}
}
reader.close();
// check all mandatory keywords have been found
checkExpected(fileName);
return file;
} catch (IOException ioe) {
throw new OrekitException(ioe, new DummyLocalizable(ioe.getMessage()));
}
}
/** {@inheritDoc} */
@Override
protected boolean parseMetaDataEntry(final KeyValue keyValue,
final ODMMetaData metaData, final List<String> comment) {
if (keyValue.getKeyword() == Keyword.MEAN_ELEMENT_THEORY) {
((OMMFile.OMMMetaData) metaData).setMeanElementTheory(keyValue.getValue());
return true;
} else {
return super.parseMetaDataEntry(keyValue, metaData, comment);
}
}
/** Private class used to stock OMM parsing info.
* @author sports
*/
......
......@@ -37,6 +37,17 @@ import org.orekit.utils.IERSConventions;
*/
public class OPMParser extends ODMParser {
/** Mandatory keywords.
* @since 10.1
*/
private static final Keyword[] MANDATORY_KEYWORDS = {
Keyword.CCSDS_OPM_VERS, Keyword.CREATION_DATE, Keyword.ORIGINATOR,
Keyword.OBJECT_NAME, Keyword.OBJECT_ID, Keyword.CENTER_NAME,
Keyword.REF_FRAME, Keyword.TIME_SYSTEM, Keyword.EPOCH,
Keyword.X, Keyword.Y, Keyword.Z,
Keyword.X_DOT, Keyword.Y_DOT, Keyword.Z_DOT
};
/** Simple constructor.
* <p>
* This class is immutable, and hence thread safe. When parts
......@@ -132,8 +143,14 @@ public class OPMParser extends ODMParser {
/** {@inheritDoc} */
public OPMFile parse(final InputStream stream, final String fileName) {
try {
final BufferedReader reader = new BufferedReader(new InputStreamReader(stream, StandardCharsets.UTF_8));
// declare the mandatory keywords as expected
for (final Keyword keyword : MANDATORY_KEYWORDS) {
declareExpected(keyword);
}
try (InputStreamReader isr = new InputStreamReader(stream, StandardCharsets.UTF_8);
BufferedReader reader = new BufferedReader(isr)) {
// initialize internal data structures
final ParseInfo pi = new ParseInfo();
pi.fileName = fileName;
......@@ -156,6 +173,9 @@ public class OPMParser extends ODMParser {
if (pi.keyValue.getKeyword() == null) {
throw new OrekitException(OrekitMessages.CCSDS_UNEXPECTED_KEYWORD, pi.lineNumber, pi.fileName, line);
}
declareFound(pi.keyValue.getKeyword());
switch (pi.keyValue.getKeyword()) {
case CCSDS_OPM_VERS:
......@@ -246,12 +266,15 @@ public class OPMParser extends ODMParser {
}
// check all mandatory keywords have been found
checkExpected(fileName);
file.setPosition(new Vector3D(pi.x, pi.y, pi.z));
file.setVelocity(new Vector3D(pi.x_dot, pi.y_dot, pi.z_dot));
if (pi.maneuver != null) {
file.addManeuver(pi.maneuver);
}
reader.close();
return file;
} catch (IOException ioe) {
throw new OrekitException(ioe, new DummyLocalizable(ioe.getMessage()));
......
......@@ -395,12 +395,7 @@ public class TDMParser extends DefaultHandler {
switch (keyValue.getKeyword()) {
case TIME_SYSTEM:
// Read the time system and ensure that it is supported by Orekit
if (!CcsdsTimeScale.contains(keyValue.getValue())) {
throw new OrekitException(OrekitMessages.CCSDS_TIME_SYSTEM_NOT_IMPLEMENTED,
keyValue.getValue());
}
final CcsdsTimeScale timeSystem =
CcsdsTimeScale.valueOf(keyValue.getValue());
final CcsdsTimeScale timeSystem = CcsdsTimeScale.parse(keyValue.getValue());
metaData.setTimeSystem(timeSystem);
// Convert start/stop time to AbsoluteDate if they have been read already
......
......@@ -301,6 +301,9 @@ CCSDS_DATE_INVALID_LENGTH_TIME_FIELD = ugyldig datofeltlængde for CCSDS dato: {
# missing agency epoch in CCSDS date
CCSDS_DATE_MISSING_AGENCY_EPOCH = manglende bureauepoke i CCSDS dato
# missing mandatory key {0} in CCSDS file {1}
CCSDS_MISSING_KEYWORD = <MISSING TRANSLATION>
# unexpected keyword in CCSDS line number {0} of file {1}:\n{2}
CCSDS_UNEXPECTED_KEYWORD = uventet nøgleord på linje nummer {0} i CCSDS-filen {1}:\n{2}
......
......@@ -301,6 +301,9 @@ CCSDS_DATE_INVALID_LENGTH_TIME_FIELD = ungültige Länge des Zeitfelds in CCSDS
# missing agency epoch in CCSDS date
CCSDS_DATE_MISSING_AGENCY_EPOCH = fehlende Agentur Epoche in CCSDS Datum
# missing mandatory key {0} in CCSDS file {1}
CCSDS_MISSING_KEYWORD = <MISSING TRANSLATION>
# unexpected keyword in CCSDS line number {0} of file {1}:\n{2}
CCSDS_UNEXPECTED_KEYWORD = unerwartetes Schlüsselwort in CCSDS Zeilennummer {0} in Datei {1}:\n{2}
......
......@@ -301,6 +301,9 @@ CCSDS_DATE_INVALID_LENGTH_TIME_FIELD = μη έγκυρο πεδίου χρόνο
# missing agency epoch in CCSDS date
CCSDS_DATE_MISSING_AGENCY_EPOCH = ελλιπής ημερομηνία της υπηρεσίας για την ημερομηνία CCSDS
# missing mandatory key {0} in CCSDS file {1}
CCSDS_MISSING_KEYWORD = <MISSING TRANSLATION>
# unexpected keyword in CCSDS line number {0} of file {1}:\n{2}
CCSDS_UNEXPECTED_KEYWORD = μη αναμενόμενη λέξη-κλειδί στη γραμμή {0} του CCSDS αρχείου {1}: \ n {2}
......
......@@ -301,6 +301,9 @@ CCSDS_DATE_INVALID_LENGTH_TIME_FIELD = invalid time field length in CCSDS date:
# missing agency epoch in CCSDS date
CCSDS_DATE_MISSING_AGENCY_EPOCH = missing agency epoch in CCSDS date
# missing mandatory key {0} in CCSDS file {1}
CCSDS_MISSING_KEYWORD = missing mandatory key {0} in CCSDS file {1}
# unexpected keyword in CCSDS line number {0} of file {1}:\n{2}
CCSDS_UNEXPECTED_KEYWORD = unexpected keyword in CCSDS line number {0} of file {1}:\n{2}
......
......@@ -301,6 +301,9 @@ CCSDS_DATE_INVALID_LENGTH_TIME_FIELD = longitud inválida para el campo fecha en
# missing agency epoch in CCSDS date
CCSDS_DATE_MISSING_AGENCY_EPOCH = falta época de referencia específica agencia en una fecha CCSDS
# missing mandatory key {0} in CCSDS file {1}
CCSDS_MISSING_KEYWORD = <MISSING TRANSLATION>
# unexpected keyword in CCSDS line number {0} of file {1}:\n{2}
CCSDS_UNEXPECTED_KEYWORD = palabra clave inesperada en la línea {0} del fichero CCSDS {1}:\n{2}
......
......@@ -301,6 +301,9 @@ CCSDS_DATE_INVALID_LENGTH_TIME_FIELD = longueur invalide pour le champ date dans
# missing agency epoch in CCSDS date
CCSDS_DATE_MISSING_AGENCY_EPOCH = époque de référence spécifique agence manquante dans une date CCSDS
# missing mandatory key {0} in CCSDS file {1}
CCSDS_MISSING_KEYWORD = mot-clef {0} manquant dans le fichier CCDSD {1}
# unexpected keyword in CCSDS line number {0} of file {1}:\n{2}
CCSDS_UNEXPECTED_KEYWORD = mot-clef inattendu à la ligne {0} du fichier CCSDS {1} :\n{2}
......
......@@ -301,6 +301,9 @@ CCSDS_DATE_INVALID_LENGTH_TIME_FIELD = lonxitude inválida para o campo data nun
# missing agency epoch in CCSDS date
CCSDS_DATE_MISSING_AGENCY_EPOCH = falta época de referencia específica axencia nunha CCSDS
# missing mandatory key {0} in CCSDS file {1}
CCSDS_MISSING_KEYWORD = <MISSING TRANSLATION>
# unexpected keyword in CCSDS line number {0} of file {1}:\n{2}
CCSDS_UNEXPECTED_KEYWORD = palabra clave inesperada na liña {0} do ficheiro CCSDS {1}:\n{2}
......
......@@ -301,6 +301,9 @@ CCSDS_DATE_INVALID_LENGTH_TIME_FIELD = lunghezza non valida per il campo del tem
# missing agency epoch in CCSDS date
CCSDS_DATE_MISSING_AGENCY_EPOCH = epoca di riferimento specifica dell''agenzia mancante nella data CCSDS
# missing mandatory key {0} in CCSDS file {1}
CCSDS_MISSING_KEYWORD = <MISSING TRANSLATION>
# unexpected keyword in CCSDS line number {0} of file {1}:\n{2}
CCSDS_UNEXPECTED_KEYWORD = parola-chiave inattesa alla linea {0} del file CCSDS {1}:\n{2}
......
......@@ -301,6 +301,9 @@ CCSDS_DATE_INVALID_LENGTH_TIME_FIELD = ugyldig datofelt-lengde for CCSDS dato: {
# missing agency epoch in CCSDS date
CCSDS_DATE_MISSING_AGENCY_EPOCH = manglende byrå epoke for CCSDS dato
# missing mandatory key {0} in CCSDS file {1}
CCSDS_MISSING_KEYWORD = <MISSING TRANSLATION>
# unexpected keyword in CCSDS line number {0} of file {1}:\n{2}
CCSDS_UNEXPECTED_KEYWORD = uventet nøkkelord på linje nummer {0} i CCSDS-filen {1}:\n{2}
......
......@@ -301,6 +301,9 @@ CCSDS_DATE_INVALID_LENGTH_TIME_FIELD = lungime invalidă pentru câmpul timp din
# missing agency epoch in CCSDS date
CCSDS_DATE_MISSING_AGENCY_EPOCH = epocă de referință specifică agenției lipsă din data CCSDS
# missing mandatory key {0} in CCSDS file {1}
CCSDS_MISSING_KEYWORD = <MISSING TRANSLATION>
# unexpected keyword in CCSDS line number {0} of file {1}:\n{2}
CCSDS_UNEXPECTED_KEYWORD = cuvânt cheie neașteptat la linia {0} din fișierul CCSDS {1}:\n{2}
......
......@@ -31,7 +31,7 @@ public class OrekitMessagesTest {
@Test
public void testMessageNumber() {
Assert.assertEquals(184, OrekitMessages.values().length);
Assert.assertEquals(185, OrekitMessages.values().length);
}
@Test
......
This diff is collapsed.
......@@ -68,10 +68,10 @@ public class OEMParserTest {
@Test
public void testParseOEM1() throws IOException {
//
final String ex = "/ccsds/OEMExample.txt";
final String ex = "/ccsds/OEMExample1.txt";
final InputStream inEntry = getClass().getResourceAsStream(ex);
final OEMParser parser = new OEMParser().withMu(CelestialBodyFactory.getEarth().getGM());
final OEMFile file = parser.parse(inEntry, "OEMExample.txt");
final OEMFile file = parser.parse(inEntry, "OEMExample1.txt");
Assert.assertEquals(CcsdsTimeScale.UTC, file.getEphemeridesBlocks().get(0).getMetaData().getTimeSystem());
Assert.assertEquals("MARS GLOBAL SURVEYOR", file.getEphemeridesBlocks().get(0).getMetaData().getObjectName());
Assert.assertEquals("1996-062A", file.getEphemeridesBlocks().get(0).getMetaData().getObjectID());
......@@ -329,12 +329,12 @@ public class OEMParserTest {
@Test
public void testWrongODMType() {
try {
new OEMParser().parse(getClass().getResourceAsStream("/ccsds/OPMExample.txt"), "OPMExample.txt");
new OEMParser().parse(getClass().getResourceAsStream("/ccsds/OPMExample1.txt"), "OPMExample1.txt");
} catch (OrekitException oe) {
Assert.assertEquals(OrekitMessages.CCSDS_UNEXPECTED_KEYWORD, oe.getSpecifier());
Assert.assertEquals(1, oe.getParts()[0]);
Assert.assertEquals("OPMExample.txt", oe.getParts()[1]);
Assert.assertEquals("CCSDS_OPM_VERS = 2.0", oe.getParts()[2]);
Assert.assertEquals("OPMExample