MariniMurrayModel.java

  1. /* Copyright 2011-2012 Space Applications Services
  2.  * Licensed to CS Communication & Systèmes (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.models.earth.troposphere;

  18. import org.hipparchus.CalculusFieldElement;
  19. import org.orekit.bodies.FieldGeodeticPoint;
  20. import org.orekit.bodies.GeodeticPoint;
  21. import org.orekit.models.earth.weather.FieldPressureTemperatureHumidity;
  22. import org.orekit.models.earth.weather.PressureTemperatureHumidity;
  23. import org.orekit.models.earth.weather.water.CIPM2007;
  24. import org.orekit.time.AbsoluteDate;
  25. import org.orekit.time.FieldAbsoluteDate;
  26. import org.orekit.utils.FieldTrackingCoordinates;
  27. import org.orekit.utils.TrackingCoordinates;

  28. /** The Marini-Murray tropospheric delay model for laser ranging.
  29.  *
  30.  * @see "Marini, J.W., and C.W. Murray, correction of Laser Range Tracking Data for
  31.  *      Atmospheric Refraction at Elevations Above 10 degrees, X-591-73-351, NASA GSFC, 1973"
  32.  *
  33.  * @author Joris Olympio
  34.  * @deprecated as of 12.1, replaced by {@link MariniMurray}
  35.  */
  36. @Deprecated
  37. public class MariniMurrayModel extends MariniMurray implements DiscreteTroposphericModel {

  38.     /** Constant pressure, temperature and humidity. */
  39.     private final PressureTemperatureHumidity pth;

  40.     /** Create a new Marini-Murray model for the troposphere using the given
  41.      * environmental conditions.
  42.      * @param t0 the temperature at the station, K
  43.      * @param p0 the atmospheric pressure at the station, mbar
  44.      * @param rh the humidity at the station, as a ratio (50% → 0.5)
  45.      * @param lambda laser wavelength (c/f), nm
  46.      */
  47.     public MariniMurrayModel(final double t0, final double p0, final double rh, final double lambda) {
  48.         super(lambda, TroposphericModelUtils.NANO_M);
  49.         this.pth = new PressureTemperatureHumidity(0,
  50.                                                    TroposphericModelUtils.HECTO_PASCAL.toSI(p0),
  51.                                                    t0,
  52.                                                    new CIPM2007().
  53.                                                    waterVaporPressure(TroposphericModelUtils.HECTO_PASCAL.toSI(p0),
  54.                                                                       t0,
  55.                                                                       rh),
  56.                                                    Double.NaN,
  57.                                                    Double.NaN);
  58.     }

  59.     /** Create a new Marini-Murray model using a standard atmosphere model.
  60.      *
  61.      * <ul>
  62.      * <li>temperature: 20 degree Celsius</li>
  63.      * <li>pressure: 1013.25 mbar</li>
  64.      * <li>humidity: 50%</li>
  65.      * </ul>
  66.      *
  67.      * @param lambda laser wavelength (c/f), nm
  68.      *
  69.      * @return a Marini-Murray model with standard environmental values
  70.      */
  71.     public static MariniMurrayModel getStandardModel(final double lambda) {
  72.         final double p  = TroposphericModelUtils.HECTO_PASCAL.toSI(1013.25);
  73.         final double t  = 273.15 + 20;
  74.         final double rh = 0.5;
  75.         return new MariniMurrayModel(t, p, rh, lambda);
  76.     }

  77.     /** {@inheritDoc} */
  78.     @Override
  79.     public double pathDelay(final double elevation, final GeodeticPoint point,
  80.                             final double[] parameters, final AbsoluteDate date) {
  81.         return pathDelay(new TrackingCoordinates(0.0, elevation, 0.0), point,
  82.                          pth, parameters, date).
  83.                getDelay();
  84.     }

  85.     /** {@inheritDoc} */
  86.     @Override
  87.     public <T extends CalculusFieldElement<T>> T pathDelay(final T elevation,
  88.                                                            final FieldGeodeticPoint<T> point,
  89.                                                            final T[] parameters,
  90.                                                            final FieldAbsoluteDate<T> date) {
  91.         return pathDelay(new FieldTrackingCoordinates<>(date.getField().getZero(), elevation, date.getField().getZero()),
  92.                          point,
  93.                          new FieldPressureTemperatureHumidity<>(date.getField(), pth),
  94.                          parameters, date).
  95.                getDelay();
  96.     }

  97. }