WideLaneCombination.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.gnss;

  18. import org.hipparchus.util.MathArrays;
  19. import org.orekit.gnss.Frequency;
  20. import org.orekit.gnss.MeasurementType;
  21. import org.orekit.gnss.SatelliteSystem;

  22. /**
  23.  * Wide-Lane combination.
  24.  * <p>
  25.  * This combination are used to create a signal
  26.  * with a significantly wide wavelength.
  27.  * This longer wavelength is useful for cycle-slips
  28.  * detection and ambiguity fixing
  29.  * </p>
  30.  * <pre>
  31.  *              f1 * m1 - f2 * m2
  32.  *    mWL =  -----------------------
  33.  *                   f1 - f2
  34.  * </pre>
  35.  * With:
  36.  * <ul>
  37.  * <li>mWL: Wide-laning measurement.</li>
  38.  * <li>f1 : Frequency of the first measurement.</li>
  39.  * <li>m1 : First measurement.</li>
  40.  * <li>f2 : Frequency of the second measurement.</li>
  41.  * <li>m1 : Second measurement.</li>
  42.  * </ul>
  43.  * <p>
  44.  * Wide-Lane combination is a dual frequency combination.
  45.  * The two measurements shall have different frequencies but they must have the same {@link MeasurementType}.
  46.  * </p>
  47.  * @author Bryan Cazabonne
  48.  * @since 10.1
  49.  */
  50. public class WideLaneCombination extends AbstractDualFrequencyCombination {

  51.     /**
  52.      * Package private constructor for the factory.
  53.      * @param system satellite system for which the combination is applied
  54.      */
  55.     WideLaneCombination(final SatelliteSystem system) {
  56.         super(CombinationType.WIDE_LANE, system);
  57.     }

  58.     /** {@inheritDoc} */
  59.     @Override
  60.     protected double getCombinedValue(final double obs1, final Frequency f1,
  61.                                       final double obs2, final Frequency f2) {
  62.         // Get the ration f/f0
  63.         final double ratioF1 = f1.getRatio();
  64.         final double ratioF2 = f2.getRatio();
  65.         // Perform combination
  66.         return MathArrays.linearCombination(ratioF1, obs1, -ratioF2, obs2) / (ratioF1 - ratioF2);
  67.     }

  68.     /** {@inheritDoc} */
  69.     @Override
  70.     protected double getCombinedFrequency(final Frequency f1, final Frequency f2) {
  71.         return f1.getMHzFrequency() - f2.getMHzFrequency();
  72.     }

  73. }