1   /* Copyright 2002-2024 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  package org.orekit.propagation.analytical.gnss.data;
18  
19  import org.hipparchus.util.FastMath;
20  
21  /**
22   * Base class for GNSS almanacs.
23   * @author Pascal Parraud
24   * @since 11.0
25   */
26  public abstract class AbstractAlmanac extends CommonGnssData implements GNSSOrbitalElements {
27  
28      /**
29       * Constructor.
30       * @param mu Earth's universal gravitational parameter
31       * @param angularVelocity mean angular velocity of the Earth for the GNSS model
32       * @param weekNumber number of weeks in the GNSS cycle
33       */
34      public AbstractAlmanac(final double mu,
35                             final double angularVelocity,
36                             final int weekNumber) {
37          super(mu, angularVelocity, weekNumber);
38      }
39  
40      /**
41       * Getter for the mean motion.
42       * @return the mean motion
43       */
44      public double getMeanMotion() {
45          final double absA = FastMath.abs(getSma());
46          return FastMath.sqrt(getMu() / absA) / absA;
47      }
48  
49      /**
50       * Getter for the rate of inclination angle.
51       * <p>
52       * By default, not contained in a GNSS almanac
53       * </p>
54       * @return the rate of inclination angle in rad/s
55       */
56      public double getIDot() {
57          return 0.0;
58      }
59  
60      /**
61       * Getter for the Cuc parameter.
62       * <p>
63       * By default, not contained in a GNSS almanac
64       * </p>
65       * @return the Cuc parameter
66       */
67      public double getCuc() {
68          return 0.0;
69      }
70  
71      /**
72       * Getter for the Cus parameter.
73       * <p>
74       * By default, not contained in a GNSS almanac
75       * </p>
76       * @return the Cus parameter
77       */
78      public double getCus() {
79          return 0.0;
80      }
81  
82      /**
83       * Getter for the Crc parameter.
84       * <p>
85       * By default, not contained in a GNSS almanac
86       * </p>
87       * @return the Crc parameter
88       */
89      public double getCrc() {
90          return 0.0;
91      }
92  
93      /**
94       * Getter for the Crs parameter.
95       * <p>
96       * By default, not contained in a GNSS almanac
97       * </p>
98       * @return the Crs parameter
99       */
100     public double getCrs() {
101         return 0.0;
102     }
103 
104     /**
105      * Getter for the Cic parameter.
106      * <p>
107      * By default, not contained in a GNSS almanac
108      * </p>
109      * @return the Cic parameter
110      */
111     public double getCic() {
112         return 0.0;
113     }
114 
115     /**
116      * Getter for the Cis parameter.
117      * <p>
118      * By default, not contained in a GNSS almanac
119      * </p>
120      * @return the Cis parameter
121      */
122     public double getCis() {
123         return 0.0;
124     }
125 
126     /**
127      * Getter for the Drift Rate Correction Coefficient.
128      * <p>
129      * By default, not contained in a GNSS almanac
130      * </p>
131      * @return the Drift Rate Correction Coefficient (s/s²).
132      */
133     public double getAf2() {
134         return 0.0;
135     }
136 
137 }