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
19 import org.hipparchus.CalculusFieldElement;
20 import org.orekit.bodies.FieldGeodeticPoint;
21 import org.orekit.bodies.GeodeticPoint;
22 import org.orekit.models.earth.weather.FieldPressureTemperatureHumidity;
23 import org.orekit.models.earth.weather.PressureTemperatureHumidity;
24 import org.orekit.models.earth.weather.water.CIPM2007;
25 import org.orekit.time.AbsoluteDate;
26 import org.orekit.time.FieldAbsoluteDate;
27 import org.orekit.utils.FieldTrackingCoordinates;
28 import org.orekit.utils.TrackingCoordinates;
29
30 /** The Marini-Murray tropospheric delay model for laser ranging.
31 *
32 * @see "Marini, J.W., and C.W. Murray, correction of Laser Range Tracking Data for
33 * Atmospheric Refraction at Elevations Above 10 degrees, X-591-73-351, NASA GSFC, 1973"
34 *
35 * @author Joris Olympio
36 * @deprecated as of 12.1, replaced by {@link MariniMurray}
37 */
38 @Deprecated
39 public class MariniMurrayModel extends MariniMurray implements DiscreteTroposphericModel {
40
41 /** Constant pressure, temperature and humidity. */
42 private final PressureTemperatureHumidity pth;
43
44 /** Create a new Marini-Murray model for the troposphere using the given
45 * environmental conditions.
46 * @param t0 the temperature at the station, K
47 * @param p0 the atmospheric pressure at the station, mbar
48 * @param rh the humidity at the station, as a ratio (50% → 0.5)
49 * @param lambda laser wavelength (c/f), nm
50 */
51 public MariniMurrayModel(final double t0, final double p0, final double rh, final double lambda) {
52 super(lambda, TroposphericModelUtils.NANO_M);
53 this.pth = new PressureTemperatureHumidity(0,
54 TroposphericModelUtils.HECTO_PASCAL.toSI(p0),
55 t0,
56 new CIPM2007().
57 waterVaporPressure(TroposphericModelUtils.HECTO_PASCAL.toSI(p0),
58 t0,
59 rh),
60 Double.NaN,
61 Double.NaN);
62 }
63
64 /** Create a new Marini-Murray model using a standard atmosphere model.
65 *
66 * <ul>
67 * <li>temperature: 20 degree Celsius</li>
68 * <li>pressure: 1013.25 mbar</li>
69 * <li>humidity: 50%</li>
70 * </ul>
71 *
72 * @param lambda laser wavelength (c/f), nm
73 *
74 * @return a Marini-Murray model with standard environmental values
75 */
76 public static MariniMurrayModel getStandardModel(final double lambda) {
77 final double p = TroposphericModelUtils.HECTO_PASCAL.toSI(1013.25);
78 final double t = 273.15 + 20;
79 final double rh = 0.5;
80 return new MariniMurrayModel(t, p, rh, lambda);
81 }
82
83 /** {@inheritDoc} */
84 @Override
85 public double pathDelay(final double elevation, final GeodeticPoint point,
86 final double[] parameters, final AbsoluteDate date) {
87 return pathDelay(new TrackingCoordinates(0.0, elevation, 0.0), point,
88 pth, parameters, date).
89 getDelay();
90 }
91
92 /** {@inheritDoc} */
93 @Override
94 public <T extends CalculusFieldElement<T>> T pathDelay(final T elevation,
95 final FieldGeodeticPoint<T> point,
96 final T[] parameters,
97 final FieldAbsoluteDate<T> date) {
98 return pathDelay(new FieldTrackingCoordinates<>(date.getField().getZero(), elevation, date.getField().getZero()),
99 point,
100 new FieldPressureTemperatureHumidity<>(date.getField(), pth),
101 parameters, date).
102 getDelay();
103 }
104
105 }