Skip to content
Snippets Groups Projects
Commit 0001b084 authored by noeljanes's avatar noeljanes
Browse files

Added troposphere corrections to range-rate

parent b2ceb39e
No related branches found
No related tags found
No related merge requests found
...@@ -183,7 +183,7 @@ public class MeasurementsGeneration { ...@@ -183,7 +183,7 @@ public class MeasurementsGeneration {
propagator.addForceModel(new HolmesFeatherstoneAttractionModel(itrf, gravity)); propagator.addForceModel(new HolmesFeatherstoneAttractionModel(itrf, gravity));
propagator.addForceModel(new ThirdBodyAttraction(CelestialBodyFactory.getSun())); propagator.addForceModel(new ThirdBodyAttraction(CelestialBodyFactory.getSun()));
propagator.addForceModel(new ThirdBodyAttraction(CelestialBodyFactory.getMoon())); propagator.addForceModel(new ThirdBodyAttraction(CelestialBodyFactory.getMoon()));
propagator.addForceModel(new DragForce(atmosphere, new IsotropicDrag(cd, area))); propagator.addForceModel(new DragForce(atmosphere, new IsotropicDrag(area, cd)));
//*/ //*/
......
...@@ -73,13 +73,7 @@ import org.orekit.estimation.measurements.ObservedMeasurement; ...@@ -73,13 +73,7 @@ import org.orekit.estimation.measurements.ObservedMeasurement;
import org.orekit.estimation.measurements.PV; import org.orekit.estimation.measurements.PV;
import org.orekit.estimation.measurements.Range; import org.orekit.estimation.measurements.Range;
import org.orekit.estimation.measurements.RangeRate; import org.orekit.estimation.measurements.RangeRate;
import org.orekit.estimation.measurements.modifiers.AngularRadioRefractionModifier; import org.orekit.estimation.measurements.modifiers.*;
import org.orekit.estimation.measurements.modifiers.Bias;
import org.orekit.estimation.measurements.modifiers.OnBoardAntennaRangeModifier;
import org.orekit.estimation.measurements.modifiers.OutlierFilter;
import org.orekit.estimation.measurements.modifiers.RangeIonosphericDelayModifier;
import org.orekit.estimation.measurements.modifiers.RangeRateIonosphericDelayModifier;
import org.orekit.estimation.measurements.modifiers.RangeTroposphericDelayModifier;
import org.orekit.forces.PolynomialParametricAcceleration; import org.orekit.forces.PolynomialParametricAcceleration;
import org.orekit.forces.drag.DragForce; import org.orekit.forces.drag.DragForce;
import org.orekit.forces.drag.DragSensitive; import org.orekit.forces.drag.DragSensitive;
...@@ -118,12 +112,7 @@ import org.orekit.models.earth.displacement.TidalDisplacement; ...@@ -118,12 +112,7 @@ import org.orekit.models.earth.displacement.TidalDisplacement;
import org.orekit.models.earth.ionosphere.IonosphericModel; import org.orekit.models.earth.ionosphere.IonosphericModel;
import org.orekit.models.earth.ionosphere.KlobucharIonoCoefficientsLoader; import org.orekit.models.earth.ionosphere.KlobucharIonoCoefficientsLoader;
import org.orekit.models.earth.ionosphere.KlobucharIonoModel; import org.orekit.models.earth.ionosphere.KlobucharIonoModel;
import org.orekit.models.earth.troposphere.DiscreteTroposphericModel; import org.orekit.models.earth.troposphere.*;
import org.orekit.models.earth.troposphere.EstimatedTroposphericModel;
import org.orekit.models.earth.troposphere.GlobalMappingFunctionModel;
import org.orekit.models.earth.troposphere.MappingFunction;
import org.orekit.models.earth.troposphere.NiellMappingFunctionModel;
import org.orekit.models.earth.troposphere.SaastamoinenModel;
import org.orekit.orbits.CartesianOrbit; import org.orekit.orbits.CartesianOrbit;
import org.orekit.orbits.CircularOrbit; import org.orekit.orbits.CircularOrbit;
import org.orekit.orbits.EquinoctialOrbit; import org.orekit.orbits.EquinoctialOrbit;
...@@ -137,6 +126,7 @@ import org.orekit.propagation.conversion.DormandPrince853IntegratorBuilder; ...@@ -137,6 +126,7 @@ import org.orekit.propagation.conversion.DormandPrince853IntegratorBuilder;
import org.orekit.propagation.conversion.NumericalPropagatorBuilder; import org.orekit.propagation.conversion.NumericalPropagatorBuilder;
import org.orekit.time.AbsoluteDate; import org.orekit.time.AbsoluteDate;
import org.orekit.time.DateComponents; import org.orekit.time.DateComponents;
import org.orekit.time.TimeScale;
import org.orekit.time.TimeScalesFactory; import org.orekit.time.TimeScalesFactory;
import org.orekit.utils.Constants; import org.orekit.utils.Constants;
import org.orekit.utils.IERSConventions; import org.orekit.utils.IERSConventions;
...@@ -760,7 +750,6 @@ public class OrbitDetermination { // Class 1 ...@@ -760,7 +750,6 @@ public class OrbitDetermination { // Class 1
private Orbit createOrbit(final KeyValueFileParser<ParameterKey> parser, private Orbit createOrbit(final KeyValueFileParser<ParameterKey> parser,
final double mu) final double mu)
throws NoSuchElementException { throws NoSuchElementException {
final Frame frame; final Frame frame;
if (!parser.containsKey(ParameterKey.INERTIAL_FRAME)) { if (!parser.containsKey(ParameterKey.INERTIAL_FRAME)) {
frame = FramesFactory.getEME2000(); frame = FramesFactory.getEME2000();
...@@ -974,6 +963,7 @@ public class OrbitDetermination { // Class 1 ...@@ -974,6 +963,7 @@ public class OrbitDetermination { // Class 1
final boolean[] stationGlobalMappingFunction = parser.getBooleanArray(ParameterKey.GROUND_STATION_GLOBAL_MAPPING_FUNCTION); final boolean[] stationGlobalMappingFunction = parser.getBooleanArray(ParameterKey.GROUND_STATION_GLOBAL_MAPPING_FUNCTION);
final boolean[] stationNiellMappingFunction = parser.getBooleanArray(ParameterKey.GROUND_STATION_NIELL_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[] stationRangeTropospheric = parser.getBooleanArray(ParameterKey.GROUND_STATION_RANGE_TROPOSPHERIC_CORRECTION);
final boolean[] stationRangeRateTropospheric = parser.getBooleanArray(ParameterKey.GROUND_STATION_RANGE_RATE_TROPOSPHERIC_CORRECTION);
//final boolean[] stationIonosphericCorrection = parser.getBooleanArray(ParameterKey.GROUND_STATION_IONOSPHERIC_CORRECTION); //final boolean[] stationIonosphericCorrection = parser.getBooleanArray(ParameterKey.GROUND_STATION_IONOSPHERIC_CORRECTION);
final TidalDisplacement tidalDisplacement; final TidalDisplacement tidalDisplacement;
...@@ -1004,7 +994,10 @@ public class OrbitDetermination { // Class 1 ...@@ -1004,7 +994,10 @@ public class OrbitDetermination { // Class 1
final EOPHistory eopHistory = FramesFactory.findEOP(body.getBodyFrame()); final EOPHistory eopHistory = FramesFactory.findEOP(body.getBodyFrame());
for (int i = 0; i < stationNames.length; ++i) { for (int i = 0; i < stationNames.length; ++i) {
final TimeScale utc = TimeScalesFactory.getUTC() ;
final AbsoluteDate orbitDate = parser.getDateMidnight(ParameterKey.ORBIT_DATE,
TimeScalesFactory.getUTC());
System.out.println(orbitDate);
// displacements // displacements
final StationDisplacement[] displacements; final StationDisplacement[] displacements;
final OceanLoading oceanLoading = (blqFactory == null) ? final OceanLoading oceanLoading = (blqFactory == null) ?
...@@ -1138,14 +1131,14 @@ public class OrbitDetermination { // Class 1 ...@@ -1138,14 +1131,14 @@ public class OrbitDetermination { // Class 1
} }
//Tropospheric correction //Tropospheric correction
final RangeTroposphericDelayModifier rangeTroposphericCorrection; final RangeTroposphericDelayModifier rangeTroposphericCorrection;
if (stationRangeTropospheric[i]) { if (stationRangeTropospheric[i]) {
MappingFunction mappingModel = null; MappingFunction mappingModel = null;
if (stationGlobalMappingFunction[i]) { if (stationGlobalMappingFunction[i]) {
mappingModel = new GlobalMappingFunctionModel(stationLatitudes[i], mappingModel = new GlobalMappingFunctionModel(stationLatitudes[i],
stationLongitudes[i]); stationLongitudes[i]);
} else if (stationNiellMappingFunction[i]) { } else if (stationNiellMappingFunction[i]) {
mappingModel = new NiellMappingFunctionModel(stationLatitudes[i]); mappingModel = new NiellMappingFunctionModel(stationLatitudes[i]);
} }
...@@ -1157,7 +1150,16 @@ public class OrbitDetermination { // Class 1 ...@@ -1157,7 +1150,16 @@ public class OrbitDetermination { // Class 1
totalDelay.setSelected(stationZenithDelayEstimated[i]); totalDelay.setSelected(stationZenithDelayEstimated[i]);
totalDelay.setName(stationNames[i].substring(0, 5) + EstimatedTroposphericModel.TOTAL_ZENITH_DELAY); totalDelay.setName(stationNames[i].substring(0, 5) + EstimatedTroposphericModel.TOTAL_ZENITH_DELAY);
} else { } else {
troposphericModel = SaastamoinenModel.getStandardModel(); final ViennaModelCoefficientsLoader loader = new ViennaModelCoefficientsLoader(stationLatitudes[i],
stationLongitudes[i],
ViennaModelType.VIENNA_THREE);
loader.loadViennaCoefficients(orbitDate.getComponents(utc));
troposphericModel = new ViennaThreeModel(loader.getA(),
loader.getZenithDelay(),
stationLatitudes[i],
stationLongitudes[i]);
//troposphericModel = SaastamoinenModel.getStandardModel();
} }
rangeTroposphericCorrection = new RangeTroposphericDelayModifier(troposphericModel); rangeTroposphericCorrection = new RangeTroposphericDelayModifier(troposphericModel);
...@@ -1165,12 +1167,51 @@ public class OrbitDetermination { // Class 1 ...@@ -1165,12 +1167,51 @@ public class OrbitDetermination { // Class 1
rangeTroposphericCorrection = null; rangeTroposphericCorrection = null;
} }
final RangeRateTroposphericDelayModifier rangeRateTroposphericCorrection;
if (stationRangeRateTropospheric[i]) {
MappingFunction mappingModel = null;
if (stationGlobalMappingFunction[i]) {
mappingModel = new GlobalMappingFunctionModel(stationLatitudes[i],
stationLongitudes[i]);
} else if (stationNiellMappingFunction[i]) {
mappingModel = new NiellMappingFunctionModel(stationLatitudes[i]);
}
// Setting up some tropospheric correction models for the range rate
// coefficients files for Vienna Model 3 can be found at
// http://vmf.geo.tuwien.ac.at/trop_products/GRID/1x1/VMF3/VMF3_OP/2019/
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 {
final ViennaModelCoefficientsLoader loader = new ViennaModelCoefficientsLoader(stationLatitudes[i],
stationLongitudes[i],
ViennaModelType.VIENNA_THREE);
loader.loadViennaCoefficients(orbitDate.getComponents(utc));
troposphericModel = new ViennaThreeModel(loader.getA(),
loader.getZenithDelay(),
stationLatitudes[i],
stationLongitudes[i]);
}
rangeRateTroposphericCorrection = new RangeRateTroposphericDelayModifier(troposphericModel , false);
}
else {
rangeRateTroposphericCorrection = null;
}
stations.put(stationNames[i], new StationData(station, stations.put(stationNames[i], new StationData(station,
rangeSigma, rangeBias, rangeSigma, rangeBias,
rangeRateSigma, rangeRateBias, rangeRateSigma, rangeRateBias,
azELSigma, azELBias, azELSigma, azELBias,
refractionCorrection, rangeTroposphericCorrection)); refractionCorrection, rangeTroposphericCorrection, rangeRateTroposphericCorrection));
} }
return stations; return stations;
...@@ -1441,9 +1482,13 @@ public class OrbitDetermination { // Class 1 ...@@ -1441,9 +1482,13 @@ public class OrbitDetermination { // Class 1
weights.rangeRateBaseWeight, false, satellite); weights.rangeRateBaseWeight, false, satellite);
rangeRate.addModifier(iono.getRangeRateModifier(od.getObservationType().getFrequency(system), rangeRate.addModifier(iono.getRangeRateModifier(od.getObservationType().getFrequency(system),
observationDataSet.getDate())); observationDataSet.getDate()));
if (stationData.rangeRateBias != null) { if (stationData.rangeRateBias != null) {
rangeRate.addModifier(stationData.rangeRateBias); rangeRate.addModifier(stationData.rangeRateBias);
} }
if (stationData.rangeRateTroposphericCorrection != null) {
rangeRate.addModifier(stationData.rangeRateTroposphericCorrection);
}
addIfNonZeroWeight(rangeRate, measurements); addIfNonZeroWeight(rangeRate, measurements);
} }
} }
...@@ -1622,16 +1667,33 @@ public class OrbitDetermination { // Class 1 ...@@ -1622,16 +1667,33 @@ public class OrbitDetermination { // Class 1
* @return parsed measurement * @return parsed measurement
*/ */
protected AbsoluteDate getDate(final String date, protected AbsoluteDate getDate(final String date,
final String line, final int lineNumber, final String fileName) final String line, final int lineNumber, final String fileName)
{ {
try { try {
return new AbsoluteDate(date, TimeScalesFactory.getUTC()); return new AbsoluteDate(date, TimeScalesFactory.getUTC());
} catch (OrekitException oe) { } catch (OrekitException oe) {
throw new OrekitException(LocalizedCoreFormats.SIMPLE_MESSAGE, throw new OrekitException(LocalizedCoreFormats.SIMPLE_MESSAGE,
"wrong date " + date + "wrong date " + date +
" at line " + lineNumber + " at line " + lineNumber +
" in file " + fileName + " in file " + fileName +
"\n" + line); "\n" + line);
}
}
protected AbsoluteDate getDateMidnight(final String date,
final String line, final int lineNumber, final String fileName)
{
try {
String[] dateParts = date.split("T");
String dateMidnight = dateParts[0] + "T00:00:00.000";
return new AbsoluteDate(dateMidnight, TimeScalesFactory.getUTC());
} catch (OrekitException oe) {
throw new OrekitException(LocalizedCoreFormats.SIMPLE_MESSAGE,
"wrong date " + date +
" at line " + lineNumber +
" in file " + fileName +
"\n" + line);
} }
} }
...@@ -2235,6 +2297,7 @@ public class OrbitDetermination { // Class 1 ...@@ -2235,6 +2297,7 @@ public class OrbitDetermination { // Class 1
GROUND_STATION_AZ_EL_BIASES_ESTIMATED, GROUND_STATION_AZ_EL_BIASES_ESTIMATED,
GROUND_STATION_ELEVATION_REFRACTION_CORRECTION, GROUND_STATION_ELEVATION_REFRACTION_CORRECTION,
GROUND_STATION_RANGE_TROPOSPHERIC_CORRECTION, GROUND_STATION_RANGE_TROPOSPHERIC_CORRECTION,
GROUND_STATION_RANGE_RATE_TROPOSPHERIC_CORRECTION,
GROUND_STATION_IONOSPHERIC_CORRECTION, GROUND_STATION_IONOSPHERIC_CORRECTION,
SOLID_TIDES_DISPLACEMENT_CORRECTION, SOLID_TIDES_DISPLACEMENT_CORRECTION,
SOLID_TIDES_DISPLACEMENT_REMOVE_PERMANENT_DEFORMATION, SOLID_TIDES_DISPLACEMENT_REMOVE_PERMANENT_DEFORMATION,
......
...@@ -56,13 +56,7 @@ import org.orekit.estimation.measurements.ObservedMeasurement; ...@@ -56,13 +56,7 @@ import org.orekit.estimation.measurements.ObservedMeasurement;
import org.orekit.estimation.measurements.PV; import org.orekit.estimation.measurements.PV;
import org.orekit.estimation.measurements.Range; import org.orekit.estimation.measurements.Range;
import org.orekit.estimation.measurements.RangeRate; import org.orekit.estimation.measurements.RangeRate;
import org.orekit.estimation.measurements.modifiers.AngularRadioRefractionModifier; import org.orekit.estimation.measurements.modifiers.*;
import org.orekit.estimation.measurements.modifiers.Bias;
import org.orekit.estimation.measurements.modifiers.OnBoardAntennaRangeModifier;
import org.orekit.estimation.measurements.modifiers.OutlierFilter;
import org.orekit.estimation.measurements.modifiers.RangeIonosphericDelayModifier;
import org.orekit.estimation.measurements.modifiers.RangeRateIonosphericDelayModifier;
import org.orekit.estimation.measurements.modifiers.RangeTroposphericDelayModifier;
import org.orekit.forces.PolynomialParametricAcceleration; import org.orekit.forces.PolynomialParametricAcceleration;
import org.orekit.forces.drag.DragForce; import org.orekit.forces.drag.DragForce;
import org.orekit.forces.drag.DragSensitive; import org.orekit.forces.drag.DragSensitive;
...@@ -159,6 +153,8 @@ public class StationData { ...@@ -159,6 +153,8 @@ public class StationData {
/** Tropospheric correction (may be null). */ /** Tropospheric correction (may be null). */
public final RangeTroposphericDelayModifier rangeTroposphericCorrection; public final RangeTroposphericDelayModifier rangeTroposphericCorrection;
public final RangeRateTroposphericDelayModifier rangeRateTroposphericCorrection;
/** Simple constructor. /** Simple constructor.
* @param station ground station * @param station ground station
* @param rangeSigma range sigma * @param rangeSigma range sigma
...@@ -169,22 +165,24 @@ public class StationData { ...@@ -169,22 +165,24 @@ public class StationData {
* @param azELBias azimuth-elevation bias (may be null if bias is fixed to zero) * @param azELBias azimuth-elevation bias (may be null if bias is fixed to zero)
* @param refractionCorrection refraction correction for elevation (may be null) * @param refractionCorrection refraction correction for elevation (may be null)
* @param rangeTroposphericCorrection tropospheric correction for the range (may be null) * @param rangeTroposphericCorrection tropospheric correction for the range (may be null)
* @param rangeRateTroposphericCorrection
*/ */
public StationData(final GroundStation station, public StationData(final GroundStation station,
final double rangeSigma, final Bias<Range> rangeBias, final double rangeSigma, final Bias<Range> rangeBias,
final double rangeRateSigma, final Bias<RangeRate> rangeRateBias, final double rangeRateSigma, final Bias<RangeRate> rangeRateBias,
final double[] azElSigma, final Bias<AngularAzEl> azELBias, final double[] azElSigma, final Bias<AngularAzEl> azELBias,
final AngularRadioRefractionModifier refractionCorrection, final AngularRadioRefractionModifier refractionCorrection,
final RangeTroposphericDelayModifier rangeTroposphericCorrection) { final RangeTroposphericDelayModifier rangeTroposphericCorrection, RangeRateTroposphericDelayModifier rangeRateTroposphericCorrection) {
this.station = station; this.station = station;
this.rangeSigma = rangeSigma; this.rangeSigma = rangeSigma;
this.rangeBias = rangeBias; this.rangeBias = rangeBias;
this.rangeRateSigma = rangeRateSigma; this.rangeRateSigma = rangeRateSigma;
this.rangeRateBias = rangeRateBias; this.rangeRateBias = rangeRateBias;
this.azElSigma = azElSigma.clone(); this.azElSigma = azElSigma.clone();
this.azELBias = azELBias; this.azELBias = azELBias;
this.refractionCorrection = refractionCorrection; this.refractionCorrection = refractionCorrection;
this.rangeTroposphericCorrection = rangeTroposphericCorrection; this.rangeTroposphericCorrection = rangeTroposphericCorrection;
this.rangeRateTroposphericCorrection = rangeRateTroposphericCorrection;
} }
} }
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment