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.gnss;
18
19 import org.orekit.bodies.GeodeticPoint;
20 import org.orekit.time.AbsoluteDate;
21
22
23 /**
24 * This class is a container for the result of a single DOP computation.
25 *
26 * @author Pascal Parraud
27 * @since 8.0
28 * @see <a href="http://en.wikipedia.org/wiki/Dilution_of_precision_%28GPS%29">Dilution of precision</a>
29 *
30 */
31 public class DOP {
32
33 // Fields
34 /** Location with respect to the Earth where DOP was calculated. */
35 private final GeodeticPoint location;
36 /** Date when all DOP was calculated. */
37 private final AbsoluteDate date;
38 /** Number of GNSS satellites taken into account for DOP computation. */
39 private final int gnssNb;
40 /** Geometric dilution of precision. */
41 private final double gdop;
42 /** Position dilution of precision. */
43 private final double pdop;
44 /** Horizontal dilution of precision. */
45 private final double hdop;
46 /** Vertical dilution of precision. */
47 private final double vdop;
48 /** Time dilution of precision. */
49 private final double tdop;
50
51 /**
52 * Constructor.
53 *
54 * @param location location with respect to the Earth where DOP was calculated
55 * @param date date when all DOP was calculated
56 * @param gnssNb number of GNSS satellites taken into account for DOP computation
57 * @param gdop the geometric dilution of precision
58 * @param pdop the position dilution of precision
59 * @param hdop the horizontal dilution of precision
60 * @param vdop the vertical dilution of precision
61 * @param tdop the time dilution of precision
62 */
63 public DOP(final GeodeticPoint location, final AbsoluteDate date, final int gnssNb,
64 final double gdop, final double pdop, final double hdop, final double vdop, final double tdop) {
65 this.location = location;
66 this.date = date;
67 this.gnssNb = gnssNb;
68 this.gdop = gdop;
69 this.pdop = pdop;
70 this.hdop = hdop;
71 this.vdop = vdop;
72 this.tdop = tdop;
73 }
74
75 /** Gets the location with respect to the Earth where DOP was calculated.
76 * @return the location with respect to the Earth where DOP was calculated
77 */
78 public GeodeticPoint getLocation() {
79 return location;
80 }
81
82 /** Gets the calculation date of the DOP.
83 * @return the calculation date of the DOP
84 */
85 public AbsoluteDate getDate() {
86 return date;
87 }
88
89 /** Gets the number of GNSS satellites taken into account for DOP computation.
90 * @return the number of GNSS satellites taken into account for DOP computation
91 */
92 public int getGnssNb() {
93 return gnssNb;
94 }
95
96 /** Gets the geometric dilution of precision.
97 * @return the GDOP
98 */
99 public double getGdop() {
100 return gdop;
101 }
102
103 /** Gets the position dilution of precision.
104 * @return the PDOP
105 */
106 public double getPdop() {
107 return pdop;
108 }
109
110 /** Gets the horizontal dilution of precision.
111 * @return the HDOP
112 */
113 public double getHdop() {
114 return hdop;
115 }
116
117 /** Gets the vertical dilution of precision.
118 * @return the VDOP
119 */
120 public double getVdop() {
121 return vdop;
122 }
123
124 /** Gets the time dilution of precision.
125 * @return the TDOP
126 */
127 public double getTdop() {
128 return tdop;
129 }
130 }