DOP.java

  1. /* Copyright 2002-2022 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.gnss;

  18. import org.orekit.bodies.GeodeticPoint;
  19. import org.orekit.time.AbsoluteDate;


  20. /**
  21.  * This class is a container for the result of a single DOP computation.
  22.  *
  23.  * @author Pascal Parraud
  24.  * @since 8.0
  25.  * @see <a href="http://en.wikipedia.org/wiki/Dilution_of_precision_%28GPS%29">Dilution of precision</a>
  26.  *
  27.  */
  28. public class DOP {

  29.     // Fields
  30.     /** Location with respect to the Earth where DOP was calculated. */
  31.     private final GeodeticPoint location;
  32.     /** Date when all DOP was calculated. */
  33.     private final AbsoluteDate date;
  34.     /** Number of GNSS satellites taken into account for DOP computation. */
  35.     private final int gnssNb;
  36.     /** Geometric dilution of precision. */
  37.     private final double gdop;
  38.     /** Position dilution of precision. */
  39.     private final double pdop;
  40.     /** Horizontal dilution of precision. */
  41.     private final double hdop;
  42.     /** Vertical dilution of precision. */
  43.     private final double vdop;
  44.     /** Time dilution of precision. */
  45.     private final double tdop;

  46.     /**
  47.      * Constructor.
  48.      *
  49.      * @param location location with respect to the Earth where DOP was calculated
  50.      * @param date date when all DOP was calculated
  51.      * @param gnssNb number of GNSS satellites taken into account for DOP computation
  52.      * @param gdop the geometric dilution of precision
  53.      * @param pdop the position dilution of precision
  54.      * @param hdop the horizontal dilution of precision
  55.      * @param vdop the vertical dilution of precision
  56.      * @param tdop the time dilution of precision
  57.      */
  58.     public DOP(final GeodeticPoint location, final AbsoluteDate date, final int gnssNb,
  59.                final double gdop, final double pdop, final double hdop, final double vdop, final double tdop) {
  60.         this.location = location;
  61.         this.date = date;
  62.         this.gnssNb = gnssNb;
  63.         this.gdop = gdop;
  64.         this.pdop = pdop;
  65.         this.hdop = hdop;
  66.         this.vdop = vdop;
  67.         this.tdop = tdop;
  68.     }

  69.     /** Gets the location with respect to the Earth where DOP was calculated.
  70.      * @return the location with respect to the Earth where DOP was calculated
  71.      */
  72.     public GeodeticPoint getLocation() {
  73.         return location;
  74.     }

  75.     /** Gets the calculation date of the DOP.
  76.      * @return the calculation date of the DOP
  77.      */
  78.     public AbsoluteDate getDate() {
  79.         return date;
  80.     }

  81.     /** Gets the number of GNSS satellites taken into account for DOP computation.
  82.      * @return the number of GNSS satellites taken into account for DOP computation
  83.      */
  84.     public int getGnssNb() {
  85.         return gnssNb;
  86.     }

  87.     /** Gets the geometric dilution of precision.
  88.      * @return the GDOP
  89.      */
  90.     public double getGdop() {
  91.         return gdop;
  92.     }

  93.     /** Gets the position dilution of precision.
  94.      * @return the PDOP
  95.      */
  96.     public double getPdop() {
  97.         return pdop;
  98.     }

  99.     /** Gets the horizontal dilution of precision.
  100.      * @return the HDOP
  101.      */
  102.     public double getHdop() {
  103.         return hdop;
  104.     }

  105.     /** Gets the vertical dilution of precision.
  106.      * @return the VDOP
  107.      */
  108.     public double getVdop() {
  109.         return vdop;
  110.     }

  111.     /** Gets the time dilution of precision.
  112.      * @return the TDOP
  113.      */
  114.     public double getTdop() {
  115.         return tdop;
  116.     }
  117. }