Skip to content

Commit

Permalink
Merge branch 'patch-12.1.3' into 'release-12.1'
Browse files Browse the repository at this point in the history
Preparing release of patch 12.1.3

See merge request orekit/orekit!607
  • Loading branch information
MaximeJo committed Sep 4, 2024
2 parents 51235c9 + fe0a871 commit 6fca027
Show file tree
Hide file tree
Showing 61 changed files with 1,376 additions and 597 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>org.orekit</groupId>
<artifactId>orekit</artifactId>
<packaging>jar</packaging>
<version>12.1.2</version>
<version>12.1.3</version>
<name>OREKIT</name>
<url>http://www.orekit.org/</url>

Expand Down
43 changes: 43 additions & 0 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,49 @@
<title>Orekit Changes</title>
</properties>
<body>
<release version="12.1.3" date="04/09/2024"
description="Version 12.1.3 is a patch release of Orekit.
It fixes bugs related to thread-safety, measurements status in UKF, inter-satellite measurements
and GNSS ambiguity solver, DSST osculating propagation, NeQuick ionospheric model,
numerical noises in covariance transformation and parsing of RINEX and CCSDS files.
Version 12.1.3 also include Checkstyle fixes.">
<action dev="luc" type="fix" issue="643">
Removed non thread-safe use of DecimalFormat.
</action>
<action dev="serrof" type="fix" issue="1501">
Pass Status in UKF theoretical measurement.
</action>
<action dev="luc" type="fix" issue="1499">
Fixed mixed up frames in inter-satellites measurements.
</action>
<action dev="luc" type="fix" issue="1489">
Protected several maps against concurrent modifications.
</action>
<action dev="luc" type="fix" issue="1487">
Fixed NeQuick ionospheric model for perfect zenith observation.
</action>
<action dev="vincent" type="fix" issue="1485">
Fixed introduced noises when changing covariance frame with identical frame.
</action>
<action dev="luc" type="fix" issue="1480">
Fixed wrong agency name length in Rinex observation writer.
</action>
<action dev="luc" type="fix" issue="1448">
Greatly reduced computation time of NeQuick ionospheric model.
</action>
<action dev="luc" type="fix" issue="1475">
Added getOneLetterCode and getTwoLettersCode to TimeSystem.
</action>
<action dev="luc" type="fix" issue="1473">
Protected AmbiguityCache against concurrent modifications.
</action>
<action dev="maxime" type="fix" issue="1467">
Fixed checkstyle error in SolarRadiationPressure.
</action>
<action dev="maxime" type="fix" issue="1461">
Fixed update of initial state's prop type after a propagation in DSST.
</action>
</release>
<release version="12.1.2" date="13/07/2024"
description="Version 12.1.2 is a patch release of Orekit.
It fixes multiple issues related to the parsing of CCSDS CDM, the generation of
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/org/orekit/errors/OrekitMessages.java
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,10 @@ public enum OrekitMessages implements Localizable {
WALKER_INCONSISTENT_PLANES("number of planes {0} is inconsistent with number of satellites {1} in Walker constellation"),

/** INFINITE_NRMSISE00_DENSITY. */
INFINITE_NRLMSISE00_DENSITY("Infinite value appears during computation of atmospheric density in NRLMSISE00 model");
INFINITE_NRLMSISE00_DENSITY("Infinite value appears during computation of atmospheric density in NRLMSISE00 model"),

/** FIELD_TOO_LONG. */
FIELD_TOO_LONG("field \"{0}\" is too long, maximum length is {1} characters");

/** Base name of the resource bundle in classpath. */
private static final String RESOURCE_BASE_NAME = "assets/org/orekit/localization/OrekitMessages";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@ public EstimatedMeasurement(final T observedMeasurement,
this.parametersDerivatives = new IdentityHashMap<ParameterDriver, TimeSpanMap<double[]>>();
}

/** Constructor from measurement base.
* @param estimatedMeasurementBase estimated measurement base
* @since 12.1.3
*/
public EstimatedMeasurement(final EstimatedMeasurementBase<T> estimatedMeasurementBase) {
this(estimatedMeasurementBase.getObservedMeasurement(), estimatedMeasurementBase.getIteration(),
estimatedMeasurementBase.getCount(), estimatedMeasurementBase.getStates(),
estimatedMeasurementBase.getParticipants());
this.setEstimatedValue(estimatedMeasurementBase.getEstimatedValue());
this.setStatus(estimatedMeasurementBase.getStatus());
}

/** Get state size.
* <p>
* Warning, the {@link #setStateDerivatives(int, double[][])}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public class EstimatedMeasurementBase<T extends ObservedMeasurement<T>> implemen
* @param count evaluations counter
* @param states states of the spacecrafts
* @param participants coordinates of the participants in signal travel order
* in inertial frame
* in inertial frame of first state
*/
public EstimatedMeasurementBase(final T observedMeasurement,
final int iteration, final int count,
Expand Down Expand Up @@ -124,7 +124,7 @@ public SpacecraftState[] getStates() {
* spacecraft for two-way range measurement).
* </p>
* @return coordinates of the measurements participants in signal travel order
* in inertial frame
* in inertial frame of first state
*/
public TimeStampedPVCoordinates[] getParticipants() {
return participants.clone();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.util.Map;

import org.hipparchus.analysis.differentiation.Gradient;
import org.orekit.frames.Frame;
import org.orekit.propagation.SpacecraftState;
import org.orekit.time.AbsoluteDate;
import org.orekit.time.FieldAbsoluteDate;
Expand Down Expand Up @@ -119,10 +120,11 @@ protected EstimatedMeasurementBase<InterSatellitesRange> theoreticalEvaluationWi
final SpacecraftState[] states) {

// coordinates of both satellites
final Frame frame = states[0].getFrame();
final SpacecraftState local = states[0];
final TimeStampedPVCoordinates pvaL = local.getPVCoordinates();
final TimeStampedPVCoordinates pvaL = local.getPVCoordinates(frame);
final SpacecraftState remote = states[1];
final TimeStampedPVCoordinates pvaR = remote.getPVCoordinates();
final TimeStampedPVCoordinates pvaR = remote.getPVCoordinates(frame);

// compute propagation times
// (if state has already been set up to pre-compensate propagation delay,
Expand All @@ -134,7 +136,7 @@ protected EstimatedMeasurementBase<InterSatellitesRange> theoreticalEvaluationWi

final TimeStampedPVCoordinates s1Downlink =
pvaL.shiftedBy(arrivalDate.durationFrom(pvaL.getDate()));
final double tauD = signalTimeOfFlight(pvaR, s1Downlink.getPosition(), arrivalDate, local.getFrame());
final double tauD = signalTimeOfFlight(pvaR, s1Downlink.getPosition(), arrivalDate, frame);

// Transit state
final double delta = getDate().durationFrom(remote.getDate());
Expand All @@ -152,15 +154,15 @@ protected EstimatedMeasurementBase<InterSatellitesRange> theoreticalEvaluationWi
final double tauU = signalTimeOfFlight(pvaL,
transitState.getPosition(),
transitState.getDate(),
local.getFrame());
frame);
estimated = new EstimatedMeasurementBase<>(this, iteration, evaluation,
new SpacecraftState[] {
local.shiftedBy(deltaMTauD),
remote.shiftedBy(deltaMTauD)
}, new TimeStampedPVCoordinates[] {
local.shiftedBy(delta - tauD - tauU).getPVCoordinates(),
remote.shiftedBy(delta - tauD).getPVCoordinates(),
local.shiftedBy(delta).getPVCoordinates()
local.shiftedBy(delta - tauD - tauU).getPVCoordinates(frame),
remote.shiftedBy(delta - tauD).getPVCoordinates(frame),
local.shiftedBy(delta).getPVCoordinates(frame)
});

// Range value
Expand All @@ -173,8 +175,8 @@ protected EstimatedMeasurementBase<InterSatellitesRange> theoreticalEvaluationWi
local.shiftedBy(deltaMTauD),
remote.shiftedBy(deltaMTauD)
}, new TimeStampedPVCoordinates[] {
remote.shiftedBy(delta - tauD).getPVCoordinates(),
local.shiftedBy(delta).getPVCoordinates()
remote.shiftedBy(delta - tauD).getPVCoordinates(frame),
local.shiftedBy(delta).getPVCoordinates(frame)
});

