GeometryFreeCombination.java

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

  18. import org.hipparchus.util.FastMath;
  19. import org.orekit.gnss.GnssSignal;
  20. import org.orekit.gnss.MeasurementType;
  21. import org.orekit.gnss.SatelliteSystem;

  22. /**
  23.  * Geometry-free combination.
  24.  * <p>
  25.  * This combination removes the geometry part of the measurement.
  26.  * It can be used to estimate the ionospheric electron content or to detect
  27.  * cycle slips in the carrier phase, as well.
  28.  * </p>
  29.  * <pre>
  30.  *    mGF =  m2 - m1
  31.  * </pre>
  32.  * With:
  33.  * <ul>
  34.  * <li>mGF: Geometry-free measurement.</li>
  35.  * <li>m1 : First measurement.</li>
  36.  * <li>m2 : Second measurement.</li>
  37.  * </ul>
  38.  * <p>
  39.  * Geometry-Free combination is a dual frequency combination.
  40.  * The two measurements shall have different frequencies but they must have the same {@link MeasurementType}.
  41.  * </p>
  42.  * @author Bryan Cazabonne
  43.  * @since 10.1
  44.  */
  45. public class GeometryFreeCombination extends AbstractDualFrequencyCombination {

  46.     /**
  47.      * Package private constructor for the factory.
  48.      * @param system satellite system for which the combination is applied
  49.      */
  50.     GeometryFreeCombination(final SatelliteSystem system) {
  51.         super(CombinationType.GEOMETRY_FREE, system);
  52.     }

  53.     /** {@inheritDoc} */
  54.     @Override
  55.     protected double getCombinedValue(final double obs1, final GnssSignal s1,
  56.                                       final double obs2, final GnssSignal s2) {
  57.         // Combined observed value does not depend on frequency for the Geometry-Free combination
  58.         return FastMath.abs(obs2 - obs1);
  59.     }

  60.     /** {@inheritDoc} */
  61.     @Override
  62.     protected double getCombinedFrequency(final GnssSignal s1, final GnssSignal s2) {
  63.         // There is not combined frequency for the Geometry-Free combination
  64.         return Double.NaN;
  65.     }

  66. }