RinexObservationHeader.java

  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. 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.     /** Real time-derived receiver clock offset. */
  92.     private int clkOffset;

  93.     /** List of applied differential code bias corrections. */
  94.     private List<AppliedDCBS> listAppliedDCBS;

  95.     /** List of antenna center variation corrections. */
  96.     private List<AppliedPCVS> listAppliedPCVS;

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

  99.     /** List of scale factor corrections. */
  100.     private Map<SatelliteSystem, List<ScaleFactorCorrection>> scaleFactorCorrections;

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

  105.     /** Number of satellites.
  106.      * @since 12.0
  107.      */
  108.     private int nbSat;

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

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

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

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

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

  128.     /** Respective leap second day number. */
  129.     private int leapSecondsDayNum;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  315.     /** Set the realtime-derived receiver clock offset.
  316.      * @param clkOffset realtime-derived receiver clock offset
  317.      */
  318.     public void setClkOffset(final int clkOffset) {
  319.         this.clkOffset = clkOffset;
  320.     }

  321.     /** Get the realtime-derived receiver clock offset.
  322.      * @return realtime-derived receiver clock offset
  323.      */
  324.     public int getClkOffset() {
  325.         return clkOffset;
  326.     }

  327.     /** Set the observation interval in seconds.
  328.      * @param interval Observation interval in seconds
  329.      */
  330.     public void setInterval(final double interval) {
  331.         this.interval = interval;
  332.     }

  333.     /** Get the observation interval in seconds.
  334.      * @return Observation interval in seconds
  335.      */
  336.     public double getInterval() {
  337.         return interval;
  338.     }

  339.     /** Set the time of First observation record.
  340.      * @param firstObs Time of First observation record
  341.      */
  342.     public void setTFirstObs(final AbsoluteDate firstObs) {
  343.         this.tFirstObs = firstObs;
  344.     }

  345.     /** Get the time of First observation record.
  346.      * @return Time of First observation record
  347.      */
  348.     public AbsoluteDate getTFirstObs() {
  349.         return tFirstObs;
  350.     }

  351.     /** Set the time of last observation record.
  352.      * @param lastObs Time of last observation record
  353.      */
  354.     public void setTLastObs(final AbsoluteDate lastObs) {
  355.         this.tLastObs = lastObs;
  356.     }

  357.     /** Get the time of last observation record.
  358.      * @return Time of last observation record
  359.      */
  360.     public AbsoluteDate getTLastObs() {
  361.         return tLastObs;
  362.     }

  363.     /** Set the Number of leap seconds since 6-Jan-1980.
  364.      * @param leapSeconds Number of leap seconds since 6-Jan-1980
  365.      */
  366.     public void setLeapSeconds(final int leapSeconds) {
  367.         this.leapSeconds = leapSeconds;
  368.     }

  369.     /** Get the Number of leap seconds since 6-Jan-1980.
  370.      * @return Number of leap seconds since 6-Jan-1980
  371.      */
  372.     public int getLeapSeconds() {
  373.         return leapSeconds;
  374.     }

  375.     /** Set type of the antenna marker.
  376.      * @param markerType type of the antenna marker
  377.      */
  378.     public void setMarkerType(final String markerType) {
  379.         this.markerType = markerType;
  380.     }

  381.     /** Get type of the antenna marker.
  382.      * @return type of the antenna marker
  383.      */
  384.     public String getMarkerType() {
  385.         return markerType;
  386.     }

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

  393.     /** Get the position of antenna reference point for antenna on vehicle.
  394.      * @return Position of antenna reference point for antenna on vehicle
  395.      */
  396.     public Vector3D getAntennaReferencePoint() {
  397.         return antRefPoint;
  398.     }

  399.     /** Set satellite system for average phase center.
  400.      * @param phaseCenterSystem satellite system for average phase center
  401.      * @since 12.0
  402.      */
  403.     public void setPhaseCenterSystem(final SatelliteSystem phaseCenterSystem) {
  404.         this.phaseCenterSystem = phaseCenterSystem;
  405.     }

  406.     /** Get satellite system for average phase center.
  407.      * @return satellite system for average phase center
  408.      * @since 12.0
  409.      */
  410.     public SatelliteSystem getPhaseCenterSystem() {
  411.         return phaseCenterSystem;
  412.     }

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

  419.     /** Get the observation code of the average phasecenter position w/r to antenna reference point.
  420.      * @return Observation code of the average phasecenter position w/r to antenna reference point
  421.      */
  422.     public String getObservationCode() {
  423.         return observationCode;
  424.     }

  425.     /** Set the antenna phasecenter.
  426.      * @param antennaPhaseCenter Antenna phasecenter
  427.      */
  428.     public void setAntennaPhaseCenter(final Vector3D antennaPhaseCenter) {
  429.         this.antennaPhaseCenter = antennaPhaseCenter;
  430.     }

  431.     /** Get the antenna phasecenter.
  432.      * @return Antenna phasecenter
  433.      */
  434.     public Vector3D getAntennaPhaseCenter() {
  435.         return antennaPhaseCenter;
  436.     }

  437.     /** Set the antenna B.Sight.
  438.      * @param antennaBSight Antenna B.Sight
  439.      */
  440.     public void setAntennaBSight(final Vector3D antennaBSight) {
  441.         this.antennaBSight = antennaBSight;
  442.     }

  443.     /** Get the antenna B.Sight.
  444.      * @return Antenna B.Sight
  445.      */
  446.     public Vector3D getAntennaBSight() {
  447.         return antennaBSight;
  448.     }

  449.     /** Set the azimuth of the zero direction of a fixed antenna.
  450.      * @param antennaAzimuth Azimuth of the zero direction of a fixed antenna
  451.      */
  452.     public void setAntennaAzimuth(final double antennaAzimuth) {
  453.         this.antennaAzimuth = antennaAzimuth;
  454.     }

  455.     /** Get the azimuth of the zero direction of a fixed antenna.
  456.      * @return Azimuth of the zero direction of a fixed antenna
  457.      */
  458.     public double getAntennaAzimuth() {
  459.         return antennaAzimuth;
  460.     }

  461.     /** Set the zero direction of antenna.
  462.      * @param antennaZeroDirection Zero direction of antenna
  463.      */
  464.     public void setAntennaZeroDirection(final Vector3D antennaZeroDirection) {
  465.         this.antennaZeroDirection = antennaZeroDirection;
  466.     }

  467.     /** Get the zero direction of antenna.
  468.      * @return Zero direction of antenna
  469.      */
  470.     public Vector3D getAntennaZeroDirection() {
  471.         return antennaZeroDirection;
  472.     }

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

  479.     /** Get the current center of mass of vehicle in body fixed coordinate system.
  480.      * @return Current center of mass of vehicle in body fixed coordinate system
  481.      */
  482.     public Vector3D getCenterMass() {
  483.         return centerMass;
  484.     }

  485.     /** Set the unit of the carrier to noise ratio observables.
  486.      * @param signalStrengthUnit Unit of the carrier to noise ratio observables
  487.      */
  488.     public void setSignalStrengthUnit(final String signalStrengthUnit) {
  489.         this.signalStrengthUnit = signalStrengthUnit;
  490.     }

  491.     /** Get the unit of the carrier to noise ratio observables.
  492.      * @return Unit of the carrier to noise ratio observables
  493.      */
  494.     public String getSignalStrengthUnit() {
  495.         return signalStrengthUnit;
  496.     }

  497.     /** Set the future or past leap seconds.
  498.      * @param leapSecondsFuture Future or past leap seconds
  499.      */
  500.     public void setLeapSecondsFuture(final int leapSecondsFuture) {
  501.         this.leapSecondsFuture = leapSecondsFuture;
  502.     }

  503.     /** Get the future or past leap seconds.
  504.      * @return Future or past leap seconds
  505.      */
  506.     public int getLeapSecondsFuture() {
  507.         return leapSecondsFuture;
  508.     }

  509.     /** Set the respective leap second week number.
  510.      * @param leapSecondsWeekNum Respective leap second week number
  511.      */
  512.     public void setLeapSecondsWeekNum(final int leapSecondsWeekNum) {
  513.         this.leapSecondsWeekNum = leapSecondsWeekNum;
  514.     }

  515.     /** Get the respective leap second week number.
  516.      * @return Respective leap second week number
  517.      */
  518.     public int getLeapSecondsWeekNum() {
  519.         return leapSecondsWeekNum;
  520.     }

  521.     /** Set the respective leap second day number.
  522.      * @param leapSecondsDayNum Respective leap second day number
  523.      */
  524.     public void setLeapSecondsDayNum(final int leapSecondsDayNum) {
  525.         this.leapSecondsDayNum = leapSecondsDayNum;
  526.     }

  527.     /** Get the respective leap second day number.
  528.      * @return Respective leap second day number
  529.      */
  530.     public int getLeapSecondsDayNum() {
  531.         return leapSecondsDayNum;
  532.     }

  533.     /** Add applied differential code bias corrections.
  534.      * @param appliedDCBS applied differential code bias corrections to add
  535.      */
  536.     public void addAppliedDCBS(final AppliedDCBS appliedDCBS) {
  537.         listAppliedDCBS.add(appliedDCBS);
  538.     }

  539.     /** Get the list of applied differential code bias corrections.
  540.      * @return list of applied differential code bias corrections
  541.      */
  542.     public List<AppliedDCBS> getListAppliedDCBS() {
  543.         return Collections.unmodifiableList(listAppliedDCBS);
  544.     }

  545.     /** Add antenna center variation corrections.
  546.      * @param appliedPCVS antenna center variation corrections
  547.      */
  548.     public void addAppliedPCVS(final AppliedPCVS appliedPCVS) {
  549.         listAppliedPCVS.add(appliedPCVS);
  550.     }

  551.     /** Get the list of antenna center variation corrections.
  552.      * @return List of antenna center variation corrections
  553.      */
  554.     public List<AppliedPCVS> getListAppliedPCVS() {
  555.         return Collections.unmodifiableList(listAppliedPCVS);
  556.     }

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

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

  569.     /** Add scale factor correction.
  570.      * @param satelliteSystem system to which this scaling factor applies
  571.      * @param scaleFactorCorrection scale factor correction
  572.      */
  573.     public void addScaleFactorCorrection(final SatelliteSystem satelliteSystem, final ScaleFactorCorrection scaleFactorCorrection) {
  574.         List<ScaleFactorCorrection> sfc = scaleFactorCorrections.get(satelliteSystem);
  575.         if (sfc == null) {
  576.             sfc = new ArrayList<>();
  577.             scaleFactorCorrections.put(satelliteSystem, sfc);
  578.         }
  579.         sfc.add(scaleFactorCorrection);
  580.     }

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

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

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

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

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

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

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

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

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

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

  660.     /** Get the code phase bias correction for GLONASS {@link ObservationType#C1C} signal.
  661.      * @return code phase bias correction for GLONASS {@link ObservationType#C1C} signal
  662.      * @since 12.0
  663.      */
  664.     public double getC1cCodePhaseBias() {
  665.         return c1cCodePhaseBias;
  666.     }

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

  674.     /** Get the code phase bias correction for GLONASS {@link ObservationType#C1P} signal.
  675.      * @return code phase bias correction for GLONASS {@link ObservationType#C1P} signal
  676.      * @since 12.0
  677.      */
  678.     public double getC1pCodePhaseBias() {
  679.         return c1pCodePhaseBias;
  680.     }

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

  688.     /** Get the code phase bias correction for GLONASS {@link ObservationType#C2C} signal.
  689.      * @return code phase bias correction for GLONASS {@link ObservationType#C2C} signal
  690.      * @since 12.0
  691.      */
  692.     public double getC2cCodePhaseBias() {
  693.         return c2cCodePhaseBias;
  694.     }

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

  702.     /** Get the code phase bias correction for GLONASS {@link ObservationType#C2P} signal.
  703.      * @return code phase bias correction for GLONASS {@link ObservationType#C2P} signal
  704.      * @since 12.0
  705.      */
  706.     public double getC2pCodePhaseBias() {
  707.         return c2pCodePhaseBias;
  708.     }

  709. }