RelativisticJ2ClockOneWayGNSSPhaseModifier.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.estimation.measurements.modifiers;

  18. import java.util.Collections;
  19. import java.util.List;

  20. import org.orekit.estimation.measurements.EstimatedMeasurementBase;
  21. import org.orekit.estimation.measurements.EstimationModifier;
  22. import org.orekit.estimation.measurements.gnss.OneWayGNSSPhase;
  23. import org.orekit.utils.Constants;
  24. import org.orekit.utils.ParameterDriver;

  25. /**
  26.  * Class modifying theoretical one-way phase measurements with relativistic J2 clock correction.
  27.  * <p>
  28.  * Relativistic clock correction of the effects caused by the oblateness of Earth on
  29.  * the gravity potential.
  30.  * </p>
  31.  * <p>
  32.  * The time delay caused by this effect is computed based on the orbital parameters of the
  33.  * emitter's orbit.
  34.  * </p>
  35.  *
  36.  * @author Louis Aucouturier
  37.  * @since 11.2
  38.  *
  39.  * @see "Teunissen, Peter, and Oliver Montenbruck, eds. Springer handbook of global navigation
  40.  * satellite systems. Chapter 19.2. Equation 19.18 Springer, 2017."
  41.  */

  42. public class RelativisticJ2ClockOneWayGNSSPhaseModifier extends AbstractRelativisticJ2ClockModifier implements EstimationModifier<OneWayGNSSPhase> {

  43.     /**
  44.      * Modifier constructor.
  45.      * @param gm Earth gravitational constant (mu) in m³/s².
  46.      * @param c20 Earth un-normalized second zonal coefficient (Signed J2 constant, is negative) (Typical value -1.0826e-3).
  47.      * @param equatorialRadius Earth equatorial radius in m.
  48.      */
  49.     public RelativisticJ2ClockOneWayGNSSPhaseModifier(final double gm,
  50.                                                       final double c20,
  51.                                                       final double equatorialRadius) {
  52.         super(gm, c20, equatorialRadius);
  53.     }

  54.     /** {@inheritDoc} */
  55.     @Override
  56.     public List<ParameterDriver> getParametersDrivers() {
  57.         return Collections.emptyList();
  58.     }

  59.     /** {@inheritDoc} */
  60.     @Override
  61.     public void modifyWithoutDerivatives(final EstimatedMeasurementBase<OneWayGNSSPhase> estimated) {
  62.         // Relativistic clock correction
  63.         final double dtJ2 = relativisticJ2Correction(estimated);

  64.         // Wavelength
  65.         final double wavelength = estimated.getObservedMeasurement().getWavelength();

  66.         // Update estimated value taking into account the relativistic effect.
  67.         final double   cOverLambda = Constants.SPEED_OF_LIGHT / wavelength;
  68.         final double[] newValue = estimated.getEstimatedValue().clone();
  69.         newValue[0] = newValue[0] - dtJ2 * cOverLambda;
  70.         estimated.modifyEstimatedValue(this, newValue);
  71.     }

  72. }