// Clock offsets
Expand All @@ -196,6 +198,8 @@ protected EstimatedMeasurement<InterSatellitesRange> theoreticalEvaluation(final
final int evaluation,
final SpacecraftState[] states) {

final Frame frame = states[0].getFrame();

// Range derivatives are computed with respect to spacecraft states in inertial frame
// ----------------------
//
Expand All @@ -222,7 +226,10 @@ protected EstimatedMeasurement<InterSatellitesRange> theoreticalEvaluation(final
final SpacecraftState local = states[0];
final TimeStampedFieldPVCoordinates<Gradient> pvaL = getCoordinates(local, 0, nbParams);
final SpacecraftState remote = states[1];
final TimeStampedFieldPVCoordinates<Gradient> pvaR = getCoordinates(remote, 6, nbParams);
final TimeStampedFieldPVCoordinates<Gradient> pvaR = states[1].
getFrame().
getTransformTo(frame, states[1].getDate()).
transformPVCoordinates(getCoordinates(remote, 6, nbParams));

// compute propagation times
// (if state has already been set up to pre-compensate propagation delay,
Expand All @@ -236,7 +243,7 @@ protected EstimatedMeasurement<InterSatellitesRange> theoreticalEvaluation(final
final TimeStampedFieldPVCoordinates<Gradient> s1Downlink =
pvaL.shiftedBy(arrivalDate.durationFrom(pvaL.getDate()));
final Gradient tauD = signalTimeOfFlight(pvaR, s1Downlink.getPosition(),
arrivalDate, local.getFrame());
arrivalDate, frame);

// Transit state
final double delta = getDate().durationFrom(remote.getDate());
Expand All @@ -254,15 +261,15 @@ protected EstimatedMeasurement<InterSatellitesRange> theoreticalEvaluation(final
final Gradient tauU = signalTimeOfFlight(pvaL,
transitStateDS.getPosition(),
transitStateDS.getDate(),
local.getFrame());
frame);
estimated = new EstimatedMeasurement<>(this, iteration, evaluation,
new SpacecraftState[] {
local.shiftedBy(deltaMTauD.getValue()),
remote.shiftedBy(deltaMTauD.getValue())
}, new TimeStampedPVCoordinates[] {
local.shiftedBy(delta - tauD.getValue() - tauU.getValue()).getPVCoordinates(),
remote.shiftedBy(delta - tauD.getValue()).getPVCoordinates(),
local.shiftedBy(delta).getPVCoordinates()
local.shiftedBy(delta - tauD.getValue() - tauU.getValue()).getPVCoordinates(frame),
remote.shiftedBy(delta - tauD.getValue()).getPVCoordinates(frame),
local.shiftedBy(delta).getPVCoordinates(frame)
});

// Range value
Expand All @@ -275,7 +282,7 @@ protected EstimatedMeasurement<InterSatellitesRange> theoreticalEvaluation(final
local.shiftedBy(deltaMTauD.getValue()),
remote.shiftedBy(deltaMTauD.getValue())
}, new TimeStampedPVCoordinates[] {
remote.shiftedBy(delta - tauD.getValue()).getPVCoordinates(),
remote.shiftedBy(delta - tauD.getValue()).getPVCoordinates(frame),
local.shiftedBy(delta).getPVCoordinates()
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ protected FieldPVCoordinatesProvider<Gradient> getRemotePV(final SpacecraftState
final TimeStampedFieldPVCoordinates<Gradient> pv0 = getCoordinates(states[1], 6, freeParameters);

// shift to desired date
return pv0.shiftedBy(date.durationFrom(states[1].getDate()));
final TimeStampedFieldPVCoordinates<Gradient> shifted = pv0.shiftedBy(date.durationFrom(states[1].getDate()));

// transform to desired frame
return states[1].getFrame().getTransformTo(frame, states[1].getDate()).transformPVCoordinates(shifted);

};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.orekit.estimation.measurements.ObservedMeasurement;
import org.orekit.estimation.measurements.QuadraticClockModel;
import org.orekit.estimation.measurements.QuadraticFieldClockModel;
import org.orekit.frames.Frame;
import org.orekit.propagation.SpacecraftState;
import org.orekit.time.AbsoluteDate;
import org.orekit.time.ClockOffset;
Expand Down Expand Up @@ -109,7 +110,8 @@ protected OnBoardCommonParametersWithoutDerivatives computeCommonParametersWitho
final boolean clockOffsetAlreadyApplied) {

// local and remote satellites
final TimeStampedPVCoordinates pvaLocal = states[0].getPVCoordinates();
final Frame frame = states[0].getFrame();
final TimeStampedPVCoordinates pvaLocal = states[0].getPVCoordinates(frame);
final ClockOffset localClock = getSatellites().
get(0).
getQuadraticClockModel().
Expand All @@ -125,7 +127,7 @@ protected OnBoardCommonParametersWithoutDerivatives computeCommonParametersWitho
final double deltaT = arrivalDate.durationFrom(states[0]);
final TimeStampedPVCoordinates pvaDownlink = pvaLocal.shiftedBy(deltaT);
final double tauD = signalTimeOfFlight(remotePV, arrivalDate, pvaDownlink.getPosition(),
arrivalDate, states[0].getFrame());
arrivalDate, frame);

// Remote satellite at signal emission
final AbsoluteDate emissionDate = arrivalDate.shiftedBy(-tauD);
Expand All @@ -136,7 +138,7 @@ protected OnBoardCommonParametersWithoutDerivatives computeCommonParametersWitho
localClockOffset, localClockRate,
remoteClockOffset, remoteClockRate,
tauD, pvaDownlink,
remotePV.getPVCoordinates(emissionDate, states[0].getFrame()));
remotePV.getPVCoordinates(emissionDate, frame));

}

