1   /* Copyright 2002-2024 Thales Alenia Space
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.annotation.DefaultDataContext;
21  import org.orekit.bodies.FieldGeodeticPoint;
22  import org.orekit.bodies.GeodeticPoint;
23  import org.orekit.data.DataContext;
24  import org.orekit.data.DataProvidersManager;
25  import org.orekit.models.earth.weather.PressureTemperatureHumidityProvider;
26  import org.orekit.time.AbsoluteDate;
27  import org.orekit.time.FieldAbsoluteDate;
28  
29  /** The modified Saastamoinen model.
30   * @author Luc Maisonobe
31   * @deprecated as of 12.1, replaced by {@link ModifiedSaastamoinenModel}
32   */
33  @Deprecated
34  public class SaastamoinenModel extends ModifiedSaastamoinenModel {
35  
36      /** Default file name for δR correction term table. */
37      public static final String DELTA_R_FILE_NAME = ModifiedSaastamoinenModel.DELTA_R_FILE_NAME;
38  
39      /** Default lowest acceptable elevation angle [rad]. */
40      public static final double DEFAULT_LOW_ELEVATION_THRESHOLD = ModifiedSaastamoinenModel.DEFAULT_LOW_ELEVATION_THRESHOLD;
41  
42      /**
43       * Create a new Saastamoinen model for the troposphere using the given environmental
44       * conditions and table from the reference book.
45       *
46       * @param t0 the temperature at the station [K]
47       * @param p0 the atmospheric pressure at the station [mbar]
48       * @param r0 the humidity at the station [fraction] (50% → 0.5)
49       * @see ModifiedSaastamoinenModel#ModifiedSaastamoinenModel(PressureTemperatureHumidityProvider, String, DataProvidersManager)
50       * @since 10.1
51       */
52      @DefaultDataContext
53      public SaastamoinenModel(final double t0, final double p0, final double r0) {
54          super(t0, p0, r0);
55      }
56  
57      /** Create a new Saastamoinen model for the troposphere using the given
58       * environmental conditions. This constructor uses the {@link DataContext#getDefault()
59       * default data context} if {@code deltaRFileName != null}.
60       *
61       * @param t0 the temperature at the station [K]
62       * @param p0 the atmospheric pressure at the station [mbar]
63       * @param r0 the humidity at the station [fraction] (50% → 0.5)
64       * @param deltaRFileName regular expression for filename containing δR
65       * correction term table (typically {@link #DELTA_R_FILE_NAME}), if null
66       * default values from the reference book are used
67       * @since 7.1
68       * @see ModifiedSaastamoinenModel#ModifiedSaastamoinenModel(PressureTemperatureHumidityProvider, String, DataProvidersManager)
69       */
70      @DefaultDataContext
71      public SaastamoinenModel(final double t0, final double p0, final double r0,
72                               final String deltaRFileName) {
73          super(t0, p0, r0, deltaRFileName);
74      }
75  
76      /** Create a new Saastamoinen model for the troposphere using the given
77       * environmental conditions. This constructor allows the user to specify the source of
78       * of the δR file.
79       *
80       * @param t0 the temperature at the station [K]
81       * @param p0 the atmospheric pressure at the station [mbar]
82       * @param r0 the humidity at the station [fraction] (50% → 0.5)
83       * @param deltaRFileName regular expression for filename containing δR
84       * correction term table (typically {@link #DELTA_R_FILE_NAME}), if null
85       * default values from the reference book are used
86       * @param dataProvidersManager provides access to auxiliary data.
87       * @since 10.1
88       */
89      public SaastamoinenModel(final double t0,
90                               final double p0,
91                               final double r0,
92                               final String deltaRFileName,
93                               final DataProvidersManager dataProvidersManager) {
94          super(t0, p0, r0, deltaRFileName, dataProvidersManager);
95      }
96  
97      /** Create a new Saastamoinen model using a standard atmosphere model.
98      *
99      * <ul>
100     * <li>altitude: 0m</li>
101     * <li>temperature: 18 degree Celsius
102     * <li>pressure: 1013.25 mbar
103     * <li>humidity: 50%
104     * </ul>
105     *
106     * @return a Saastamoinen model with standard environmental values
107     */
108     @DefaultDataContext
109     public static SaastamoinenModel getStandardModel() {
110         return new SaastamoinenModel(273.16 + 18, 1013.25, 0.5);
111     }
112 
113     /** {@inheritDoc} */
114     @Override
115     @Deprecated
116     public double pathDelay(final double elevation, final GeodeticPoint point,
117                             final double[] parameters, final AbsoluteDate date) {
118         return super.pathDelay(elevation, point, parameters, date);
119     }
120 
121     /** {@inheritDoc} */
122     @Override
123     @Deprecated
124     public <T extends CalculusFieldElement<T>> T pathDelay(final T elevation,
125                                                            final FieldGeodeticPoint<T> point,
126                                                            final T[] parameters,
127                                                            final FieldAbsoluteDate<T> date) {
128         return super.pathDelay(elevation, point, parameters, date);
129     }
130 
131 }