1 /* Copyright 2024-2025 The Johns Hopkins University Applied Physics Laboratory
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 package org.orekit.files.iirv.terms;
18
19 import org.orekit.files.iirv.terms.base.DoubleValuedIIRVTerm;
20
21 /**
22 * 4-character dimensionless drag coefficient.
23 * <p>
24 * Assumed decimal point is two places from the right. Must contain all zeros if not used.
25 * <p>
26 * Units: dimensionless
27 * <p>
28 * Valid values:
29 * <ul>
30 * <li> 0 to 99.99</li>
31 * <li>"<code>xxxx</code>", <code>x</code>: Any integer 0-9</li>
32 * </ul>
33 *
34 * @author Nick LaFarge
35 * @since 13.0
36 */
37 public class DragCoefficientTerm extends DoubleValuedIIRVTerm {
38
39 /** DragCoefficientTerm contains all zeros when not used. */
40 public static final DragCoefficientTerm UNUSED = new DragCoefficientTerm(0);
41
42 /** The length of the IIRV term within the message. */
43 public static final int DRAG_COEFFICIENT_TERM_LENGTH = 4;
44
45 /** Regular expression that ensures the validity of string values for this term. */
46 public static final String DRAG_COEFFICIENT_TERM_PATTERN = "\\d{4}";
47
48 /**
49 * Constructor.
50 * <p>
51 * See {@link DoubleValuedIIRVTerm#DoubleValuedIIRVTerm(String, String, int, int, boolean)}
52 *
53 * @param value value of the drag coefficient term (dimensionless)
54 */
55 public DragCoefficientTerm(final String value) {
56 super(DRAG_COEFFICIENT_TERM_PATTERN, value, DRAG_COEFFICIENT_TERM_LENGTH, 2, false);
57 }
58
59 /**
60 * Constructor.
61 * <p>
62 * See {@link DoubleValuedIIRVTerm#DoubleValuedIIRVTerm(String, double, int, int, boolean)}
63 *
64 * @param value value of the drag coefficient term (dimensionless)
65 */
66 public DragCoefficientTerm(final double value) {
67 super(DRAG_COEFFICIENT_TERM_PATTERN, value, DRAG_COEFFICIENT_TERM_LENGTH, 2, false);
68 }
69 }