Dear Colleagues, I am using the Propagators method propagate(AbsoluteDate start, AbsoluteDate target)
to do a propagation between start and target date.
The initial state of the propagator is before the start date.
According to the description of the method which can be found here
https://www.orekit.org/static/apidocs/org/orekit/propagation/Propagator.html#propagate-org.orekit.time.AbsoluteDate-org.orekit.time.AbsoluteDate- the event detection mechanism should be switched off outside the interval of start and target date. In my example below also events outside the specified interval are detected. I would expect that 0 events are reported instead of 3. What is the intended behaviour? Many Thanks, André public
class App {
public
static
void main(String[]
args)
throws OrekitException {
// Mostly copied from the examples found in:
// https://www.orekit.org/static/tutorial/propagation.html DataProvidersManager.getInstance().addProvider(new
DirectoryCrawler(new
File(args[0]))); Vector3D
position =
new Vector3D(-6142438.668, 3492467.560, -25767.25680); Vector3D
velocity =
new Vector3D(505.8479685, 942.7809215, 7435.922231); PVCoordinates
pvCoordinates =
new PVCoordinates(position,
velocity); AbsoluteDate
initialDate =
new AbsoluteDate(2004, 01, 01, 12, 00, 00.000, TimeScalesFactory.getUTC()); Frame
inertialFrame = FramesFactory.getEME2000();
double
mu = 3.986004415e+14; Orbit
initialOrbit =
new CartesianOrbit(pvCoordinates,
inertialFrame,
initialDate,
mu); SpacecraftState
initialState =
new SpacecraftState(initialOrbit);
double
minStep = 0.001;
double
maxstep = 1000.0;
double
positionTolerance = 10.0; OrbitType
propagationType = OrbitType.CARTESIAN;
double[][]
tolerances = NumericalPropagator.tolerances(positionTolerance,
initialOrbit,
propagationType); AdaptiveStepsizeIntegrator
integrator =
new DormandPrince853Integrator(minStep,
maxstep,
tolerances[0],
tolerances[1]); NumericalPropagator
propagator =
new NumericalPropagator(integrator);
propagator.setOrbitType(propagationType);
// Code showing the issue starts here
// The propagator's initial state is set
propagator.setInitialState(initialState);
// Dates for the Event detector AbsoluteDate
dateOne =
initialDate.shiftedBy(10); AbsoluteDate
dateTwo =
initialDate.shiftedBy(20); AbsoluteDate
dateThree =
initialDate.shiftedBy(30);
// Start and stop date for the propagation AbsoluteDate
startDate =
initialDate.shiftedBy(40); AbsoluteDate
stopDate =
initialDate.shiftedBy(50); RecordAndContinue<DateDetector>
recordAndContinue =
new RecordAndContinue<>(); DateDetector
dateDetector =
new DateDetector(1, 1E-1,
dateOne,
dateTwo,
dateThree).withHandler(recordAndContinue);
propagator.addEventDetector(dateDetector);
/* * A propagation from startDate to stopDate is requested. * The starting date is not the initial date * and the propagation interval is outside of the DateDetectors dates.
*/ SpacecraftState
finalState =
propagator.propagate(startDate,
stopDate);
System.out.println("Final
date: " +
finalState.getDate());
//The expected result is 0 events as event detection should not be activated outside the interval of start and stop date.
System.out.println("Number
of events: " +
recordAndContinue.getEvents().size()); } } ___________________________________________________________ |