1   /* Copyright 2022-2025 Thales Alenia Space
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.frames.Frame;
20  import org.orekit.gnss.SatelliteSystem;
21  import org.orekit.time.TimeScales;
22  
23  /**
24   * Factory for {@link NavICL1NvNavigationMessage}.
25   * @author Luc Maisonobe
26   * @since 14.0
27   */
28  public class NavICL1NvNavigationMessageFactory
29      extends AbstractNavigationMessageFactory<NavICL1NvNavigationMessage> {
30  
31      /** Reference signal flag. */
32      private int referenceSignalFlag;
33  
34      /** User Range Accuracy Index. */
35      private int urai;
36  
37      /** L1 SPS health. */
38      private int l1SpsHealth;
39  
40      /** Estimated group delay differential TGD for S-L5 correction. */
41      private double tgdSL5;
42  
43      /** Inter Signal Delay for S L1P. */
44      private double iscSL1P;
45  
46      /** Inter Signal Delay for L1D L1P. */
47      private double iscL1DL1P;
48  
49      /** Inter Signal Delay for L1P S. */
50      private double iscL1PS;
51  
52      /** Inter Signal Delay for L1D S. */
53      private double iscL1DS;
54  
55      /** Simple constructor.
56       * @param timeScales known time scales
57       * @param system     satellite system to use for interpreting week number
58       * @param type       message type (null if not a navigation message)
59       * @param inertial   reference inertial frame
60       * @param bodyFixed  body fixed frame (will be frozen at {@code date} to build the orbital elements
61       */
62      public NavICL1NvNavigationMessageFactory(final TimeScales timeScales, final SatelliteSystem system,
63                                               final String type, final Frame inertial, final Frame bodyFixed) {
64          super(GNSSConstants.NAVIC_AV, timeScales, system,
65                type, inertial, bodyFixed, GNSSConstants.NAVIC_MU);
66      }
67  
68      /** Get the reference signal flag.
69       * @return reference signal flag
70       */
71      public int getReferenceSignalFlag() {
72          return referenceSignalFlag;
73      }
74  
75      /** Set then reference signal flag.
76       * @param referenceSignalFlag reference signal flag
77       */
78      public void setReferenceSignalFlag(final int referenceSignalFlag) {
79          this.referenceSignalFlag = referenceSignalFlag;
80      }
81  
82      /** Get User Range Accuracy Index.
83       * @return User Range Accuracy Index
84       */
85      public int getUrai() {
86          return urai;
87      }
88  
89      /** Set User Range Accuracy Index.
90       * @param urai User Range Accuracy Index
91       */
92      public void setUrai(final int urai) {
93          this.urai = urai;
94      }
95  
96      /** Get L1 SPS health.
97       * @return L1 SPS health
98       */
99      public int getL1SpsHealth() {
100         return l1SpsHealth;
101     }
102 
103     /** Set L1 SPS health.
104      * @param l1SpsHealth L1 SPS health
105      */
106     public void setL1SpsHealth(final int l1SpsHealth) {
107         this.l1SpsHealth = l1SpsHealth;
108     }
109 
110     /** Get the estimated group delay differential TGD for S-L5 correction.
111      * @return estimated group delay differential TGD for S-L3 correction (s)
112      */
113     public double getTgdSL5() {
114         return tgdSL5;
115     }
116 
117     /** Set the estimated group delay differential TGD for S-L5 correction.
118      * @param tgdSL5 estimated group delay differential TGD for S-L3 correction (s)
119      */
120     public void setTgdSL5(final double tgdSL5) {
121         this.tgdSL5 = tgdSL5;
122     }
123 
124     /** Get the inter Signal Delay for S L1P.
125      * @return inter signal delay
126      */
127     public double getIscSL1P() {
128         return iscSL1P;
129     }
130 
131     /** Set the inter Signal Delay for S L1P.
132      * @param iscSL1P inter signal delay
133      */
134     public void setIscSL1P(final double iscSL1P) {
135         this.iscSL1P = iscSL1P;
136     }
137 
138     /** Get the inter Signal Delay for L1D L1P.
139      * @return inter signal delay
140      */
141     public double getIscL1DL1P() {
142         return iscL1DL1P;
143     }
144 
145     /** Set the inter Signal Delay for L1D L1P.
146      * @param iscL1DL1P inter signal delay
147      */
148     public void setIscL1DL1P(final double iscL1DL1P) {
149         this.iscL1DL1P = iscL1DL1P;
150     }
151 
152     /** Get the inter Signal Delay for L1P S.
153      * @return inter signal delay
154      */
155     public double getIscL1PS() {
156         return iscL1PS;
157     }
158 
159     /** Set the inter Signal Delay for L1P S.
160      * @param iscL1PS inter signal delay
161      */
162     public void setIscL1PS(final double iscL1PS) {
163         this.iscL1PS = iscL1PS;
164     }
165 
166     /** Get the inter Signal Delay for L1D S.
167      * @return inter signal delay
168      */
169     public double getIscL1DS() {
170         return iscL1DS;
171     }
172 
173     /** Set the inter Signal Delay for L1D S.
174      * @param iscL1DS inter signal delay
175      */
176     public void setIscL1DS(final double iscL1DS) {
177         this.iscL1DS = iscL1DS;
178     }
179 
180     /** {@inheritDoc} */
181     @Override
182     public NavICL1NvNavigationMessage createFromDrivers() {
183         return new NavICL1NvNavigationMessage(getTimeScales(), getType(), getPrn(), getTimeOfEphemeris(),
184                                               createOrbitFromDrivers(), getADotDriver().getValue(),
185                                               getDeltaN0Driver().getValue(), getDeltaN0DotDriver().getValue(),
186                                               getIDotDriver().getValue(), getOmegaDotDriver().getValue(),
187                                               getCucDriver().getValue(), getCusDriver().getValue(),
188                                               getCrcDriver().getValue(), getCrsDriver().getValue(),
189                                               getCicDriver().getValue(), getCisDriver().getValue(),
190                                               getAf0Driver().getValue(), getAf1Driver().getValue(),
191                                               getAf2Driver().getValue(),
192                                               getTgd(), getTimeOfClock(), getTransmissionTime(),
193                                               getReferenceSignalFlag(),
194                                               getUrai(), getL1SpsHealth(),
195                                               getTgdSL5(),
196                                               getIscSL1P(), getIscL1DL1P(), getIscL1PS(), getIscL1DS());
197     }
198 
199 }