1 /* Copyright 2002-2025 CS GROUP
2 * Licensed to CS GROUP (CS) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * CS licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18 package org.orekit.files.ccsds.ndm.odm.omm;
19
20 import java.util.regex.Pattern;
21
22 import org.orekit.files.ccsds.ndm.odm.OdmCommonMetadata;
23
24 /** Metadata for Orbit Mean Messages.
25 * @author Luc Maisonobe
26 * @since 12.0
27 */
28 public class OmmMetadata extends OdmCommonMetadata {
29
30 /** Constant for SGP/SGP4 mean elements theory. */
31 public static final String SGP_SGP4_THEORY = "SGP/SGP4";
32
33 /** Constant for SGP4-XP mean elements theory.
34 * @since 12.0
35 */
36 public static final String SGP4_XP_THEORY = "SGP4-XP";
37
38 /** Constant for DSST mean elements theory. */
39 public static final String DSST_THEORY = "DSST";
40
41 /** Pattern for SGP or SDP theory. */
42 private static final Pattern SGP_SDP_PATTERN = Pattern.compile(".*S[GD]P.*");
43
44 /** Description of the Mean Element Theory. Indicates the proper method to employ
45 * to propagate the state. */
46 private String meanElementTheory;
47
48 /** Empty constructor.
49 * <p>
50 * This constructor is not strictly necessary, but it prevents spurious
51 * javadoc warnings with JDK 18 and later.
52 * </p>
53 * @since 12.0
54 */
55 public OmmMetadata() {
56 // nothing to do
57 }
58
59 /** Check if mean element theory in SGP or SDP.
60 * @return true if mean element theory in SGP or SDP
61 */
62 public boolean theoryIsSgpSdp() {
63 return SGP_SDP_PATTERN.matcher(meanElementTheory).matches();
64 }
65
66 /** Get the description of the Mean Element Theory.
67 * @return the mean element theory
68 */
69 public String getMeanElementTheory() {
70 return meanElementTheory;
71 }
72
73 /** Set the description of the Mean Element Theory.
74 * @param meanElementTheory the mean element theory to be set
75 */
76 public void setMeanElementTheory(final String meanElementTheory) {
77 refuseFurtherComments();
78 this.meanElementTheory = meanElementTheory;
79 }
80
81 }