Commit 32b56615 authored by Bryan Cazabonne's avatar Bryan Cazabonne
Browse files

Merge branch 'develop' into issue-818

Fixes #818
parents 3833242b a5a57b2b
Pipeline #1340 passed with stages
in 20 minutes and 1 second
......@@ -24,6 +24,9 @@
<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="evan" type="remove" issue="586">
Remove InertialProvider.EME2000_ALIGNED, Propagator.DEFAULT_LAW. Use
InertialProvider.of(Frame).
......
......@@ -1820,10 +1820,14 @@ public abstract class AbstractGaussianContribution implements DSSTForceModel {
final Slot slot = new Slot(jMax, interpolationPoints);
final AbsoluteDate first = meanStates[0].getDate();
final AbsoluteDate last = meanStates[meanStates.length - 1].getDate();
if (first.compareTo(last) <= 0) {
final int compare = first.compareTo(last);
if (compare < 0) {
slots.addValidAfter(slot, first);
} else {
} else if (compare > 0) {
slots.addValidBefore(slot, first);
} else {
// single date, valid for all time
slots.addValidAfter(slot, AbsoluteDate.PAST_INFINITY);
}
return slot;
}
......
......@@ -1733,10 +1733,14 @@ public class DSSTTesseral implements DSSTForceModel {
final Slot slot = new Slot(mMax, jMax, interpolationPoints);
final AbsoluteDate first = meanStates[0].getDate();
final AbsoluteDate last = meanStates[meanStates.length - 1].getDate();
if (first.compareTo(last) <= 0) {
final int compare = first.compareTo(last);
if (compare < 0) {
slots.addValidAfter(slot, first);
} else {
} else if (compare > 0) {
slots.addValidBefore(slot, first);
} else {
// single date, valid for all time
slots.addValidAfter(slot, AbsoluteDate.PAST_INFINITY);
}
return slot;
}
......
......@@ -3087,10 +3087,14 @@ public class DSSTThirdBody implements DSSTForceModel {
final Slot slot = new Slot(jMax, interpolationPoints);
final AbsoluteDate first = meanStates[0].getDate();
final AbsoluteDate last = meanStates[meanStates.length - 1].getDate();
if (first.compareTo(last) <= 0) {
final int compare = first.compareTo(last);
if (compare < 0) {
slots.addValidAfter(slot, first);
} else {
} else if (compare > 0) {
slots.addValidBefore(slot, first);
} else {
// single date, valid for all time
slots.addValidAfter(slot, AbsoluteDate.PAST_INFINITY);
}
return slot;
}
......
......@@ -1481,10 +1481,14 @@ public class DSSTZonal implements DSSTForceModel {
final Slot slot = new Slot(maxFrequencyShortPeriodics, interpolationPoints);
final AbsoluteDate first = meanStates[0].getDate();
final AbsoluteDate last = meanStates[meanStates.length - 1].getDate();
if (first.compareTo(last) <= 0) {
final int compare = first.compareTo(last);
if (compare < 0) {
slots.addValidAfter(slot, first);
} else {
} else if (compare > 0) {
slots.addValidBefore(slot, first);
} else {
// single date, valid for all time
slots.addValidAfter(slot, AbsoluteDate.PAST_INFINITY);
}
return slot;
}
......
/*
* Licensed to the Hipparchus project under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.orekit.propagation.events;
import org.hipparchus.ode.ODEIntegrator;
import org.hipparchus.ode.nonstiff.DormandPrince853Integrator;
import org.orekit.bodies.CelestialBodyFactory;
import org.orekit.propagation.PropagationType;
import org.orekit.propagation.Propagator;
import org.orekit.propagation.SpacecraftState;
import org.orekit.propagation.semianalytical.dsst.DSSTPropagator;
import org.orekit.propagation.semianalytical.dsst.forces.DSSTThirdBody;
import org.orekit.utils.Constants;
/** Test events with the DSST Propagator.
*
* @author Evan Ward
*/
public class CloseEventsDsstOsculatingTest extends CloseEventsAbstractTest {
@Override
public Propagator getPropagator(double stepSize) {
double[][] tol = DSSTPropagator.tolerances(1, initialOrbit);
ODEIntegrator integrator = new DormandPrince853Integrator(stepSize, stepSize, tol[0], tol[1]);
DSSTPropagator propagator = new DSSTPropagator(integrator, PropagationType.OSCULATING);
propagator.setInitialState(new SpacecraftState(initialOrbit));
double gm = Constants.EIGEN5C_EARTH_MU;
propagator.addForceModel(new DSSTThirdBody(CelestialBodyFactory.getMoon(), gm));
return propagator;
}
}
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