Expand All @@ -150,6 +152,8 @@ protected OnBoardCommonParametersWithoutDerivatives computeCommonParametersWitho
protected OnBoardCommonParametersWithDerivatives computeCommonParametersWith(final SpacecraftState[] states,
final boolean clockOffsetAlreadyApplied) {

final Frame frame = states[0].getFrame();

// measurement derivatives are computed with respect to spacecraft state in inertial frame
// Parameters:
// - 6k..6k+2 - Position of spacecraft k (counting k from 0 to nbSat-1) in inertial frame
Expand Down Expand Up @@ -183,7 +187,7 @@ protected OnBoardCommonParametersWithDerivatives computeCommonParametersWith(fin
final TimeStampedFieldPVCoordinates<Gradient> pvaDownlink = pvaLocal.shiftedBy(deltaT);
final Gradient tauD = signalTimeOfFlight(remotePV, arrivalDate,
pvaDownlink.getPosition(), arrivalDate,
states[0].getFrame());
frame);

// Remote satellite at signal emission
final FieldAbsoluteDate<Gradient> emissionDate = arrivalDate.shiftedBy(tauD.negate());
Expand All @@ -193,7 +197,7 @@ protected OnBoardCommonParametersWithDerivatives computeCommonParametersWith(fin
localClockOffset.getOffset(), localClockOffset.getRate(),
remoteClockOffset.getOffset(), remoteClockOffset.getRate(),
tauD, pvaDownlink,
remotePV.getPVCoordinates(emissionDate, states[0].getFrame()));
remotePV.getPVCoordinates(emissionDate, frame));

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ public AmbiguityCache() {
* @return parameter driver for the emitter/receiver/wavelength triplet
*/
public AmbiguityDriver getAmbiguity(final String emitter, final String receiver, final double wavelength) {
return cache.computeIfAbsent(new Key(emitter, receiver, wavelength),
k -> new AmbiguityDriver(emitter, receiver, wavelength));
final Key key = new Key(emitter, receiver, wavelength);
synchronized (cache) {
return cache.computeIfAbsent(key, k -> new AmbiguityDriver(emitter, receiver, wavelength));
}
}

/** Key for the map. */
Expand Down
Loading

0 comments on commit 6fca027

Please sign in to comment.