1 /* Copyright 2022-2025 Luc Maisonobe
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.files.rinex.navigation;
18
19 import org.orekit.gnss.SatelliteSystem;
20 import org.orekit.utils.units.Unit;
21
22 /** Container for data contained in a ionosphere Nequick G message.
23 * @author Luc Maisonobe
24 * @since 12.0
25 */
26 public class IonosphereNequickGMessage extends IonosphereBaseMessage {
27
28 /** Converter for Nequick-G aᵢ₀ parameter. */
29 public static final Unit SFU = Unit.SOLAR_FLUX_UNIT;
30
31 /** Converter for Nequick-G aᵢ₁ parameter. */
32 public static final Unit SFU_PER_DEG = SFU.divide("sfu/deg", Unit.DEGREE);
33
34 /** Converter for Nequick-G aᵢ₂ parameter. */
35 public static final Unit SFU_PER_DEG2 = SFU_PER_DEG.divide("sfu/deg²", Unit.DEGREE);
36
37 /** aᵢ₀ (sfu). */
38 private double ai0;
39
40 /** aᵢ₁ (sfu/rad). */
41 private double ai1;
42
43 /** aᵢ₂ (sfu/rad²). */
44 private double ai2;
45
46 /** Disturbance flags. */
47 private int flags;
48
49 /** Simple constructor.
50 * @param system satellite system
51 * @param prn satellite number
52 * @param navigationMessageType navigation message type
53 */
54 public IonosphereNequickGMessage(final SatelliteSystem system, final int prn, final String navigationMessageType) {
55 super(system, prn, navigationMessageType);
56 }
57
58 /** Get aᵢ₀.
59 * <p>
60 * Beware Orekit uses SI units here.
61 * In order to retrieve the more traditional SFU, use
62 * {@code IonosphereNequickGMessage.SFU.fromSI(msg.getAi0())}
63 * </p>
64 * @return aᵢ₀ (W/m²/Hz)
65 * @see #SFU
66 */
67 public double getAi0() {
68 return ai0;
69 }
70
71 /** Set aᵢ₀.
72 * <p>
73 * Beware Orekit uses SI units here.
74 * In order to use the more traditional SFU, use
75 * {@code msg.setAi0(IonosphereNequickGMessage.SFU.toSI(ai0))}
76 * </p>
77 * @param ai0 aᵢ₀ (W/m²/Hz)
78 * @see #SFU
79 */
80 public void setAi0(final double ai0) {
81 this.ai0 = ai0;
82 }
83
84 /** Get aᵢ₁.
85 * <p>
86 * Beware Orekit uses SI units here.
87 * In order to retrieve the more traditional SFU/deg, use
88 * {@code IonosphereNequickGMessage.SFU_PAR_DEG.fromSI(msg.getAi1())}
89 * </p>
90 * @return aᵢ₁ (W/m²/Hz/rad)
91 * @see #SFU_PER_DEG
92 */
93 public double getAi1() {
94 return ai1;
95 }
96
97 /** Set aᵢ₁.
98 * <p>
99 * Beware Orekit uses SI units here.
100 * In order to use the more traditional SFU/deg, use
101 * {@code msg.setAi1(IonosphereNequickGMessage.SFU_PER_DEG.toSI(ai1))}
102 * </p>
103 * @param ai1 aᵢ₁ (W/m²/Hz/rad)
104 * @see #SFU_PER_DEG
105 */
106 public void setAi1(final double ai1) {
107 this.ai1 = ai1;
108 }
109
110 /** Get aᵢ₂.
111 * <p>
112 * Beware Orekit uses SI units here.
113 * In order to retrieve the more traditional SFU/deg², use
114 * {@code IonosphereNequickGMessage.SFU_PER_DEG_2.fromSI(msg.getAi2())}
115 * </p>
116 * @return aᵢ₂ (W/m²/Hz/rad²)
117 * @see #SFU_PER_DEG2
118 */
119 public double getAi2() {
120 return ai2;
121 }
122
123 /** Set aᵢ₂.
124 * <p>
125 * Beware Orekit uses SI units here.
126 * In order to use the more traditional SFU/deg², use
127 * {@code msg.setAi2(IonosphereNequickGMessage.SFU_PER_DEG2.toSI(ai2))}
128 * </p>
129 * @param ai2 aᵢ₂ (W/m²/Hz/rad²)
130 * @see #SFU_PER_DEG2
131 */
132 public void setAi2(final double ai2) {
133 this.ai2 = ai2;
134 }
135
136 /** Get the disturbance flags.
137 * @return disturbance flags
138 */
139 public int getFlags() {
140 return flags;
141 }
142
143 /** Set the disturbance flags.
144 * @param flags disturbance flags
145 */
146 public void setFlags(final int flags) {
147 this.flags = flags;
148 }
149
150 }