ObservableSatellite.java

  1. /* Copyright 2002-2020 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;

  18. import org.hipparchus.util.FastMath;
  19. import org.orekit.utils.ParameterDriver;

  20. /** Class modeling a satellite that can be observed.
  21.  *
  22.  * @author Luc Maisonobe
  23.  * @since 9.3
  24.  */
  25. public class ObservableSatellite {

  26.     /** Prefix for clock offset parameter driver, the propagator index will be appended to it. */
  27.     public static final String CLOCK_OFFSET_PREFIX = "clock-offset-satellite-";

  28.     /** Clock offset scaling factor.
  29.      * <p>
  30.      * We use a power of 2 to avoid numeric noise introduction
  31.      * in the multiplications/divisions sequences.
  32.      * </p>
  33.      */
  34.     private static final double CLOCK_OFFSET_SCALE = FastMath.scalb(1.0, -10);

  35.     /** Index of the propagator related to this satellite. */
  36.     private final int propagatorIndex;

  37.     /** Parameter driver for satellite clock offset. */
  38.     private final ParameterDriver clockOffsetDriver;

  39.     /** Simple constructor.
  40.      * @param propagatorIndex index of the propagator related to this satellite
  41.      */
  42.     public ObservableSatellite(final int propagatorIndex) {
  43.         this.propagatorIndex   = propagatorIndex;
  44.         this.clockOffsetDriver = new ParameterDriver(CLOCK_OFFSET_PREFIX + propagatorIndex,
  45.                                                      0.0, CLOCK_OFFSET_SCALE,
  46.                                                      Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY);
  47.     }

  48.     /** Get the index of the propagator related to this satellite.
  49.      * @return index of the propagator related to this satellite
  50.      */
  51.     public int getPropagatorIndex() {
  52.         return propagatorIndex;
  53.     }

  54.     /** Get the clock offset parameter driver.
  55.      * <p>
  56.      * The offset value is defined as the value in seconds that must be <em>subtracted</em> from
  57.      * the satellite clock reading of time to compute the real physical date. The offset
  58.      * is therefore negative if the satellite clock is slow and positive if it is fast.
  59.      * </p>
  60.      * @return clock offset parameter driver
  61.      */
  62.     public ParameterDriver getClockOffsetDriver() {
  63.         return clockOffsetDriver;
  64.     }

  65. }