1 /* Copyright 2022-2026 Luc Maisonobe
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.estimation.measurements.gnss;
18
19 import java.util.Map;
20
21 import org.hipparchus.analysis.differentiation.Gradient;
22 import org.orekit.propagation.SpacecraftState;
23 import org.orekit.time.clocks.FieldClockOffset;
24 import org.orekit.utils.TimeStampedFieldPVCoordinates;
25
26 /** Common intermediate parameters used to estimate measurements where receiver is a ground station.
27 * @author Luc Maisonobe
28 * @since 12.1
29 */
30 class CommonParametersWithDerivatives {
31
32 /** Spacecraft state. */
33 private final SpacecraftState state;
34
35 /** Derivatives indices map. */
36 private final Map<String, Integer> indices;
37
38 /** Downlink delay. */
39 private final Gradient tauD;
40
41 /** Clock offset of measured satellite. */
42 private final FieldClockOffset<Gradient> localOffset;
43
44 /** Clock offset of remote observer. */
45 private final FieldClockOffset<Gradient> remoteOffset;
46
47 /** Transit state. */
48 private final SpacecraftState transitState;
49
50 /** Transit state of measured/local satellite. */
51 private final TimeStampedFieldPVCoordinates<Gradient> transitPV;
52
53 /** State of remote observer. */
54 private final TimeStampedFieldPVCoordinates<Gradient> remotePV;
55
56 /** Simple constructor.
57 * @param state spacecraft state
58 * @param indices derivatives indices map
59 * @param tauD downlink delay
60 * @param localOffset measured satellite clock offset
61 * @param remoteOffset clock offset of remote observer
62 * @param transitState transit state of measured satellite
63 * @param transitPV transit position/velocity as a gradient
64 * @param remotePV position/velocity of remote observer as a gradient
65 */
66 CommonParametersWithDerivatives(final SpacecraftState state,
67 final Map<String, Integer> indices,
68 final Gradient tauD,
69 final FieldClockOffset<Gradient> localOffset,
70 final FieldClockOffset<Gradient> remoteOffset,
71 final SpacecraftState transitState,
72 final TimeStampedFieldPVCoordinates<Gradient> transitPV,
73 final TimeStampedFieldPVCoordinates<Gradient> remotePV) {
74 this.state = state;
75 this.indices = indices;
76 this.tauD = tauD;
77 this.localOffset = localOffset;
78 this.remoteOffset = remoteOffset;
79 this.transitState = transitState;
80 this.transitPV = transitPV;
81 this.remotePV = remotePV;
82 }
83
84 /** Get spacecraft state.
85 * @return spacecraft state
86 */
87 public SpacecraftState getState() {
88 return state;
89 }
90
91 /** Get derivatives indices map.
92 * @return derivatives indices map
93 */
94 public Map<String, Integer> getIndices() {
95 return indices;
96 }
97
98 /** Get downlink delay.
99 * @return ownlink delay
100 */
101 public Gradient getTauD() {
102 return tauD;
103 }
104
105 /** Get local clock offset.
106 * @return clock offset of measured satellite
107 */
108 public FieldClockOffset<Gradient> getLocalOffset() {
109 return localOffset;
110 }
111
112 /** Get remote clock offset.
113 * @return clock offset of remote observer
114 */
115 public FieldClockOffset<Gradient> getRemoteOffset() {
116 return remoteOffset;
117 }
118
119 /** Get transit state.
120 * @return transit state
121 */
122 public SpacecraftState getTransitState() {
123 return transitState;
124 }
125
126 /** Get transit position/velocity.
127 * @return transit position/velocity
128 */
129 public TimeStampedFieldPVCoordinates<Gradient> getTransitPV() {
130 return transitPV;
131 }
132
133 /** Get remote observer position/velocity.
134 * @return remote observer position/velocity
135 */
136 public TimeStampedFieldPVCoordinates<Gradient> getRemotePV() {
137 return remotePV;
138 }
139
140 }