Commit 1f9e1ee1 authored by Bryan Cazabonne's avatar Bryan Cazabonne

Merge branch 'develop' into tropo

Conflicts:
	src/main/java/org/orekit/models/earth/ViennaModelCoefficientsLoader.java
	src/test/java/org/orekit/estimation/leastsquares/OrbitDeterminationTest.java
	src/test/java/org/orekit/models/earth/ViennaModelCoefficientsLoaderTest.java
parents 39940d9e 5600aca5
......@@ -175,6 +175,9 @@
<contributor>
<name>Espen Bj&#248;rntvedt</name>
</contributor>
<contributor>
<name>Bryan Cazabonne</name>
</contributor>
<contributor>
<name>Paul Cefola</name>
</contributor>
......
......@@ -75,7 +75,7 @@ public class EstimatedTroposphericModel implements DiscreteTroposphericModel {
* @param totalDelay initial value for the tropospheric zenith total delay [m]
*/
public EstimatedTroposphericModel(final double t0, final double p0,
final MappingFunction model, final double totalDelay) {
final MappingFunction model, final double totalDelay) {
totalZenithDelay = new ParameterDriver(EstimatedTroposphericModel.TOTAL_ZENITH_DELAY,
totalDelay, FastMath.scalb(1.0, 0), 0.0, Double.POSITIVE_INFINITY);
......
......@@ -91,10 +91,10 @@ public class ViennaModelCoefficientsLoader implements DataLoader {
/** The hydrostatic and wet zenith delays loaded. */
private double[] zenithDelay;
/** Geodetic site latitude, degrees.*/
/** Geodetic site latitude, radians.*/
private double latitude;
/** Geodetic site longitude, degrees.*/
/** Geodetic site longitude, radians.*/
private double longitude;
/** Vienna tropospheric model type.*/
......@@ -102,8 +102,8 @@ public class ViennaModelCoefficientsLoader implements DataLoader {
/** Constructor with supported names given by user.
* @param supportedNames Supported names
* @param latitude geodetic latitude of the station, in degrees
* @param longitude geodetic latitude of the station, in degrees
* @param latitude geodetic latitude of the station, in radians
* @param longitude geodetic latitude of the station, in radians
* @param type the type of Vienna tropospheric model (one or three)
*/
public ViennaModelCoefficientsLoader(final String supportedNames, final double latitude,
......@@ -114,14 +114,14 @@ public class ViennaModelCoefficientsLoader implements DataLoader {
this.type = type;
this.latitude = latitude;
// Normalize longitude between 0° and 360°
final double lon = MathUtils.normalizeAngle(FastMath.toRadians(longitude), FastMath.PI);
this.longitude = FastMath.toDegrees(lon);
// Normalize longitude between 0 and 2π
this.longitude = MathUtils.normalizeAngle(longitude, FastMath.PI);
}
/** Constructor with default supported names.
* @param latitude geodetic latitude of the station, in degrees
* @param longitude geodetic latitude of the station, in degrees
* @param latitude geodetic latitude of the station, in radians
* @param longitude geodetic latitude of the station, in radians
* @param type the type of Vienna tropospheric model (one or three)
*/
public ViennaModelCoefficientsLoader(final double latitude, final double longitude,
......@@ -262,16 +262,16 @@ public class ViennaModelCoefficientsLoader implements DataLoader {
// Latitudes list
for (double lat = Double.valueOf(range_line[2]); lat <= Double.valueOf(range_line[3]); lat = lat + Double.valueOf(range_line[6])) {
latitudes.add(lat);
latitudes.add(FastMath.toRadians(lat));
}
// Longitude list
for (double lon = Double.valueOf(range_line[4]); lon <= Double.valueOf(range_line[5]); lon = lon + Double.valueOf(range_line[7])) {
longitudes.add(lon);
longitudes.add(FastMath.toRadians(lon));
// For VFM1 files, header specify that longitudes end at 360°
// In reality they end at 357.5°. That is why we stop the loop when the longitude
// is equal to 357.5°.
if (type == ViennaModelType.VIENNA_ONE && lon == 357.5) {
// reaches 357.5°.
if (type == ViennaModelType.VIENNA_ONE && lon >= 357.5) {
break;
}
}
......
......@@ -209,7 +209,8 @@ discrete events. Here is a short list of the features offered by the library:</p
<li>force model parameters estimation (drag coefficients, radiation pressure coefficients,
central attraction, maneuver thrust or flow rate)</li>
<li>measurements parameters estimation (biases, satellite clock offset, station clock offset,
station position, pole motion and rate, prime meridian correction and rate)</li>
station position, pole motion and rate, prime meridian correction and rate, total
zenith delay in tropospheric correction)</li>
</ul>
</li>
<li>multi-satellites orbit determination</li>
......@@ -271,7 +272,7 @@ discrete events. Here is a short list of the features offered by the library:</p
</li>
<li>Earth models
<ul>
<li>tropospheric delay (modified Saastamoinen)</li>
<li>tropospheric delay (modified Saastamoinen, Mendes-Pavlis, Vienna 1, Vienna 2, estimated, fixed)</li>
<li>tropospheric refraction correction angle (Recommendation ITU-R P.834-7 and Saemundssen's formula quoted by Meeus)</li>
<li>tropospheric model for laser ranging (Marini-Murray)</li>
<li>Klobuchar ionospheric model (including parsing α and β coefficients from University of Bern Astronomical Institute files)</li>
......
......@@ -186,7 +186,8 @@
* force model parameters estimation (drag coefficients, radiation pressure coefficients,
central attraction, maneuver thrust or flow rate)
* measurements parameters estimation (biases, satellite clock offset, station clock offset,
station position, pole motion and rate, prime meridian correction and rate)
station position, pole motion and rate, prime meridian correction and rate, total zenith
delay in tropospheric correction)
* multi-satellites orbit determination
* ground stations displacements due to solid tides
......@@ -240,7 +241,7 @@
* Earth models
* tropospheric delay (modified Saastamoinen)
* tropospheric delay (modified Saastamoinen, Mendes-Pavlis, Vienna 1, Vienna 2, estimated, fixed)
* tropospheric refraction correction angle (Recommendation ITU-R P.834-7 and Saemundssen's formula quoted by Meeus)
* tropospheric model for laser ranging (Marini-Murray)
* Klobuchar ionospheric model (including parsing α and β coefficients from University of Bern Astronomical Institute files)
......
......@@ -21,6 +21,14 @@
</properties>
<body>
<release version="TBD" date="TBD" description="TBD">
<action dev="bryan" type="add" issue="498">
Added several tropospheric models: Mendes-Pavlis, Vienna 1, Vienna 3, estimated model
where the total zenith delay can be estimated during Orbit Determination.
</action>
<action dev="bryan" type="add" issue="498">
Added Global Mapping Function and Niell Mapping Function to be used with tropospheric
models.
</action>
<action dev="luc" type="add" issue="515">
Added clock offset parameter at satellites level for orbit determination.
</action>
......
......@@ -254,7 +254,7 @@ public class OrbitDeterminationTest {
//test on statistic for the range residuals
final long nbRange = 4009;
final double[] RefStatRange = { -2.555, 2.830, 0.0, 0.750 };
final double[] RefStatRange = { -2.706, 2.566, 0.0, 0.738 };
Assert.assertEquals(nbRange, odGNSS.getRangeStat().getN());
Assert.assertEquals(RefStatRange[0], odGNSS.getRangeStat().getMin(), 0.3);
Assert.assertEquals(RefStatRange[1], odGNSS.getRangeStat().getMax(), 0.3);
......@@ -1077,11 +1077,11 @@ public class OrbitDeterminationTest {
final double[] stationLatitudes = parser.getAngleArray(ParameterKey.GROUND_STATION_LATITUDE);
final double[] stationLongitudes = parser.getAngleArray(ParameterKey.GROUND_STATION_LONGITUDE);
final double[] stationAltitudes = parser.getDoubleArray(ParameterKey.GROUND_STATION_ALTITUDE);
final boolean[] stationPositionEstimated = parser.getBooleanArray(ParameterKey.GROUND_STATION_POSITION_ESTIMATED);
final double[] stationClockOffsets = parser.getDoubleArray(ParameterKey.GROUND_STATION_CLOCK_OFFSET);
final double[] stationClockOffsetsMin = parser.getDoubleArray(ParameterKey.GROUND_STATION_CLOCK_OFFSET_MIN);
final double[] stationClockOffsetsMax = parser.getDoubleArray(ParameterKey.GROUND_STATION_CLOCK_OFFSET_MAX);
final boolean[] stationClockOffsetEstimated = parser.getBooleanArray(ParameterKey.GROUND_STATION_CLOCK_OFFSET_ESTIMATED);
final boolean[] stationPositionEstimated = parser.getBooleanArray(ParameterKey.GROUND_STATION_POSITION_ESTIMATED);
final double[] stationRangeSigma = parser.getDoubleArray(ParameterKey.GROUND_STATION_RANGE_SIGMA);
final double[] stationRangeBias = parser.getDoubleArray(ParameterKey.GROUND_STATION_RANGE_BIAS);
final double[] stationRangeBiasMin = parser.getDoubleArray(ParameterKey.GROUND_STATION_RANGE_BIAS_MIN);
......
......@@ -1587,11 +1587,11 @@ public class KalmanOrbitDeterminationTest {
final double[] stationLatitudes = parser.getAngleArray(ParameterKey.GROUND_STATION_LATITUDE);
final double[] stationLongitudes = parser.getAngleArray(ParameterKey.GROUND_STATION_LONGITUDE);
final double[] stationAltitudes = parser.getDoubleArray(ParameterKey.GROUND_STATION_ALTITUDE);
final boolean[] stationPositionEstimated = parser.getBooleanArray(ParameterKey.GROUND_STATION_POSITION_ESTIMATED);
final double[] stationClockOffsets = parser.getDoubleArray(ParameterKey.GROUND_STATION_CLOCK_OFFSET);
final double[] stationClockOffsetsMin = parser.getDoubleArray(ParameterKey.GROUND_STATION_CLOCK_OFFSET_MIN);
final double[] stationClockOffsetsMax = parser.getDoubleArray(ParameterKey.GROUND_STATION_CLOCK_OFFSET_MAX);
final boolean[] stationClockOffsetEstimated = parser.getBooleanArray(ParameterKey.GROUND_STATION_CLOCK_OFFSET_ESTIMATED);
final boolean[] stationPositionEstimated = parser.getBooleanArray(ParameterKey.GROUND_STATION_POSITION_ESTIMATED);
final double[] stationRangeSigma = parser.getDoubleArray(ParameterKey.GROUND_STATION_RANGE_SIGMA);
final double[] stationRangeBias = parser.getDoubleArray(ParameterKey.GROUND_STATION_RANGE_BIAS);
final double[] stationRangeBiasMin = parser.getDoubleArray(ParameterKey.GROUND_STATION_RANGE_BIAS_MIN);
......
/* Copyright 2002-2018 CS Systèmes d'Information
/* Copyright 2002-2019 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
......
......@@ -16,6 +16,7 @@
*/
package org.orekit.models.earth;
import org.hipparchus.util.FastMath;
import org.junit.Assert;
import org.junit.Test;
import org.orekit.Utils;
......@@ -25,7 +26,7 @@ import org.orekit.time.DateTimeComponents;
public class ViennaModelCoefficientsLoaderTest {
private static double epsilon = 1.0e-16;
private static double epsilon = 5.0e-16;
@Test
/**
......@@ -36,8 +37,8 @@ public class ViennaModelCoefficientsLoaderTest {
Utils.setDataRoot("vmf1-tropospheric-coefficients");
final double latitude = 14.0;
final double longitude = 67.5;
final double latitude = FastMath.toRadians(14.0);
final double longitude = FastMath.toRadians(67.5);
ViennaModelCoefficientsLoader tropoLoader = new ViennaModelCoefficientsLoader(latitude, longitude, ViennaModelType.VIENNA_ONE);
DateTimeComponents dateTimeComponents = new DateTimeComponents(2018, 11, 19, 18, 0, 0.0);
tropoLoader.loadViennaCoefficients(dateTimeComponents);
......@@ -61,8 +62,8 @@ public class ViennaModelCoefficientsLoaderTest {
Utils.setDataRoot("vmf3-5x5-tropospheric-coefficients");
final double latitude = 77.5;
final double longitude = 2.5;
final double latitude = FastMath.toRadians(77.5);
final double longitude = FastMath.toRadians(2.5);
ViennaModelCoefficientsLoader tropoLoader = new ViennaModelCoefficientsLoader(latitude, longitude, ViennaModelType.VIENNA_THREE);
DateTimeComponents dateTimeComponents = new DateTimeComponents(2018, 11, 25, 0, 0, 0.0);
tropoLoader.loadViennaCoefficients(dateTimeComponents);
......@@ -86,8 +87,8 @@ public class ViennaModelCoefficientsLoaderTest {
Utils.setDataRoot("vmf3-1x1-tropospheric-coefficients");
final double latitude = 19.5;
final double longitude = 276.5;
final double latitude = FastMath.toRadians(19.5);
final double longitude = FastMath.toRadians(276.5);
ViennaModelCoefficientsLoader tropoLoader = new ViennaModelCoefficientsLoader(latitude, longitude, ViennaModelType.VIENNA_THREE);
DateTimeComponents dateTimeComponents = new DateTimeComponents(2018, 11, 25, 0, 0, 0.0);
tropoLoader.loadViennaCoefficients(dateTimeComponents);
......@@ -108,7 +109,8 @@ public class ViennaModelCoefficientsLoaderTest {
// Commons parameters
Utils.setDataRoot("vmf3-1x1-tropospheric-coefficients");
DateTimeComponents dateTimeComponents = new DateTimeComponents(2018, 11, 25, 0, 0, 0.0);
final double latitude = 45.0;
final double latitude = FastMath.toRadians(45.0);
double longitude1;
ViennaModelCoefficientsLoader model1;
......@@ -117,8 +119,8 @@ public class ViennaModelCoefficientsLoaderTest {
ViennaModelCoefficientsLoader model2;
// Test longitude = 181° and longitude = -179°
longitude1 = 181.0;
longitude2 = -179.0;
longitude1 = FastMath.toRadians(181.0);
longitude2 = FastMath.toRadians(-179.0);
model1 = new ViennaModelCoefficientsLoader(latitude, longitude1, ViennaModelType.VIENNA_THREE);
model2 = new ViennaModelCoefficientsLoader(latitude, longitude2, ViennaModelType.VIENNA_THREE);
......@@ -132,8 +134,8 @@ public class ViennaModelCoefficientsLoaderTest {
Assert.assertEquals(model1.getZenithDelay()[1], model2.getZenithDelay()[1], epsilon);
// Test longitude = 180° and longitude = -180°
longitude1 = 180.0;
longitude2 = -180.0;
longitude1 = FastMath.toRadians(180.0);
longitude2 = FastMath.toRadians(-180.0);
model1 = new ViennaModelCoefficientsLoader(latitude, longitude1, ViennaModelType.VIENNA_THREE);
model2 = new ViennaModelCoefficientsLoader(latitude, longitude2, ViennaModelType.VIENNA_THREE);
......@@ -147,8 +149,8 @@ public class ViennaModelCoefficientsLoaderTest {
Assert.assertEquals(model1.getZenithDelay()[1], model2.getZenithDelay()[1], epsilon);
// Test longitude = 0° and longitude = 360°
longitude1 = 0.0;
longitude2 = 360.0;
longitude1 = FastMath.toRadians(0.0);
longitude2 = FastMath.toRadians(360.0);
model1 = new ViennaModelCoefficientsLoader(latitude, longitude1, ViennaModelType.VIENNA_THREE);
model2 = new ViennaModelCoefficientsLoader(latitude, longitude2, ViennaModelType.VIENNA_THREE);
......@@ -169,8 +171,8 @@ public class ViennaModelCoefficientsLoaderTest {
*/
public void testCorruptedFileBadData() {
final double latitude = 14.0;
final double longitude = 67.5;
final double latitude = FastMath.toRadians(14.0);
final double longitude = FastMath.toRadians(67.5);
Utils.setDataRoot("vmf1-tropospheric-coefficients");
final String fileName = "corrupted-bad-data-VMFG_20181119.H18";
......@@ -193,8 +195,8 @@ public class ViennaModelCoefficientsLoaderTest {
public void testAbsentFile() {
Utils.setDataRoot("vmf1-tropospheric-coefficients");
final double latitude = 14.0;
final double longitude = 67.5;
final double latitude = FastMath.toRadians(14.0);
final double longitude = FastMath.toRadians(67.5);
ViennaModelCoefficientsLoader tropoLoader = new ViennaModelCoefficientsLoader(latitude, longitude, ViennaModelType.VIENNA_ONE);
DateTimeComponents dateTimeComponents = new DateTimeComponents(2018, 11, 19, 1, 0, 0);
......
......@@ -938,11 +938,11 @@ public class OrbitDetermination {
final double[] stationLatitudes = parser.getAngleArray(ParameterKey.GROUND_STATION_LATITUDE);
final double[] stationLongitudes = parser.getAngleArray(ParameterKey.GROUND_STATION_LONGITUDE);
final double[] stationAltitudes = parser.getDoubleArray(ParameterKey.GROUND_STATION_ALTITUDE);
final boolean[] stationPositionEstimated = parser.getBooleanArray(ParameterKey.GROUND_STATION_POSITION_ESTIMATED);
final double[] stationClockOffsets = parser.getDoubleArray(ParameterKey.GROUND_STATION_CLOCK_OFFSET);
final double[] stationClockOffsetsMin = parser.getDoubleArray(ParameterKey.GROUND_STATION_CLOCK_OFFSET_MIN);
final double[] stationClockOffsetsMax = parser.getDoubleArray(ParameterKey.GROUND_STATION_CLOCK_OFFSET_MAX);
final boolean[] stationClockOffsetEstimated = parser.getBooleanArray(ParameterKey.GROUND_STATION_CLOCK_OFFSET_ESTIMATED);
final boolean[] stationPositionEstimated = parser.getBooleanArray(ParameterKey.GROUND_STATION_POSITION_ESTIMATED);
final double[] stationRangeSigma = parser.getDoubleArray(ParameterKey.GROUND_STATION_RANGE_SIGMA);
final double[] stationRangeBias = parser.getDoubleArray(ParameterKey.GROUND_STATION_RANGE_BIAS);
final double[] stationRangeBiasMin = parser.getDoubleArray(ParameterKey.GROUND_STATION_RANGE_BIAS_MIN);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment