View Javadoc
1   /*
2    * Copyright (C) 2019 Alberto Irurueta Carro (alberto@irurueta.com)
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *         http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package com.irurueta.navigation.gnss;
17  
18  import com.irurueta.geometry.InhomogeneousPoint3D;
19  import com.irurueta.geometry.Point3D;
20  import com.irurueta.navigation.frames.ECEFPosition;
21  import com.irurueta.units.*;
22  
23  import java.io.Serializable;
24  import java.util.Objects;
25  
26  /**
27   * Contains GNSS configuration parameters.
28   */
29  public class GNSSConfig implements Serializable, Cloneable {
30  
31      public static final int MIN_SATELLITES = 4;
32  
33      /**
34       * Minimum interval between GNSS epochs expressed in seconds (s).
35       */
36      private double epochInterval;
37  
38      /**
39       * X coordinate of initial estimated position resolved along ECEF axes and
40       * expressed in meters (m).
41       */
42      private double initialEstimatedEcefPositionX;
43  
44      /**
45       * Y coordinate of initial estimated position resolved along ECEF axes and
46       * expressed in meters (m).
47       */
48      private double initialEstimatedEcefPositionY;
49  
50      /**
51       * Z coordinate of initial estimated position resolved along ECEF axes and
52       * expressed in meters (m).
53       */
54      private double initialEstimatedEcefPositionZ;
55  
56      /**
57       * Number of satellites in constellation.
58       */
59      private int numberOfSatellites = MIN_SATELLITES;
60  
61      /**
62       * Orbital radius of satellites expressed in meters (m).
63       */
64      private double orbitalRadiusOfSatellites;
65  
66      /**
67       * Inclination angle of satellites expressed in degrees (deg).
68       */
69      private double satellitesInclinationDegrees;
70  
71      /**
72       * Longitude offset of constellation expressed in degrees (deg).
73       */
74      private double constellationLongitudeOffsetDegrees;
75  
76      /**
77       * Timing offset of constellation expressed in seconds (s).
78       */
79      private double constellationTimingOffset;
80  
81      /**
82       * Mask angle expressed in degrees (deg).
83       */
84      private double maskAngleDegrees;
85  
86      /**
87       * Signal In Space (SIS) error Standard Deviation (SD) expressed in meters (m).
88       */
89      private double sisErrorSD;
90  
91      /**
92       * Zenith ionosphere error Standard Deviation (SD) expressed in meters (m).
93       */
94      private double zenithIonosphereErrorSD;
95  
96      /**
97       * Zenith troposphere error Standard Deviation (SD) expressed in meters (m).
98       */
99      private double zenithTroposphereErrorSD;
100 
101     /**
102      * Code tracking error Standard Deviation (SD) expressed in meters per second (m/s).
103      */
104     private double codeTrackingErrorSD;
105 
106     /**
107      * Range rate tracking error Standard Deviation (SD) expressed in meters per second (m/s).
108      */
109     private double rangeRateTrackingErrorSD;
110 
111     /**
112      * Initial receiver clock offset at time = 0 expressed in meters (m).
113      */
114     private double initialReceiverClockOffset;
115 
116     /**
117      * Initial receiver clock drift at time = 0 expressed in meters per second (m/s).
118      */
119     private double initialReceiverClockDrift;
120 
121     /**
122      * Constructor.
123      */
124     public GNSSConfig() {
125     }
126 
127     /**
128      * Constructor.
129      *
130      * @param epochInterval                       minimum interval between GNSS
131      *                                            epochs expressed in seconds (s).
132      * @param initialEstimatedEcefPositionX       x coordinate of initial estimated
133      *                                            position resolved along ECEF axes
134      *                                            and expressed in meters (m).
135      * @param initialEstimatedEcefPositionY       y coordinate of initial estimated
136      *                                            position resolved along ECEF axes
137      *                                            and expressed in meters (m).
138      * @param initialEstimatedEcefPositionZ       z coordinate of initial estimated
139      *                                            position resolved along ECEF axes
140      *                                            and expressed in meters (m).
141      * @param numberOfSatellites                  number of satellites in constellation.
142      * @param orbitalRadiusOfSatellites           orbital radius of satellites
143      *                                            expressed in meters (m).
144      * @param satellitesInclinationDegrees        inclination angle of satellites
145      *                                            expressed in degrees (deg).
146      * @param constellationLongitudeOffsetDegrees longitude offset of constellation
147      *                                            expressed in degrees (deg).
148      * @param constellationTimingOffset           timing offset of constellation
149      *                                            expressed in seconds (s).
150      * @param maskAngleDegrees                    mask angle expressed in degrees
151      *                                            (deg).
152      * @param sisErrorSD                          Signal In Space (SIS) error
153      *                                            Standard Deviation (SD) expressed
154      *                                            in meters (m).
155      * @param zenithIonosphereErrorSD             zenith ionosphere error Standard
156      *                                            Deviation (SD) expressed in meters
157      *                                            (m).
158      * @param zenithTroposphereErrorSD            zenith troposphere error Standard
159      *                                            Deviation (SD) expressed in meters
160      *                                            (m).
161      * @param codeTrackingErrorSD                 code tracking error Standard
162      *                                            Deviation (SD) expressed in meters
163      *                                            per second (m/s).
164      * @param rangeRateTrackingErrorSD            range rate tracking error Standard
165      *                                            Deviation (SD) expressed in meters
166      *                                            per second (m/s).
167      * @param initialReceiverClockOffset          initial receiver clock offset at
168      *                                            time = 0 expressed in meters (m).
169      * @param initialReceiverClockDrift           initial receiver clock drift at
170      *                                            time = 0 expressed in meters per
171      *                                            second (m/s).
172      * @throws IllegalArgumentException if provided epoch interval is negative or
173      *                                  if number of satellites in constellation is
174      *                                  less than 4 or if orbital radius of
175      *                                  satellites is negative or if SIS error SD is
176      *                                  negative, or if zenith ionosphere error SD
177      *                                  is negative, or if zenith troposphere error
178      *                                  SD is negative, or if code tracking error SD
179      *                                  is negative, or if range rate tracking error
180      *                                  SD is negative.
181      */
182     public GNSSConfig(final double epochInterval,
183                       final double initialEstimatedEcefPositionX,
184                       final double initialEstimatedEcefPositionY,
185                       final double initialEstimatedEcefPositionZ,
186                       final int numberOfSatellites,
187                       final double orbitalRadiusOfSatellites,
188                       final double satellitesInclinationDegrees,
189                       final double constellationLongitudeOffsetDegrees,
190                       final double constellationTimingOffset,
191                       final double maskAngleDegrees,
192                       final double sisErrorSD,
193                       final double zenithIonosphereErrorSD,
194                       final double zenithTroposphereErrorSD,
195                       final double codeTrackingErrorSD,
196                       final double rangeRateTrackingErrorSD,
197                       final double initialReceiverClockOffset,
198                       final double initialReceiverClockDrift) {
199         setValues(epochInterval, initialEstimatedEcefPositionX,
200                 initialEstimatedEcefPositionY, initialEstimatedEcefPositionZ,
201                 numberOfSatellites, orbitalRadiusOfSatellites,
202                 satellitesInclinationDegrees, constellationLongitudeOffsetDegrees,
203                 constellationTimingOffset, maskAngleDegrees, sisErrorSD,
204                 zenithIonosphereErrorSD, zenithTroposphereErrorSD,
205                 codeTrackingErrorSD, rangeRateTrackingErrorSD,
206                 initialReceiverClockOffset, initialReceiverClockDrift);
207     }
208 
209     /**
210      * Constructor
211      *
212      * @param epochInterval                 minimum interval between GNSS epochs.
213      * @param initialEstimatedEcefPositionX x coordinate of initial estimated
214      *                                      position resolved along ECEF axes.
215      * @param initialEstimatedEcefPositionY y coordinate of initial estimated
216      *                                      position resolved along ECEF axes.
217      * @param initialEstimatedEcefPositionZ z coordinate of initial estimated
218      *                                      position resolved along ECEF axes.
219      * @param numberOfSatellites            number of satellites in constellation.
220      * @param orbitalRadiusOfSatellites     orbital radius of satellites.
221      * @param satellitesInclination         inclination angle of satellites.
222      * @param constellationLongitudeOffset  longitude offset of constellation.
223      * @param constellationTimingOffset     timing offset of constellation.
224      * @param maskAngle                     mask angle.
225      * @param sisErrorSD                    Signal In Space (SIS) error Standard
226      *                                      Deviation (SD).
227      * @param zenithIonosphereErrorSD       zenith ionosphere error Standard
228      *                                      Deviation (SD).
229      * @param zenithTroposphereErrorSD      zenith troposphere error Standard
230      *                                      Deviation (SD).
231      * @param codeTrackingErrorSD           code tracking error Standard Deviation
232      *                                      (SD).
233      * @param rangeRateTrackingErrorSD      range rate tracking error Standard
234      *                                      Deviation (SD).
235      * @param initialReceiverClockOffset    initial receiver clock offset at time = 0.
236      * @param initialReceiverClockDrift     initial receiver clock drift at time = 0.
237      * @throws IllegalArgumentException if provided epoch interval is negative or
238      *                                  if number of satellites in constellation is
239      *                                  less than 4 or if orbital radius of
240      *                                  satellites is negative or if SIS error SD is
241      *                                  negative, or if zenith ionosphere error SD
242      *                                  is negative, or if zenith troposphere error
243      *                                  SD is negative, or if code tracking error SD
244      *                                  is negative, or if range rate tracking error
245      *                                  SD is negative.
246      */
247     public GNSSConfig(final Time epochInterval,
248                       final Distance initialEstimatedEcefPositionX,
249                       final Distance initialEstimatedEcefPositionY,
250                       final Distance initialEstimatedEcefPositionZ,
251                       final int numberOfSatellites,
252                       final Distance orbitalRadiusOfSatellites,
253                       final Angle satellitesInclination,
254                       final Angle constellationLongitudeOffset,
255                       final Time constellationTimingOffset,
256                       final Angle maskAngle,
257                       final Distance sisErrorSD,
258                       final Distance zenithIonosphereErrorSD,
259                       final Distance zenithTroposphereErrorSD,
260                       final Speed codeTrackingErrorSD,
261                       final Speed rangeRateTrackingErrorSD,
262                       final Distance initialReceiverClockOffset,
263                       final Speed initialReceiverClockDrift) {
264         setValues(epochInterval, initialEstimatedEcefPositionX,
265                 initialEstimatedEcefPositionY, initialEstimatedEcefPositionZ,
266                 numberOfSatellites, orbitalRadiusOfSatellites, satellitesInclination,
267                 constellationLongitudeOffset, constellationTimingOffset, maskAngle,
268                 sisErrorSD, zenithIonosphereErrorSD, zenithTroposphereErrorSD,
269                 codeTrackingErrorSD, rangeRateTrackingErrorSD,
270                 initialReceiverClockOffset, initialReceiverClockDrift);
271     }
272 
273     /**
274      * Constructor.
275      *
276      * @param epochInterval                       minimum interval between GNSS
277      *                                            epochs expressed in seconds (s).
278      * @param initialEstimatedEcefPosition        initial estimated position
279      *                                            resolved along ECEF axes.
280      * @param numberOfSatellites                  number of satellites in
281      *                                            constellation.
282      * @param orbitalRadiusOfSatellites           orbital radius of satellites
283      *                                            expressed in meters (m).
284      * @param satellitesInclinationDegrees        inclination angle of satellites
285      *                                            expressed in degrees (deg).
286      * @param constellationLongitudeOffsetDegrees longitude offset of constellation
287      *                                            expressed in degrees (deg).
288      * @param constellationTimingOffset           timing offset of constellation
289      *                                            expressed in seconds (s).
290      * @param maskAngleDegrees                    mask angle expressed in degrees
291      *                                            (deg).
292      * @param sisErrorSD                          Signal In Space (SIS) error
293      *                                            Standard Deviation (SD) expressed
294      *                                            in meters (m).
295      * @param zenithIonosphereErrorSD             zenith ionosphere error Standard
296      *                                            Deviation (SD) expressed in meters
297      *                                            (m).
298      * @param zenithTroposphereErrorSD            zenith troposphere error Standard
299      *                                            Deviation (SD) expressed in meters
300      *                                            (m).
301      * @param codeTrackingErrorSD                 code tracking error Standard
302      *                                            Deviation (SD) expressed in meters
303      *                                            per second (m/s).
304      * @param rangeRateTrackingErrorSD            range rate tracking error Standard
305      *                                            Deviation (SD) expressed in meters
306      *                                            per second (m/s).
307      * @param initialReceiverClockOffset          initial receiver clock offset at
308      *                                            time = 0 expressed in meters (m).
309      * @param initialReceiverClockDrift           initial receiver clock drift at
310      *                                            time = 0 expressed in meters per
311      *                                            second (m/s).
312      * @throws IllegalArgumentException if provided epoch interval is negative or
313      *                                  if number of satellites in constellation is
314      *                                  less than 4 or if orbital radius of
315      *                                  satellites is negative or if SIS error SD is
316      *                                  negative, or if zenith ionosphere error SD
317      *                                  is negative, or if zenith troposphere error
318      *                                  SD is negative, or if code tracking error SD
319      *                                  is negative, or if range rate tracking error
320      *                                  SD is negative.
321      */
322     public GNSSConfig(final double epochInterval,
323                       final ECEFPosition initialEstimatedEcefPosition,
324                       final int numberOfSatellites,
325                       final double orbitalRadiusOfSatellites,
326                       final double satellitesInclinationDegrees,
327                       final double constellationLongitudeOffsetDegrees,
328                       final double constellationTimingOffset,
329                       final double maskAngleDegrees,
330                       final double sisErrorSD,
331                       final double zenithIonosphereErrorSD,
332                       final double zenithTroposphereErrorSD,
333                       final double codeTrackingErrorSD,
334                       final double rangeRateTrackingErrorSD,
335                       final double initialReceiverClockOffset,
336                       final double initialReceiverClockDrift) {
337         setValues(epochInterval, initialEstimatedEcefPosition, numberOfSatellites,
338                 orbitalRadiusOfSatellites, satellitesInclinationDegrees,
339                 constellationLongitudeOffsetDegrees, constellationTimingOffset,
340                 maskAngleDegrees, sisErrorSD, zenithIonosphereErrorSD,
341                 zenithTroposphereErrorSD, codeTrackingErrorSD,
342                 rangeRateTrackingErrorSD, initialReceiverClockOffset,
343                 initialReceiverClockDrift);
344     }
345 
346     /**
347      * Constructor.
348      *
349      * @param epochInterval                minimum interval between GNSS epochs.
350      * @param initialEstimatedEcefPosition initial estimated position
351      *                                     resolved along ECEF axes.
352      * @param numberOfSatellites           number of satellites in constellation.
353      * @param orbitalRadiusOfSatellites    orbital radius of satellites.
354      * @param satellitesInclination        inclination angle of satellites.
355      * @param constellationLongitudeOffset longitude offset of constellation.
356      * @param constellationTimingOffset    timing offset of constellation.
357      * @param maskAngle                    mask angle.
358      * @param sisErrorSD                   Signal In Space (SIS) error Standard
359      *                                     Deviation (SD).
360      * @param zenithIonosphereErrorSD      zenith ionosphere error Standard
361      *                                     Deviation (SD).
362      * @param zenithTroposphereErrorSD     zenith troposphere error Standard
363      *                                     Deviation (SD).
364      * @param codeTrackingErrorSD          code tracking error Standard Deviation
365      *                                     (SD).
366      * @param rangeRateTrackingErrorSD     range rate tracking error Standard
367      *                                     Deviation (SD).
368      * @param initialReceiverClockOffset   initial receiver clock offset at time = 0.
369      * @param initialReceiverClockDrift    initial receiver clock drift at time = 0.
370      * @throws IllegalArgumentException if provided epoch interval is negative or
371      *                                  if number of satellites in constellation is
372      *                                  less than 4 or if orbital radius of
373      *                                  satellites is negative or if SIS error SD is
374      *                                  negative, or if zenith ionosphere error SD
375      *                                  is negative, or if zenith troposphere error
376      *                                  SD is negative, or if code tracking error SD
377      *                                  is negative, or if range rate tracking error
378      *                                  SD is negative.
379      */
380     public GNSSConfig(final Time epochInterval,
381                       final ECEFPosition initialEstimatedEcefPosition,
382                       final int numberOfSatellites,
383                       final Distance orbitalRadiusOfSatellites,
384                       final Angle satellitesInclination,
385                       final Angle constellationLongitudeOffset,
386                       final Time constellationTimingOffset,
387                       final Angle maskAngle,
388                       final Distance sisErrorSD,
389                       final Distance zenithIonosphereErrorSD,
390                       final Distance zenithTroposphereErrorSD,
391                       final Speed codeTrackingErrorSD,
392                       final Speed rangeRateTrackingErrorSD,
393                       final Distance initialReceiverClockOffset,
394                       final Speed initialReceiverClockDrift) {
395         setValues(epochInterval, initialEstimatedEcefPosition, numberOfSatellites,
396                 orbitalRadiusOfSatellites, satellitesInclination,
397                 constellationLongitudeOffset, constellationTimingOffset, maskAngle,
398                 sisErrorSD, zenithIonosphereErrorSD, zenithTroposphereErrorSD,
399                 codeTrackingErrorSD, rangeRateTrackingErrorSD,
400                 initialReceiverClockOffset, initialReceiverClockDrift);
401     }
402 
403     /**
404      * Constructor.
405      *
406      * @param epochInterval                       minimum interval between GNSS
407      *                                            epochs expressed in seconds (s).
408      * @param initialEstimatedPosition            initial estimated position
409      *                                            resolved along ECEF axes and expressed
410      *                                            in meters (m).
411      * @param numberOfSatellites                  number of satellites in
412      *                                            constellation.
413      * @param orbitalRadiusOfSatellites           orbital radius of satellites
414      *                                            expressed in meters (m).
415      * @param satellitesInclinationDegrees        inclination angle of satellites
416      *                                            expressed in degrees (deg).
417      * @param constellationLongitudeOffsetDegrees longitude offset of constellation
418      *                                            expressed in degrees (deg).
419      * @param constellationTimingOffset           timing offset of constellation
420      *                                            expressed in seconds (s).
421      * @param maskAngleDegrees                    mask angle expressed in degrees
422      *                                            (deg).
423      * @param sisErrorSD                          Signal In Space (SIS) error
424      *                                            Standard Deviation (SD) expressed
425      *                                            in meters (m).
426      * @param zenithIonosphereErrorSD             zenith ionosphere error Standard
427      *                                            Deviation (SD) expressed in meters
428      *                                            (m).
429      * @param zenithTroposphereErrorSD            zenith troposphere error Standard
430      *                                            Deviation (SD) expressed in meters
431      *                                            (m).
432      * @param codeTrackingErrorSD                 code tracking error Standard
433      *                                            Deviation (SD) expressed in meters
434      *                                            per second (m/s).
435      * @param rangeRateTrackingErrorSD            range rate tracking error Standard
436      *                                            Deviation (SD) expressed in meters
437      *                                            per second (m/s).
438      * @param initialReceiverClockOffset          initial receiver clock offset at
439      *                                            time = 0 expressed in meters (m).
440      * @param initialReceiverClockDrift           initial receiver clock drift at
441      *                                            time = 0 expressed in meters per
442      *                                            second (m/s).
443      * @throws IllegalArgumentException if provided epoch interval is negative or
444      *                                  if number of satellites in constellation is
445      *                                  less than 4 or if orbital radius of
446      *                                  satellites is negative or if SIS error SD is
447      *                                  negative, or if zenith ionosphere error SD
448      *                                  is negative, or if zenith troposphere error
449      *                                  SD is negative, or if code tracking error SD
450      *                                  is negative, or if range rate tracking error
451      *                                  SD is negative.
452      */
453     public GNSSConfig(final double epochInterval,
454                       final Point3D initialEstimatedPosition,
455                       final int numberOfSatellites,
456                       final double orbitalRadiusOfSatellites,
457                       final double satellitesInclinationDegrees,
458                       final double constellationLongitudeOffsetDegrees,
459                       final double constellationTimingOffset,
460                       final double maskAngleDegrees,
461                       final double sisErrorSD,
462                       final double zenithIonosphereErrorSD,
463                       final double zenithTroposphereErrorSD,
464                       final double codeTrackingErrorSD,
465                       final double rangeRateTrackingErrorSD,
466                       final double initialReceiverClockOffset,
467                       final double initialReceiverClockDrift) {
468         setValues(epochInterval, initialEstimatedPosition, numberOfSatellites,
469                 orbitalRadiusOfSatellites, satellitesInclinationDegrees,
470                 constellationLongitudeOffsetDegrees, constellationTimingOffset,
471                 maskAngleDegrees, sisErrorSD, zenithIonosphereErrorSD,
472                 zenithTroposphereErrorSD, codeTrackingErrorSD,
473                 rangeRateTrackingErrorSD, initialReceiverClockOffset,
474                 initialReceiverClockDrift);
475     }
476 
477     /**
478      * Sets values.
479      *
480      * @param epochInterval                minimum interval between GNSS epochs.
481      * @param initialEstimatedPosition     initial estimated position
482      *                                     resolved along ECEF axes and expressed
483      *                                     in meters (m).
484      * @param numberOfSatellites           number of satellites in constellation.
485      * @param orbitalRadiusOfSatellites    orbital radius of satellites.
486      * @param satellitesInclination        inclination angle of satellites.
487      * @param constellationLongitudeOffset longitude offset of constellation.
488      * @param constellationTimingOffset    timing offset of constellation.
489      * @param maskAngle                    mask angle.
490      * @param sisErrorSD                   Signal In Space (SIS) error Standard
491      *                                     Deviation (SD).
492      * @param zenithIonosphereErrorSD      zenith ionosphere error Standard
493      *                                     Deviation (SD).
494      * @param zenithTroposphereErrorSD     zenith troposphere error Standard
495      *                                     Deviation (SD).
496      * @param codeTrackingErrorSD          code tracking error Standard Deviation
497      *                                     (SD).
498      * @param rangeRateTrackingErrorSD     range rate tracking error Standard
499      *                                     Deviation (SD).
500      * @param initialReceiverClockOffset   initial receiver clock offset at time = 0.
501      * @param initialReceiverClockDrift    initial receiver clock drift at time = 0.
502      * @throws IllegalArgumentException if provided epoch interval is negative or
503      *                                  if number of satellites in constellation is
504      *                                  less than 4 or if orbital radius of
505      *                                  satellites is negative or if SIS error SD is
506      *                                  negative, or if zenith ionosphere error SD
507      *                                  is negative, or if zenith troposphere error
508      *                                  SD is negative, or if code tracking error SD
509      *                                  is negative, or if range rate tracking error
510      *                                  SD is negative.
511      */
512     public GNSSConfig(final Time epochInterval,
513                       final Point3D initialEstimatedPosition,
514                       final int numberOfSatellites,
515                       final Distance orbitalRadiusOfSatellites,
516                       final Angle satellitesInclination,
517                       final Angle constellationLongitudeOffset,
518                       final Time constellationTimingOffset,
519                       final Angle maskAngle,
520                       final Distance sisErrorSD,
521                       final Distance zenithIonosphereErrorSD,
522                       final Distance zenithTroposphereErrorSD,
523                       final Speed codeTrackingErrorSD,
524                       final Speed rangeRateTrackingErrorSD,
525                       final Distance initialReceiverClockOffset,
526                       final Speed initialReceiverClockDrift) {
527         setValues(epochInterval, initialEstimatedPosition, numberOfSatellites,
528                 orbitalRadiusOfSatellites, satellitesInclination,
529                 constellationLongitudeOffset, constellationTimingOffset, maskAngle,
530                 sisErrorSD, zenithIonosphereErrorSD, zenithTroposphereErrorSD,
531                 codeTrackingErrorSD, rangeRateTrackingErrorSD,
532                 initialReceiverClockOffset, initialReceiverClockDrift);
533     }
534 
535     /**
536      * Copy constructor.
537      *
538      * @param input input instance to copy data from.
539      */
540     public GNSSConfig(final GNSSConfig input) {
541         copyFrom(input);
542     }
543 
544     /**
545      * Gets minimum interval between GNSS epochs expressed in seconds (s).
546      *
547      * @return minimum interval between GNSS epochs.
548      */
549     public double getEpochInterval() {
550         return epochInterval;
551     }
552 
553     /**
554      * Sets minimum interval between GNSS epochs expressed in seconds (s).
555      *
556      * @param epochInterval minimum interval between GNSS epochs.
557      * @throws IllegalArgumentException if provided value is negative.
558      */
559     public void setEpochInterval(final double epochInterval) {
560         if (epochInterval < 0.0) {
561             throw new IllegalArgumentException();
562         }
563         this.epochInterval = epochInterval;
564     }
565 
566     /**
567      * Gets minimum interval between GNSS epochs.
568      *
569      * @param result instance where minimum interval between GNSS epochs
570      *               will be stored.
571      */
572     public void getEpochIntervalTime(final Time result) {
573         result.setValue(epochInterval);
574         result.setUnit(TimeUnit.SECOND);
575     }
576 
577     /**
578      * Gets minimum interval between GNSS epochs.
579      *
580      * @return minimum interval between GNSS epochs.
581      */
582     public Time getEpochIntervalTime() {
583         return new Time(epochInterval, TimeUnit.SECOND);
584     }
585 
586     /**
587      * Sets minimum interval between GNSS epochs.
588      *
589      * @param epochInterval minimum interval between GNSS epochs.
590      * @throws IllegalArgumentException if provided value is negative.
591      */
592     public void setEpochIntervalTime(final Time epochInterval) {
593         setEpochInterval(TimeConverter.convert(
594                 epochInterval.getValue().doubleValue(), epochInterval.getUnit(), TimeUnit.SECOND));
595     }
596 
597     /**
598      * Gets x coordinate of initial estimated position resolved along ECEF axes and
599      * expressed in meters (m).
600      *
601      * @return x coordinate of initial estimated position.
602      */
603     public double getInitialEstimatedEcefPositionX() {
604         return initialEstimatedEcefPositionX;
605     }
606 
607     /**
608      * Sets x coordinate of initial estimated position resolved along ECEF axes and
609      * expressed in meters (m).
610      *
611      * @param initialEstimatedEcefPositionX x coordinate of initial estimated position.
612      */
613     public void setInitialEstimatedEcefPositionX(final double initialEstimatedEcefPositionX) {
614         this.initialEstimatedEcefPositionX = initialEstimatedEcefPositionX;
615     }
616 
617     /**
618      * Gets x coordinate of initial estimated position resolved along ECEF axes.
619      *
620      * @param result instance where x coordinate of initial estimated position will
621      *               be stored.
622      */
623     public void getInitialEstimatedEcefPositionXDistance(final Distance result) {
624         result.setValue(initialEstimatedEcefPositionX);
625         result.setUnit(DistanceUnit.METER);
626     }
627 
628     /**
629      * Gets x coordinate of initial estimated position resolved along ECEF axes.
630      *
631      * @return x coordinate of initial estimated position.
632      */
633     public Distance getInitialEstimatedEcefPositionXDistance() {
634         return new Distance(initialEstimatedEcefPositionX, DistanceUnit.METER);
635     }
636 
637     /**
638      * Sets x coordinate of initial estimated position resolved along ECEF axes.
639      *
640      * @param initialEstimatedEcefPositionX x coordinate of initial estimated
641      *                                      position.
642      */
643     public void setInitialEstimatedEcefPositionXDistance(final Distance initialEstimatedEcefPositionX) {
644         this.initialEstimatedEcefPositionX = DistanceConverter.convert(
645                 initialEstimatedEcefPositionX.getValue().doubleValue(), initialEstimatedEcefPositionX.getUnit(),
646                 DistanceUnit.METER);
647     }
648 
649     /**
650      * Gets y coordinate of initial estimated position resolved along ECEF axes and
651      * expressed in meters (m).
652      *
653      * @return x coordinate of initial estimated position.
654      */
655     public double getInitialEstimatedEcefPositionY() {
656         return initialEstimatedEcefPositionY;
657     }
658 
659     /**
660      * Sets y coordinate of initial estimated position resolved along ECEF axes and
661      * expressed in meters (m).
662      *
663      * @param initialEstimatedEcefPositionY y coordinate of initial estimated
664      *                                      position.
665      */
666     public void setInitialEstimatedEcefPositionY(final double initialEstimatedEcefPositionY) {
667         this.initialEstimatedEcefPositionY = initialEstimatedEcefPositionY;
668     }
669 
670     /**
671      * Gets y coordinate of initial estimated position resolved along ECEF axes.
672      *
673      * @param result instance where y coordinate of initial estimated position will
674      *               be stored.
675      */
676     public void getInitialEstimatedEcefPositionYDistance(final Distance result) {
677         result.setValue(initialEstimatedEcefPositionY);
678         result.setUnit(DistanceUnit.METER);
679     }
680 
681     /**
682      * Gets y coordinate of initial estimated position resolved along ECEF axes.
683      *
684      * @return y coordinate of initial estimated position.
685      */
686     public Distance getInitialEstimatedEcefPositionYDistance() {
687         return new Distance(initialEstimatedEcefPositionY, DistanceUnit.METER);
688     }
689 
690     /**
691      * Sets y coordinate of initial estimated position resolved along ECEF axes.
692      *
693      * @param initialEstimatedEcefPositionY y coordinate of initial estimated
694      *                                      position.
695      */
696     public void setInitialEstimatedEcefPositionYDistance(final Distance initialEstimatedEcefPositionY) {
697         this.initialEstimatedEcefPositionY = DistanceConverter.convert(
698                 initialEstimatedEcefPositionY.getValue().doubleValue(), initialEstimatedEcefPositionY.getUnit(),
699                 DistanceUnit.METER);
700     }
701 
702     /**
703      * Gets z coordinate of initial estimated position resolved along ECEF axes and
704      * expressed in meters (m).
705      *
706      * @return z coordinate of initial estimated position.
707      */
708     public double getInitialEstimatedEcefPositionZ() {
709         return initialEstimatedEcefPositionZ;
710     }
711 
712     /**
713      * Sets z coordinate of initial estimated position resolved along ECEF axes and
714      * expressed in meters (m).
715      *
716      * @param initialEstimatedEcefPositionZ z coordinate of initial estimated
717      *                                      position.
718      */
719     public void setInitialEstimatedEcefPositionZ(final double initialEstimatedEcefPositionZ) {
720         this.initialEstimatedEcefPositionZ = initialEstimatedEcefPositionZ;
721     }
722 
723     /**
724      * Gets z coordinate of initial estimated position resolved along ECEF axes.
725      *
726      * @param result instance where z coordinate of initial estimated position will
727      *               be stored.
728      */
729     public void getInitialEstimatedEcefPositionZDistance(final Distance result) {
730         result.setValue(initialEstimatedEcefPositionZ);
731         result.setUnit(DistanceUnit.METER);
732     }
733 
734     /**
735      * Gets z coordinate of initial estimated position resolved along ECEF axes.
736      *
737      * @return z coordinate of initial estimated position.
738      */
739     public Distance getInitialEstimatedEcefPositionZDistance() {
740         return new Distance(initialEstimatedEcefPositionZ, DistanceUnit.METER);
741     }
742 
743     /**
744      * Sets z coordinate of initial estimated position resolved along ECEF axes.
745      *
746      * @param initialEstimatedEcefPositionZ z coordinate of initial estimated
747      *                                      position.
748      */
749     public void setInitialEstimatedEcefPositionZDistance(final Distance initialEstimatedEcefPositionZ) {
750         this.initialEstimatedEcefPositionZ = DistanceConverter.convert(
751                 initialEstimatedEcefPositionZ.getValue().doubleValue(), initialEstimatedEcefPositionZ.getUnit(),
752                 DistanceUnit.METER);
753     }
754 
755     /**
756      * Gets initial estimated position resolved along ECEF axes.
757      *
758      * @param result instance where initial estimated position will be stored.
759      */
760     public void getInitialEstimatedEcefPosition(final ECEFPosition result) {
761         result.setCoordinates(initialEstimatedEcefPositionX, initialEstimatedEcefPositionY,
762                 initialEstimatedEcefPositionZ);
763     }
764 
765     /**
766      * Gets initial estimated position resolved along ECEF axes.
767      *
768      * @return initial estimated position.
769      */
770     public ECEFPosition getInitialEstimatedEcefPosition() {
771         return new ECEFPosition(initialEstimatedEcefPositionX, initialEstimatedEcefPositionY,
772                 initialEstimatedEcefPositionZ);
773     }
774 
775     /**
776      * Sets initial estimated position resolved along ECEF axes.
777      *
778      * @param initialEstimatedEcefPosition initial estimated position resolved
779      *                                     along ECEF axes.
780      */
781     public void setInitialEstimatedEcefPosition(final ECEFPosition initialEstimatedEcefPosition) {
782         initialEstimatedEcefPositionX = initialEstimatedEcefPosition.getX();
783         initialEstimatedEcefPositionY = initialEstimatedEcefPosition.getY();
784         initialEstimatedEcefPositionZ = initialEstimatedEcefPosition.getZ();
785     }
786 
787     /**
788      * Gets initial estimated position resolved along ECEF axes and expressed in
789      * meters (m).
790      *
791      * @param result instance where initial estimated position will be stored.
792      */
793     public void getInitialEstimatedPosition(final Point3D result) {
794         result.setInhomogeneousCoordinates(initialEstimatedEcefPositionX, initialEstimatedEcefPositionY,
795                 initialEstimatedEcefPositionZ);
796     }
797 
798     /**
799      * Gets initial estimated position resolved along ECEF axes and expressed in
800      * meters (m).
801      *
802      * @return initial estimated position.
803      */
804     public Point3D getInitialEstimatedPosition() {
805         return new InhomogeneousPoint3D(initialEstimatedEcefPositionX, initialEstimatedEcefPositionY,
806                 initialEstimatedEcefPositionZ);
807     }
808 
809     /**
810      * Sets initial estimated position resolved along ECEF axes and expressed in
811      * meters (m).
812      *
813      * @param initialEstimatedPosition initial estimated position.
814      */
815     public void setInitialEstimatedPosition(final Point3D initialEstimatedPosition) {
816         initialEstimatedEcefPositionX = initialEstimatedPosition.getInhomX();
817         initialEstimatedEcefPositionY = initialEstimatedPosition.getInhomY();
818         initialEstimatedEcefPositionZ = initialEstimatedPosition.getInhomZ();
819     }
820 
821     /**
822      * Gets number of satellites in constellation.
823      *
824      * @return number of satellites in constellation.
825      */
826     public int getNumberOfSatellites() {
827         return numberOfSatellites;
828     }
829 
830     /**
831      * Sets number of satellites in constellation.
832      *
833      * @param numberOfSatellites number of satellites in constellation.
834      * @throws IllegalArgumentException if number of satellites is less than 4, which
835      *                                  prevents proper position estimation.
836      */
837     public void setNumberOfSatellites(final int numberOfSatellites) {
838         if (numberOfSatellites < MIN_SATELLITES) {
839             throw new IllegalArgumentException();
840         }
841         this.numberOfSatellites = numberOfSatellites;
842     }
843 
844     /**
845      * Gets orbital radius of satellites expressed in meters (m).
846      *
847      * @return orbital radius of satellites.
848      */
849     public double getOrbitalRadiusOfSatellites() {
850         return orbitalRadiusOfSatellites;
851     }
852 
853     /**
854      * Sets orbital radius of satellites expressed in meters (m).
855      *
856      * @param orbitalRadiusOfSatellites orbital radius of satellites.
857      * @throws IllegalArgumentException if provided value is negative.
858      */
859     public void setOrbitalRadiusOfSatellites(final double orbitalRadiusOfSatellites) {
860         if (orbitalRadiusOfSatellites < 0.0) {
861             throw new IllegalArgumentException();
862         }
863         this.orbitalRadiusOfSatellites = orbitalRadiusOfSatellites;
864     }
865 
866     /**
867      * Gets orbital radius of satellites.
868      *
869      * @param result instance where orbital radius of satellites will be stored.
870      */
871     public void getOrbitalRadiusOfSatellitesDistance(final Distance result) {
872         result.setValue(orbitalRadiusOfSatellites);
873         result.setUnit(DistanceUnit.METER);
874     }
875 
876     /**
877      * Gets orbital radius of satellites.
878      *
879      * @return orbital radius of satellites.
880      */
881     public Distance getOrbitalRadiusOfSatellitesDistance() {
882         return new Distance(orbitalRadiusOfSatellites, DistanceUnit.METER);
883     }
884 
885     /**
886      * Sets orbital radius of satellites.
887      *
888      * @param orbitalRadiusOfSatellites orbital radius of satellites.
889      * @throws IllegalArgumentException if provided value is negative.
890      */
891     public void setOrbitalRadiusOfSatellitesDistance(final Distance orbitalRadiusOfSatellites) {
892         setOrbitalRadiusOfSatellites(DistanceConverter.convert(orbitalRadiusOfSatellites.getValue().doubleValue(),
893                 orbitalRadiusOfSatellites.getUnit(), DistanceUnit.METER));
894     }
895 
896     /**
897      * Gets inclination angle of satellites expressed in degrees (deg).
898      *
899      * @return inclination angle of satellites.
900      */
901     public double getSatellitesInclinationDegrees() {
902         return satellitesInclinationDegrees;
903     }
904 
905     /**
906      * Sets inclination angle of satellites expressed in degrees (deg).
907      *
908      * @param satellitesInclinationDegrees inclination angle of satellites.
909      */
910     public void setSatellitesInclinationDegrees(final double satellitesInclinationDegrees) {
911         this.satellitesInclinationDegrees = satellitesInclinationDegrees;
912     }
913 
914     /**
915      * Gets inclination angle of satellites.
916      *
917      * @param result instance where inclination angle of satellites will be
918      *               stored.
919      */
920     public void getSatellitesInclinationAngle(final Angle result) {
921         result.setValue(satellitesInclinationDegrees);
922         result.setUnit(AngleUnit.DEGREES);
923     }
924 
925     /**
926      * Gets inclination angle of satellites.
927      *
928      * @return inclination angle of satellites.
929      */
930     public Angle getSatellitesInclinationAngle() {
931         return new Angle(satellitesInclinationDegrees, AngleUnit.DEGREES);
932     }
933 
934     /**
935      * Sets inclination angle of satellites.
936      *
937      * @param satellitesInclination inclination angle of satellites.
938      */
939     public void setSatellitesInclinationAngle(final Angle satellitesInclination) {
940         satellitesInclinationDegrees = AngleConverter.convert(satellitesInclination.getValue().doubleValue(),
941                 satellitesInclination.getUnit(), AngleUnit.DEGREES);
942     }
943 
944     /**
945      * Gets longitude offset of constellation expressed in degrees (deg).
946      *
947      * @return longitude offset of constellation.
948      */
949     public double getConstellationLongitudeOffsetDegrees() {
950         return constellationLongitudeOffsetDegrees;
951     }
952 
953     /**
954      * Sets longitude offset of constellation expressed in degrees (deg).
955      *
956      * @param constellationLongitudeOffsetDegrees longitude offset of constellation.
957      */
958     public void setConstellationLongitudeOffsetDegrees(final double constellationLongitudeOffsetDegrees) {
959         this.constellationLongitudeOffsetDegrees = constellationLongitudeOffsetDegrees;
960     }
961 
962     /**
963      * Gets longitude offset of constellation.
964      *
965      * @param result instance where longitude offset of constellation will be stored.
966      */
967     public void getConstellationLongitudeOffsetAngle(final Angle result) {
968         result.setValue(constellationLongitudeOffsetDegrees);
969         result.setUnit(AngleUnit.DEGREES);
970     }
971 
972     /**
973      * Gets longitude offset of constellation.
974      *
975      * @return longitude offset of constellation.
976      */
977     public Angle getConstellationLongitudeOffsetAngle() {
978         return new Angle(constellationLongitudeOffsetDegrees, AngleUnit.DEGREES);
979     }
980 
981     /**
982      * Sets longitude offset of constellation.
983      *
984      * @param constellationLongitudeOffset longitude offset of constellation.
985      */
986     public void setConstellationLongitudeOffsetAngle(final Angle constellationLongitudeOffset) {
987         constellationLongitudeOffsetDegrees = AngleConverter.convert(
988                 constellationLongitudeOffset.getValue().doubleValue(),
989                 constellationLongitudeOffset.getUnit(), AngleUnit.DEGREES);
990     }
991 
992     /**
993      * Gets timing offset of constellation expressed in seconds (s).
994      *
995      * @return timing offset of constellation.
996      */
997     public double getConstellationTimingOffset() {
998         return constellationTimingOffset;
999     }
1000 
1001     /**
1002      * Sets timing offset of constellation expressed in seconds (s).
1003      *
1004      * @param constellationTimingOffset timing offset of constellation.
1005      */
1006     public void setConstellationTimingOffset(final double constellationTimingOffset) {
1007         this.constellationTimingOffset = constellationTimingOffset;
1008     }
1009 
1010     /**
1011      * Gets timing offset of constellation.
1012      *
1013      * @param result instance where timing offset of constellation will be stored.
1014      */
1015     public void getConstellationTimingOffsetTime(final Time result) {
1016         result.setValue(constellationTimingOffset);
1017         result.setUnit(TimeUnit.SECOND);
1018     }
1019 
1020     /**
1021      * Gets timing offset of constellation.
1022      *
1023      * @return timing offset of constellation.
1024      */
1025     public Time getConstellationTimingOffsetTime() {
1026         return new Time(constellationTimingOffset, TimeUnit.SECOND);
1027     }
1028 
1029     /**
1030      * Sets timing offset of constellation.
1031      *
1032      * @param constellationTimingOffset timing offset of constellation.
1033      */
1034     public void setConstellationTimingOffsetTime(final Time constellationTimingOffset) {
1035         this.constellationTimingOffset = TimeConverter.convert(constellationTimingOffset.getValue().doubleValue(),
1036                 constellationTimingOffset.getUnit(), TimeUnit.SECOND);
1037     }
1038 
1039     /**
1040      * Gets mask angle expressed in degrees (deg).
1041      *
1042      * @return mask angle.
1043      */
1044     public double getMaskAngleDegrees() {
1045         return maskAngleDegrees;
1046     }
1047 
1048     /**
1049      * Sets mask angle expressed in degrees (deg).
1050      *
1051      * @param maskAngleDegrees mask angle.
1052      */
1053     public void setMaskAngleDegrees(final double maskAngleDegrees) {
1054         this.maskAngleDegrees = maskAngleDegrees;
1055     }
1056 
1057     /**
1058      * Gets mask angle.
1059      *
1060      * @param result instance where mask angle will be stored.
1061      */
1062     public void getMaskAngle(final Angle result) {
1063         result.setValue(maskAngleDegrees);
1064         result.setUnit(AngleUnit.DEGREES);
1065     }
1066 
1067     /**
1068      * Gets mask angle.
1069      *
1070      * @return mask angle.
1071      */
1072     public Angle getMaskAngle() {
1073         return new Angle(maskAngleDegrees, AngleUnit.DEGREES);
1074     }
1075 
1076     /**
1077      * Sets mask angle.
1078      *
1079      * @param maskAngle mask angle.
1080      */
1081     public void setMaskAngle(final Angle maskAngle) {
1082         maskAngleDegrees = AngleConverter.convert(maskAngle.getValue().doubleValue(),
1083                 maskAngle.getUnit(), AngleUnit.DEGREES);
1084     }
1085 
1086     /**
1087      * Gets Signal In Space (SIS) error Standard Deviation (SD) expressed in
1088      * meters (m).
1089      *
1090      * @return Signal In Space error Standard Deviation.
1091      */
1092     public double getSISErrorSD() {
1093         return sisErrorSD;
1094     }
1095 
1096     /**
1097      * Sets Signal In Space (SIS) error Standard Deviation (SD) expressed in
1098      * meters (m).
1099      *
1100      * @param sisErrorSD Signal In Space (SIS) error Standard Deviation.
1101      * @throws IllegalArgumentException if provided value is negative.
1102      */
1103     public void setSISErrorSD(final double sisErrorSD) {
1104         if (sisErrorSD < 0.0) {
1105             throw new IllegalArgumentException();
1106         }
1107         this.sisErrorSD = sisErrorSD;
1108     }
1109 
1110     /**
1111      * Gets Signal In Space (SIS) error Standard Deviation (SD).
1112      *
1113      * @param result instance where Signal In Space (SIS) error
1114      *               Standard Deviation (SD) will be stored.
1115      */
1116     public void getSISErrorSDDistance(final Distance result) {
1117         result.setValue(sisErrorSD);
1118         result.setUnit(DistanceUnit.METER);
1119     }
1120 
1121     /**
1122      * Gets Signal In Space (SIS) error Standard Deviation (SD).
1123      *
1124      * @return Signal In Space (SIS) error Standard Deviation (SD).
1125      */
1126     public Distance getSISErrorSDDistance() {
1127         return new Distance(sisErrorSD, DistanceUnit.METER);
1128     }
1129 
1130     /**
1131      * Sets Signal In Space (SIS) error Standard Deviation (SD).
1132      *
1133      * @param sisErrorSD Signal In Space (SIS) error Standard Deviation (SD).
1134      * @throws IllegalArgumentException if provided value is negative.
1135      */
1136     public void setSISErrorSDDistance(final Distance sisErrorSD) {
1137         setSISErrorSD(DistanceConverter.convert(sisErrorSD.getValue().doubleValue(),
1138                 sisErrorSD.getUnit(), DistanceUnit.METER));
1139     }
1140 
1141     /**
1142      * Gets Zenith ionosphere error Standard Deviation (SD) expressed in meters (m).
1143      *
1144      * @return Zenith ionosphere error Standard Deviation.
1145      */
1146     public double getZenithIonosphereErrorSD() {
1147         return zenithIonosphereErrorSD;
1148     }
1149 
1150     /**
1151      * Sets Zenith ionosphere error Standard Deviation (SD) expressed in meters (m).
1152      *
1153      * @param zenithIonosphereErrorSD Zenith ionosphere error Standard Deviation.
1154      * @throws IllegalArgumentException if provided value is negative.
1155      */
1156     public void setZenithIonosphereErrorSD(final double zenithIonosphereErrorSD) {
1157         if (zenithIonosphereErrorSD < 0.0) {
1158             throw new IllegalArgumentException();
1159         }
1160         this.zenithIonosphereErrorSD = zenithIonosphereErrorSD;
1161     }
1162 
1163     /**
1164      * Gets Zenith ionosphere error Standard Deviation (SD).
1165      *
1166      * @param result instance where Zenith ionosphere error Standard Deviation
1167      *               will be stored.
1168      */
1169     public void getZenithIonosphereErrorSDDistance(final Distance result) {
1170         result.setValue(zenithIonosphereErrorSD);
1171         result.setUnit(DistanceUnit.METER);
1172     }
1173 
1174     /**
1175      * Gets Zenith ionosphere error Standard Deviation (SD).
1176      *
1177      * @return Zenith ionosphere error Standard Deviation.
1178      */
1179     public Distance getZenithIonosphereErrorSDDistance() {
1180         return new Distance(zenithIonosphereErrorSD, DistanceUnit.METER);
1181     }
1182 
1183     /**
1184      * Sets Zenith ionosphere error Standard Deviation (SD).
1185      *
1186      * @param zenithIonosphereErrorSD Zenith ionosphere error Standard Deviation.
1187      * @throws IllegalArgumentException if provided value is negative.
1188      */
1189     public void setZenithIonosphereErrorSDDistance(final Distance zenithIonosphereErrorSD) {
1190         setZenithIonosphereErrorSD(DistanceConverter.convert(zenithIonosphereErrorSD.getValue().doubleValue(),
1191                 zenithIonosphereErrorSD.getUnit(), DistanceUnit.METER));
1192     }
1193 
1194     /**
1195      * Gets Zenith troposphere error Standard Deviation (SD) expressed in meters (m).
1196      *
1197      * @return Zenith troposphere error Standard Deviation.
1198      */
1199     public double getZenithTroposphereErrorSD() {
1200         return zenithTroposphereErrorSD;
1201     }
1202 
1203     /**
1204      * Sets Zenith troposphere error Standard Deviation (SD) expressed in meters (m).
1205      *
1206      * @param zenithTroposphereErrorSD Zenith troposphere error Standard Deviation.
1207      * @throws IllegalArgumentException if provided value is negative.
1208      */
1209     public void setZenithTroposphereErrorSD(final double zenithTroposphereErrorSD) {
1210         if (zenithTroposphereErrorSD < 0.0) {
1211             throw new IllegalArgumentException();
1212         }
1213         this.zenithTroposphereErrorSD = zenithTroposphereErrorSD;
1214     }
1215 
1216     /**
1217      * Gets Zenith troposphere error Standard Deviation (SD).
1218      *
1219      * @param result instance where Zenith troposphere error Standard Deviation (SD)
1220      *               will be stored.
1221      */
1222     public void getZenithTroposphereErrorSDDistance(final Distance result) {
1223         result.setValue(zenithTroposphereErrorSD);
1224         result.setUnit(DistanceUnit.METER);
1225     }
1226 
1227     /**
1228      * Gets Zenith troposphere error Standard Deviation (SD).
1229      *
1230      * @return Zenith troposphere error Standard Deviation (SD).
1231      */
1232     public Distance getZenithTroposphereErrorSDDistance() {
1233         return new Distance(zenithTroposphereErrorSD, DistanceUnit.METER);
1234     }
1235 
1236     /**
1237      * Sets Zenith troposphere error Standard Deviation (SD).
1238      *
1239      * @param zenithTroposphereErrorSD Zenith troposphere error Standard Deviation.
1240      * @throws IllegalArgumentException if provided value is negative.
1241      */
1242     public void setZenithTroposphereErrorSDDistance(final Distance zenithTroposphereErrorSD) {
1243         setZenithTroposphereErrorSD(DistanceConverter.convert(zenithTroposphereErrorSD.getValue().doubleValue(),
1244                 zenithTroposphereErrorSD.getUnit(), DistanceUnit.METER));
1245     }
1246 
1247     /**
1248      * Gets code tracking error Standard Deviation (SD) expressed in meters per
1249      * second (m/s).
1250      *
1251      * @return code tracking error Standard Deviation (SD).
1252      */
1253     public double getCodeTrackingErrorSD() {
1254         return codeTrackingErrorSD;
1255     }
1256 
1257     /**
1258      * Sets code tracking error Standard Deviation (SD) expressed in meters per
1259      * second (m/s).
1260      *
1261      * @param codeTrackingErrorSD code tracking error Standard Deviation (SD).
1262      * @throws IllegalArgumentException if provided value is negative.
1263      */
1264     public void setCodeTrackingErrorSD(final double codeTrackingErrorSD) {
1265         if (codeTrackingErrorSD < 0.0) {
1266             throw new IllegalArgumentException();
1267         }
1268         this.codeTrackingErrorSD = codeTrackingErrorSD;
1269     }
1270 
1271     /**
1272      * Gets code tracking error Standard Deviation (SD).
1273      *
1274      * @param result instance where code tracking error Standard Deviation will
1275      *               be stored.
1276      */
1277     public void getCodeTrackingErrorSDSpeed(final Speed result) {
1278         result.setValue(codeTrackingErrorSD);
1279         result.setUnit(SpeedUnit.METERS_PER_SECOND);
1280     }
1281 
1282     /**
1283      * Gets code tracking error Standard Deviation (SD).
1284      *
1285      * @return code tracking error Standard Deviation.
1286      */
1287     public Speed getCodeTrackingErrorSDSpeed() {
1288         return new Speed(codeTrackingErrorSD, SpeedUnit.METERS_PER_SECOND);
1289     }
1290 
1291     /**
1292      * Sets code tracking error Standard Deviation (SD).
1293      *
1294      * @param codeTrackingErrorSD code tracking error Standard Deviation.
1295      * @throws IllegalArgumentException if provided value is negative.
1296      */
1297     public void setCodeTrackingErrorSDSpeed(final Speed codeTrackingErrorSD) {
1298         setCodeTrackingErrorSD(SpeedConverter.convert(codeTrackingErrorSD.getValue().doubleValue(),
1299                 codeTrackingErrorSD.getUnit(), SpeedUnit.METERS_PER_SECOND));
1300     }
1301 
1302     /**
1303      * Gets range rate tracking error Standard Deviation (SD) expressed in meters
1304      * per second (m/s).
1305      *
1306      * @return range rate tracking error.
1307      */
1308     public double getRangeRateTrackingErrorSD() {
1309         return rangeRateTrackingErrorSD;
1310     }
1311 
1312     /**
1313      * Sets range rate tracking error Standard Deviation (SD) expressed in meters
1314      * per second (m/s).
1315      *
1316      * @param rangeRateTrackingErrorSD range rate tracking error Standard Deviation.
1317      * @throws IllegalArgumentException if provided value is negative.
1318      */
1319     public void setRangeRateTrackingErrorSD(final double rangeRateTrackingErrorSD) {
1320         if (rangeRateTrackingErrorSD < 0.0) {
1321             throw new IllegalArgumentException();
1322         }
1323         this.rangeRateTrackingErrorSD = rangeRateTrackingErrorSD;
1324     }
1325 
1326     /**
1327      * Gets range rate tracking error Standard Deviation (SD).
1328      *
1329      * @param result instance where range rate tracking error Standard Deviation will
1330      *               be stored.
1331      */
1332     public void getRangeRateTrackingErrorSDSpeed(final Speed result) {
1333         result.setValue(rangeRateTrackingErrorSD);
1334         result.setUnit(SpeedUnit.METERS_PER_SECOND);
1335     }
1336 
1337     /**
1338      * Gets range rate tracking error Standard Deviation (SD).
1339      *
1340      * @return range rate tracking error.
1341      */
1342     public Speed getRangeRateTrackingErrorSDSpeed() {
1343         return new Speed(rangeRateTrackingErrorSD, SpeedUnit.METERS_PER_SECOND);
1344     }
1345 
1346     /**
1347      * Sets range rate tracking error Standard Deviation (SD).
1348      *
1349      * @param rangeRateTrackingErrorSD range rate tracking error.
1350      * @throws IllegalArgumentException if provided value is negative.
1351      */
1352     public void setRangeRateTrackingErrorSDSpeed(final Speed rangeRateTrackingErrorSD) {
1353         setRangeRateTrackingErrorSD(SpeedConverter.convert(rangeRateTrackingErrorSD.getValue().doubleValue(),
1354                 rangeRateTrackingErrorSD.getUnit(), SpeedUnit.METERS_PER_SECOND));
1355     }
1356 
1357     /**
1358      * Gets initial receiver clock offset at time = 0 expressed in meters (m).
1359      *
1360      * @return initial receiver clock offset.
1361      */
1362     public double getInitialReceiverClockOffset() {
1363         return initialReceiverClockOffset;
1364     }
1365 
1366     /**
1367      * Sets initial receiver clock offset at time = 0 expressed in meters (m).
1368      *
1369      * @param initialReceiverClockOffset initial receiver clock offset.
1370      */
1371     public void setInitialReceiverClockOffset(final double initialReceiverClockOffset) {
1372         this.initialReceiverClockOffset = initialReceiverClockOffset;
1373     }
1374 
1375     /**
1376      * Gets initial receiver clock offset at time = 0.
1377      *
1378      * @param result instance where initial receiver clock offset will be stored.
1379      */
1380     public void getInitialReceiverClockOffsetDistance(final Distance result) {
1381         result.setValue(initialReceiverClockOffset);
1382         result.setUnit(DistanceUnit.METER);
1383     }
1384 
1385     /**
1386      * Gets initial receiver clock offset at time = 0.
1387      *
1388      * @return initial receiver clock offset.
1389      */
1390     public Distance getInitialReceiverClockOffsetDistance() {
1391         return new Distance(initialReceiverClockOffset, DistanceUnit.METER);
1392     }
1393 
1394     /**
1395      * Sets initial receiver clock offset at time = 0.
1396      *
1397      * @param initialReceiverClockOffset initial receiver clock offset.
1398      */
1399     public void setInitialReceiverClockOffsetDistance(final Distance initialReceiverClockOffset) {
1400         this.initialReceiverClockOffset = DistanceConverter.convert(initialReceiverClockOffset.getValue().doubleValue(),
1401                 initialReceiverClockOffset.getUnit(), DistanceUnit.METER);
1402     }
1403 
1404     /**
1405      * Gets initial receiver clock drift at time = 0 expressed in meters per
1406      * second (m/s).
1407      *
1408      * @return initial receiver clock drift.
1409      */
1410     public double getInitialReceiverClockDrift() {
1411         return initialReceiverClockDrift;
1412     }
1413 
1414     /**
1415      * Sets initial receiver clock drift at time = 0 expressed in meters per
1416      * second (m/s).
1417      *
1418      * @param initialReceiverClockDrift initial receiver clock drift.
1419      */
1420     public void setInitialReceiverClockDrift(final double initialReceiverClockDrift) {
1421         this.initialReceiverClockDrift = initialReceiverClockDrift;
1422     }
1423 
1424     /**
1425      * Gets initial receiver clock drift at time = 0.
1426      *
1427      * @param result instance where initial receiver clock drift at time = 0 will
1428      *               be stored.
1429      */
1430     public void getInitialReceiverClockDriftSpeed(final Speed result) {
1431         result.setValue(initialReceiverClockDrift);
1432         result.setUnit(SpeedUnit.METERS_PER_SECOND);
1433     }
1434 
1435     /**
1436      * Gets initial receiver clock drift at time = 0.
1437      *
1438      * @return initial receiver clock drift at time = 0.
1439      */
1440     public Speed getInitialReceiverClockDriftSpeed() {
1441         return new Speed(initialReceiverClockDrift, SpeedUnit.METERS_PER_SECOND);
1442     }
1443 
1444     /**
1445      * Sets initial receiver clock drift at time = 0.
1446      *
1447      * @param initialReceiverClockDrift initial receiver clock drift at time = 0.
1448      */
1449     public void setInitialReceiverClockDriftSpeed(final Speed initialReceiverClockDrift) {
1450         this.initialReceiverClockDrift = SpeedConverter.convert(initialReceiverClockDrift.getValue().doubleValue(),
1451                 initialReceiverClockDrift.getUnit(), SpeedUnit.METERS_PER_SECOND);
1452     }
1453 
1454     /**
1455      * Sets values.
1456      *
1457      * @param epochInterval                       minimum interval between GNSS
1458      *                                            epochs expressed in seconds (s).
1459      * @param initialEstimatedEcefPositionX       x coordinate of initial estimated
1460      *                                            position resolved along ECEF axes
1461      *                                            and expressed in meters (m).
1462      * @param initialEstimatedEcefPositionY       y coordinate of initial estimated
1463      *                                            position resolved along ECEF axes
1464      *                                            and expressed in meters (m).
1465      * @param initialEstimatedEcefPositionZ       z coordinate of initial estimated
1466      *                                            position resolved along ECEF axes
1467      *                                            and expressed in meters (m).
1468      * @param numberOfSatellites                  number of satellites in constellation.
1469      * @param orbitalRadiusOfSatellites           orbital radius of satellites
1470      *                                            expressed in meters (m).
1471      * @param satellitesInclinationDegrees        inclination angle of satellites
1472      *                                            expressed in degrees (deg).
1473      * @param constellationLongitudeOffsetDegrees longitude offset of constellation
1474      *                                            expressed in degrees (deg).
1475      * @param constellationTimingOffset           timing offset of constellation
1476      *                                            expressed in seconds (s).
1477      * @param maskAngleDegrees                    mask angle expressed in degrees
1478      *                                            (deg).
1479      * @param sisErrorSD                          Signal In Space (SIS) error
1480      *                                            Standard Deviation (SD) expressed
1481      *                                            in meters (m).
1482      * @param zenithIonosphereErrorSD             zenith ionosphere error Standard
1483      *                                            Deviation (SD) expressed in meters
1484      *                                            (m).
1485      * @param zenithTroposphereErrorSD            zenith troposphere error Standard
1486      *                                            Deviation (SD) expressed in meters
1487      *                                            (m).
1488      * @param codeTrackingErrorSD                 code tracking error Standard
1489      *                                            Deviation (SD) expressed in meters
1490      *                                            per second (m/s).
1491      * @param rangeRateTrackingErrorSD            range rate tracking error Standard
1492      *                                            Deviation (SD) expressed in meters
1493      *                                            per second (m/s).
1494      * @param initialReceiverClockOffset          initial receiver clock offset at
1495      *                                            time = 0 expressed in meters (m).
1496      * @param initialReceiverClockDrift           initial receiver clock drift at
1497      *                                            time = 0 expressed in meters per
1498      *                                            second (m/s).
1499      * @throws IllegalArgumentException if provided epoch interval is negative or
1500      *                                  if number of satellites in constellation is
1501      *                                  less than 4 or if orbital radius of
1502      *                                  satellites is negative or if SIS error SD is
1503      *                                  negative, or if zenith ionosphere error SD
1504      *                                  is negative, or if zenith troposphere error
1505      *                                  SD is negative, or if code tracking error SD
1506      *                                  is negative, or if range rate tracking error
1507      *                                  SD is negative.
1508      */
1509     public void setValues(final double epochInterval,
1510                           final double initialEstimatedEcefPositionX,
1511                           final double initialEstimatedEcefPositionY,
1512                           final double initialEstimatedEcefPositionZ,
1513                           final int numberOfSatellites,
1514                           final double orbitalRadiusOfSatellites,
1515                           final double satellitesInclinationDegrees,
1516                           final double constellationLongitudeOffsetDegrees,
1517                           final double constellationTimingOffset,
1518                           final double maskAngleDegrees,
1519                           final double sisErrorSD,
1520                           final double zenithIonosphereErrorSD,
1521                           final double zenithTroposphereErrorSD,
1522                           final double codeTrackingErrorSD,
1523                           final double rangeRateTrackingErrorSD,
1524                           final double initialReceiverClockOffset,
1525                           final double initialReceiverClockDrift) {
1526         setEpochInterval(epochInterval);
1527         this.initialEstimatedEcefPositionX = initialEstimatedEcefPositionX;
1528         this.initialEstimatedEcefPositionY = initialEstimatedEcefPositionY;
1529         this.initialEstimatedEcefPositionZ = initialEstimatedEcefPositionZ;
1530         setNumberOfSatellites(numberOfSatellites);
1531         setOrbitalRadiusOfSatellites(orbitalRadiusOfSatellites);
1532         this.satellitesInclinationDegrees = satellitesInclinationDegrees;
1533         this.constellationLongitudeOffsetDegrees = constellationLongitudeOffsetDegrees;
1534         this.constellationTimingOffset = constellationTimingOffset;
1535         this.maskAngleDegrees = maskAngleDegrees;
1536         setSISErrorSD(sisErrorSD);
1537         setZenithIonosphereErrorSD(zenithIonosphereErrorSD);
1538         setZenithTroposphereErrorSD(zenithTroposphereErrorSD);
1539         setCodeTrackingErrorSD(codeTrackingErrorSD);
1540         setRangeRateTrackingErrorSD(rangeRateTrackingErrorSD);
1541         this.initialReceiverClockOffset = initialReceiverClockOffset;
1542         this.initialReceiverClockDrift = initialReceiverClockDrift;
1543     }
1544 
1545     /**
1546      * Sets values.
1547      *
1548      * @param epochInterval                 minimum interval between GNSS epochs.
1549      * @param initialEstimatedEcefPositionX x coordinate of initial estimated
1550      *                                      position resolved along ECEF axes.
1551      * @param initialEstimatedEcefPositionY y coordinate of initial estimated
1552      *                                      position resolved along ECEF axes.
1553      * @param initialEstimatedEcefPositionZ z coordinate of initial estimated
1554      *                                      position resolved along ECEF axes.
1555      * @param numberOfSatellites            number of satellites in constellation.
1556      * @param orbitalRadiusOfSatellites     orbital radius of satellites.
1557      * @param satellitesInclination         inclination angle of satellites.
1558      * @param constellationLongitudeOffset  longitude offset of constellation.
1559      * @param constellationTimingOffset     timing offset of constellation.
1560      * @param maskAngle                     mask angle.
1561      * @param sisErrorSD                    Signal In Space (SIS) error Standard
1562      *                                      Deviation (SD).
1563      * @param zenithIonosphereErrorSD       zenith ionosphere error Standard
1564      *                                      Deviation (SD).
1565      * @param zenithTroposphereErrorSD      zenith troposphere error Standard
1566      *                                      Deviation (SD).
1567      * @param codeTrackingErrorSD           code tracking error Standard Deviation
1568      *                                      (SD).
1569      * @param rangeRateTrackingErrorSD      range rate tracking error Standard
1570      *                                      Deviation (SD).
1571      * @param initialReceiverClockOffset    initial receiver clock offset at time = 0.
1572      * @param initialReceiverClockDrift     initial receiver clock drift at time = 0.
1573      * @throws IllegalArgumentException if provided epoch interval is negative or
1574      *                                  if number of satellites in constellation is
1575      *                                  less than 4 or if orbital radius of
1576      *                                  satellites is negative or if SIS error SD is
1577      *                                  negative, or if zenith ionosphere error SD
1578      *                                  is negative, or if zenith troposphere error
1579      *                                  SD is negative, or if code tracking error SD
1580      *                                  is negative, or if range rate tracking error
1581      *                                  SD is negative.
1582      */
1583     public void setValues(final Time epochInterval,
1584                           final Distance initialEstimatedEcefPositionX,
1585                           final Distance initialEstimatedEcefPositionY,
1586                           final Distance initialEstimatedEcefPositionZ,
1587                           final int numberOfSatellites,
1588                           final Distance orbitalRadiusOfSatellites,
1589                           final Angle satellitesInclination,
1590                           final Angle constellationLongitudeOffset,
1591                           final Time constellationTimingOffset,
1592                           final Angle maskAngle,
1593                           final Distance sisErrorSD,
1594                           final Distance zenithIonosphereErrorSD,
1595                           final Distance zenithTroposphereErrorSD,
1596                           final Speed codeTrackingErrorSD,
1597                           final Speed rangeRateTrackingErrorSD,
1598                           final Distance initialReceiverClockOffset,
1599                           final Speed initialReceiverClockDrift) {
1600         setEpochIntervalTime(epochInterval);
1601         setInitialEstimatedEcefPositionXDistance(initialEstimatedEcefPositionX);
1602         setInitialEstimatedEcefPositionYDistance(initialEstimatedEcefPositionY);
1603         setInitialEstimatedEcefPositionZDistance(initialEstimatedEcefPositionZ);
1604         internalSetValues(numberOfSatellites, orbitalRadiusOfSatellites, satellitesInclination,
1605                 constellationLongitudeOffset, constellationTimingOffset, maskAngle, sisErrorSD, zenithIonosphereErrorSD,
1606                 zenithTroposphereErrorSD, codeTrackingErrorSD, rangeRateTrackingErrorSD, initialReceiverClockOffset,
1607                 initialReceiverClockDrift);
1608     }
1609 
1610     /**
1611      * Sets values.
1612      *
1613      * @param epochInterval                       minimum interval between GNSS
1614      *                                            epochs expressed in seconds (s).
1615      * @param initialEstimatedEcefPosition        initial estimated position
1616      *                                            resolved along ECEF axes.
1617      * @param numberOfSatellites                  number of satellites in
1618      *                                            constellation.
1619      * @param orbitalRadiusOfSatellites           orbital radius of satellites
1620      *                                            expressed in meters (m).
1621      * @param satellitesInclinationDegrees        inclination angle of satellites
1622      *                                            expressed in degrees (deg).
1623      * @param constellationLongitudeOffsetDegrees longitude offset of constellation
1624      *                                            expressed in degrees (deg).
1625      * @param constellationTimingOffset           timing offset of constellation
1626      *                                            expressed in seconds (s).
1627      * @param maskAngleDegrees                    mask angle expressed in degrees
1628      *                                            (deg).
1629      * @param sisErrorSD                          Signal In Space (SIS) error
1630      *                                            Standard Deviation (SD) expressed
1631      *                                            in meters (m).
1632      * @param zenithIonosphereErrorSD             zenith ionosphere error Standard
1633      *                                            Deviation (SD) expressed in meters
1634      *                                            (m).
1635      * @param zenithTroposphereErrorSD            zenith troposphere error Standard
1636      *                                            Deviation (SD) expressed in meters
1637      *                                            (m).
1638      * @param codeTrackingErrorSD                 code tracking error Standard
1639      *                                            Deviation (SD) expressed in meters
1640      *                                            per second (m/s).
1641      * @param rangeRateTrackingErrorSD            range rate tracking error Standard
1642      *                                            Deviation (SD) expressed in meters
1643      *                                            per second (m/s).
1644      * @param initialReceiverClockOffset          initial receiver clock offset at
1645      *                                            time = 0 expressed in meters (m).
1646      * @param initialReceiverClockDrift           initial receiver clock drift at
1647      *                                            time = 0 expressed in meters per
1648      *                                            second (m/s).
1649      * @throws IllegalArgumentException if provided epoch interval is negative or
1650      *                                  if number of satellites in constellation is
1651      *                                  less than 4 or if orbital radius of
1652      *                                  satellites is negative or if SIS error SD is
1653      *                                  negative, or if zenith ionosphere error SD
1654      *                                  is negative, or if zenith troposphere error
1655      *                                  SD is negative, or if code tracking error SD
1656      *                                  is negative, or if range rate tracking error
1657      *                                  SD is negative.
1658      */
1659     public void setValues(final double epochInterval,
1660                           final ECEFPosition initialEstimatedEcefPosition,
1661                           final int numberOfSatellites,
1662                           final double orbitalRadiusOfSatellites,
1663                           final double satellitesInclinationDegrees,
1664                           final double constellationLongitudeOffsetDegrees,
1665                           final double constellationTimingOffset,
1666                           final double maskAngleDegrees,
1667                           final double sisErrorSD,
1668                           final double zenithIonosphereErrorSD,
1669                           final double zenithTroposphereErrorSD,
1670                           final double codeTrackingErrorSD,
1671                           final double rangeRateTrackingErrorSD,
1672                           final double initialReceiverClockOffset,
1673                           final double initialReceiverClockDrift) {
1674         setValues(epochInterval, initialEstimatedEcefPosition.getX(), initialEstimatedEcefPosition.getY(),
1675                 initialEstimatedEcefPosition.getZ(), numberOfSatellites, orbitalRadiusOfSatellites,
1676                 satellitesInclinationDegrees, constellationLongitudeOffsetDegrees, constellationTimingOffset,
1677                 maskAngleDegrees, sisErrorSD, zenithIonosphereErrorSD, zenithTroposphereErrorSD, codeTrackingErrorSD,
1678                 rangeRateTrackingErrorSD, initialReceiverClockOffset, initialReceiverClockDrift);
1679     }
1680 
1681     /**
1682      * Sets values.
1683      *
1684      * @param epochInterval                minimum interval between GNSS epochs.
1685      * @param initialEstimatedEcefPosition initial estimated position
1686      *                                     resolved along ECEF axes.
1687      * @param numberOfSatellites           number of satellites in constellation.
1688      * @param orbitalRadiusOfSatellites    orbital radius of satellites.
1689      * @param satellitesInclination        inclination angle of satellites.
1690      * @param constellationLongitudeOffset longitude offset of constellation.
1691      * @param constellationTimingOffset    timing offset of constellation.
1692      * @param maskAngle                    mask angle.
1693      * @param sisErrorSD                   Signal In Space (SIS) error Standard
1694      *                                     Deviation (SD).
1695      * @param zenithIonosphereErrorSD      zenith ionosphere error Standard
1696      *                                     Deviation (SD).
1697      * @param zenithTroposphereErrorSD     zenith troposphere error Standard
1698      *                                     Deviation (SD).
1699      * @param codeTrackingErrorSD          code tracking error Standard Deviation
1700      *                                     (SD).
1701      * @param rangeRateTrackingErrorSD     range rate tracking error Standard
1702      *                                     Deviation (SD).
1703      * @param initialReceiverClockOffset   initial receiver clock offset at time = 0.
1704      * @param initialReceiverClockDrift    initial receiver clock drift at time = 0.
1705      * @throws IllegalArgumentException if provided epoch interval is negative or
1706      *                                  if number of satellites in constellation is
1707      *                                  less than 4 or if orbital radius of
1708      *                                  satellites is negative or if SIS error SD is
1709      *                                  negative, or if zenith ionosphere error SD
1710      *                                  is negative, or if zenith troposphere error
1711      *                                  SD is negative, or if code tracking error SD
1712      *                                  is negative, or if range rate tracking error
1713      *                                  SD is negative.
1714      */
1715     public void setValues(final Time epochInterval,
1716                           final ECEFPosition initialEstimatedEcefPosition,
1717                           final int numberOfSatellites,
1718                           final Distance orbitalRadiusOfSatellites,
1719                           final Angle satellitesInclination,
1720                           final Angle constellationLongitudeOffset,
1721                           final Time constellationTimingOffset,
1722                           final Angle maskAngle,
1723                           final Distance sisErrorSD,
1724                           final Distance zenithIonosphereErrorSD,
1725                           final Distance zenithTroposphereErrorSD,
1726                           final Speed codeTrackingErrorSD,
1727                           final Speed rangeRateTrackingErrorSD,
1728                           final Distance initialReceiverClockOffset,
1729                           final Speed initialReceiverClockDrift) {
1730         setEpochIntervalTime(epochInterval);
1731         setInitialEstimatedEcefPosition(initialEstimatedEcefPosition);
1732         internalSetValues(numberOfSatellites, orbitalRadiusOfSatellites, satellitesInclination,
1733                 constellationLongitudeOffset, constellationTimingOffset, maskAngle, sisErrorSD, zenithIonosphereErrorSD,
1734                 zenithTroposphereErrorSD, codeTrackingErrorSD, rangeRateTrackingErrorSD, initialReceiverClockOffset,
1735                 initialReceiverClockDrift);
1736     }
1737 
1738     /**
1739      * Sets values.
1740      *
1741      * @param epochInterval                       minimum interval between GNSS
1742      *                                            epochs expressed in seconds (s).
1743      * @param initialEstimatedPosition            initial estimated position
1744      *                                            resolved along ECEF axes and expressed
1745      *                                            in meters (m).
1746      * @param numberOfSatellites                  number of satellites in
1747      *                                            constellation.
1748      * @param orbitalRadiusOfSatellites           orbital radius of satellites
1749      *                                            expressed in meters (m).
1750      * @param satellitesInclinationDegrees        inclination angle of satellites
1751      *                                            expressed in degrees (deg).
1752      * @param constellationLongitudeOffsetDegrees longitude offset of constellation
1753      *                                            expressed in degrees (deg).
1754      * @param constellationTimingOffset           timing offset of constellation
1755      *                                            expressed in seconds (s).
1756      * @param maskAngleDegrees                    mask angle expressed in degrees
1757      *                                            (deg).
1758      * @param sisErrorSD                          Signal In Space (SIS) error
1759      *                                            Standard Deviation (SD) expressed
1760      *                                            in meters (m).
1761      * @param zenithIonosphereErrorSD             zenith ionosphere error Standard
1762      *                                            Deviation (SD) expressed in meters
1763      *                                            (m).
1764      * @param zenithTroposphereErrorSD            zenith troposphere error Standard
1765      *                                            Deviation (SD) expressed in meters
1766      *                                            (m).
1767      * @param codeTrackingErrorSD                 code tracking error Standard
1768      *                                            Deviation (SD) expressed in meters
1769      *                                            per second (m/s).
1770      * @param rangeRateTrackingErrorSD            range rate tracking error Standard
1771      *                                            Deviation (SD) expressed in meters
1772      *                                            per second (m/s).
1773      * @param initialReceiverClockOffset          initial receiver clock offset at
1774      *                                            time = 0 expressed in meters (m).
1775      * @param initialReceiverClockDrift           initial receiver clock drift at
1776      *                                            time = 0 expressed in meters per
1777      *                                            second (m/s).
1778      * @throws IllegalArgumentException if provided epoch interval is negative or
1779      *                                  if number of satellites in constellation is
1780      *                                  less than 4 or if orbital radius of
1781      *                                  satellites is negative or if SIS error SD is
1782      *                                  negative, or if zenith ionosphere error SD
1783      *                                  is negative, or if zenith troposphere error
1784      *                                  SD is negative, or if code tracking error SD
1785      *                                  is negative, or if range rate tracking error
1786      *                                  SD is negative.
1787      */
1788     public void setValues(final double epochInterval,
1789                           final Point3D initialEstimatedPosition,
1790                           final int numberOfSatellites,
1791                           final double orbitalRadiusOfSatellites,
1792                           final double satellitesInclinationDegrees,
1793                           final double constellationLongitudeOffsetDegrees,
1794                           final double constellationTimingOffset,
1795                           final double maskAngleDegrees,
1796                           final double sisErrorSD,
1797                           final double zenithIonosphereErrorSD,
1798                           final double zenithTroposphereErrorSD,
1799                           final double codeTrackingErrorSD,
1800                           final double rangeRateTrackingErrorSD,
1801                           final double initialReceiverClockOffset,
1802                           final double initialReceiverClockDrift) {
1803         setValues(epochInterval, initialEstimatedPosition.getInhomX(), initialEstimatedPosition.getInhomY(),
1804                 initialEstimatedPosition.getInhomZ(), numberOfSatellites, orbitalRadiusOfSatellites,
1805                 satellitesInclinationDegrees, constellationLongitudeOffsetDegrees, constellationTimingOffset,
1806                 maskAngleDegrees, sisErrorSD, zenithIonosphereErrorSD, zenithTroposphereErrorSD, codeTrackingErrorSD,
1807                 rangeRateTrackingErrorSD, initialReceiverClockOffset, initialReceiverClockDrift);
1808     }
1809 
1810     /**
1811      * Sets values.
1812      *
1813      * @param epochInterval                minimum interval between GNSS epochs.
1814      * @param initialEstimatedPosition     initial estimated position
1815      *                                     resolved along ECEF axes and expressed
1816      *                                     in meters (m).
1817      * @param numberOfSatellites           number of satellites in constellation.
1818      * @param orbitalRadiusOfSatellites    orbital radius of satellites.
1819      * @param satellitesInclination        inclination angle of satellites.
1820      * @param constellationLongitudeOffset longitude offset of constellation.
1821      * @param constellationTimingOffset    timing offset of constellation.
1822      * @param maskAngle                    mask angle.
1823      * @param sisErrorSD                   Signal In Space (SIS) error Standard
1824      *                                     Deviation (SD).
1825      * @param zenithIonosphereErrorSD      zenith ionosphere error Standard
1826      *                                     Deviation (SD).
1827      * @param zenithTroposphereErrorSD     zenith troposphere error Standard
1828      *                                     Deviation (SD).
1829      * @param codeTrackingErrorSD          code tracking error Standard Deviation
1830      *                                     (SD).
1831      * @param rangeRateTrackingErrorSD     range rate tracking error Standard
1832      *                                     Deviation (SD).
1833      * @param initialReceiverClockOffset   initial receiver clock offset at time = 0.
1834      * @param initialReceiverClockDrift    initial receiver clock drift at time = 0.
1835      * @throws IllegalArgumentException if provided epoch interval is negative or
1836      *                                  if number of satellites in constellation is
1837      *                                  less than 4 or if orbital radius of
1838      *                                  satellites is negative or if SIS error SD is
1839      *                                  negative, or if zenith ionosphere error SD
1840      *                                  is negative, or if zenith troposphere error
1841      *                                  SD is negative, or if code tracking error SD
1842      *                                  is negative, or if range rate tracking error
1843      *                                  SD is negative.
1844      */
1845     public void setValues(final Time epochInterval,
1846                           final Point3D initialEstimatedPosition,
1847                           final int numberOfSatellites,
1848                           final Distance orbitalRadiusOfSatellites,
1849                           final Angle satellitesInclination,
1850                           final Angle constellationLongitudeOffset,
1851                           final Time constellationTimingOffset,
1852                           final Angle maskAngle,
1853                           final Distance sisErrorSD,
1854                           final Distance zenithIonosphereErrorSD,
1855                           final Distance zenithTroposphereErrorSD,
1856                           final Speed codeTrackingErrorSD,
1857                           final Speed rangeRateTrackingErrorSD,
1858                           final Distance initialReceiverClockOffset,
1859                           final Speed initialReceiverClockDrift) {
1860         setEpochIntervalTime(epochInterval);
1861         setInitialEstimatedPosition(initialEstimatedPosition);
1862         internalSetValues(numberOfSatellites, orbitalRadiusOfSatellites, satellitesInclination,
1863                 constellationLongitudeOffset, constellationTimingOffset, maskAngle, sisErrorSD, zenithIonosphereErrorSD,
1864                 zenithTroposphereErrorSD, codeTrackingErrorSD, rangeRateTrackingErrorSD, initialReceiverClockOffset,
1865                 initialReceiverClockDrift);
1866     }
1867 
1868     /**
1869      * Copies this instance data into provided instance.
1870      *
1871      * @param output destination instance where data will be copied to.
1872      */
1873     public void copyTo(final GNSSConfig output) {
1874         output.epochInterval = epochInterval;
1875         output.initialEstimatedEcefPositionX = initialEstimatedEcefPositionX;
1876         output.initialEstimatedEcefPositionY = initialEstimatedEcefPositionY;
1877         output.initialEstimatedEcefPositionZ = initialEstimatedEcefPositionZ;
1878         output.numberOfSatellites = numberOfSatellites;
1879         output.orbitalRadiusOfSatellites = orbitalRadiusOfSatellites;
1880         output.satellitesInclinationDegrees = satellitesInclinationDegrees;
1881         output.constellationLongitudeOffsetDegrees = constellationLongitudeOffsetDegrees;
1882         output.constellationTimingOffset = constellationTimingOffset;
1883         output.maskAngleDegrees = maskAngleDegrees;
1884         output.sisErrorSD = sisErrorSD;
1885         output.zenithIonosphereErrorSD = zenithIonosphereErrorSD;
1886         output.zenithTroposphereErrorSD = zenithTroposphereErrorSD;
1887         output.codeTrackingErrorSD = codeTrackingErrorSD;
1888         output.rangeRateTrackingErrorSD = rangeRateTrackingErrorSD;
1889         output.initialReceiverClockOffset = initialReceiverClockOffset;
1890         output.initialReceiverClockDrift = initialReceiverClockDrift;
1891     }
1892 
1893     /**
1894      * Copies data of provided instance into this instance.
1895      *
1896      * @param input instance to copy data from.
1897      */
1898     public void copyFrom(final GNSSConfig input) {
1899         epochInterval = input.epochInterval;
1900         initialEstimatedEcefPositionX = input.initialEstimatedEcefPositionX;
1901         initialEstimatedEcefPositionY = input.initialEstimatedEcefPositionY;
1902         initialEstimatedEcefPositionZ = input.initialEstimatedEcefPositionZ;
1903         numberOfSatellites = input.numberOfSatellites;
1904         orbitalRadiusOfSatellites = input.orbitalRadiusOfSatellites;
1905         satellitesInclinationDegrees = input.satellitesInclinationDegrees;
1906         constellationLongitudeOffsetDegrees = input.constellationLongitudeOffsetDegrees;
1907         constellationTimingOffset = input.constellationTimingOffset;
1908         maskAngleDegrees = input.maskAngleDegrees;
1909         sisErrorSD = input.sisErrorSD;
1910         zenithIonosphereErrorSD = input.zenithIonosphereErrorSD;
1911         zenithTroposphereErrorSD = input.zenithTroposphereErrorSD;
1912         codeTrackingErrorSD = input.codeTrackingErrorSD;
1913         rangeRateTrackingErrorSD = input.rangeRateTrackingErrorSD;
1914         initialReceiverClockOffset = input.initialReceiverClockOffset;
1915         initialReceiverClockDrift = input.initialReceiverClockDrift;
1916     }
1917 
1918     /**
1919      * Computes and returns hash code for this instance. Hash codes are almost unique
1920      * values that are useful for fast classification and storage of objects in collections.
1921      *
1922      * @return Hash code.
1923      */
1924     @Override
1925     public int hashCode() {
1926         return Objects.hash(epochInterval, initialEstimatedEcefPositionX,
1927                 initialEstimatedEcefPositionY, initialEstimatedEcefPositionZ,
1928                 numberOfSatellites, orbitalRadiusOfSatellites,
1929                 satellitesInclinationDegrees, constellationLongitudeOffsetDegrees,
1930                 constellationTimingOffset, maskAngleDegrees, sisErrorSD,
1931                 zenithIonosphereErrorSD, zenithTroposphereErrorSD,
1932                 codeTrackingErrorSD, rangeRateTrackingErrorSD,
1933                 initialReceiverClockOffset, initialReceiverClockDrift);
1934     }
1935 
1936     /**
1937      * Checks if provided object is a GNSSConfig having exactly the same contents
1938      * as this instance.
1939      *
1940      * @param o object to be compared.
1941      * @return true if both objects are considered to be equal, false otherwise.
1942      */
1943     @Override
1944     public boolean equals(Object o) {
1945         if (this == o) {
1946             return true;
1947         }
1948         if (o == null || getClass() != o.getClass()) {
1949             return false;
1950         }
1951 
1952         final GNSSConfig other = (GNSSConfig) o;
1953         return equals(other);
1954     }
1955 
1956     /**
1957      * Checks if provided instance has exactly the same contents as this instance.
1958      *
1959      * @param other instance to be compared.
1960      * @return true if both instances are considered to be equal, false otherwise.
1961      */
1962     public boolean equals(final GNSSConfig other) {
1963         return equals(other, 0.0);
1964     }
1965 
1966     /**
1967      * Checks if provided instance has contents similar to this instance up to provided
1968      * threshold value.
1969      *
1970      * @param other     instance to be compared.
1971      * @param threshold maximum difference allowed for values.
1972      * @return true if both instances are considered to be equal (up to provided threshold),
1973      * false otherwise.
1974      */
1975     public boolean equals(final GNSSConfig other, final double threshold) {
1976         if (other == null) {
1977             return false;
1978         }
1979 
1980         return Math.abs(epochInterval - other.epochInterval) <= threshold
1981                 && Math.abs(initialEstimatedEcefPositionX - other.initialEstimatedEcefPositionX) <= threshold
1982                 && Math.abs(initialEstimatedEcefPositionY - other.initialEstimatedEcefPositionY) <= threshold
1983                 && Math.abs(initialEstimatedEcefPositionZ - other.initialEstimatedEcefPositionZ) <= threshold
1984                 && Math.abs(numberOfSatellites - other.numberOfSatellites) <= threshold
1985                 && Math.abs(orbitalRadiusOfSatellites - other.orbitalRadiusOfSatellites) <= threshold
1986                 && Math.abs(satellitesInclinationDegrees - other.satellitesInclinationDegrees) <= threshold
1987                 && Math.abs(constellationLongitudeOffsetDegrees - other.constellationLongitudeOffsetDegrees)
1988                 <= threshold
1989                 && Math.abs(constellationTimingOffset - other.constellationTimingOffset) <= threshold
1990                 && Math.abs(maskAngleDegrees - other.maskAngleDegrees) <= threshold
1991                 && Math.abs(sisErrorSD - other.sisErrorSD) <= threshold
1992                 && Math.abs(zenithIonosphereErrorSD - other.zenithIonosphereErrorSD) <= threshold
1993                 && Math.abs(zenithTroposphereErrorSD - other.zenithTroposphereErrorSD) <= threshold
1994                 && Math.abs(codeTrackingErrorSD - other.codeTrackingErrorSD) <= threshold
1995                 && Math.abs(rangeRateTrackingErrorSD - other.rangeRateTrackingErrorSD) <= threshold
1996                 && Math.abs(initialReceiverClockOffset - other.initialReceiverClockOffset) <= threshold
1997                 && Math.abs(initialReceiverClockDrift - other.initialReceiverClockDrift) <= threshold;
1998     }
1999 
2000     /**
2001      * Makes a copy of this instance.
2002      *
2003      * @return a copy of this instance.
2004      * @throws CloneNotSupportedException if clone fails for some reason.
2005      */
2006     @Override
2007     protected Object clone() throws CloneNotSupportedException {
2008         final var result = (GNSSConfig)super.clone();
2009         copyTo(result);
2010         return result;
2011     }
2012 
2013     /**
2014      * Method used internally to set values.
2015      *
2016      * @param numberOfSatellites           number of satellites in constellation.
2017      * @param orbitalRadiusOfSatellites    orbital radius of satellites.
2018      * @param satellitesInclination        inclination angle of satellites.
2019      * @param constellationLongitudeOffset longitude offset of constellation.
2020      * @param constellationTimingOffset    timing offset of constellation.
2021      * @param maskAngle                    mask angle.
2022      * @param sisErrorSD                   Signal In Space (SIS) error Standard
2023      *                                     Deviation (SD).
2024      * @param zenithIonosphereErrorSD      zenith ionosphere error Standard
2025      *                                     Deviation (SD).
2026      * @param zenithTroposphereErrorSD     zenith troposphere error Standard
2027      *                                     Deviation (SD).
2028      * @param codeTrackingErrorSD          code tracking error Standard Deviation
2029      *                                     (SD).
2030      * @param rangeRateTrackingErrorSD     range rate tracking error Standard
2031      *                                     Deviation (SD).
2032      * @param initialReceiverClockOffset   initial receiver clock offset at time = 0.
2033      * @param initialReceiverClockDrift    initial receiver clock drift at time = 0.
2034      * @throws IllegalArgumentException if number of satellites in constellation is
2035      *                                  less than 4 or if orbital radius of
2036      *                                  satellites is negative or if SIS error SD is
2037      *                                  negative, or if zenith ionosphere error SD
2038      *                                  is negative, or if zenith troposphere error
2039      *                                  SD is negative, or if code tracking error SD
2040      *                                  is negative, or if range rate tracking error
2041      *                                  SD is negative.
2042      */
2043     private void internalSetValues(final int numberOfSatellites,
2044                                    final Distance orbitalRadiusOfSatellites,
2045                                    final Angle satellitesInclination,
2046                                    final Angle constellationLongitudeOffset,
2047                                    final Time constellationTimingOffset,
2048                                    final Angle maskAngle,
2049                                    final Distance sisErrorSD,
2050                                    final Distance zenithIonosphereErrorSD,
2051                                    final Distance zenithTroposphereErrorSD,
2052                                    final Speed codeTrackingErrorSD,
2053                                    final Speed rangeRateTrackingErrorSD,
2054                                    final Distance initialReceiverClockOffset,
2055                                    final Speed initialReceiverClockDrift) {
2056         setNumberOfSatellites(numberOfSatellites);
2057         setOrbitalRadiusOfSatellitesDistance(orbitalRadiusOfSatellites);
2058         setSatellitesInclinationAngle(satellitesInclination);
2059         setConstellationLongitudeOffsetAngle(constellationLongitudeOffset);
2060         setConstellationTimingOffsetTime(constellationTimingOffset);
2061         setMaskAngle(maskAngle);
2062         setSISErrorSDDistance(sisErrorSD);
2063         setZenithIonosphereErrorSDDistance(zenithIonosphereErrorSD);
2064         setZenithTroposphereErrorSDDistance(zenithTroposphereErrorSD);
2065         setCodeTrackingErrorSDSpeed(codeTrackingErrorSD);
2066         setRangeRateTrackingErrorSDSpeed(rangeRateTrackingErrorSD);
2067         setInitialReceiverClockOffsetDistance(initialReceiverClockOffset);
2068         setInitialReceiverClockDriftSpeed(initialReceiverClockDrift);
2069     }
2070 }