Commit 2c2c7ce6 authored by Bryan Cazabonne's avatar Bryan Cazabonne
Browse files

Merge branch 'develop' into MaximeJ/orekit-issue-829

parents d8b21b33 142d7486
Pipeline #1346 passed with stages
in 23 minutes and 25 seconds
......@@ -108,3 +108,14 @@ deploy:site:
- master@orekit/orekit
- /^release-[.0-9]+$/@orekit/orekit
- develop@orekit/orekit
# trigger performance tests after artifacts are deployed to Nexus
# similar to Jenkins' "build after a snapshot dependency is built"
performance:
stage: deploy
needs:
- job: deploy:artifacts
artifacts: false
trigger: evanward1/orekit-performance
only:
- develop@orekit/orekit
......@@ -2,7 +2,7 @@ OREKIT
Copyright 2002-2021 CS GROUP
This product includes software developed by
CS GROUP (http://www.c-s.fr/)
CS GROUP (https://www.csgroup.eu/)
This product includes software developed by
Bruce R. Bowman (HQ AFSPC, Space Analysis Division)
......
......@@ -257,6 +257,9 @@
<contributor>
<name>Fran&#231;ois-Xavier Laffont</name>
</contributor>
<contributor>
<name>Anne-Laure Lugan</name>
</contributor>
<contributor>
<name>Lukas Matt</name>
</contributor>
......
......@@ -24,27 +24,90 @@
<action dev="maxime" type="fix" issue="829">
Fixed DataSourceTest.testFileName for Windows users.
</action>
<action dev="bryan" type="fix" issue="818">
Use observed solar flux instead of adjusted in DTM2000 model.
</action>
<action dev="evan" type="fix" issue="798">
Allow DSST event detection when propagating backwards.
</action>
<action dev="bryan" type="fix" issue="717" due-to="evan">
Fixed DSST orbit determination when propagating backwards.
</action>
<action dev="evan" type="remove" issue="586">
Remove InertialProvider.EME2000_ALIGNED, Propagator.DEFAULT_LAW. Use
InertialProvider.of(Frame).
</action>
<action dev="evan" type="update" issue="586">
Change default attitude provider to be aligned with propagation frame for all
analytic propagators and GLONASS propagator. Backward incompatible.
</action>
<action dev="evan" type="update" issue="586">
Improve performance of IntertialProvider(Frame)
</action>
<action dev="anne-laure" type="update" issue="797">
Add information if a detector failed during propagation
</action>
<action dev="bryan" type="fix" issue="788" due-to="luc">
Fixed missing call to setMuCreated() in OemParser.
</action>
<action dev="evan" type="update" issue="618">
Fix supportedNames matching in ClasspathCrawler. Backwards incompatible.
</action>
<action dev="bryan" type="fix" issue="828">
Fixed missing file types in SP3Parser.
</action>
<action dev="bryan" type="fix" issue="827">
Fixed time system used in SP3 files.
</action>
<action dev="evan" type="fix" issue="685">
Fix AnalyticalPropagator RESET_STATE when new state is null.
</action>
<action dev="bryan" type="fix" issue="803">
Fixed parsing of clock values in SP3 files.
</action>
<action dev="bryan" type="fix" issue="820">
TLE Jacobians are now calculated in cartesian elements.
</action>
<action dev="evan" type="update" issue="825">
Improve exception messages with two AbsoluteDates by including duration between
them.
</action>
<action dev="evan" type="update" issue="637" due-to="Piotr">
Add trailing "Z" to AbsoluteDate.toString() to indicate UTC.
Backwards incompatible.
</action>
<action dev="evan" type="update" issue="825">
In AbsoluteDate.toString() fallback to TAI when no leap seconds are loaded.
</action>
<action dev="evan" type="update" issue="591">
Fix TimeComponents.toString(): correct ISO 8601 with UTC offset, rounding issues.
Backwards incompatible.
</action>
<action dev="evan" type="update" issue="590">
Fix DateTimeComponents.toString(): correct ISO 8601, leap second, rounding issues.
Backwards incompatible.
</action>
<action dev="evan" type="update" issue="637" due-to="Piotr">
Fix AbsoluteDate.toString(timeZone) and toString(minutesFromUtc) to include the
UTC offset when it is zero.
</action>
<action dev="evan" type="add">
Add DateTimeComponents.toString(...) method with correct rounding for user
specified precision.
</action>
<action dev="bryan" type="update" issue="626">
Used a separate Comparator for sorting integer least square solutions.
</action>
<action dev="bryan" type="update" issue="799">
Used the field-specific value of π.
</action>
<action dev="evan" type="update" issue="830" due-to="skyrex">
Remove step size limitations in analytic propagators. Backwards incompatible.
</action>
<action dev="evan" type="fix">
Fix part of step passed to the step handler twice in analytic propagators with
event handlers.
</action>
<action dev="bryan" type="fix" issue="795" due-to="guylaine">
Fixed output of NRLMSISE00 for altitude at 32.5 km.
</action>
......
......@@ -30,24 +30,13 @@ import org.orekit.utils.PVCoordinatesProvider;
/**
* This class handles an inertial attitude provider.
* This class handles an attitude provider aligned with a frame or a fixed offset to it.
* Contrary to the name the frame need not be an inertial frame.
* <p>Instances of this class are guaranteed to be immutable.</p>
* @author Luc Maisonobe
*/
public class InertialProvider implements AttitudeProvider {
/** Dummy attitude provider, perfectly aligned with the EME2000 frame.
*
* <p>This field uses the {@link DataContext#getDefault() default data context}.
*
* @see #InertialProvider(Rotation, Frame)
* @see #InertialProvider(Frame)
*/
@DefaultDataContext
public static final InertialProvider EME2000_ALIGNED =
new InertialProvider(Rotation.IDENTITY);
/** Fixed satellite frame. */
private final Frame satelliteFrame;
......@@ -69,7 +58,9 @@ public class InertialProvider implements AttitudeProvider {
* @param frame the reference frame for the attitude.
*/
public InertialProvider(final Frame frame) {
this(Rotation.IDENTITY, frame);
// it is faster to use the frame directly here rather than call the other
// constructor because of the == shortcut in frame.getTransformTo
this.satelliteFrame = frame;
}
/**
......@@ -86,6 +77,24 @@ public class InertialProvider implements AttitudeProvider {
new Transform(AbsoluteDate.ARBITRARY_EPOCH, rotation), null, false);
}
/**
* Creates an attitude provider aligned with the given frame. The frame does not need
* to be inertial.
*
* <p>This attitude provider returned by this method is designed to be as fast as
* possible for when attitude is irrelevant while still being a valid implementation
* of {@link AttitudeProvider}. To ensure good performance the specified attitude
* reference frame should be the same frame used for propagation so that computing the
* frame transformation is trivial.
*
* @param satelliteFrame with which the satellite is aligned.
* @return new attitude provider aligned with the given frame.
* @since 11.0
*/
public static AttitudeProvider of(final Frame satelliteFrame) {
return new InertialProvider(satelliteFrame);
}
/** {@inheritDoc} */
public Attitude getAttitude(final PVCoordinatesProvider pvProv,
final AbsoluteDate date, final Frame frame) {
......
......@@ -990,12 +990,14 @@ public class JPLEphemeridesLoader extends AbstractSelfFeedingLoader
// extract time range covered by the record
final AbsoluteDate rangeStart = extractDate(record, DATA_START_RANGE_OFFSET);
if (rangeStart.compareTo(startEpoch) < 0) {
throw new OrekitException(OrekitMessages.OUT_OF_RANGE_EPHEMERIDES_DATE, rangeStart, startEpoch, finalEpoch);
throw new OrekitException(OrekitMessages.OUT_OF_RANGE_EPHEMERIDES_DATE_BEFORE,
rangeStart, startEpoch, finalEpoch, startEpoch.durationFrom(rangeStart));
}
final AbsoluteDate rangeEnd = extractDate(record, DATE_END_RANGE_OFFSET);
if (rangeEnd.compareTo(finalEpoch) > 0) {
throw new OrekitException(OrekitMessages.OUT_OF_RANGE_EPHEMERIDES_DATE, rangeEnd, startEpoch, finalEpoch);
throw new OrekitException(OrekitMessages.OUT_OF_RANGE_EPHEMERIDES_DATE_AFTER,
rangeEnd, startEpoch, finalEpoch, rangeEnd.durationFrom(finalEpoch));
}
if (rangeStart.compareTo(end) > 0 || rangeEnd.compareTo(start) < 0) {
......
......@@ -127,8 +127,10 @@ public class ClasspathCrawler implements DataProvider {
} else {
// match supported name against file name #618
final String fileName = name.substring(name.lastIndexOf('/') + 1);
DataSource data = new DataSource(fileName, () -> classLoader.getResourceAsStream(name));
// apply all registered filters
DataSource data = new DataSource(name, () -> classLoader.getResourceAsStream(name));
data = manager.getFiltersManager().applyRelevantFilters(data);
if (supported.matcher(data.getName()).matches()) {
......
......@@ -72,6 +72,7 @@ public enum OrekitMessages implements Localizable {
UNABLE_TO_FIND_RESOURCE("unable to find resource {0} in classpath"),
NO_EARTH_ORIENTATION_PARAMETERS_LOADED("no Earth Orientation Parameters loaded"),
MISSING_EARTH_ORIENTATION_PARAMETERS_BETWEEN_DATES("missing Earth Orientation Parameters between {0} and {1}"),
MISSING_EARTH_ORIENTATION_PARAMETERS_BETWEEN_DATES_GAP("missing Earth Orientation Parameters between {0} and {1}, gap is {2,number,0.0##############E0} s"),
NO_EARTH_ORIENTATION_PARAMETERS("missing Earth Orientation Parameters"),
NOT_A_SUPPORTED_IERS_DATA_FILE("file {0} is not a supported IERS data file"),
INCONSISTENT_DATES_IN_IERS_FILE("inconsistent dates in IERS file {0}: {1}-{2}-{3} and MJD {4}"),
......@@ -100,7 +101,7 @@ public enum OrekitMessages implements Localizable {
MISSING_GRAVITY_FIELD_COEFFICIENT_IN_FILE("missing gravity field coefficient {0}({1}, {2}) in file {3}"),
TOO_LARGE_DEGREE_FOR_GRAVITY_FIELD("too large degree (n = {0}, potential maximal degree is {1})"),
TOO_LARGE_ORDER_FOR_GRAVITY_FIELD("too large order (m = {0}, potential maximal order is {1})"),
SEVERAL_REFERENCE_DATES_IN_GRAVITY_FIELD("several reference dates ({0} and {1}) found in gravity field file {2}"),
SEVERAL_REFERENCE_DATES_IN_GRAVITY_FIELD("several reference dates ({0} and {1} differ by {3,number,0.0##############E0} s) found in gravity field file {2}"),
NO_TLE_FOR_OBJECT("no TLE data available for object {0}"),
NO_TLE_FOR_LAUNCH_YEAR_NUMBER_PIECE(
"no TLE data available for launch year {0}, launch number {1}, launch piece {2}"),
......@@ -131,7 +132,7 @@ public enum OrekitMessages implements Localizable {
FRAMES_MISMATCH("frame {0} does not match frame {1}"),
INITIAL_STATE_NOT_SPECIFIED_FOR_ORBIT_PROPAGATION("initial state not specified for orbit propagation"),
EVENT_DATE_TOO_CLOSE(
"event date {0}, greater than {1} minus {3} seconds and smaller than {2} plus {3} seconds, cannot be added"),
"target event date must be before {1} by {3,number,0.0##############E0} seconds or after {2} by {3,number,0.0##############E0} seconds, but target event date {0} is {4,number,0.0##############E0} seconds before {1} and {5,number,0.0##############E0} seconds after {2} so it cannot be added"),
UNABLE_TO_READ_JPL_HEADER("unable to read header record from JPL ephemerides binary file {0}"),
INCONSISTENT_ASTRONOMICAL_UNIT_IN_FILES(
"inconsistent values of astronomical unit in JPL ephemerides files: ({0} and {1})"),
......@@ -144,6 +145,8 @@ public enum OrekitMessages implements Localizable {
NO_JPL_EPHEMERIDES_BINARY_FILES_FOUND("no JPL ephemerides binary files found"),
OUT_OF_RANGE_BODY_EPHEMERIDES_DATE("out of range date for {0} ephemerides: {1}"),
OUT_OF_RANGE_EPHEMERIDES_DATE("out of range date for ephemerides: {0}, [{1}, {2}]"),
OUT_OF_RANGE_EPHEMERIDES_DATE_BEFORE("out of range date for ephemerides: {0} is {3,number,0.0##############E0} s before [{1}, {2}]"),
OUT_OF_RANGE_EPHEMERIDES_DATE_AFTER("out of range date for ephemerides: {0} is {3,number,0.0##############E0} s after [{1}, {2}]"),
UNEXPECTED_TWO_ELEVATION_VALUES_FOR_ONE_AZIMUTH(
"unexpected two elevation values: {0} and {1}, for one azimuth: {2}"),
UNSUPPORTED_PARAMETER_NAME("unsupported parameter name {0}, supported names: {1}"),
......@@ -204,10 +207,10 @@ public enum OrekitMessages implements Localizable {
NOT_ENOUGH_DATA_FOR_INTERPOLATION("not enough data for interpolation (sample size = {0})"),
NOT_ENOUGH_CACHED_NEIGHBORS("too small number of cached neighbors: {0} (must be at least {1})"),
NO_CACHED_ENTRIES("no cached entries"),
NON_CHRONOLOGICALLY_SORTED_ENTRIES("generated entries not sorted: {0} > {1}"),
NON_CHRONOLOGICALLY_SORTED_ENTRIES("generated entries not sorted: {0} > {1} by {2,number,0.0##############E0} s"),
NO_DATA_GENERATED("no data generated around date: {0}"),
UNABLE_TO_GENERATE_NEW_DATA_BEFORE("unable to generate new data before {0}, data requested for {1}"),
UNABLE_TO_GENERATE_NEW_DATA_AFTER("unable to generate new data after {0}, data requested for {1}"),
UNABLE_TO_GENERATE_NEW_DATA_BEFORE("unable to generate new data before {0}, but data is requested for {1} which is {2,number,0.0##############E0} s before"),
UNABLE_TO_GENERATE_NEW_DATA_AFTER("unable to generate new data after {0}, but data is requested for {1} which is {2,number,0.0##############E0} s after"),
UNABLE_TO_COMPUTE_HYPERBOLIC_ECCENTRIC_ANOMALY(
"unable to compute hyperbolic eccentric anomaly from the mean anomaly after {0} iterations"),
UNABLE_TO_COMPUTE_DSST_MEAN_PARAMETERS("unable to compute mean orbit from osculating orbit after {0} iterations"),
......@@ -286,10 +289,11 @@ public enum OrekitMessages implements Localizable {
"invalid measurement types {0} and {1} for the combination of measurements {2}"),
INCOMPATIBLE_FREQUENCIES_FOR_COMBINATION_OF_MEASUREMENTS(
"frequencies {0} and {1} are incompatibles for the {2} combination"),
NON_CHRONOLOGICAL_DATES_FOR_OBSERVATIONS("observations {0} and {1} are not in chronological dates"),
NON_CHRONOLOGICAL_DATES_FOR_OBSERVATIONS("observations are not in chronological order: {0} is {2,number,0.0##############E0} s after {1}"),
EXCEPTIONAL_DATA_CONTEXT(
"Use of the ExceptionalDataContext detected. This is typically used to detect developer errors."),
NON_DIFFERENT_DATES_FOR_OBSERVATIONS("observations {0}, {1} and {2} must have different dates"),
NON_DIFFERENT_DATES_FOR_OBSERVATIONS(
"Observations must have different dates: {0}, {1} ({3,number,0.0##############E0} s from first observation), and {2} ({4,number,0.0##############E0} s from first observation, {5,number,0.0##############E0} s from second observation)"),
NON_COPLANAR_POINTS("observations are not in the same plane"),
INVALID_PARAMETER_RANGE("invalid parameter {0}: {1} not in range [{2}, {3}]"),
PARAMETER_NOT_SET("The parameter {0} should not be null in {1}"),
......@@ -322,7 +326,8 @@ public enum OrekitMessages implements Localizable {
UNKNOWN_UNIT("unknown unit {0}"),
INCOMPATIBLE_UNITS("units {0} and {1} are not compatible"),
MISSING_VELOCITY("missing velocity data"),
ATTEMPT_TO_GENERATE_MALFORMED_FILE("attempt to generate file {0} with a formatting error");
ATTEMPT_TO_GENERATE_MALFORMED_FILE("attempt to generate file {0} with a formatting error"),
FIND_ROOT("{0} failed to find root between {1} (g={2,number,0.0##############E0}) and {3} (g={4,number,0.0##############E0})\nLast iteration at {5} (g={6,number,0.0##############E0})");
// CHECKSTYLE: resume JavadocVariable check
......
......@@ -105,7 +105,8 @@ public class IodGibbs {
final Vector3D r3, final AbsoluteDate date3) {
// Checks measures are not at the same date
if (date1.equals(date2) || date1.equals(date3) || date2.equals(date3)) {
throw new OrekitException(OrekitMessages.NON_DIFFERENT_DATES_FOR_OBSERVATIONS, date1, date2, date3);
throw new OrekitException(OrekitMessages.NON_DIFFERENT_DATES_FOR_OBSERVATIONS, date1, date2, date3,
date2.durationFrom(date1), date3.durationFrom(date1), date3.durationFrom(date2));
}
// Checks measures are in the same plane
......
......@@ -130,7 +130,7 @@ public class IodLambert {
// Exception if t2 < t1
if (tau < 0.0) {
throw new OrekitException(OrekitMessages.NON_CHRONOLOGICAL_DATES_FOR_OBSERVATIONS, t1, t2);
throw new OrekitException(OrekitMessages.NON_CHRONOLOGICAL_DATES_FOR_OBSERVATIONS, t1, t2, -tau);
}
// normalizing constants
......
......@@ -123,8 +123,10 @@ public class StreamingAemWriter implements AutoCloseable {
@Override
public void init(final SpacecraftState s0, final AbsoluteDate t, final double step) {
try {
if (t.isBefore(s0)) {
throw new OrekitException(OrekitMessages.NON_CHRONOLOGICALLY_SORTED_ENTRIES, s0.getDate(), t);
final AbsoluteDate date = s0.getDate();
if (t.isBefore(date)) {
throw new OrekitException(OrekitMessages.NON_CHRONOLOGICALLY_SORTED_ENTRIES,
date, t, date.durationFrom(t));
}
if (headerWritePending) {
......@@ -133,7 +135,7 @@ public class StreamingAemWriter implements AutoCloseable {
headerWritePending = false;
}
metadata.setStartTime(s0.getDate());
metadata.setStartTime(date);
metadata.setUseableStartTime(null);
metadata.setUseableStopTime(null);
metadata.setStopTime(t);
......
......@@ -128,8 +128,10 @@ public class StreamingOemWriter implements AutoCloseable {
@Override
public void init(final SpacecraftState s0, final AbsoluteDate t, final double step) {
try {
if (t.isBefore(s0)) {
throw new OrekitException(OrekitMessages.NON_CHRONOLOGICALLY_SORTED_ENTRIES, s0.getDate(), t);
final AbsoluteDate date = s0.getDate();
if (t.isBefore(date)) {
throw new OrekitException(OrekitMessages.NON_CHRONOLOGICALLY_SORTED_ENTRIES,
date, t, date.durationFrom(t));
}
if (headerWritePending) {
......@@ -138,7 +140,7 @@ public class StreamingOemWriter implements AutoCloseable {
headerWritePending = false;
}
metadata.setStartTime(s0.getDate());
metadata.setStartTime(date);
metadata.setUseableStartTime(null);
metadata.setUseableStopTime(null);
metadata.setStopTime(t);
......
......@@ -303,8 +303,10 @@ public class ICGEMFormatReader extends PotentialCoefficientsReader {
// first reference found, store it
referenceDate = toDate(localRef);
} else if (!referenceDate.equals(toDate(localRef))) {
final AbsoluteDate localDate = toDate(localRef);
throw new OrekitException(OrekitMessages.SEVERAL_REFERENCE_DATES_IN_GRAVITY_FIELD,
referenceDate, toDate(localRef), name);
referenceDate, localDate, name,
localDate.durationFrom(referenceDate));
}
}
......
......@@ -179,8 +179,10 @@ public class SHMFormatReader extends PotentialCoefficientsReader {
// first reference found, store it
referenceDate = toDate(localRef);
} else if (!referenceDate.equals(toDate(localRef))) {
final AbsoluteDate localDate = toDate(localRef);
throw new OrekitException(OrekitMessages.SEVERAL_REFERENCE_DATES_IN_GRAVITY_FIELD,
referenceDate, toDate(localRef), name);
referenceDate, localDate, name,
localDate.durationFrom(referenceDate));
}
} else {
......
......@@ -617,8 +617,9 @@ public class EOPHistory implements Serializable {
// compare the dates of preceding and current entries
if (preceding != null && (current.getDate().durationFrom(preceding.getDate())) > maxGap) {
throw new OrekitException(OrekitMessages.MISSING_EARTH_ORIENTATION_PARAMETERS_BETWEEN_DATES,
preceding.getDate(), current.getDate());
throw new OrekitException(OrekitMessages.MISSING_EARTH_ORIENTATION_PARAMETERS_BETWEEN_DATES_GAP,
preceding.getDate(), current.getDate(),
current.getDate().durationFrom(preceding.getDate()));
}
// prepare next iteration
......
......@@ -145,8 +145,13 @@ public class CssiSpaceWeatherData extends AbstractSelfFeedingLoader
* @param date date to bracket
*/
private void bracketDate(final AbsoluteDate date) {
if (date.durationFrom(firstDate) < 0 || date.durationFrom(lastDate) > 0) {
throw new OrekitException(OrekitMessages.OUT_OF_RANGE_EPHEMERIDES_DATE, date, firstDate, lastDate);
if (date.durationFrom(firstDate) < 0) {
throw new OrekitException(OrekitMessages.OUT_OF_RANGE_EPHEMERIDES_DATE_BEFORE,
date, firstDate, lastDate, firstDate.durationFrom(date));
}
if (date.durationFrom(lastDate) > 0) {
throw new OrekitException(OrekitMessages.OUT_OF_RANGE_EPHEMERIDES_DATE_AFTER,
date, firstDate, lastDate, date.durationFrom(lastDate));
}
// don't search if the cached selection is fine
......@@ -158,7 +163,7 @@ public class CssiSpaceWeatherData extends AbstractSelfFeedingLoader
final List<TimeStamped> neigbors = data.getNeighbors(date).collect(Collectors.toList());
previousParam = (LineParameters) neigbors.get(0);
nextParam = (LineParameters) neigbors.get(1);
if (previousParam.getDate().compareTo(date) > 0) {
if (previousParam.getDate().compareTo(date) > 0) { // TODO delete dead code
/**
* Throwing exception if neighbors are unbalanced because we are at the
* beginning of the data set
......@@ -188,29 +193,17 @@ public class CssiSpaceWeatherData extends AbstractSelfFeedingLoader
return previousValue * previousWeight + nextValue * nextWeight;
}
/** {@inheritDoc}
* For the DTM2000 model, we are using the adjusted flux
*/
/** {@inheritDoc} */
public double getInstantFlux(final AbsoluteDate date) {
// Interpolating two neighboring daily fluxes
// get the neighboring dates
bracketDate(date);
return getLinearInterpolation(date, previousParam.getF107Adj(), nextParam.getF107Adj());
return getLinearInterpolation(date, previousParam.getF107Obs(), nextParam.getF107Obs());
}
/** {@inheritDoc}
* For the DTM2000 model, we are using the adjusted flux
*/
/** {@inheritDoc} */
public double getMeanFlux(final AbsoluteDate date) {
if (date.compareTo(lastDailyPredictedDate) <= 0) {
bracketDate(date);
return previousParam.getCtr81Adj();
} else {
// Only monthly data is available, better interpolate between two months
// get the neighboring dates
bracketDate(date);
return getLinearInterpolation(date, previousParam.getCtr81Adj(), nextParam.getCtr81Adj());
}
return getAverageFlux(date);
}
/** {@inheritDoc} */
......@@ -261,10 +254,9 @@ public class CssiSpaceWeatherData extends AbstractSelfFeedingLoader
/**
* Gets the daily flux on the current day.
* For the NRLMSISE00 model, we are using the observed flux
*
* @param date the current date
* @return the daily F10.7 flux (adjusted)
* @return the daily F10.7 flux (observed)
*/
private double getDailyFluxOnDay(final AbsoluteDate date) {
if (date.compareTo(lastDailyPredictedDate) <= 0) {
......@@ -279,9 +271,7 @@ public class CssiSpaceWeatherData extends AbstractSelfFeedingLoader
}
}
/** {@inheritDoc}
* For the NRLMSISE00 model, we are using the observed flux
*/
/** {@inheritDoc} */
public double getAverageFlux(final AbsoluteDate date) {
if (date.compareTo(lastDailyPredictedDate) <= 0) {
bracketDate(date);
......
......@@ -238,9 +238,13 @@ public class MarshallSolarActivityFutureEstimation extends AbstractSelfFeedingLo
*/
private void bracketDate(final AbsoluteDate date) {
if (date.durationFrom(firstDate) < 0 || date.durationFrom(lastDate) > 0) {
throw new OrekitException(OrekitMessages.OUT_OF_RANGE_EPHEMERIDES_DATE,
date, firstDate, lastDate);
if (date.durationFrom(firstDate) < 0) {
throw new OrekitException(OrekitMessages.OUT_OF_RANGE_EPHEMERIDES_DATE_BEFORE,
date, firstDate, lastDate, firstDate.durationFrom(date));
}
if (date.durationFrom(lastDate) > 0) {
throw new OrekitException(OrekitMessages.OUT_OF_RANGE_EPHEMERIDES_DATE_AFTER,
date, firstDate, lastDate, date.durationFrom(lastDate));
}
// don't search if the cached selection is fine
......
......@@ -24,11 +24,11 @@ import org.hipparchus.ode.nonstiff.DormandPrince853Integrator;
import org.hipparchus.util.FastMath;
import org.orekit.annotation.DefaultDataContext;
import org.orekit.attitudes.AttitudeProvider;
import org.orekit.attitudes.InertialProvider;
import org.orekit.bodies.CR3BPSystem;
import org.orekit.data.DataContext;
import org.orekit.errors.OrekitException;
import org.orekit.errors.OrekitMessages;
import org.orekit.propagation.Propagator;
import org.orekit.propagation.SpacecraftState;
import org.orekit.propagation.events.EventDetector;
import org.orekit.propagation.events.HaloXZPlaneCrossingDetector;
......@@ -83,7 +83,7 @@ public class CR3BPDifferentialCorrection {
public CR3BPDifferentialCorrection(final PVCoordinates firstguess,
final CR3BPSystem syst, final double orbitalPeriod) {
this(firstguess, syst, orbitalPeriod,
Propagator.getDefaultLaw(DataContext.getDefault().getFrames()),
InertialProvider.of(syst.getRotatingFrame()),
DataContext.getDefault().getTimeScales().getUTC());
}
......
......@@ -22,9 +22,9 @@ import org.hipparchus.linear.RealMatrix;
import org.hipparchus.linear.RealVector;
import org.orekit.annotation.DefaultDataContext;
import org.orekit.attitudes.AttitudeProvider;
import org.orekit.attitudes.InertialProvider;
import org.orekit.bodies.CR3BPSystem;
import org.orekit.data.DataContext;
import org.orekit.propagation.Propagator;
import org.orekit.propagation.SpacecraftState;
import org.orekit.propagation.numerical.cr3bp.STMEquations;
import org.orekit.time.TimeScale;
......@@ -90,7 +90,7 @@ public abstract class LibrationOrbit {
*/
@DefaultDataContext
public void applyDifferentialCorrection() {
applyDifferentialCorrection(Propagator.getDefaultLaw(DataContext.getDefault().getFrames()),
applyDifferentialCorrection(InertialProvider.of(syst.getRotatingFrame()),
DataContext.getDefault().getTimeScales().getUTC());
}
......
......@@ -54,17 +54,6 @@ public interface FieldPropagator<T extends CalculusFieldElement<T>> extends Fiel
/** Default mass. */
double DEFAULT_MASS = 1000.0;
/**
* Default attitude provider.
*
* <p>This field uses the {@link DataContext#getDefault() default data context}.
*
* @see Propagator#getDefaultLaw(Frames)
* @see InertialProvider#InertialProvider(Frame)
*/
@DefaultDataContext
AttitudeProvider DEFAULT_LAW = InertialProvider.EME2000_ALIGNED;
/** Get the multiplexer holding all step handlers.
* @return multiplexer holding all step handlers
* @since 11.0
......
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