DcbSatellite.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.sinex;

  18. import org.orekit.gnss.SatelliteSystem;

  19. /**
  20.  * Class based on DCB, used to store the data parsed in {@link SinexLoader}
  21.  * for Differential Code Biases computed for satellites.
  22.  * <p>
  23.  * Satellites and stations have differentiated classes as stations might have multiple satellite systems.
  24.  * The data are stored in a single DCB object.
  25.  * </p>
  26.  * @author Louis Aucouturier
  27.  * @since 12.0
  28.  */
  29. public class DcbSatellite {

  30.     /** Satellite PRN identifier.
  31.      * <p>
  32.      * Satellite PRN and station id are present in order to allow stations to be associated with
  33.      * a satellite system stored in the PRN, as done in the Sinex file.
  34.      * </p>
  35.      */
  36.     private String prn;

  37.     /** DCB description container. */
  38.     private DcbDescription description;

  39.     /** DCB solution data. */
  40.     private Dcb dcb;

  41.     /**
  42.      * Constructor for the DCBSatellite class.
  43.      *
  44.      * @param prn satellite PRN identifier
  45.      */
  46.     public DcbSatellite(final String prn) {
  47.         this.prn         = prn;
  48.         this.description = null;
  49.         this.dcb         = new Dcb();
  50.     }

  51.     /**
  52.      * Get the data contained in "DCB/DESCRIPTION" block of the Sinex file.
  53.      * <p>
  54.      * This block gives important parameters from the analysis and defines
  55.      * the fields in the block ’BIAS/SOLUTION’
  56.      * </p>
  57.      * @return the "DCB/DESCRIPTION" parameters.
  58.      */
  59.     public DcbDescription getDescription() {
  60.         return description;
  61.     }

  62.     /**
  63.      * Set the data contained in "DCB/DESCRIPTION" block of the Sinex file.
  64.      *
  65.      * @param description the "DCB/DESCRIPTION" parameters to set
  66.      */
  67.     public void setDescription(final DcbDescription description) {
  68.         this.description = description;
  69.     }

  70.     /**
  71.      * Get the DCB data for the current satellite.
  72.      *
  73.      * @return the DCB data for the current satellite
  74.      */
  75.     public Dcb getDcbData() {
  76.         return dcb;
  77.     }

  78.     /**
  79.      * Return the satellite PRN, as a String.
  80.      * <p>
  81.      * Example of satellite PRN: "G01"
  82.      * </p>
  83.      * @return the satellite PRN
  84.      */
  85.     public String getPRN() {
  86.         return prn;
  87.     }

  88.     /**
  89.      * Get the satellite sytem corresponding to the satellite.
  90.      * <p>
  91.      * Satellite system is extracted from the first letter of the PRN.
  92.      * </p>
  93.      * @return the satellite from which the DCB are extracted.
  94.      */
  95.     public SatelliteSystem getSatelliteSytem() {
  96.         return SatelliteSystem.parseSatelliteSystem(prn);
  97.     }

  98. }