RelativisticClockInterSatellitesPhaseModifier.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.InterSatellitesPhase;
  23. import org.orekit.utils.Constants;
  24. import org.orekit.utils.ParameterDriver;

  25. /** Class modifying theoretical inter-satellites phase measurement with relativistic clock correction.
  26.  * <p>
  27.  * Relativistic clock correction is caused by the motion of the satellite as well as
  28.  * the change in the gravitational potential
  29.  * </p>
  30.  * @author Bryan Cazabonne
  31.  * @since 10.3
  32.  *
  33.  * @see "Teunissen, Peter, and Oliver Montenbruck, eds. Springer handbook of global navigation
  34.  * satellite systems. Chapter 19.2. Springer, 2017."
  35.  */
  36. public class RelativisticClockInterSatellitesPhaseModifier extends AbstractRelativisticClockModifier implements EstimationModifier<InterSatellitesPhase> {

  37.     /** Simple constructor. */
  38.     public RelativisticClockInterSatellitesPhaseModifier() {
  39.         super();
  40.     }

  41.     /** {@inheritDoc} */
  42.     @Override
  43.     public List<ParameterDriver> getParametersDrivers() {
  44.         return Collections.emptyList();
  45.     }

  46.     /** {@inheritDoc} */
  47.     @Override
  48.     public void modifyWithoutDerivatives(final EstimatedMeasurementBase<InterSatellitesPhase> estimated) {
  49.         // Relativistic clock correction
  50.         final double dtRel = relativisticCorrection(estimated);

  51.         // Wavelength
  52.         final double wavelength  = estimated.getObservedMeasurement().getWavelength();
  53.         final double cOverLambda = Constants.SPEED_OF_LIGHT / wavelength;

  54.         // Update estimated value taking into account the relativistic effect.
  55.         final double[] newValue = estimated.getEstimatedValue().clone();
  56.         newValue[0] = newValue[0] - dtRel * cOverLambda;
  57.         estimated.modifyEstimatedValue(this, newValue);
  58.     }

  59. }