diff --git a/pom.xml b/pom.xml index 7c29bd36811b8eb16cf3d30ca3756f2ec563b9be..c1e8a16daf8e60d25a813c02f84b0bdbd92566a8 100644 --- a/pom.xml +++ b/pom.xml @@ -175,6 +175,9 @@ <contributor> <name>Espen Bjørntvedt</name> </contributor> + <contributor> + <name>Bryan Cazabonne</name> + </contributor> <contributor> <name>Paul Cefola</name> </contributor> diff --git a/src/main/java/org/orekit/models/earth/EstimatedTroposphericModel.java b/src/main/java/org/orekit/models/earth/EstimatedTroposphericModel.java index f09dbd1099df1ed1b71a076e0be909006404314a..6860d35937842fc017b2fa15c95a8683845cd2f4 100644 --- a/src/main/java/org/orekit/models/earth/EstimatedTroposphericModel.java +++ b/src/main/java/org/orekit/models/earth/EstimatedTroposphericModel.java @@ -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); diff --git a/src/main/java/org/orekit/models/earth/ViennaModelCoefficientsLoader.java b/src/main/java/org/orekit/models/earth/ViennaModelCoefficientsLoader.java index e1b03e8b29b3db221e673985a55ccde20844f43a..3bac36856b0b9e5437ddc01c52d2b7aa80f3463a 100644 --- a/src/main/java/org/orekit/models/earth/ViennaModelCoefficientsLoader.java +++ b/src/main/java/org/orekit/models/earth/ViennaModelCoefficientsLoader.java @@ -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; } } diff --git a/src/main/java/org/orekit/overview.html b/src/main/java/org/orekit/overview.html index f8b5e7cc180e8849379a76c16dacfa8bf7ae0b9a..70561f532a3a3020e8bad74facc83d530d2d5fa5 100644 --- a/src/main/java/org/orekit/overview.html +++ b/src/main/java/org/orekit/overview.html @@ -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> diff --git a/src/site/markdown/index.md b/src/site/markdown/index.md index 87b17c12e53c60f006752e5228c177550011e199..e11b76d103c58fbf8eb058522336bb6f59895368 100644 --- a/src/site/markdown/index.md +++ b/src/site/markdown/index.md @@ -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) diff --git a/src/site/xdoc/changes.xml b/src/site/xdoc/changes.xml index a5170a3a69ac1be825ba5c3abf682f0c9526f27d..7f6c5d4ef4f30d1a9f6585ab5ffc7cd9b21b5c24 100644 --- a/src/site/xdoc/changes.xml +++ b/src/site/xdoc/changes.xml @@ -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> diff --git a/src/test/java/org/orekit/estimation/leastsquares/OrbitDeterminationTest.java b/src/test/java/org/orekit/estimation/leastsquares/OrbitDeterminationTest.java index 79c7a94023471e4a72f5c011c82b121b763f8232..bdee79b0fabdf1964ec6412f361bff93265cb653 100644 --- a/src/test/java/org/orekit/estimation/leastsquares/OrbitDeterminationTest.java +++ b/src/test/java/org/orekit/estimation/leastsquares/OrbitDeterminationTest.java @@ -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); diff --git a/src/test/java/org/orekit/estimation/sequential/KalmanOrbitDeterminationTest.java b/src/test/java/org/orekit/estimation/sequential/KalmanOrbitDeterminationTest.java index 6f93c29276c4eda46fe46ddf2652bbbaf93216fd..ce6c79301dd7ec6fc402d9ec1c733191296a9ca6 100644 --- a/src/test/java/org/orekit/estimation/sequential/KalmanOrbitDeterminationTest.java +++ b/src/test/java/org/orekit/estimation/sequential/KalmanOrbitDeterminationTest.java @@ -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); diff --git a/src/test/java/org/orekit/models/earth/GlobalMappingFunctionModelTest.java b/src/test/java/org/orekit/models/earth/GlobalMappingFunctionModelTest.java index ae7d72d24a2615f0269b98fa600cdfdd910c4017..7499caca397b899f533c9f3321aeface0e121eca 100644 --- a/src/test/java/org/orekit/models/earth/GlobalMappingFunctionModelTest.java +++ b/src/test/java/org/orekit/models/earth/GlobalMappingFunctionModelTest.java @@ -1,4 +1,4 @@ -/* 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. diff --git a/src/test/java/org/orekit/models/earth/ViennaModelCoefficientsLoaderTest.java b/src/test/java/org/orekit/models/earth/ViennaModelCoefficientsLoaderTest.java index 8404a9f5cd04b462071760376fed56606d8fae21..1532ccd5333c615106d8be96b9d2b1e5caf566ed 100644 --- a/src/test/java/org/orekit/models/earth/ViennaModelCoefficientsLoaderTest.java +++ b/src/test/java/org/orekit/models/earth/ViennaModelCoefficientsLoaderTest.java @@ -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); diff --git a/src/tutorials/java/fr/cs/examples/estimation/OrbitDetermination.java b/src/tutorials/java/fr/cs/examples/estimation/OrbitDetermination.java index 2915ccec2c93196ba7452ddfd5c4e577b144e425..def0561f3838dc88713e8fd48220daaa2dad4f01 100644 --- a/src/tutorials/java/fr/cs/examples/estimation/OrbitDetermination.java +++ b/src/tutorials/java/fr/cs/examples/estimation/OrbitDetermination.java @@ -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);