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
18 package org.orekit.estimation.measurements.modifiers;
19
20 import java.util.Collections;
21 import java.util.List;
22
23 import org.orekit.estimation.measurements.EstimatedMeasurementBase;
24 import org.orekit.estimation.measurements.EstimationModifier;
25 import org.orekit.estimation.measurements.Range;
26 import org.orekit.utils.Constants;
27 import org.orekit.utils.ParameterDriver;
28
29 /**
30 * Class modifying theoretical range measurements with relativistic J2 clock correction.
31 * <p>
32 * Relativistic clock correction of the effects caused by the oblateness of Earth on
33 * the gravity potential.
34 * </p>
35 * <p>
36 * The time delay caused by this effect is computed based on the orbital parameters of the
37 * emitter's orbit.
38 * </p>
39 *
40 * @author Louis Aucouturier
41 * @since 11.2
42 *
43 * @see "Teunissen, Peter, and Oliver Montenbruck, eds. Springer handbook of global navigation
44 * satellite systems. Chapter 19.2. Equation 19.18 Springer, 2017."
45 */
46
47 public class RelativisticJ2ClockRangeModifier extends AbstractRelativisticJ2ClockModifier implements EstimationModifier<Range> {
48
49 /**
50 * Modifier constructor.
51 * @param gm Earth gravitational constant (mu) in m³/s².
52 * @param c20 Earth un-normalized second zonal coefficient (Signed J2 constant, is negative) (Typical value -1.0826e-3).
53 * @param equatorialRadius Earth equatorial radius in m.
54 */
55 public RelativisticJ2ClockRangeModifier(final double gm,
56 final double c20,
57 final double equatorialRadius) {
58 super(gm, c20, equatorialRadius);
59 }
60
61 /** {@inheritDoc} */
62 public List<ParameterDriver> getParametersDrivers() {
63 return Collections.emptyList();
64 }
65
66 /** {@inheritDoc} */
67 @Override
68 public void modifyWithoutDerivatives(final EstimatedMeasurementBase<Range> estimated) {
69 // Relativistic effect
70 final double dtJ2 = relativisticJ2Correction(estimated);
71
72 // Update estimated value taking into account the relativistic effect.
73 final double[] newValue = estimated.getEstimatedValue().clone();
74 newValue[0] = newValue[0] - dtJ2 * Constants.SPEED_OF_LIGHT;
75 estimated.modifyEstimatedValue(this, newValue);
76 }
77
78 }