Commit 3bdc5f1a authored by Bryan Cazabonne's avatar Bryan Cazabonne

Updated tutorial after a change in Orekit.

parent f83522b5
Pipeline #682 passed with stages
in 2 minutes and 5 seconds
......@@ -82,6 +82,7 @@ import org.orekit.estimation.sequential.KalmanEstimator;
import org.orekit.estimation.sequential.KalmanEstimatorBuilder;
import org.orekit.files.ilrs.CRDFile;
import org.orekit.files.ilrs.CRDFile.CRDDataBlock;
import org.orekit.files.ilrs.CRDFile.Meteo;
import org.orekit.files.ilrs.CRDFile.MeteorologicalMeasurement;
import org.orekit.files.ilrs.CRDFile.RangeMeasurement;
import org.orekit.files.ilrs.CRDHeader;
......@@ -141,8 +142,6 @@ import org.orekit.propagation.conversion.DormandPrince853IntegratorBuilder;
import org.orekit.propagation.conversion.IntegratedPropagatorBuilder;
import org.orekit.propagation.conversion.ODEIntegratorBuilder;
import org.orekit.time.AbsoluteDate;
import org.orekit.time.DateComponents;
import org.orekit.time.TimeComponents;
import org.orekit.time.TimeScale;
import org.orekit.time.TimeScalesFactory;
import org.orekit.tutorials.yaml.TutorialBatchLSEstimator;
......@@ -2109,18 +2108,11 @@ public abstract class AbstractOrbitDetermination<T extends IntegratedPropagatorB
// Header
final CRDHeader header = block.getHeader();
// Measurement year ; month and day component
final DateComponents rangeDateC = header.getStartEpoch().getComponents(parser.getTimeScale()).getDate();
// Wavelength (meters)
final double wavelength = block.getConfigurationRecords().getSystemRecord().getWavelength();
// Meteo data
final List<MeteorologicalMeasurement> meteoData = block.getMeteoData();
MeteorologicalMeasurement meteo = null;
if (meteoData.size() > 0) {
meteo = meteoData.get(0);
}
final Meteo meteo = block.getMeteoData();
// Station data
final StationData stationData = stations.get(String.valueOf(header.getSystemIdentifier()));
......@@ -2132,8 +2124,8 @@ public abstract class AbstractOrbitDetermination<T extends IntegratedPropagatorB
final double timeOfFlight = range.getTimeOfFlight();
// Transmit time
final AbsoluteDate transmitTime = new AbsoluteDate(rangeDateC, new TimeComponents(range.getSecOfDay()),
parser.getTimeScale());
final AbsoluteDate transmitTime = range.getDate();
// If epoch corresponds to bounce time, take into consideration the time of flight to compute the transmit time
if (range.getEpochEvent() == 1) {
transmitTime.shiftedBy(-0.5 * timeOfFlight);
......@@ -2155,10 +2147,12 @@ public abstract class AbstractOrbitDetermination<T extends IntegratedPropagatorB
final Range measurement = new Range(stationData.getStation(), twoWays, receivedTime, rangeValue,
stationData.getRangeSigma(), weights.getRangeBaseWeight(), satellite);
// Meteo record for the current epoch
final MeteorologicalMeasurement meteoData = meteo.getMeteo(receivedTime);
// Tropospheric model
final DiscreteTroposphericModel model;
if (meteo != null) {
model = new MendesPavlisModel(meteo.getTemperature(), meteo.getPressure() * 1000.0, 0.01 * meteo.getHumidity(),
if (meteoData != null) {
model = new MendesPavlisModel(meteoData.getTemperature(), meteoData.getPressure() * 1000.0, 0.01 * meteoData.getHumidity(),
stationData.getStation().getBaseFrame().getPoint().getLatitude(), wavelength * 1.0e6);
} else {
model = MendesPavlisModel.getStandardModel(stationData.getStation().getBaseFrame().getPoint().getLatitude(), wavelength * 1.0e6);
......
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