Skip to content

Commit

Permalink
Merge branch 'refs/heads/release-12.1' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
sscsepehy committed Jul 1, 2024
2 parents 48a7fc3 + f7b06e6 commit bbf24a5
Show file tree
Hide file tree
Showing 16 changed files with 202 additions and 53 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>org.orekit</groupId>
<artifactId>orekit</artifactId>
<packaging>jar</packaging>
<version>12.1</version>
<version>12.1.1</version>
<name>OREKIT</name>
<url>http://www.orekit.org/</url>

Expand Down
7 changes: 7 additions & 0 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
<title>Orekit Changes</title>
</properties>
<body>
<release version="12.1.1" date="25/06/2024"
description="Version 12.1.1 is a patch release of Orekit.
It fixes one incompatible change introduced in 12.1 on ModifiedSaastamoinenModel.">
<action dev="luc" type="fix" issue="1446">
Fixed API incompatible change introduced in 12.1.
</action>
</release>
<release version="12.1" date="24/06/2024"
description="Version 12.1 is a minor release of Orekit.
It includes both fixes and new features. Version 12.1 also includes major
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@
* </p>
* @author Thomas Neidhart
* @see "Guochang Xu, GPS - Theory, Algorithms and Applications, Springer, 2007"
* @since 12.1
* @since 12.0
*/
public class ModifiedSaastamoinenModel implements TroposphericModel {
public class ModifiedSaastamoinenModel implements TroposphericModel, DiscreteTroposphericModel {

/** Default file name for δR correction term table. */
public static final String DELTA_R_FILE_NAME = "^saastamoinen-correction\\.txt$";
Expand Down Expand Up @@ -123,6 +123,92 @@ public class ModifiedSaastamoinenModel implements TroposphericModel {
/** Lowest acceptable elevation angle [rad]. */
private double lowElevationThreshold;

/**
* Create a new Saastamoinen model for the troposphere using the given environmental
* conditions and table from the reference book.
*
* @param t0 the temperature at the station [K]
* @param p0 the atmospheric pressure at the station [mbar]
* @param r0 the humidity at the station [fraction] (50% -&gt; 0.5)
* @see #ModifiedSaastamoinenModel(double, double, double, String, DataProvidersManager)
* @since 10.1
* @deprecated as of 12.1.1, replaced by {@link #ModifiedSaastamoinenModel(PressureTemperatureHumidityProvider)}
*/
@Deprecated
public ModifiedSaastamoinenModel(final double t0, final double p0, final double r0) {
this(t0, p0, r0, defaultDeltaR());
}

/** Create a new Saastamoinen model for the troposphere using the given
* environmental conditions. This constructor uses the {@link DataContext#getDefault()
* default data context} if {@code deltaRFileName != null}.
*
* @param t0 the temperature at the station [K]
* @param p0 the atmospheric pressure at the station [mbar]
* @param r0 the humidity at the station [fraction] (50% -&gt; 0.5)
* @param deltaRFileName regular expression for filename containing δR
* correction term table (typically {@link #DELTA_R_FILE_NAME}), if null
* default values from the reference book are used
* @since 7.1
* @see #ModifiedSaastamoinenModel(double, double, double, String, DataProvidersManager)
* @deprecated as of 12.1.1, replaced by {@link #ModifiedSaastamoinenModel(PressureTemperatureHumidityProvider, String)}
*/
@Deprecated
@DefaultDataContext
public ModifiedSaastamoinenModel(final double t0, final double p0, final double r0,
final String deltaRFileName) {
this(t0, p0, r0, deltaRFileName,
DataContext.getDefault().getDataProvidersManager());
}

/** Create a new Saastamoinen model for the troposphere using the given
* environmental conditions. This constructor allows the user to specify the source of
* of the δR file.
*
* @param t0 the temperature at the station [K]
* @param p0 the atmospheric pressure at the station [mbar]
* @param r0 the humidity at the station [fraction] (50% -&gt; 0.5)
* @param deltaRFileName regular expression for filename containing δR
* correction term table (typically {@link #DELTA_R_FILE_NAME}), if null
* default values from the reference book are used
* @param dataProvidersManager provides access to auxiliary data.
* @since 10.1
* @deprecated as of 12.1.1, replaced by {@link #ModifiedSaastamoinenModel(PressureTemperatureHumidityProvider, String, DataProvidersManager)}
*/
@Deprecated
public ModifiedSaastamoinenModel(final double t0,
final double p0,
final double r0,
final String deltaRFileName,
final DataProvidersManager dataProvidersManager) {
this(t0, p0, r0,
deltaRFileName == null ?
defaultDeltaR() :
loadDeltaR(deltaRFileName, dataProvidersManager));
}

/** Create a new Saastamoinen model.
*
* @param t0 the temperature at the station [K]
* @param p0 the atmospheric pressure at the station [mbar]
* @param r0 the humidity at the station [fraction] (50% -> 0.5)
* @param deltaR δR correction term function
* @since 7.1
* @deprecated as of 12.1.1, replaced by {@link #ModifiedSaastamoinenModel(PressureTemperatureHumidityProvider, BilinearInterpolatingFunction)}
*/
@Deprecated
private ModifiedSaastamoinenModel(final double t0, final double p0, final double r0,
final BilinearInterpolatingFunction deltaR) {
this(new ConstantPressureTemperatureHumidityProvider(
new PressureTemperatureHumidity(0,
TroposphericModelUtils.HECTO_PASCAL.toSI(p0),
t0,
WATER.waterVaporPressure(TroposphericModelUtils.HECTO_PASCAL.toSI(p0), t0, r0),
Double.NaN,
Double.NaN)),
deltaR);
}

/**
* Create a new Saastamoinen model for the troposphere using the given environmental
* conditions and table from the reference book.
Expand Down Expand Up @@ -221,6 +307,51 @@ public PressureTemperatureHumidityProvider getPth0Provider() {
return pth0Provider;
}

/** {@inheritDoc}
* <p>
* The Saastamoinen model is not defined for altitudes below 0.0. for continuity
* reasons, we use the value for h = 0 when altitude is negative.
* </p>
* <p>
* There are also numerical issues for elevation angles close to zero. For continuity reasons,
* elevations lower than a threshold will use the value obtained
* for the threshold itself.
* </p>
* @see #getLowElevationThreshold()
* @see #setLowElevationThreshold(double)
*/
@Override
public double pathDelay(final double elevation, final GeodeticPoint point,
final double[] parameters, final AbsoluteDate date) {
return pathDelay(new TrackingCoordinates(0.0, elevation, 0.0), point,
pth0Provider.getWeatherParamerers(point, date),
parameters, date).
getDelay();
}

/** {@inheritDoc}
* <p>
* The Saastamoinen model is not defined for altitudes below 0.0. for continuity
* reasons, we use the value for h = 0 when altitude is negative.
* </p>
* <p>
* There are also numerical issues for elevation angles close to zero. For continuity reasons,
* elevations lower than a threshold will use the value obtained
* for the threshold itself.
* </p>
* @see #getLowElevationThreshold()
* @see #setLowElevationThreshold(double)
*/
@Override
public <T extends CalculusFieldElement<T>> T pathDelay(final T elevation, final FieldGeodeticPoint<T> point,
final T[] parameters, final FieldAbsoluteDate<T> date) {
return pathDelay(new FieldTrackingCoordinates<>(date.getField().getZero(), elevation, date.getField().getZero()),
point,
pth0Provider.getWeatherParamerers(point, date),
parameters, date).
getDelay();
}

/** {@inheritDoc}
* <p>
* The Saastamoinen model is not defined for altitudes below 0.0. for continuity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,16 @@
import org.orekit.bodies.GeodeticPoint;
import org.orekit.data.DataContext;
import org.orekit.data.DataProvidersManager;
import org.orekit.models.earth.weather.ConstantPressureTemperatureHumidityProvider;
import org.orekit.models.earth.weather.PressureTemperatureHumidity;
import org.orekit.models.earth.weather.PressureTemperatureHumidityProvider;
import org.orekit.models.earth.weather.water.Wang1988;
import org.orekit.time.AbsoluteDate;
import org.orekit.time.FieldAbsoluteDate;
import org.orekit.utils.FieldTrackingCoordinates;
import org.orekit.utils.TrackingCoordinates;

/** The modified Saastamoinen model.
* @author Luc Maisonobe
* @deprecated as of 12.1, replaced by {@link ModifiedSaastamoinenModel}
*/
@Deprecated
public class SaastamoinenModel extends ModifiedSaastamoinenModel implements DiscreteTroposphericModel {
public class SaastamoinenModel extends ModifiedSaastamoinenModel {

/** Default file name for δR correction term table. */
public static final String DELTA_R_FILE_NAME = ModifiedSaastamoinenModel.DELTA_R_FILE_NAME;
Expand All @@ -56,7 +51,7 @@ public class SaastamoinenModel extends ModifiedSaastamoinenModel implements Disc
*/
@DefaultDataContext
public SaastamoinenModel(final double t0, final double p0, final double r0) {
this(t0, p0, r0, DELTA_R_FILE_NAME);
super(t0, p0, r0);
}

/** Create a new Saastamoinen model for the troposphere using the given
Expand All @@ -75,7 +70,7 @@ public SaastamoinenModel(final double t0, final double p0, final double r0) {
@DefaultDataContext
public SaastamoinenModel(final double t0, final double p0, final double r0,
final String deltaRFileName) {
this(t0, p0, r0, deltaRFileName, DataContext.getDefault().getDataProvidersManager());
super(t0, p0, r0, deltaRFileName);
}

/** Create a new Saastamoinen model for the troposphere using the given
Expand All @@ -96,16 +91,7 @@ public SaastamoinenModel(final double t0,
final double r0,
final String deltaRFileName,
final DataProvidersManager dataProvidersManager) {
super(new ConstantPressureTemperatureHumidityProvider(new PressureTemperatureHumidity(0.0,
TroposphericModelUtils.HECTO_PASCAL.toSI(p0),
t0,
new Wang1988().
waterVaporPressure(TroposphericModelUtils.HECTO_PASCAL.toSI(p0),
t0,
r0),
Double.NaN,
Double.NaN)),
deltaRFileName, dataProvidersManager);
super(t0, p0, r0, deltaRFileName, dataProvidersManager);
}

/** Create a new Saastamoinen model using a standard atmosphere model.
Expand All @@ -129,8 +115,7 @@ public static SaastamoinenModel getStandardModel() {
@Deprecated
public double pathDelay(final double elevation, final GeodeticPoint point,
final double[] parameters, final AbsoluteDate date) {
return pathDelay(new TrackingCoordinates(0.0, elevation, 0.0), point,
getPth0Provider().getWeatherParamerers(point, date), parameters, date).getDelay();
return super.pathDelay(elevation, point, parameters, date);
}

/** {@inheritDoc} */
Expand All @@ -140,10 +125,7 @@ public <T extends CalculusFieldElement<T>> T pathDelay(final T elevation,
final FieldGeodeticPoint<T> point,
final T[] parameters,
final FieldAbsoluteDate<T> date) {
return pathDelay(new FieldTrackingCoordinates<>(date.getField().getZero(), elevation, date.getField().getZero()),
point,
getPth0Provider().getWeatherParamerers(point, date),
parameters, date).getDelay();
return super.pathDelay(elevation, point, parameters, date);
}

}
2 changes: 1 addition & 1 deletion src/site/markdown/downloads.md.vm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ with groupID org.orekit and artifactId orekit so maven
internal mechanism will download automatically all artifacts and dependencies
as required.

#set ( $versions = {"12.1": "2024-06-24", "12.0.2": "2024-03-15", "12.0.1": "2023-12-31", "12.0": "2023-11-08", "11.3.3": "2023-06-30", "11.3.2": "2023-02-17", "11.3.1": "2022-12-24", "11.3": "2022-10-25", "11.2.1": "2022-08-01", "11.2": "2022-06-20", "11.1.2": "2022-04-27", "11.1.1": "2022-03-17", "11.1": "2022-02-14", "11.0.2": "2021-11-24", "11.0.1": "2021-10-22", "11.0": "2021-09-20", "10.3.1": "2021-06-16", "10.3": "2020-12-21", "10.2": "2020-07-14", "10.1": "2020-02-19", "10.0": "2019-06-24", "9.3.1": "2019-03-16", "9.3": "2019-01-25", "9.2": "2018-05-26","9.1": "2017-11-26","9.0.1": "2017-11-03","9.0": "2017-07-26","8.0.1": "2017-11-03","8.0": "2016-06-30","7.2.1": "2017-11-03","7.2": "2016-04-05","7.1": "2016-02-07","7.0": "2015-01-11","6.1": "2013-12-13","6.0": "2013-04-23","5.0.3": "2011-07-13","5.0.2": "2011-07-11","5.0.1": "2011-04-18"} )
#set ( $versions = {"12.1.1": "2024-06-25", "12.1": "2024-06-24", "12.0.2": "2024-03-15", "12.0.1": "2023-12-31", "12.0": "2023-11-08", "11.3.3": "2023-06-30", "11.3.2": "2023-02-17", "11.3.1": "2022-12-24", "11.3": "2022-10-25", "11.2.1": "2022-08-01", "11.2": "2022-06-20", "11.1.2": "2022-04-27", "11.1.1": "2022-03-17", "11.1": "2022-02-14", "11.0.2": "2021-11-24", "11.0.1": "2021-10-22", "11.0": "2021-09-20", "10.3.1": "2021-06-16", "10.3": "2020-12-21", "10.2": "2020-07-14", "10.1": "2020-02-19", "10.0": "2019-06-24", "9.3.1": "2019-03-16", "9.3": "2019-01-25", "9.2": "2018-05-26","9.1": "2017-11-26","9.0.1": "2017-11-03","9.0": "2017-07-26","8.0.1": "2017-11-03","8.0": "2016-06-30","7.2.1": "2017-11-03","7.2": "2016-04-05","7.1": "2016-02-07","7.0": "2015-01-11","6.1": "2013-12-13","6.0": "2013-04-23","5.0.3": "2011-07-13","5.0.2": "2011-07-11","5.0.1": "2011-04-18"} )
#foreach( $version in $versions.entrySet() )

| package | link |
Expand Down
1 change: 1 addition & 0 deletions src/site/markdown/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ Math to Hipparchus
Orekit 12.0.1 | Hipparchus 3.0
Orekit 12.0.2 | Hipparchus 3.0
Orekit 12.1 | Hipparchus 3.1
Orekit 12.1.1 | Hipparchus 3.1

### Maven failed to compile Orekit and complained about a missing artifact.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.orekit.estimation.EstimationTestUtils;
import org.orekit.estimation.measurements.modifiers.BistaticRangeRateTroposphericDelayModifier;
import org.orekit.models.earth.troposphere.ModifiedSaastamoinenModel;
import org.orekit.models.earth.troposphere.TroposphericModel;
import org.orekit.orbits.OrbitType;
import org.orekit.orbits.PositionAngleType;
import org.orekit.propagation.Propagator;
Expand Down Expand Up @@ -168,7 +169,8 @@ public void testStateDerivativesWithModifier() {
1.0, 3.0, 300.0);
propagator.clearStepHandlers();

final BistaticRangeRateTroposphericDelayModifier modifier = new BistaticRangeRateTroposphericDelayModifier(ModifiedSaastamoinenModel.getStandardModel());
final BistaticRangeRateTroposphericDelayModifier modifier =
new BistaticRangeRateTroposphericDelayModifier((TroposphericModel) ModifiedSaastamoinenModel.getStandardModel());

double maxRelativeError = 0;
for (final ObservedMeasurement<?> measurement : measurements) {
Expand Down Expand Up @@ -324,7 +326,8 @@ public void testParameterDerivativesWithModifier() {
1.0, 3.0, 300.0);
propagator.clearStepHandlers();

final BistaticRangeRateTroposphericDelayModifier modifier = new BistaticRangeRateTroposphericDelayModifier(ModifiedSaastamoinenModel.getStandardModel());
final BistaticRangeRateTroposphericDelayModifier modifier =
new BistaticRangeRateTroposphericDelayModifier((TroposphericModel) ModifiedSaastamoinenModel.getStandardModel());

double maxRelativeError = 0;
for (final ObservedMeasurement<?> measurement : measurements) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.orekit.estimation.EstimationTestUtils;
import org.orekit.estimation.measurements.modifiers.BistaticRangeTroposphericDelayModifier;
import org.orekit.models.earth.troposphere.ModifiedSaastamoinenModel;
import org.orekit.models.earth.troposphere.TroposphericModel;
import org.orekit.orbits.OrbitType;
import org.orekit.orbits.PositionAngleType;
import org.orekit.propagation.Propagator;
Expand Down Expand Up @@ -169,7 +170,8 @@ public void testStateDerivativesWithModifier() {
1.0, 3.0, 300.0);
propagator.clearStepHandlers();

final BistaticRangeTroposphericDelayModifier modifier = new BistaticRangeTroposphericDelayModifier(ModifiedSaastamoinenModel.getStandardModel());
final BistaticRangeTroposphericDelayModifier modifier =
new BistaticRangeTroposphericDelayModifier((TroposphericModel) ModifiedSaastamoinenModel.getStandardModel());

double maxRelativeError = 0;
for (final ObservedMeasurement<?> measurement : measurements) {
Expand Down Expand Up @@ -325,7 +327,8 @@ public void testParameterDerivativesWithModifier() {
1.0, 3.0, 300.0);
propagator.clearStepHandlers();

final BistaticRangeTroposphericDelayModifier modifier = new BistaticRangeTroposphericDelayModifier(ModifiedSaastamoinenModel.getStandardModel());
final BistaticRangeTroposphericDelayModifier modifier =
new BistaticRangeTroposphericDelayModifier((TroposphericModel) ModifiedSaastamoinenModel.getStandardModel());

double maxRelativeError = 0;
for (final ObservedMeasurement<?> measurement : measurements) {
Expand Down
Loading

0 comments on commit bbf24a5

Please sign in to comment.