Commit 6f28768d authored by Bryan Cazabonne's avatar Bryan Cazabonne
Browse files

Enabled the OD tutorial to use the estimated tropospheric model.

parent eb9b41a1
......@@ -108,10 +108,15 @@ import org.orekit.gnss.ObservationDataSet;
import org.orekit.gnss.RinexLoader;
import org.orekit.gnss.SatelliteSystem;
import org.orekit.models.AtmosphericRefractionModel;
import org.orekit.models.earth.DiscreteTroposphericModel;
import org.orekit.models.earth.EarthITU453AtmosphereRefraction;
import org.orekit.models.earth.EstimatedTroposphericModel;
import org.orekit.models.earth.GlobalMappingFunctionModel;
import org.orekit.models.earth.IonosphericModel;
import org.orekit.models.earth.KlobucharIonoCoefficientsLoader;
import org.orekit.models.earth.KlobucharIonoModel;
import org.orekit.models.earth.MappingFunction;
import org.orekit.models.earth.NiellMappingFunctionModel;
import org.orekit.models.earth.SaastamoinenModel;
import org.orekit.models.earth.displacement.OceanLoading;
import org.orekit.models.earth.displacement.OceanLoadingCoefficientsBLQFactory;
......@@ -926,32 +931,37 @@ public class OrbitDetermination {
final Map<String, StationData> stations = new HashMap<String, StationData>();
final String[] stationNames = parser.getStringArray(ParameterKey.GROUND_STATION_NAME);
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[] 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);
final double[] stationRangeBiasMax = parser.getDoubleArray(ParameterKey.GROUND_STATION_RANGE_BIAS_MAX);
final boolean[] stationRangeBiasEstimated = parser.getBooleanArray(ParameterKey.GROUND_STATION_RANGE_BIAS_ESTIMATED);
final double[] stationRangeRateSigma = parser.getDoubleArray(ParameterKey.GROUND_STATION_RANGE_RATE_SIGMA);
final double[] stationRangeRateBias = parser.getDoubleArray(ParameterKey.GROUND_STATION_RANGE_RATE_BIAS);
final double[] stationRangeRateBiasMin = parser.getDoubleArray(ParameterKey.GROUND_STATION_RANGE_RATE_BIAS_MIN);
final double[] stationRangeRateBiasMax = parser.getDoubleArray(ParameterKey.GROUND_STATION_RANGE_RATE_BIAS_MAX);
final boolean[] stationRangeRateBiasEstimated = parser.getBooleanArray(ParameterKey.GROUND_STATION_RANGE_RATE_BIAS_ESTIMATED);
final double[] stationAzimuthSigma = parser.getAngleArray(ParameterKey.GROUND_STATION_AZIMUTH_SIGMA);
final double[] stationAzimuthBias = parser.getAngleArray(ParameterKey.GROUND_STATION_AZIMUTH_BIAS);
final double[] stationAzimuthBiasMin = parser.getAngleArray(ParameterKey.GROUND_STATION_AZIMUTH_BIAS_MIN);
final double[] stationAzimuthBiasMax = parser.getAngleArray(ParameterKey.GROUND_STATION_AZIMUTH_BIAS_MAX);
final double[] stationElevationSigma = parser.getAngleArray(ParameterKey.GROUND_STATION_ELEVATION_SIGMA);
final double[] stationElevationBias = parser.getAngleArray(ParameterKey.GROUND_STATION_ELEVATION_BIAS);
final double[] stationElevationBiasMin = parser.getAngleArray(ParameterKey.GROUND_STATION_ELEVATION_BIAS_MIN);
final double[] stationElevationBiasMax = parser.getAngleArray(ParameterKey.GROUND_STATION_ELEVATION_BIAS_MAX);
final boolean[] stationAzElBiasesEstimated = parser.getBooleanArray(ParameterKey.GROUND_STATION_AZ_EL_BIASES_ESTIMATED);
final boolean[] stationElevationRefraction = parser.getBooleanArray(ParameterKey.GROUND_STATION_ELEVATION_REFRACTION_CORRECTION);
final boolean[] stationRangeTropospheric = parser.getBooleanArray(ParameterKey.GROUND_STATION_RANGE_TROPOSPHERIC_CORRECTION);
final String[] stationNames = parser.getStringArray(ParameterKey.GROUND_STATION_NAME);
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[] 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);
final double[] stationRangeBiasMax = parser.getDoubleArray(ParameterKey.GROUND_STATION_RANGE_BIAS_MAX);
final boolean[] stationRangeBiasEstimated = parser.getBooleanArray(ParameterKey.GROUND_STATION_RANGE_BIAS_ESTIMATED);
final double[] stationRangeRateSigma = parser.getDoubleArray(ParameterKey.GROUND_STATION_RANGE_RATE_SIGMA);
final double[] stationRangeRateBias = parser.getDoubleArray(ParameterKey.GROUND_STATION_RANGE_RATE_BIAS);
final double[] stationRangeRateBiasMin = parser.getDoubleArray(ParameterKey.GROUND_STATION_RANGE_RATE_BIAS_MIN);
final double[] stationRangeRateBiasMax = parser.getDoubleArray(ParameterKey.GROUND_STATION_RANGE_RATE_BIAS_MAX);
final boolean[] stationRangeRateBiasEstimated = parser.getBooleanArray(ParameterKey.GROUND_STATION_RANGE_RATE_BIAS_ESTIMATED);
final double[] stationAzimuthSigma = parser.getAngleArray(ParameterKey.GROUND_STATION_AZIMUTH_SIGMA);
final double[] stationAzimuthBias = parser.getAngleArray(ParameterKey.GROUND_STATION_AZIMUTH_BIAS);
final double[] stationAzimuthBiasMin = parser.getAngleArray(ParameterKey.GROUND_STATION_AZIMUTH_BIAS_MIN);
final double[] stationAzimuthBiasMax = parser.getAngleArray(ParameterKey.GROUND_STATION_AZIMUTH_BIAS_MAX);
final double[] stationElevationSigma = parser.getAngleArray(ParameterKey.GROUND_STATION_ELEVATION_SIGMA);
final double[] stationElevationBias = parser.getAngleArray(ParameterKey.GROUND_STATION_ELEVATION_BIAS);
final double[] stationElevationBiasMin = parser.getAngleArray(ParameterKey.GROUND_STATION_ELEVATION_BIAS_MIN);
final double[] stationElevationBiasMax = parser.getAngleArray(ParameterKey.GROUND_STATION_ELEVATION_BIAS_MAX);
final boolean[] stationAzElBiasesEstimated = parser.getBooleanArray(ParameterKey.GROUND_STATION_AZ_EL_BIASES_ESTIMATED);
final boolean[] stationElevationRefraction = parser.getBooleanArray(ParameterKey.GROUND_STATION_ELEVATION_REFRACTION_CORRECTION);
final boolean[] stationTroposphericModelEstimated = parser.getBooleanArray(ParameterKey.GROUND_STATION_TROPOSPHERIC_MODEL_ESTIMATED);
final double[] stationTroposphericZenithDelay = parser.getDoubleArray(ParameterKey.GROUND_STATION_TROPOSPHERIC_ZENITH_DELAY);
final boolean[] stationZenithDelayEstimated = parser.getBooleanArray(ParameterKey.GROUND_STATION_TROPOSPHERIC_DELAY_ESTIMATED);
final boolean[] stationGlobalMappingFunction = parser.getBooleanArray(ParameterKey.GROUND_STATION_GLOBAL_MAPPING_FUNCTION);
final boolean[] stationNiellMappingFunction = parser.getBooleanArray(ParameterKey.GROUND_STATION_NIELL_MAPPING_FUNCTION);
final boolean[] stationRangeTropospheric = parser.getBooleanArray(ParameterKey.GROUND_STATION_RANGE_TROPOSPHERIC_CORRECTION);
//final boolean[] stationIonosphericCorrection = parser.getBooleanArray(ParameterKey.GROUND_STATION_IONOSPHERIC_CORRECTION);
final TidalDisplacement tidalDisplacement;
......@@ -1111,11 +1121,27 @@ public class OrbitDetermination {
}
//Tropospheric correction
//Tropospheric correction
final RangeTroposphericDelayModifier rangeTroposphericCorrection;
if (stationRangeTropospheric[i]) {
final SaastamoinenModel troposphericModel = SaastamoinenModel.getStandardModel();
MappingFunction mappingModel = null;
if (stationGlobalMappingFunction[i]) {
mappingModel = new GlobalMappingFunctionModel(stationLatitudes[i],
stationLongitudes[i]);
} else if (stationNiellMappingFunction[i]) {
mappingModel = new NiellMappingFunctionModel(stationLatitudes[i]);
}
DiscreteTroposphericModel troposphericModel;
if (stationTroposphericModelEstimated[i] && mappingModel != null) {
troposphericModel = new EstimatedTroposphericModel(mappingModel, stationTroposphericZenithDelay[i]);
ParameterDriver totalDelay = troposphericModel.getParametersDrivers().get(0);
totalDelay.setSelected(stationZenithDelayEstimated[i]);
totalDelay.setName(stationNames[i].substring(0, 5) + EstimatedTroposphericModel.TOTAL_ZENITH_DELAY);
} else {
troposphericModel = SaastamoinenModel.getStandardModel();
}
rangeTroposphericCorrection = new RangeTroposphericDelayModifier(troposphericModel);
} else {
......@@ -2440,6 +2466,11 @@ public class OrbitDetermination {
GROUND_STATION_LONGITUDE,
GROUND_STATION_ALTITUDE,
GROUND_STATION_POSITION_ESTIMATED,
GROUND_STATION_TROPOSPHERIC_MODEL_ESTIMATED,
GROUND_STATION_TROPOSPHERIC_ZENITH_DELAY,
GROUND_STATION_TROPOSPHERIC_DELAY_ESTIMATED,
GROUND_STATION_GLOBAL_MAPPING_FUNCTION,
GROUND_STATION_NIELL_MAPPING_FUNCTION,
GROUND_STATION_RANGE_SIGMA,
GROUND_STATION_RANGE_BIAS,
GROUND_STATION_RANGE_BIAS_MIN,
......
......@@ -212,6 +212,11 @@ ground.station.elevation.bias.min [0] = -0.50
ground.station.elevation.bias.max [0] = +0.50
ground.station.az.el.biases.estimated [0] = true
ground.station.elevation.refraction.correction [0] = true
ground.station.tropospheric.model.estimated [0] = false
ground.station.tropospheric.zenith.delay [0] = 2.0
ground.station.tropospheric.delay.estimated [0] = false
ground.station.global.mapping.function [0] = false
ground.station.niell.mapping.function [0] = false
ground.station.range.tropospheric.correction [0] = true
ground.station.name [1] = Kumsan
......@@ -239,6 +244,11 @@ ground.station.elevation.bias.min [1] = -0.50
ground.station.elevation.bias.max [1] = +0.50
ground.station.az.el.biases.estimated [1] = true
ground.station.elevation.refraction.correction [1] = true
ground.station.tropospheric.model.estimated [1] = false
ground.station.tropospheric.zenith.delay [1] = 2.0
ground.station.tropospheric.delay.estimated [1] = false
ground.station.global.mapping.function [1] = false
ground.station.niell.mapping.function [1] = false
ground.station.range.tropospheric.correction [1] = true
ground.station.name [2] = Uralla
......@@ -266,6 +276,11 @@ ground.station.elevation.bias.min [2] = -0.50
ground.station.elevation.bias.max [2] = +0.50
ground.station.az.el.biases.estimated [2] = true
ground.station.elevation.refraction.correction [2] = true
ground.station.tropospheric.model.estimated [2] = false
ground.station.tropospheric.zenith.delay [2] = 2.0
ground.station.tropospheric.delay.estimated [2] = false
ground.station.global.mapping.function [2] = false
ground.station.niell.mapping.function [2] = false
ground.station.range.tropospheric.correction [2] = true
ground.station.name [3] = Pretoria
......@@ -293,6 +308,11 @@ ground.station.elevation.bias.min [3] = -0.50
ground.station.elevation.bias.max [3] = +0.50
ground.station.az.el.biases.estimated [3] = true
ground.station.elevation.refraction.correction [3] = true
ground.station.tropospheric.model.estimated [3] = false
ground.station.tropospheric.zenith.delay [3] = 2.0
ground.station.tropospheric.delay.estimated [3] = false
ground.station.global.mapping.function [3] = false
ground.station.niell.mapping.function [3] = false
ground.station.range.tropospheric.correction [3] = true
ground.station.name [4] = CastleRock
......@@ -320,6 +340,11 @@ ground.station.elevation.bias.min [4] = -0.50
ground.station.elevation.bias.max [4] = +0.50
ground.station.az.el.biases.estimated [4] = true
ground.station.elevation.refraction.correction [4] = true
ground.station.tropospheric.model.estimated [4] = false
ground.station.tropospheric.zenith.delay [4] = 2.0
ground.station.tropospheric.delay.estimated [4] = false
ground.station.global.mapping.function [4] = false
ground.station.niell.mapping.function [4] = false
ground.station.range.tropospheric.correction [4] = true
### Measurements parameters
......
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