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 /**
20 * This class holds a GPS almanac as read from SEM or YUMA files.
21 *
22 * <p>Depending on the source (SEM or YUMA), some fields may be filled in or not.
23 * An almanac read from a YUMA file doesn't hold SVN number, average URA and satellite
24 * configuration.</p>
25 *
26 * @author Pascal Parraud
27 * @since 8.0
28 *
29 */
30 public class GPSAlmanac extends AbstractAlmanac implements GNSSClockElements {
31
32 /** Source of the almanac. */
33 private String src;
34
35 /** SVN number. */
36 private int svn;
37
38 /** Health status. */
39 private int health;
40
41 /** Average URA. */
42 private int ura;
43
44 /** Satellite configuration. */
45 private int config;
46
47 /**
48 * Constructor.
49 */
50 public GPSAlmanac() {
51 super(GNSSConstants.GPS_MU, GNSSConstants.GPS_AV, GNSSConstants.GPS_WEEK_NB);
52 }
53
54 /**
55 * Setter for the Square Root of Semi-Major Axis (m^1/2).
56 * <p>
57 * In addition, this method set the value of the Semi-Major Axis.
58 * </p>
59 * @param sqrtA the Square Root of Semi-Major Axis (m^1/2)
60 */
61 public void setSqrtA(final double sqrtA) {
62 super.setSma(sqrtA * sqrtA);
63 }
64
65 /**
66 * Gets the source of this GPS almanac.
67 * <p>Sources can be SEM or YUMA, when the almanac is read from a file.</p>
68 *
69 * @return the source of this GPS almanac
70 */
71 public String getSource() {
72 return src;
73 }
74
75 /**
76 * Sets the source of this GPS almanac.
77 *
78 * @param source the source of this GPS almanac
79 */
80 public void setSource(final String source) {
81 this.src = source;
82 }
83
84 /**
85 * Gets the satellite "SVN" reference number.
86 *
87 * @return the satellite "SVN" reference number
88 */
89 public int getSVN() {
90 return svn;
91 }
92
93 /**
94 * Sets the "SVN" reference number.
95 *
96 * @param svnNumber the number to set
97 */
98 public void setSVN(final int svnNumber) {
99 this.svn = svnNumber;
100 }
101
102 /**
103 * Gets the Health status.
104 *
105 * @return the Health status
106 */
107 public int getHealth() {
108 return health;
109 }
110
111 /**
112 * Sets the health status.
113 *
114 * @param health the health status to set
115 */
116 public void setHealth(final int health) {
117 this.health = health;
118 }
119
120 /**
121 * Gets the average URA number.
122 *
123 * @return the average URA number
124 */
125 public int getURA() {
126 return ura;
127 }
128
129 /**
130 * Sets the average URA number.
131 *
132 * @param uraNumber the URA number to set
133 */
134 public void setURA(final int uraNumber) {
135 this.ura = uraNumber;
136 }
137
138 /**
139 * Gets the satellite configuration.
140 *
141 * @return the satellite configuration
142 */
143 public int getSatConfiguration() {
144 return config;
145 }
146
147 /**
148 * Sets the satellite configuration.
149 *
150 * @param satConfiguration the satellite configuration to set
151 */
152 public void setSatConfiguration(final int satConfiguration) {
153 this.config = satConfiguration;
154 }
155
156 /**
157 * Gets for the Group Delay Differential (s).
158 *
159 * @return the Group Delay Differential in seconds
160 */
161 public double getTGD() {
162 return 0.0;
163 }
164
165 }