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 GalileoNavigationMessage}.
25   * @author Luc Maisonobe
26   * @since 14.0
27   */
28  public class GalileoNavigationMessageFactory
29      extends AbstractNavigationMessageFactory<GalileoNavigationMessage> {
30  
31      /** Issue of Data of the navigation batch. */
32      private int iodNav;
33  
34      /** Data source. */
35      private int dataSource;
36  
37      /** E1/E5a broadcast group delay (s). */
38      private double bgdE1E5a;
39  
40      /** E5b/E1 broadcast group delay (s). */
41      private double bgdE5bE1;
42  
43      /** Signal in space accuracy. */
44      private double sisa;
45  
46      /** Satellite health status. */
47      private double svHealth;
48  
49      /** Simple constructor.
50       * @param timeScales known time scales
51       * @param system     satellite system to use for interpreting week number
52       * @param type       message type (null if not a navigation message)
53       * @param inertial   reference inertial frame
54       * @param bodyFixed  body fixed frame (will be frozen at {@code date} to build the orbital elements
55       */
56      public GalileoNavigationMessageFactory(final TimeScales timeScales, final SatelliteSystem system,
57                                             final String type, final Frame inertial, final Frame bodyFixed) {
58          super(GNSSConstants.GALILEO_AV, timeScales, system,
59                type, inertial, bodyFixed, GNSSConstants.GALILEO_MU);
60      }
61  
62      /** Get the Issue Of Data (IOD).
63       * @return Issue Of Data (IOD)
64       */
65      public int getIodNav() {
66          return iodNav;
67      }
68  
69      /** Set the Issue Of Data (IOD).
70       * @param iodNav Issue Of Data (IOD)
71       */
72      public void setIodNav(final int iodNav) {
73          this.iodNav = iodNav;
74      }
75  
76      /** Get the data source.
77       * @return the data source
78       */
79      public int getDataSource() {
80          return dataSource;
81      }
82  
83      /** Set the data source.
84       * @param dataSource data source
85       */
86      public void setDataSource(final int dataSource) {
87          this.dataSource = dataSource;
88      }
89  
90      /** Get the E1/E5a broadcast group delay.
91       * @return the E1/E5a broadcast group delay (s)
92       */
93      public double getBGDE1E5a() {
94          return bgdE1E5a;
95      }
96  
97      /** Set the E1/E5a broadcast group delay.
98       * @param newBgdE1E5a the E1/E5a broadcast group delay (s)
99       */
100     public void setBGDE1E5a(final double newBgdE1E5a) {
101         this.bgdE1E5a = newBgdE1E5a;
102     }
103 
104     /** Get the Broadcast Group Delay E5b/E1.
105      * @return the Broadcast Group Delay E5b/E1 (s)
106      */
107     public double getBGDE5bE1() {
108         return bgdE5bE1;
109     }
110 
111     /** Set the Broadcast Group Delay E5b/E1.
112      * @param newBgdE5bE1 the Broadcast Group Delay E5b/E1 (s)
113      */
114     public void setBGDE5bE1(final double newBgdE5bE1) {
115         this.bgdE5bE1 = newBgdE5bE1;
116     }
117 
118     /** Get the signal in space accuracy (m).
119      * @return the signal in space accuracy
120      */
121     public double getSisa() {
122         return sisa;
123     }
124 
125     /** Set the signal in space accuracy (m).
126      * @param sisa the signal in space accuracy
127      */
128     public void setSisa(final double sisa) {
129         this.sisa = sisa;
130     }
131 
132     /** Get the SV health status.
133      * @return the SV health status
134      */
135     public double getSvHealth() {
136         return svHealth;
137     }
138 
139     /** Set the SV health status.
140      * @param svHealth the SV health status
141      */
142     public void setSvHealth(final double svHealth) {
143         this.svHealth = svHealth;
144     }
145 
146     /** {@inheritDoc} */
147     @Override
148     public GalileoNavigationMessage createFromDrivers() {
149         return new GalileoNavigationMessage(getTimeScales(), getType(), getPrn(), getTimeOfEphemeris(),
150                                             createOrbitFromDrivers(), getADotDriver().getValue(),
151                                             getDeltaN0Driver().getValue(), getDeltaN0DotDriver().getValue(),
152                                             getIDotDriver().getValue(), getOmegaDotDriver().getValue(),
153                                             getCucDriver().getValue(), getCusDriver().getValue(),
154                                             getCrcDriver().getValue(), getCrsDriver().getValue(),
155                                             getCicDriver().getValue(), getCisDriver().getValue(),
156                                             getAf0Driver().getValue(), getAf1Driver().getValue(),
157                                             getAf2Driver().getValue(),
158                                             getTgd(), getTimeOfClock(), getTransmissionTime(),
159                                             getIodNav(), getDataSource(),
160                                             getBGDE1E5a(), getBGDE5bE1(),
161                                             getSisa(), getSvHealth());
162     }
163 
164 }