RinexObservationHeader.java

  1. /* Copyright 2002-2025 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. import java.util.ArrayList;
  19. import java.util.Collections;
  20. import java.util.HashMap;
  21. import java.util.List;
  22. import java.util.Map;

  23. import org.hipparchus.geometry.euclidean.threed.Vector3D;
  24. import org.hipparchus.geometry.euclidean.twod.Vector2D;
  25. import org.orekit.files.rinex.AppliedDCBS;
  26. import org.orekit.files.rinex.AppliedPCVS;
  27. import org.orekit.files.rinex.section.RinexBaseHeader;
  28. import org.orekit.files.rinex.utils.RinexFileType;
  29. import org.orekit.gnss.ObservationType;
  30. import org.orekit.gnss.SatInSystem;
  31. import org.orekit.gnss.SatelliteSystem;
  32. import org.orekit.time.AbsoluteDate;

  33. /** Container for Rinex observation file header.
  34.  * @since 9.2
  35.  */
  36. public class RinexObservationHeader extends RinexBaseHeader {

  37.     /** Name of the Antenna Marker. */
  38.     private String markerName;

  39.     /** Number of Antenna marker. */
  40.     private String markerNumber;

  41.     /** Type of Antenna marker. */
  42.     private String markerType;

  43.     /** Name of Observer. */
  44.     private String observerName;

  45.     /** Name of Agency. */
  46.     private String agencyName;

  47.     /** Receiver Number. */
  48.     private String receiverNumber;

  49.     /** Receiver Type. */
  50.     private String receiverType;

  51.     /** Receiver version. */
  52.     private String receiverVersion;

  53.     /** Antenna Number. */
  54.     private String antennaNumber;

  55.     /** Antenna Type. */
  56.     private String antennaType;

  57.     /** Approximate Marker Position (WGS84). */
  58.     private Vector3D approxPos;

  59.     /** Antenna Height. */
  60.     private double antennaHeight;

  61.     /** Eccentricities of antenna center. */
  62.     private Vector2D eccentricities;

  63.     /** Position of antenna reference point for antenna on vehicle. */
  64.     private Vector3D antRefPoint;

  65.     /** Satellite system for average phasecenter position.
  66.      * @since 12.0
  67.      */
  68.     private SatelliteSystem phaseCenterSystem;

  69.     /** Observation code of the average phasecenter position w/r to antenna reference point. */
  70.     private String observationCode;

  71.     /** Antenna phasecenter.
  72.      * North/East/Up (fixed station) or X/Y/Z in body fixed system (vehicle). */
  73.     private Vector3D antennaPhaseCenter;

  74.     /** Antenna B.Sight.
  75.      * Direction of the “vertical” antenna axis towards the GNSS satellites.  */
  76.     private Vector3D antennaBSight;

  77.     /** Azimuth of the zero direction of a fixed antenna (degrees, from north). */
  78.     private double antennaAzimuth;

  79.     /** Zero direction of antenna. */
  80.     private Vector3D antennaZeroDirection;

  81.     /** Current center of mass (X,Y,Z, meters) of vehicle in body fixed coordinate system. */
  82.     private Vector3D centerMass;

  83.     /** Unit of the carrier to noise ratio observables Snn (if present) DBHZ: S/N given in dbHz. */
  84.     private String signalStrengthUnit;

  85.     /** Observation interval in seconds. */
  86.     private double interval;

  87.     /** Time of First observation record. */
  88.     private AbsoluteDate tFirstObs;

  89.     /** Time of last observation record. */
  90.     private AbsoluteDate tLastObs;

  91.     /** Flag for application of real time-derived receiver clock offset.
  92.      * @since 12.1
  93.      */
  94.     private boolean clockOffsetApplied;

  95.     /** List of applied differential code bias corrections. */
  96.     private final List<AppliedDCBS> listAppliedDCBS;

  97.     /** List of antenna center variation corrections. */
  98.     private final List<AppliedPCVS> listAppliedPCVS;

  99.     /** List of phase shift correction used to generate phases consistent w/r to cycle shifts. */
  100.     private final List<PhaseShiftCorrection> phaseShiftCorrections;

  101.     /** List of scale factor corrections. */
  102.     private final Map<SatelliteSystem, List<ScaleFactorCorrection>> scaleFactorCorrections;

  103.     /** List of GLONASS satellite-channel associations.
  104.      * @since 12.0
  105.      */
  106.     private final List<GlonassSatelliteChannel> glonassChannels;

  107.     /** Number of satellites.
  108.      * @since 12.0
  109.      */
  110.     private int nbSat;

  111.     /** Number of observations per satellite.
  112.      * @since 12.0
  113.      */
  114.     private final Map<SatInSystem, Map<ObservationType, Integer>> nbObsPerSat;

  115.     /** Observation types for each satellite systems.
  116.      * @since 12.0
  117.      */
  118.     private final Map<SatelliteSystem, List<ObservationType>> mapTypeObs;

  119.     /** Number of leap seconds since 6-Jan-1980. */
  120.     private int leapSeconds;

  121.     /** Future or past leap seconds ΔtLSF (BNK).
  122.      * i.e. future leap second if the week and day number are in the future.
  123.      */
  124.     private int leapSecondsFuture;

  125.     /** Respective leap second week number.
  126.      * For GPS, GAL, QZS and IRN, weeks since 6-Jan-1980.
  127.      * When BDS only file leap seconds specified, weeks since 1-Jan-2006
  128.      */
  129.     private int leapSecondsWeekNum;

  130.     /** Respective leap second day number. */
  131.     private int leapSecondsDayNum;

  132.     /** Code phase bias correction for GLONASS C1C signal.
  133.      * @since 12.0
  134.      */
  135.     private double c1cCodePhaseBias;

  136.     /** Code phase bias correction for GLONASS C1P signal.
  137.      * @since 12.0
  138.      */
  139.     private double c1pCodePhaseBias;

  140.     /** Code phase bias correction for GLONASS C2C signal.
  141.      * @since 12.0
  142.      */
  143.     private double c2cCodePhaseBias;

  144.     /** Code phase bias correction for GLONASS C2P signal.
  145.      * @since 12.0
  146.      */
  147.     private double c2pCodePhaseBias;

  148.     /** Simple constructor.
  149.      */
  150.     public RinexObservationHeader() {
  151.         super(RinexFileType.OBSERVATION);
  152.         antennaAzimuth         = Double.NaN;
  153.         antennaHeight          = Double.NaN;
  154.         eccentricities         = Vector2D.ZERO;
  155.         clockOffsetApplied     = false;
  156.         nbSat                  = -1;
  157.         interval               = Double.NaN;
  158.         leapSeconds            = 0;
  159.         listAppliedDCBS        = new ArrayList<>();
  160.         listAppliedPCVS        = new ArrayList<>();
  161.         phaseShiftCorrections  = new ArrayList<>();
  162.         scaleFactorCorrections = new HashMap<>();
  163.         glonassChannels        = new ArrayList<>();
  164.         nbObsPerSat            = new HashMap<>();
  165.         mapTypeObs             = new HashMap<>();
  166.         tLastObs               = AbsoluteDate.FUTURE_INFINITY;
  167.         c1cCodePhaseBias       = Double.NaN;
  168.         c1pCodePhaseBias       = Double.NaN;
  169.         c2cCodePhaseBias       = Double.NaN;
  170.         c2pCodePhaseBias       = Double.NaN;
  171.     }

  172.     /** Set name of the antenna marker.
  173.      * @param markerName name of the antenna marker
  174.      */
  175.     public void setMarkerName(final String markerName) {
  176.         this.markerName = markerName;
  177.     }

  178.     /** Get name of the antenna marker.
  179.      * @return name of the antenna marker
  180.      */
  181.     public String getMarkerName() {
  182.         return markerName;
  183.     }

  184.     /** Set number of the antenna marker.
  185.      * @param markerNumber number of the antenna marker
  186.      */
  187.     public void setMarkerNumber(final String markerNumber) {
  188.         this.markerNumber = markerNumber;
  189.     }

  190.     /** Get number of the antenna marker.
  191.      * @return number of the antenna marker
  192.      */
  193.     public String getMarkerNumber() {
  194.         return markerNumber;
  195.     }

  196.     /** Set name of the observer.
  197.      * @param observerName name of the observer
  198.      */
  199.     public void setObserverName(final String observerName) {
  200.         this.observerName = observerName;
  201.     }

  202.     /** Get name of the observer.
  203.      * @return name of the observer
  204.      */
  205.     public String getObserverName() {
  206.         return observerName;
  207.     }

  208.     /**
  209.      * Setter for the agency name.
  210.      * @param agencyName the agency name to set
  211.      */
  212.     public void setAgencyName(final String agencyName) {
  213.         this.agencyName = agencyName;
  214.     }

  215.     /** Get name of the agency.
  216.      * @return name of the agency
  217.      */
  218.     public String getAgencyName() {
  219.         return agencyName;
  220.     }

  221.     /** Set the number of the receiver.
  222.      * @param receiverNumber number of the receiver
  223.      */
  224.     public void setReceiverNumber(final String receiverNumber) {
  225.         this.receiverNumber = receiverNumber;
  226.     }

  227.     /** Get the number of the receiver.
  228.      * @return number of the receiver
  229.      */
  230.     public String getReceiverNumber() {
  231.         return receiverNumber;
  232.     }

  233.     /** Set the type of the receiver.
  234.      * @param receiverType type of the receiver
  235.      */
  236.     public void setReceiverType(final String receiverType) {
  237.         this.receiverType = receiverType;
  238.     }

  239.     /** Get the type of the receiver.
  240.      * @return type of the receiver
  241.      */
  242.     public String getReceiverType() {
  243.         return receiverType;
  244.     }

  245.     /** Set the version of the receiver.
  246.      * @param receiverVersion version of the receiver
  247.      */
  248.     public void setReceiverVersion(final String receiverVersion) {
  249.         this.receiverVersion = receiverVersion;
  250.     }

  251.     /** Get the version of the receiver.
  252.      * @return version of the receiver
  253.      */
  254.     public String getReceiverVersion() {
  255.         return receiverVersion;
  256.     }

  257.     /** Set the number of the antenna.
  258.      * @param antennaNumber number of the antenna
  259.      */
  260.     public void setAntennaNumber(final String antennaNumber) {
  261.         this.antennaNumber = antennaNumber;
  262.     }

  263.     /** Get the number of the antenna.
  264.      * @return number of the antenna
  265.      */
  266.     public String getAntennaNumber() {
  267.         return antennaNumber;
  268.     }

  269.     /** Set the type of the antenna.
  270.      * @param antennaType type of the antenna
  271.      */
  272.     public void setAntennaType(final String antennaType) {
  273.         this.antennaType = antennaType;
  274.     }

  275.     /** Get the type of the antenna.
  276.      * @return type of the antenna
  277.      */
  278.     public String getAntennaType() {
  279.         return antennaType;
  280.     }

  281.     /** Set the Approximate Marker Position.
  282.      * @param approxPos Approximate Marker Position
  283.      */
  284.     public void setApproxPos(final Vector3D approxPos) {
  285.         this.approxPos = approxPos;
  286.     }

  287.     /** Get the Approximate Marker Position.
  288.      * @return Approximate Marker Position
  289.      */
  290.     public Vector3D getApproxPos() {
  291.         return approxPos;
  292.     }

  293.     /** Set the antenna height.
  294.      * @param antennaHeight height of the antenna
  295.      */
  296.     public void setAntennaHeight(final double antennaHeight) {
  297.         this.antennaHeight = antennaHeight;
  298.     }

  299.     /** Get the antenna height.
  300.      * @return height of the antenna
  301.      */
  302.     public double getAntennaHeight() {
  303.         return antennaHeight;
  304.     }

  305.     /** Set the eccentricities of antenna center.
  306.      * @param eccentricities Eccentricities of antenna center
  307.      */
  308.     public void setEccentricities(final Vector2D eccentricities) {
  309.         this.eccentricities = eccentricities;
  310.     }

  311.     /** Get the eccentricities of antenna center.
  312.      * @return Eccentricities of antenna center
  313.      */
  314.     public Vector2D getEccentricities() {
  315.         return eccentricities;
  316.     }

  317.     /** Set the application flag for realtime-derived receiver clock offset.
  318.      * @param clockOffsetApplied application flag for realtime-derived receiver clock offset
  319.      * @since 12.1
  320.      */
  321.     public void setClockOffsetApplied(final boolean clockOffsetApplied) {
  322.         this.clockOffsetApplied = clockOffsetApplied;
  323.     }

  324.     /** Get the application flag for realtime-derived receiver clock offset.
  325.      * @return application flag for realtime-derived receiver clock offset
  326.      * @since 12.1
  327.      */
  328.     public boolean getClockOffsetApplied() {
  329.         return clockOffsetApplied;
  330.     }

  331.     /** Set the observation interval in seconds.
  332.      * @param interval Observation interval in seconds
  333.      */
  334.     public void setInterval(final double interval) {
  335.         this.interval = interval;
  336.     }

  337.     /** Get the observation interval in seconds.
  338.      * @return Observation interval in seconds
  339.      */
  340.     public double getInterval() {
  341.         return interval;
  342.     }

  343.     /** Set the time of First observation record.
  344.      * @param firstObs Time of First observation record
  345.      */
  346.     public void setTFirstObs(final AbsoluteDate firstObs) {
  347.         this.tFirstObs = firstObs;
  348.     }

  349.     /** Get the time of First observation record.
  350.      * @return Time of First observation record
  351.      */
  352.     public AbsoluteDate getTFirstObs() {
  353.         return tFirstObs;
  354.     }

  355.     /** Set the time of last observation record.
  356.      * @param lastObs Time of last observation record
  357.      */
  358.     public void setTLastObs(final AbsoluteDate lastObs) {
  359.         this.tLastObs = lastObs;
  360.     }

  361.     /** Get the time of last observation record.
  362.      * @return Time of last observation record
  363.      */
  364.     public AbsoluteDate getTLastObs() {
  365.         return tLastObs;
  366.     }

  367.     /** Set the Number of leap seconds since 6-Jan-1980.
  368.      * @param leapSeconds Number of leap seconds since 6-Jan-1980
  369.      */
  370.     public void setLeapSeconds(final int leapSeconds) {
  371.         this.leapSeconds = leapSeconds;
  372.     }

  373.     /** Get the Number of leap seconds since 6-Jan-1980.
  374.      * @return Number of leap seconds since 6-Jan-1980
  375.      */
  376.     public int getLeapSeconds() {
  377.         return leapSeconds;
  378.     }

  379.     /** Set type of the antenna marker.
  380.      * @param markerType type of the antenna marker
  381.      */
  382.     public void setMarkerType(final String markerType) {
  383.         this.markerType = markerType;
  384.     }

  385.     /** Get type of the antenna marker.
  386.      * @return type of the antenna marker
  387.      */
  388.     public String getMarkerType() {
  389.         return markerType;
  390.     }

  391.     /** Set the position of antenna reference point for antenna on vehicle.
  392.      * @param refPoint Position of antenna reference point for antenna on vehicle
  393.      */
  394.     public void setAntennaReferencePoint(final Vector3D refPoint) {
  395.         this.antRefPoint = refPoint;
  396.     }

  397.     /** Get the position of antenna reference point for antenna on vehicle.
  398.      * @return Position of antenna reference point for antenna on vehicle
  399.      */
  400.     public Vector3D getAntennaReferencePoint() {
  401.         return antRefPoint;
  402.     }

  403.     /** Set satellite system for average phase center.
  404.      * @param phaseCenterSystem satellite system for average phase center
  405.      * @since 12.0
  406.      */
  407.     public void setPhaseCenterSystem(final SatelliteSystem phaseCenterSystem) {
  408.         this.phaseCenterSystem = phaseCenterSystem;
  409.     }

  410.     /** Get satellite system for average phase center.
  411.      * @return satellite system for average phase center
  412.      * @since 12.0
  413.      */
  414.     public SatelliteSystem getPhaseCenterSystem() {
  415.         return phaseCenterSystem;
  416.     }

  417.     /** Set the observation code of the average phasecenter position w/r to antenna reference point.
  418.      * @param observationCode Observation code of the average phasecenter position w/r to antenna reference point
  419.      */
  420.     public void setObservationCode(final String observationCode) {
  421.         this.observationCode = observationCode;
  422.     }

  423.     /** Get the observation code of the average phasecenter position w/r to antenna reference point.
  424.      * @return Observation code of the average phasecenter position w/r to antenna reference point
  425.      */
  426.     public String getObservationCode() {
  427.         return observationCode;
  428.     }

  429.     /** Set the antenna phasecenter.
  430.      * @param antennaPhaseCenter Antenna phasecenter
  431.      */
  432.     public void setAntennaPhaseCenter(final Vector3D antennaPhaseCenter) {
  433.         this.antennaPhaseCenter = antennaPhaseCenter;
  434.     }

  435.     /** Get the antenna phasecenter.
  436.      * @return Antenna phasecenter
  437.      */
  438.     public Vector3D getAntennaPhaseCenter() {
  439.         return antennaPhaseCenter;
  440.     }

  441.     /** Set the antenna B.Sight.
  442.      * @param antennaBSight Antenna B.Sight
  443.      */
  444.     public void setAntennaBSight(final Vector3D antennaBSight) {
  445.         this.antennaBSight = antennaBSight;
  446.     }

  447.     /** Get the antenna B.Sight.
  448.      * @return Antenna B.Sight
  449.      */
  450.     public Vector3D getAntennaBSight() {
  451.         return antennaBSight;
  452.     }

  453.     /** Set the azimuth of the zero direction of a fixed antenna.
  454.      * @param antennaAzimuth Azimuth of the zero direction of a fixed antenna
  455.      */
  456.     public void setAntennaAzimuth(final double antennaAzimuth) {
  457.         this.antennaAzimuth = antennaAzimuth;
  458.     }

  459.     /** Get the azimuth of the zero direction of a fixed antenna.
  460.      * @return Azimuth of the zero direction of a fixed antenna
  461.      */
  462.     public double getAntennaAzimuth() {
  463.         return antennaAzimuth;
  464.     }

  465.     /** Set the zero direction of antenna.
  466.      * @param antennaZeroDirection Zero direction of antenna
  467.      */
  468.     public void setAntennaZeroDirection(final Vector3D antennaZeroDirection) {
  469.         this.antennaZeroDirection = antennaZeroDirection;
  470.     }

  471.     /** Get the zero direction of antenna.
  472.      * @return Zero direction of antenna
  473.      */
  474.     public Vector3D getAntennaZeroDirection() {
  475.         return antennaZeroDirection;
  476.     }

  477.     /** Set the current center of mass of vehicle in body fixed coordinate system.
  478.      * @param centerMass Current center of mass of vehicle in body fixed coordinate system
  479.      */
  480.     public void setCenterMass(final Vector3D centerMass) {
  481.         this.centerMass = centerMass;
  482.     }

  483.     /** Get the current center of mass of vehicle in body fixed coordinate system.
  484.      * @return Current center of mass of vehicle in body fixed coordinate system
  485.      */
  486.     public Vector3D getCenterMass() {
  487.         return centerMass;
  488.     }

  489.     /** Set the unit of the carrier to noise ratio observables.
  490.      * @param signalStrengthUnit Unit of the carrier to noise ratio observables
  491.      */
  492.     public void setSignalStrengthUnit(final String signalStrengthUnit) {
  493.         this.signalStrengthUnit = signalStrengthUnit;
  494.     }

  495.     /** Get the unit of the carrier to noise ratio observables.
  496.      * @return Unit of the carrier to noise ratio observables
  497.      */
  498.     public String getSignalStrengthUnit() {
  499.         return signalStrengthUnit;
  500.     }

  501.     /** Set the future or past leap seconds.
  502.      * @param leapSecondsFuture Future or past leap seconds
  503.      */
  504.     public void setLeapSecondsFuture(final int leapSecondsFuture) {
  505.         this.leapSecondsFuture = leapSecondsFuture;
  506.     }

  507.     /** Get the future or past leap seconds.
  508.      * @return Future or past leap seconds
  509.      */
  510.     public int getLeapSecondsFuture() {
  511.         return leapSecondsFuture;
  512.     }

  513.     /** Set the respective leap second week number.
  514.      * @param leapSecondsWeekNum Respective leap second week number
  515.      */
  516.     public void setLeapSecondsWeekNum(final int leapSecondsWeekNum) {
  517.         this.leapSecondsWeekNum = leapSecondsWeekNum;
  518.     }

  519.     /** Get the respective leap second week number.
  520.      * @return Respective leap second week number
  521.      */
  522.     public int getLeapSecondsWeekNum() {
  523.         return leapSecondsWeekNum;
  524.     }

  525.     /** Set the respective leap second day number.
  526.      * @param leapSecondsDayNum Respective leap second day number
  527.      */
  528.     public void setLeapSecondsDayNum(final int leapSecondsDayNum) {
  529.         this.leapSecondsDayNum = leapSecondsDayNum;
  530.     }

  531.     /** Get the respective leap second day number.
  532.      * @return Respective leap second day number
  533.      */
  534.     public int getLeapSecondsDayNum() {
  535.         return leapSecondsDayNum;
  536.     }

  537.     /** Add applied differential code bias corrections.
  538.      * @param appliedDCBS applied differential code bias corrections to add
  539.      */
  540.     public void addAppliedDCBS(final AppliedDCBS appliedDCBS) {
  541.         listAppliedDCBS.add(appliedDCBS);
  542.     }

  543.     /** Get the list of applied differential code bias corrections.
  544.      * @return list of applied differential code bias corrections
  545.      */
  546.     public List<AppliedDCBS> getListAppliedDCBS() {
  547.         return Collections.unmodifiableList(listAppliedDCBS);
  548.     }

  549.     /** Add antenna center variation corrections.
  550.      * @param appliedPCVS antenna center variation corrections
  551.      */
  552.     public void addAppliedPCVS(final AppliedPCVS appliedPCVS) {
  553.         listAppliedPCVS.add(appliedPCVS);
  554.     }

  555.     /** Get the list of antenna center variation corrections.
  556.      * @return List of antenna center variation corrections
  557.      */
  558.     public List<AppliedPCVS> getListAppliedPCVS() {
  559.         return Collections.unmodifiableList(listAppliedPCVS);
  560.     }

  561.     /** Add phase shift correction used to generate phases consistent w/r to cycle shifts.
  562.      * @param phaseShiftCorrection phase shift correction used to generate phases consistent w/r to cycle shifts
  563.      */
  564.     public void addPhaseShiftCorrection(final PhaseShiftCorrection phaseShiftCorrection) {
  565.         phaseShiftCorrections.add(phaseShiftCorrection);
  566.     }

  567.     /** Get the list of phase shift correction used to generate phases consistent w/r to cycle shifts.
  568.      * @return List of phase shift correction used to generate phases consistent w/r to cycle shifts
  569.      */
  570.     public List<PhaseShiftCorrection> getPhaseShiftCorrections() {
  571.         return Collections.unmodifiableList(phaseShiftCorrections);
  572.     }

  573.     /** Add scale factor correction.
  574.      * @param satelliteSystem system to which this scaling factor applies
  575.      * @param scaleFactorCorrection scale factor correction
  576.      */
  577.     public void addScaleFactorCorrection(final SatelliteSystem satelliteSystem, final ScaleFactorCorrection scaleFactorCorrection) {
  578.         final List<ScaleFactorCorrection> sfc;
  579.         synchronized (scaleFactorCorrections) {
  580.             sfc = scaleFactorCorrections.computeIfAbsent(satelliteSystem, k -> new ArrayList<>());
  581.         }
  582.         sfc.add(scaleFactorCorrection);
  583.     }

  584.     /** Get the list of scale factor correction.
  585.      * @param satelliteSystem system to which this scaling factor applies
  586.      * @return List of scale factor correction
  587.      */
  588.     public List<ScaleFactorCorrection> getScaleFactorCorrections(final SatelliteSystem satelliteSystem) {
  589.         final List<ScaleFactorCorrection> sfc = scaleFactorCorrections.get(satelliteSystem);
  590.         return sfc == null ? Collections.emptyList() : Collections.unmodifiableList(sfc);
  591.     }

  592.     /** Add GLONASS satellite/channel association.
  593.      * @param glonassChannel GLONASS satellite/channel association
  594.      * @since 12.0
  595.      */
  596.     public void addGlonassChannel(final GlonassSatelliteChannel glonassChannel) {
  597.         glonassChannels.add(glonassChannel);
  598.     }

  599.     /** Get the list of GLONASS satellite/channel associations.
  600.      * @return List of GLONASS satellite/channel associations
  601.      * @since 12.0
  602.      */
  603.     public List<GlonassSatelliteChannel> getGlonassChannels() {
  604.         return Collections.unmodifiableList(glonassChannels);
  605.     }

  606.     /** Set number of satellites.
  607.      * @param nbSat number of satellites
  608.      * @since 12.0
  609.      */
  610.     public void setNbSat(final int nbSat) {
  611.         this.nbSat = nbSat;
  612.     }

  613.     /** Get number of satellites.
  614.      * @return number of satellites
  615.      * @since 12.0
  616.      */
  617.     public int getNbSat() {
  618.         return nbSat;
  619.     }

  620.     /** Set number of observations for a satellite.
  621.      * @param sat satellite
  622.      * @param type observation type
  623.      * @param nbObs number of observations of this type for this satellite
  624.      * @since 12.0
  625.      */
  626.     public void setNbObsPerSatellite(final SatInSystem sat, final ObservationType type, final int nbObs) {
  627.         final Map<ObservationType, Integer> satNbObs;
  628.         synchronized (nbObsPerSat) {
  629.             satNbObs = nbObsPerSat.computeIfAbsent(sat, k -> new HashMap<>());
  630.         }
  631.         satNbObs.put(type, nbObs);
  632.     }

  633.     /** Get an unmodifiable view of the map of number of observations per satellites.
  634.      * @return unmodifiable view of the map of number of observations per satellites
  635.      * @since 12.0
  636.      */
  637.     public Map<SatInSystem, Map<ObservationType, Integer>> getNbObsPerSat() {
  638.         return Collections.unmodifiableMap(nbObsPerSat);
  639.     }

  640.     /** Set number of observations for a satellite.
  641.      * @param system satellite system
  642.      * @param types observation types
  643.      * @since 12.0
  644.      */
  645.     public void setTypeObs(final SatelliteSystem system, final List<ObservationType> types) {
  646.         mapTypeObs.put(system, new ArrayList<>(types));
  647.     }

  648.     /** Get an unmodifiable view of the map of observation types.
  649.      * @return unmodifiable view of the map of observation types
  650.      * @since 12.0
  651.      */
  652.     public Map<SatelliteSystem, List<ObservationType>> getTypeObs() {
  653.         return Collections.unmodifiableMap(mapTypeObs);
  654.     }

  655.     /** Set the code phase bias correction for GLONASS {@link org.orekit.gnss.PredefinedObservationType#C1C} signal.
  656.      * @param c1cCodePhaseBias code phase bias correction for GLONASS {@link org.orekit.gnss.PredefinedObservationType#C1C} signal
  657.      * @since 12.0
  658.      */
  659.     public void setC1cCodePhaseBias(final double c1cCodePhaseBias) {
  660.         this.c1cCodePhaseBias = c1cCodePhaseBias;
  661.     }

  662.     /** Get the code phase bias correction for GLONASS {@link org.orekit.gnss.PredefinedObservationType#C1C} signal.
  663.      * @return code phase bias correction for GLONASS {@link org.orekit.gnss.PredefinedObservationType#C1C} signal
  664.      * @since 12.0
  665.      */
  666.     public double getC1cCodePhaseBias() {
  667.         return c1cCodePhaseBias;
  668.     }

  669.     /** Set the code phase bias correction for GLONASS {@link org.orekit.gnss.PredefinedObservationType#C1P} signal.
  670.      * @param c1pCodePhaseBias code phase bias correction for GLONASS {@link org.orekit.gnss.PredefinedObservationType#C1P} signal
  671.      * @since 12.0
  672.      */
  673.     public void setC1pCodePhaseBias(final double c1pCodePhaseBias) {
  674.         this.c1pCodePhaseBias = c1pCodePhaseBias;
  675.     }

  676.     /** Get the code phase bias correction for GLONASS {@link org.orekit.gnss.PredefinedObservationType#C1P} signal.
  677.      * @return code phase bias correction for GLONASS {@link org.orekit.gnss.PredefinedObservationType#C1P} signal
  678.      * @since 12.0
  679.      */
  680.     public double getC1pCodePhaseBias() {
  681.         return c1pCodePhaseBias;
  682.     }

  683.     /** Set the code phase bias correction for GLONASS {@link org.orekit.gnss.PredefinedObservationType#C2C} signal.
  684.      * @param c2cCodePhaseBias code phase bias correction for GLONASS {@link org.orekit.gnss.PredefinedObservationType#C2C} signal
  685.      * @since 12.0
  686.      */
  687.     public void setC2cCodePhaseBias(final double c2cCodePhaseBias) {
  688.         this.c2cCodePhaseBias = c2cCodePhaseBias;
  689.     }

  690.     /** Get the code phase bias correction for GLONASS {@link org.orekit.gnss.PredefinedObservationType#C2C} signal.
  691.      * @return code phase bias correction for GLONASS {@link org.orekit.gnss.PredefinedObservationType#C2C} signal
  692.      * @since 12.0
  693.      */
  694.     public double getC2cCodePhaseBias() {
  695.         return c2cCodePhaseBias;
  696.     }

  697.     /** Set the code phase bias correction for GLONASS {@link org.orekit.gnss.PredefinedObservationType#C2P} signal.
  698.      * @param c2pCodePhaseBias code phase bias correction for GLONASS {@link org.orekit.gnss.PredefinedObservationType#C2P} signal
  699.      * @since 12.0
  700.      */
  701.     public void setC2pCodePhaseBias(final double c2pCodePhaseBias) {
  702.         this.c2pCodePhaseBias = c2pCodePhaseBias;
  703.     }

  704.     /** Get the code phase bias correction for GLONASS {@link org.orekit.gnss.PredefinedObservationType#C2P} signal.
  705.      * @return code phase bias correction for GLONASS {@link org.orekit.gnss.PredefinedObservationType#C2P} signal
  706.      * @since 12.0
  707.      */
  708.     public double getC2pCodePhaseBias() {
  709.         return c2pCodePhaseBias;
  710.     }

  711. }