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.orekit.annotation.DefaultDataContext;
20  import org.orekit.attitudes.AttitudeProvider;
21  import org.orekit.data.DataContext;
22  import org.orekit.frames.Frame;
23  import org.orekit.frames.Frames;
24  import org.orekit.propagation.analytical.gnss.GNSSPropagator;
25  import org.orekit.propagation.analytical.gnss.GNSSPropagatorBuilder;
26  import org.orekit.time.TimeStamped;
27  
28  /** This interface provides the minimal set of orbital elements needed by the {@link GNSSPropagator}.
29  *
30  * @author Pascal Parraud
31  *
32  */
33  public interface GNSSOrbitalElements extends TimeStamped {
34  
35      /**
36       * Gets the PRN number of the GNSS satellite.
37       *
38       * @return the PRN number of the GNSS satellite
39       */
40      int getPRN();
41  
42      /**
43       * Gets the Reference Week of the GNSS orbit.
44       *
45       * @return the Reference Week of the GNSS orbit within [0, 1024[
46       */
47      int getWeek();
48  
49      /**
50       * Gets the Reference Time of the GNSS orbit as a duration from week start.
51       *
52       * @return the Reference Time of the GNSS orbit (s)
53       */
54      double getTime();
55  
56      /**
57       * Gets the Semi-Major Axis.
58       *
59       * @return the Semi-Major Axis (m)
60       */
61      double getSma();
62  
63      /**
64       * Gets the Mean Motion.
65       *
66       * @return the Mean Motion (rad/s)
67       */
68      double getMeanMotion();
69  
70      /**
71       * Gets the Eccentricity.
72       *
73       * @return the Eccentricity
74       */
75      double getE();
76  
77      /**
78       * Gets the Inclination Angle at Reference Time.
79       *
80       * @return the Inclination Angle at Reference Time (rad)
81       */
82      double getI0();
83  
84      /**
85       * Gets the Rate of Inclination Angle.
86       *
87       * @return the Rate of Inclination Angle (rad/s)
88       */
89      double getIDot();
90  
91      /**
92       * Gets the Longitude of Ascending Node of Orbit Plane at Weekly Epoch.
93       *
94       * @return the Longitude of Ascending Node of Orbit Plane at Weekly Epoch (rad)
95       */
96      double getOmega0();
97  
98      /**
99       * Gets the Rate of Right Ascension.
100      *
101      * @return the Rate of Right Ascension (rad/s)
102      */
103     double getOmegaDot();
104 
105     /**
106      * Gets the Argument of Perigee.
107      *
108      * @return the Argument of Perigee (rad)
109      */
110     double getPa();
111 
112     /**
113      * Gets the Mean Anomaly at Reference Time.
114      *
115      * @return the Mean Anomaly at Reference Time (rad)
116      */
117     double getM0();
118 
119     /**
120      * Gets the Amplitude of the Cosine Harmonic Correction Term to the Argument of Latitude.
121      *
122      * @return the Amplitude of the Cosine Harmonic Correction Term to the Argument of Latitude (rad)
123      */
124     double getCuc();
125 
126     /**
127      * Gets the Amplitude of the Sine Harmonic Correction Term to the Argument of Latitude.
128      *
129      * @return the Amplitude of the Sine Harmonic Correction Term to the Argument of Latitude (rad)
130      */
131     double getCus();
132 
133     /**
134      * Gets the Amplitude of the Cosine Harmonic Correction Term to the Orbit Radius.
135      *
136      * @return the Amplitude of the Cosine Harmonic Correction Term to the Orbit Radius (m)
137      */
138     double getCrc();
139 
140     /**
141      * Gets the Amplitude of the Sine Harmonic Correction Term to the Orbit Radius.
142      *
143      * @return the Amplitude of the Sine Harmonic Correction Term to the Orbit Radius (m)
144      */
145     double getCrs();
146 
147     /**
148      * Gets the Amplitude of the Cosine Harmonic Correction Term to the Angle of Inclination.
149      *
150      * @return the Amplitude of the Cosine Harmonic Correction Term to the Angle of Inclination (rad)
151      */
152     double getCic();
153 
154     /**
155      * Gets the Amplitude of the Sine Harmonic Correction Term to the Angle of Inclination.
156      *
157      * @return the Amplitude of the Sine Harmonic Correction Term to the Angle of Inclination (rad)
158      */
159     double getCis();
160 
161     /**
162      * Gets the Earth's universal gravitational parameter.
163      *
164      * @return the Earth's universal gravitational parameter
165      */
166     double getMu();
167 
168     /**
169      * Gets the mean angular velocity of the Earth of the GNSS model.
170      *
171      * @return the mean angular velocity of the Earth of the GNSS model
172      */
173     double getAngularVelocity();
174 
175     /**
176      * Gets the duration of the GNSS cycle in seconds.
177      *
178      * @return the duration of the GNSS cycle in seconds
179      */
180     double getCycleDuration();
181 
182     /**
183      * Get the propagator corresponding to the navigation message.
184      * <p>
185      * The attitude provider is set by default to be aligned with the EME2000 frame.<br>
186      * The mass is set by default to the
187      *  {@link org.orekit.propagation.Propagator#DEFAULT_MASS DEFAULT_MASS}.<br>
188      * The ECI frame is set by default to the
189      *  {@link org.orekit.frames.Predefined#EME2000 EME2000 frame} in the default data
190      *  context.<br>
191      * The ECEF frame is set by default to the
192      *  {@link org.orekit.frames.Predefined#ITRF_CIO_CONV_2010_SIMPLE_EOP
193      *  CIO/2010-based ITRF simple EOP} in the default data context.
194      * </p><p>
195      * This constructor uses the {@link DataContext#getDefault() default data context}
196      * </p>
197      * @return the propagator corresponding to the navigation message
198      * @see #getPropagator(Frames)
199      * @see #getPropagator(Frames, AttitudeProvider, Frame, Frame, double)
200      * @since 12.0
201      */
202     @DefaultDataContext
203     default GNSSPropagator getPropagator() {
204         return new GNSSPropagatorBuilder(this).build();
205     }
206 
207     /**
208      * Get the propagator corresponding to the navigation message.
209      * <p>
210      * The attitude provider is set by default to be aligned with the EME2000 frame.<br>
211      * The mass is set by default to the
212      *  {@link org.orekit.propagation.Propagator#DEFAULT_MASS DEFAULT_MASS}.<br>
213      * The ECI frame is set by default to the
214      *  {@link org.orekit.frames.Predefined#EME2000 EME2000 frame} in the default data
215      *  context.<br>
216      * The ECEF frame is set by default to the
217      *  {@link org.orekit.frames.Predefined#ITRF_CIO_CONV_2010_SIMPLE_EOP
218      *  CIO/2010-based ITRF simple EOP} in the default data context.
219      * </p>
220      * @param frames set of frames to use
221      * @return the propagator corresponding to the navigation message
222      * @see #getPropagator()
223      * @see #getPropagator(Frames, AttitudeProvider, Frame, Frame, double)
224      * @since 12.0
225      */
226     default GNSSPropagator getPropagator(final Frames frames) {
227         return new GNSSPropagatorBuilder(this, frames).build();
228     }
229 
230     /**
231      * Get the propagator corresponding to the navigation message.
232      * @param frames set of frames to use
233      * @param provider attitude provider
234      * @param inertial inertial frame, use to provide the propagated orbit
235      * @param bodyFixed body fixed frame, corresponding to the navigation message
236      * @param mass spacecraft mass in kg
237      * @return the propagator corresponding to the navigation message
238      * @see #getPropagator()
239      * @see #getPropagator(Frames)
240      * @since 12.0
241      */
242     default GNSSPropagator getPropagator(final Frames frames, final AttitudeProvider provider,
243                                          final Frame inertial, final Frame bodyFixed, final double mass) {
244         return new GNSSPropagatorBuilder(this, frames).attitudeProvider(provider)
245                                                       .eci(inertial)
246                                                       .ecef(bodyFixed)
247                                                       .mass(mass)
248                                                       .build();
249     }
250 
251 }