1   /* Copyright 2002-2024 CS GROUP
2    * Licensed to CS GROUP (CS) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * CS licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *   http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  package org.orekit.files.rinex.observation;
18  
19  import java.util.ArrayList;
20  import java.util.Collections;
21  import java.util.HashMap;
22  import java.util.List;
23  import java.util.Map;
24  
25  import org.hipparchus.geometry.euclidean.threed.Vector3D;
26  import org.hipparchus.geometry.euclidean.twod.Vector2D;
27  import org.orekit.files.rinex.AppliedDCBS;
28  import org.orekit.files.rinex.AppliedPCVS;
29  import org.orekit.files.rinex.section.RinexBaseHeader;
30  import org.orekit.files.rinex.utils.RinexFileType;
31  import org.orekit.gnss.ObservationType;
32  import org.orekit.gnss.SatInSystem;
33  import org.orekit.gnss.SatelliteSystem;
34  import org.orekit.time.AbsoluteDate;
35  
36  /** Container for Rinex observation file header.
37   * @since 9.2
38   */
39  public class RinexObservationHeader extends RinexBaseHeader {
40  
41      /** Name of the Antenna Marker. */
42      private String markerName;
43  
44      /** Number of Antenna marker. */
45      private String markerNumber;
46  
47      /** Type of Antenna marker. */
48      private String markerType;
49  
50      /** Name of Observer. */
51      private String observerName;
52  
53      /** Name of Agency. */
54      private String agencyName;
55  
56      /** Receiver Number. */
57      private String receiverNumber;
58  
59      /** Receiver Type. */
60      private String receiverType;
61  
62      /** Receiver version. */
63      private String receiverVersion;
64  
65      /** Antenna Number. */
66      private String antennaNumber;
67  
68      /** Antenna Type. */
69      private String antennaType;
70  
71      /** Approximate Marker Position (WGS84). */
72      private Vector3D approxPos;
73  
74      /** Antenna Height. */
75      private double antennaHeight;
76  
77      /** Eccentricities of antenna center. */
78      private Vector2D eccentricities;
79  
80      /** Position of antenna reference point for antenna on vehicle. */
81      private Vector3D antRefPoint;
82  
83      /** Satellite system for average phasecenter position.
84       * @since 12.0
85       */
86      private SatelliteSystem phaseCenterSystem;
87  
88      /** Observation code of the average phasecenter position w/r to antenna reference point. */
89      private String observationCode;
90  
91      /** Antenna phasecenter.
92       * North/East/Up (fixed station) or X/Y/Z in body fixed system (vehicle). */
93      private Vector3D antennaPhaseCenter;
94  
95      /** Antenna B.Sight.
96       * Direction of the “vertical” antenna axis towards the GNSS satellites.  */
97      private Vector3D antennaBSight;
98  
99      /** Azimuth of the zero direction of a fixed antenna (degrees, from north). */
100     private double antennaAzimuth;
101 
102     /** Zero direction of antenna. */
103     private Vector3D antennaZeroDirection;
104 
105     /** Current center of mass (X,Y,Z, meters) of vehicle in body fixed coordinate system. */
106     private Vector3D centerMass;
107 
108     /** Unit of the carrier to noise ratio observables Snn (if present) DBHZ: S/N given in dbHz. */
109     private String signalStrengthUnit;
110 
111     /** Observation interval in seconds. */
112     private double interval;
113 
114     /** Time of First observation record. */
115     private AbsoluteDate tFirstObs;
116 
117     /** Time of last observation record. */
118     private AbsoluteDate tLastObs;
119 
120     /** Flag for application of real time-derived receiver clock offset.
121      * @since 12.1
122      */
123     private boolean clockOffsetApplied;
124 
125     /** List of applied differential code bias corrections. */
126     private final List<AppliedDCBS> listAppliedDCBS;
127 
128     /** List of antenna center variation corrections. */
129     private final List<AppliedPCVS> listAppliedPCVS;
130 
131     /** List of phase shift correction used to generate phases consistent w/r to cycle shifts. */
132     private final List<PhaseShiftCorrection> phaseShiftCorrections;
133 
134     /** List of scale factor corrections. */
135     private final Map<SatelliteSystem, List<ScaleFactorCorrection>> scaleFactorCorrections;
136 
137     /** List of GLONASS satellite-channel associations.
138      * @since 12.0
139      */
140     private final List<GlonassSatelliteChannel> glonassChannels;
141 
142     /** Number of satellites.
143      * @since 12.0
144      */
145     private int nbSat;
146 
147     /** Number of observations per satellite.
148      * @since 12.0
149      */
150     private final Map<SatInSystem, Map<ObservationType, Integer>> nbObsPerSat;
151 
152     /** Observation types for each satellite systems.
153      * @since 12.0
154      */
155     private final Map<SatelliteSystem, List<ObservationType>> mapTypeObs;
156 
157     /** Number of leap seconds since 6-Jan-1980. */
158     private int leapSeconds;
159 
160     /** Future or past leap seconds ΔtLSF (BNK).
161      * i.e. future leap second if the week and day number are in the future.
162      */
163     private int leapSecondsFuture;
164 
165     /** Respective leap second week number.
166      * For GPS, GAL, QZS and IRN, weeks since 6-Jan-1980.
167      * When BDS only file leap seconds specified, weeks since 1-Jan-2006
168      */
169     private int leapSecondsWeekNum;
170 
171     /** Respective leap second day number. */
172     private int leapSecondsDayNum;
173 
174     /** Code phase bias correction for GLONASS C1C signal.
175      * @since 12.0
176      */
177     private double c1cCodePhaseBias;
178 
179     /** Code phase bias correction for GLONASS C1P signal.
180      * @since 12.0
181      */
182     private double c1pCodePhaseBias;
183 
184     /** Code phase bias correction for GLONASS C2C signal.
185      * @since 12.0
186      */
187     private double c2cCodePhaseBias;
188 
189     /** Code phase bias correction for GLONASS C2P signal.
190      * @since 12.0
191      */
192     private double c2pCodePhaseBias;
193 
194     /** Simple constructor.
195      */
196     public RinexObservationHeader() {
197         super(RinexFileType.OBSERVATION);
198         antennaAzimuth         = Double.NaN;
199         antennaHeight          = Double.NaN;
200         eccentricities         = Vector2D.ZERO;
201         clockOffsetApplied     = false;
202         nbSat                  = -1;
203         interval               = Double.NaN;
204         leapSeconds            = 0;
205         listAppliedDCBS        = new ArrayList<>();
206         listAppliedPCVS        = new ArrayList<>();
207         phaseShiftCorrections  = new ArrayList<>();
208         scaleFactorCorrections = new HashMap<>();
209         glonassChannels        = new ArrayList<>();
210         nbObsPerSat            = new HashMap<>();
211         mapTypeObs             = new HashMap<>();
212         tLastObs               = AbsoluteDate.FUTURE_INFINITY;
213         c1cCodePhaseBias       = Double.NaN;
214         c1pCodePhaseBias       = Double.NaN;
215         c2cCodePhaseBias       = Double.NaN;
216         c2pCodePhaseBias       = Double.NaN;
217     }
218 
219     /** Set name of the antenna marker.
220      * @param markerName name of the antenna marker
221      */
222     public void setMarkerName(final String markerName) {
223         this.markerName = markerName;
224     }
225 
226     /** Get name of the antenna marker.
227      * @return name of the antenna marker
228      */
229     public String getMarkerName() {
230         return markerName;
231     }
232 
233     /** Set number of the antenna marker.
234      * @param markerNumber number of the antenna marker
235      */
236     public void setMarkerNumber(final String markerNumber) {
237         this.markerNumber = markerNumber;
238     }
239 
240     /** Get number of the antenna marker.
241      * @return number of the antenna marker
242      */
243     public String getMarkerNumber() {
244         return markerNumber;
245     }
246 
247     /** Set name of the observer.
248      * @param observerName name of the observer
249      */
250     public void setObserverName(final String observerName) {
251         this.observerName = observerName;
252     }
253 
254     /** Get name of the observer.
255      * @return name of the observer
256      */
257     public String getObserverName() {
258         return observerName;
259     }
260 
261     /**
262      * Setter for the agency name.
263      * @param agencyName the agency name to set
264      */
265     public void setAgencyName(final String agencyName) {
266         this.agencyName = agencyName;
267     }
268 
269     /** Get name of the agency.
270      * @return name of the agency
271      */
272     public String getAgencyName() {
273         return agencyName;
274     }
275 
276     /** Set the number of the receiver.
277      * @param receiverNumber number of the receiver
278      */
279     public void setReceiverNumber(final String receiverNumber) {
280         this.receiverNumber = receiverNumber;
281     }
282 
283     /** Get the number of the receiver.
284      * @return number of the receiver
285      */
286     public String getReceiverNumber() {
287         return receiverNumber;
288     }
289 
290     /** Set the type of the receiver.
291      * @param receiverType type of the receiver
292      */
293     public void setReceiverType(final String receiverType) {
294         this.receiverType = receiverType;
295     }
296 
297     /** Get the type of the receiver.
298      * @return type of the receiver
299      */
300     public String getReceiverType() {
301         return receiverType;
302     }
303 
304     /** Set the version of the receiver.
305      * @param receiverVersion version of the receiver
306      */
307     public void setReceiverVersion(final String receiverVersion) {
308         this.receiverVersion = receiverVersion;
309     }
310 
311     /** Get the version of the receiver.
312      * @return version of the receiver
313      */
314     public String getReceiverVersion() {
315         return receiverVersion;
316     }
317 
318     /** Set the number of the antenna.
319      * @param antennaNumber number of the antenna
320      */
321     public void setAntennaNumber(final String antennaNumber) {
322         this.antennaNumber = antennaNumber;
323     }
324 
325     /** Get the number of the antenna.
326      * @return number of the antenna
327      */
328     public String getAntennaNumber() {
329         return antennaNumber;
330     }
331 
332     /** Set the type of the antenna.
333      * @param antennaType type of the antenna
334      */
335     public void setAntennaType(final String antennaType) {
336         this.antennaType = antennaType;
337     }
338 
339     /** Get the type of the antenna.
340      * @return type of the antenna
341      */
342     public String getAntennaType() {
343         return antennaType;
344     }
345 
346     /** Set the Approximate Marker Position.
347      * @param approxPos Approximate Marker Position
348      */
349     public void setApproxPos(final Vector3D approxPos) {
350         this.approxPos = approxPos;
351     }
352 
353     /** Get the Approximate Marker Position.
354      * @return Approximate Marker Position
355      */
356     public Vector3D getApproxPos() {
357         return approxPos;
358     }
359 
360     /** Set the antenna height.
361      * @param antennaHeight height of the antenna
362      */
363     public void setAntennaHeight(final double antennaHeight) {
364         this.antennaHeight = antennaHeight;
365     }
366 
367     /** Get the antenna height.
368      * @return height of the antenna
369      */
370     public double getAntennaHeight() {
371         return antennaHeight;
372     }
373 
374     /** Set the eccentricities of antenna center.
375      * @param eccentricities Eccentricities of antenna center
376      */
377     public void setEccentricities(final Vector2D eccentricities) {
378         this.eccentricities = eccentricities;
379     }
380 
381     /** Get the eccentricities of antenna center.
382      * @return Eccentricities of antenna center
383      */
384     public Vector2D getEccentricities() {
385         return eccentricities;
386     }
387 
388     /** Set the realtime-derived receiver clock offset.
389      * @param clkOffset realtime-derived receiver clock offset
390      * @deprecated as of 12.1, replaced by {@link #setClockOffsetApplied(boolean)}
391      */
392     @Deprecated
393     public void setClkOffset(final int clkOffset) {
394         setClockOffsetApplied(clkOffset > 0);
395     }
396 
397     /** Get the realtime-derived receiver clock offset.
398      * @return realtime-derived receiver clock offset
399      * @deprecated as of 12.1, replaced by #@link {@link #getClockOffsetApplied()}
400      */
401     @Deprecated
402     public int getClkOffset() {
403         return getClockOffsetApplied() ? 1 : 0;
404     }
405 
406     /** Set the application flag for realtime-derived receiver clock offset.
407      * @param clockOffsetApplied application flag for realtime-derived receiver clock offset
408      * @since 12.1
409      */
410     public void setClockOffsetApplied(final boolean clockOffsetApplied) {
411         this.clockOffsetApplied = clockOffsetApplied;
412     }
413 
414     /** Get the application flag for realtime-derived receiver clock offset.
415      * @return application flag for realtime-derived receiver clock offset
416      * @since 12.1
417      */
418     public boolean getClockOffsetApplied() {
419         return clockOffsetApplied;
420     }
421 
422     /** Set the observation interval in seconds.
423      * @param interval Observation interval in seconds
424      */
425     public void setInterval(final double interval) {
426         this.interval = interval;
427     }
428 
429     /** Get the observation interval in seconds.
430      * @return Observation interval in seconds
431      */
432     public double getInterval() {
433         return interval;
434     }
435 
436     /** Set the time of First observation record.
437      * @param firstObs Time of First observation record
438      */
439     public void setTFirstObs(final AbsoluteDate firstObs) {
440         this.tFirstObs = firstObs;
441     }
442 
443     /** Get the time of First observation record.
444      * @return Time of First observation record
445      */
446     public AbsoluteDate getTFirstObs() {
447         return tFirstObs;
448     }
449 
450     /** Set the time of last observation record.
451      * @param lastObs Time of last observation record
452      */
453     public void setTLastObs(final AbsoluteDate lastObs) {
454         this.tLastObs = lastObs;
455     }
456 
457     /** Get the time of last observation record.
458      * @return Time of last observation record
459      */
460     public AbsoluteDate getTLastObs() {
461         return tLastObs;
462     }
463 
464     /** Set the Number of leap seconds since 6-Jan-1980.
465      * @param leapSeconds Number of leap seconds since 6-Jan-1980
466      */
467     public void setLeapSeconds(final int leapSeconds) {
468         this.leapSeconds = leapSeconds;
469     }
470 
471     /** Get the Number of leap seconds since 6-Jan-1980.
472      * @return Number of leap seconds since 6-Jan-1980
473      */
474     public int getLeapSeconds() {
475         return leapSeconds;
476     }
477 
478     /** Set type of the antenna marker.
479      * @param markerType type of the antenna marker
480      */
481     public void setMarkerType(final String markerType) {
482         this.markerType = markerType;
483     }
484 
485     /** Get type of the antenna marker.
486      * @return type of the antenna marker
487      */
488     public String getMarkerType() {
489         return markerType;
490     }
491 
492     /** Set the position of antenna reference point for antenna on vehicle.
493      * @param refPoint Position of antenna reference point for antenna on vehicle
494      */
495     public void setAntennaReferencePoint(final Vector3D refPoint) {
496         this.antRefPoint = refPoint;
497     }
498 
499     /** Get the position of antenna reference point for antenna on vehicle.
500      * @return Position of antenna reference point for antenna on vehicle
501      */
502     public Vector3D getAntennaReferencePoint() {
503         return antRefPoint;
504     }
505 
506     /** Set satellite system for average phase center.
507      * @param phaseCenterSystem satellite system for average phase center
508      * @since 12.0
509      */
510     public void setPhaseCenterSystem(final SatelliteSystem phaseCenterSystem) {
511         this.phaseCenterSystem = phaseCenterSystem;
512     }
513 
514     /** Get satellite system for average phase center.
515      * @return satellite system for average phase center
516      * @since 12.0
517      */
518     public SatelliteSystem getPhaseCenterSystem() {
519         return phaseCenterSystem;
520     }
521 
522     /** Set the observation code of the average phasecenter position w/r to antenna reference point.
523      * @param observationCode Observation code of the average phasecenter position w/r to antenna reference point
524      */
525     public void setObservationCode(final String observationCode) {
526         this.observationCode = observationCode;
527     }
528 
529     /** Get the observation code of the average phasecenter position w/r to antenna reference point.
530      * @return Observation code of the average phasecenter position w/r to antenna reference point
531      */
532     public String getObservationCode() {
533         return observationCode;
534     }
535 
536     /** Set the antenna phasecenter.
537      * @param antennaPhaseCenter Antenna phasecenter
538      */
539     public void setAntennaPhaseCenter(final Vector3D antennaPhaseCenter) {
540         this.antennaPhaseCenter = antennaPhaseCenter;
541     }
542 
543     /** Get the antenna phasecenter.
544      * @return Antenna phasecenter
545      */
546     public Vector3D getAntennaPhaseCenter() {
547         return antennaPhaseCenter;
548     }
549 
550     /** Set the antenna B.Sight.
551      * @param antennaBSight Antenna B.Sight
552      */
553     public void setAntennaBSight(final Vector3D antennaBSight) {
554         this.antennaBSight = antennaBSight;
555     }
556 
557     /** Get the antenna B.Sight.
558      * @return Antenna B.Sight
559      */
560     public Vector3D getAntennaBSight() {
561         return antennaBSight;
562     }
563 
564     /** Set the azimuth of the zero direction of a fixed antenna.
565      * @param antennaAzimuth Azimuth of the zero direction of a fixed antenna
566      */
567     public void setAntennaAzimuth(final double antennaAzimuth) {
568         this.antennaAzimuth = antennaAzimuth;
569     }
570 
571     /** Get the azimuth of the zero direction of a fixed antenna.
572      * @return Azimuth of the zero direction of a fixed antenna
573      */
574     public double getAntennaAzimuth() {
575         return antennaAzimuth;
576     }
577 
578     /** Set the zero direction of antenna.
579      * @param antennaZeroDirection Zero direction of antenna
580      */
581     public void setAntennaZeroDirection(final Vector3D antennaZeroDirection) {
582         this.antennaZeroDirection = antennaZeroDirection;
583     }
584 
585     /** Get the zero direction of antenna.
586      * @return Zero direction of antenna
587      */
588     public Vector3D getAntennaZeroDirection() {
589         return antennaZeroDirection;
590     }
591 
592     /** Set the current center of mass of vehicle in body fixed coordinate system.
593      * @param centerMass Current center of mass of vehicle in body fixed coordinate system
594      */
595     public void setCenterMass(final Vector3D centerMass) {
596         this.centerMass = centerMass;
597     }
598 
599     /** Get the current center of mass of vehicle in body fixed coordinate system.
600      * @return Current center of mass of vehicle in body fixed coordinate system
601      */
602     public Vector3D getCenterMass() {
603         return centerMass;
604     }
605 
606     /** Set the unit of the carrier to noise ratio observables.
607      * @param signalStrengthUnit Unit of the carrier to noise ratio observables
608      */
609     public void setSignalStrengthUnit(final String signalStrengthUnit) {
610         this.signalStrengthUnit = signalStrengthUnit;
611     }
612 
613     /** Get the unit of the carrier to noise ratio observables.
614      * @return Unit of the carrier to noise ratio observables
615      */
616     public String getSignalStrengthUnit() {
617         return signalStrengthUnit;
618     }
619 
620     /** Set the future or past leap seconds.
621      * @param leapSecondsFuture Future or past leap seconds
622      */
623     public void setLeapSecondsFuture(final int leapSecondsFuture) {
624         this.leapSecondsFuture = leapSecondsFuture;
625     }
626 
627     /** Get the future or past leap seconds.
628      * @return Future or past leap seconds
629      */
630     public int getLeapSecondsFuture() {
631         return leapSecondsFuture;
632     }
633 
634     /** Set the respective leap second week number.
635      * @param leapSecondsWeekNum Respective leap second week number
636      */
637     public void setLeapSecondsWeekNum(final int leapSecondsWeekNum) {
638         this.leapSecondsWeekNum = leapSecondsWeekNum;
639     }
640 
641     /** Get the respective leap second week number.
642      * @return Respective leap second week number
643      */
644     public int getLeapSecondsWeekNum() {
645         return leapSecondsWeekNum;
646     }
647 
648     /** Set the respective leap second day number.
649      * @param leapSecondsDayNum Respective leap second day number
650      */
651     public void setLeapSecondsDayNum(final int leapSecondsDayNum) {
652         this.leapSecondsDayNum = leapSecondsDayNum;
653     }
654 
655     /** Get the respective leap second day number.
656      * @return Respective leap second day number
657      */
658     public int getLeapSecondsDayNum() {
659         return leapSecondsDayNum;
660     }
661 
662     /** Add applied differential code bias corrections.
663      * @param appliedDCBS applied differential code bias corrections to add
664      */
665     public void addAppliedDCBS(final AppliedDCBS appliedDCBS) {
666         listAppliedDCBS.add(appliedDCBS);
667     }
668 
669     /** Get the list of applied differential code bias corrections.
670      * @return list of applied differential code bias corrections
671      */
672     public List<AppliedDCBS> getListAppliedDCBS() {
673         return Collections.unmodifiableList(listAppliedDCBS);
674     }
675 
676     /** Add antenna center variation corrections.
677      * @param appliedPCVS antenna center variation corrections
678      */
679     public void addAppliedPCVS(final AppliedPCVS appliedPCVS) {
680         listAppliedPCVS.add(appliedPCVS);
681     }
682 
683     /** Get the list of antenna center variation corrections.
684      * @return List of antenna center variation corrections
685      */
686     public List<AppliedPCVS> getListAppliedPCVS() {
687         return Collections.unmodifiableList(listAppliedPCVS);
688     }
689 
690     /** Add phase shift correction used to generate phases consistent w/r to cycle shifts.
691      * @param phaseShiftCorrection phase shift correction used to generate phases consistent w/r to cycle shifts
692      */
693     public void addPhaseShiftCorrection(final PhaseShiftCorrection phaseShiftCorrection) {
694         phaseShiftCorrections.add(phaseShiftCorrection);
695     }
696 
697     /** Get the list of phase shift correction used to generate phases consistent w/r to cycle shifts.
698      * @return List of phase shift correction used to generate phases consistent w/r to cycle shifts
699      */
700     public List<PhaseShiftCorrection> getPhaseShiftCorrections() {
701         return Collections.unmodifiableList(phaseShiftCorrections);
702     }
703 
704     /** Add scale factor correction.
705      * @param satelliteSystem system to which this scaling factor applies
706      * @param scaleFactorCorrection scale factor correction
707      */
708     public void addScaleFactorCorrection(final SatelliteSystem satelliteSystem, final ScaleFactorCorrection scaleFactorCorrection) {
709         final List<ScaleFactorCorrection> sfc = scaleFactorCorrections.computeIfAbsent(satelliteSystem,
710                                                                                        k -> new ArrayList<>());
711         sfc.add(scaleFactorCorrection);
712     }
713 
714     /** Get the list of scale factor correction.
715      * @param satelliteSystem system to which this scaling factor applies
716      * @return List of scale factor correction
717      */
718     public List<ScaleFactorCorrection> getScaleFactorCorrections(final SatelliteSystem satelliteSystem) {
719         final List<ScaleFactorCorrection> sfc = scaleFactorCorrections.get(satelliteSystem);
720         return sfc == null ? Collections.emptyList() : Collections.unmodifiableList(sfc);
721     }
722 
723     /** Add GLONASS satellite/channel association.
724      * @param glonassChannel GLONASS satellite/channel association
725      * @since 12.0
726      */
727     public void addGlonassChannel(final GlonassSatelliteChannel glonassChannel) {
728         glonassChannels.add(glonassChannel);
729     }
730 
731     /** Get the list of GLONASS satellite/channel associations.
732      * @return List of GLONASS satellite/channel associations
733      * @since 12.0
734      */
735     public List<GlonassSatelliteChannel> getGlonassChannels() {
736         return Collections.unmodifiableList(glonassChannels);
737     }
738 
739     /** Set number of satellites.
740      * @param nbSat number of satellites
741      * @since 12.0
742      */
743     public void setNbSat(final int nbSat) {
744         this.nbSat = nbSat;
745     }
746 
747     /** Get number of satellites.
748      * @return number of satellites
749      * @since 12.0
750      */
751     public int getNbSat() {
752         return nbSat;
753     }
754 
755     /** Set number of observations for a satellite.
756      * @param sat satellite
757      * @param type observation type
758      * @param nbObs number of observations of this type for this satellite
759      * @since 12.0
760      */
761     public void setNbObsPerSatellite(final SatInSystem sat, final ObservationType type, final int nbObs) {
762         final Map<ObservationType, Integer> satNbObs = nbObsPerSat.computeIfAbsent(sat, k -> new HashMap<>());
763         satNbObs.put(type, nbObs);
764     }
765 
766     /** Get an unmodifiable view of the map of number of observations per satellites.
767      * @return unmodifiable view of the map of number of observations per satellites
768      * @since 12.0
769      */
770     public Map<SatInSystem, Map<ObservationType, Integer>> getNbObsPerSat() {
771         return Collections.unmodifiableMap(nbObsPerSat);
772     }
773 
774     /** Set number of observations for a satellite.
775      * @param system satellite system
776      * @param types observation types
777      * @since 12.0
778      */
779     public void setTypeObs(final SatelliteSystem system, final List<ObservationType> types) {
780         mapTypeObs.put(system, new ArrayList<>(types));
781     }
782 
783     /** Get an unmodifiable view of the map of observation types.
784      * @return unmodifiable view of the map of observation types
785      * @since 12.0
786      */
787     public Map<SatelliteSystem, List<ObservationType>> getTypeObs() {
788         return Collections.unmodifiableMap(mapTypeObs);
789     }
790 
791     /** Set the code phase bias correction for GLONASS {@link ObservationType#C1C} signal.
792      * @param c1cCodePhaseBias code phase bias correction for GLONASS {@link ObservationType#C1C} signal
793      * @since 12.0
794      */
795     public void setC1cCodePhaseBias(final double c1cCodePhaseBias) {
796         this.c1cCodePhaseBias = c1cCodePhaseBias;
797     }
798 
799     /** Get the code phase bias correction for GLONASS {@link ObservationType#C1C} signal.
800      * @return code phase bias correction for GLONASS {@link ObservationType#C1C} signal
801      * @since 12.0
802      */
803     public double getC1cCodePhaseBias() {
804         return c1cCodePhaseBias;
805     }
806 
807     /** Set the code phase bias correction for GLONASS {@link ObservationType#C1P} signal.
808      * @param c1pCodePhaseBias code phase bias correction for GLONASS {@link ObservationType#C1P} signal
809      * @since 12.0
810      */
811     public void setC1pCodePhaseBias(final double c1pCodePhaseBias) {
812         this.c1pCodePhaseBias = c1pCodePhaseBias;
813     }
814 
815     /** Get the code phase bias correction for GLONASS {@link ObservationType#C1P} signal.
816      * @return code phase bias correction for GLONASS {@link ObservationType#C1P} signal
817      * @since 12.0
818      */
819     public double getC1pCodePhaseBias() {
820         return c1pCodePhaseBias;
821     }
822 
823     /** Set the code phase bias correction for GLONASS {@link ObservationType#C2C} signal.
824      * @param c2cCodePhaseBias code phase bias correction for GLONASS {@link ObservationType#C2C} signal
825      * @since 12.0
826      */
827     public void setC2cCodePhaseBias(final double c2cCodePhaseBias) {
828         this.c2cCodePhaseBias = c2cCodePhaseBias;
829     }
830 
831     /** Get the code phase bias correction for GLONASS {@link ObservationType#C2C} signal.
832      * @return code phase bias correction for GLONASS {@link ObservationType#C2C} signal
833      * @since 12.0
834      */
835     public double getC2cCodePhaseBias() {
836         return c2cCodePhaseBias;
837     }
838 
839     /** Set the code phase bias correction for GLONASS {@link ObservationType#C2P} signal.
840      * @param c2pCodePhaseBias code phase bias correction for GLONASS {@link ObservationType#C2P} signal
841      * @since 12.0
842      */
843     public void setC2pCodePhaseBias(final double c2pCodePhaseBias) {
844         this.c2pCodePhaseBias = c2pCodePhaseBias;
845     }
846 
847     /** Get the code phase bias correction for GLONASS {@link ObservationType#C2P} signal.
848      * @return code phase bias correction for GLONASS {@link ObservationType#C2P} signal
849      * @since 12.0
850      */
851     public double getC2pCodePhaseBias() {
852         return c2pCodePhaseBias;
853     }
854 
855 }