Good evening, I am having some trouble to understand the behaviour of the propagator when using finite maneuvers. I am sharing part of the code to show the problems.
final FactoryManagedFrame eme2000 = FramesFactory.getEME2000();
final AbsoluteDate date = new AbsoluteDate(new DateComponents(2022, 01, 01),
new TimeComponents(12, 00, 00.000),
TimeScalesFactory.getUTC());
KeplerianOrbit orbit = new KeplerianOrbit(6871000, 0.00101606133264409,
FastMath.toRadians(50),
FastMath.toRadians(0), FastMath.toRadians(45),
FastMath.toRadians(0), PositionAngle.TRUE,
FramesFactory.getEME2000(), date, Constants.IERS2010_EARTH_MU);
final SpacecraftState initialState = new SpacecraftState(orbit, 250.0);
final OrbitType orbitType = OrbitType.EQUINOCTIAL;
final double[][] tol = NumericalPropagator.tolerances(1.0, orbit, orbitType);
final AdaptiveStepsizeIntegrator integrator =
new DormandPrince853Integrator(0.1,2.0,tol[0],tol[1]);
final NumericalPropagator propagator = new NumericalPropagator(integrator);
propagator.setOrbitType(orbitType);
propagator.setInitialState(initialState);
Vector3D thrustVector = new Vector3D(0,0,10);
AttitudeProvider attitudeOverride = new LofOffset(FramesFactory.getEME2000(), LOFType.VNC);
final AbsoluteDate firingDate = new AbsoluteDate(new DateComponents(2022, 01,
02),
new TimeComponents(12, 05, 00.000),
TimeScalesFactory.getUTC());
final DateDetector start_fire = new DateDetector(firingDate);
final DateDetector end_fire = new DateDetector(firingDate.shiftedBy(15));
final EventBasedManeuverTriggers triggers = new
EventBasedManeuverTriggers(start_fire,
end_fire, false);
final PropulsionModel propulsionModel =
new BasicConstantThrustPropulsionModel(thrustVector.getNorm(), 150,
Vector3D.PLUS_I,
"apogee-engine");
propagator.addForceModel(new Maneuver(attitudeOverride, triggers,
propulsionModel));
To propagate I am using the ephemeris generator and the bounded propagator as described in the folowing code:
EphemerisGenerator ephemerisGenerator = propagator.getEphemerisGenerator();
propagator.propagate(firingDate.shiftedBy(300),firingDate.shiftedBy(-300));
BoundedPropagator boundedPropagator = ephemerisGenerator.getGeneratedEphemeris();
List<AbsoluteDate> orekitPropagationPointsList = new ArrayList<AbsoluteDate>();
orekitPropagationPointsList.add(firingDate.shiftedBy(0));
orekitPropagationPointsList.add(firingDate.shiftedBy(10));
orekitPropagationPointsList.add(firingDate.shiftedBy(60));
orekitPropagationPointsList.add(firingDate.shiftedBy(300));
for (int i = 0; i < orekitPropagationPointsList.size(); i++) {
SpacecraftState orekitCurrentSpacecraftState =
boundedPropagator.propagate(orekitPropagationPointsList.get(i));
System.out.print(orekitCurrentSpacecraftState.getDate() + " ");
System.out.print(orekitCurrentSpacecraftState.getA() + " ");
System.out.print(orekitCurrentSpacecraftState.getE() + " ");
System.out.print(Math.toDegrees(orekitCurrentSpacecraftState.getI()) + "\n");
}
My questions are two:
-
Even if the flag “allowBackwardPropagation” is set to false, why is it working with the current propagation times? I am propagating backward and it works perfectly.
-
Even if the “firingDate” is outside the propagation interval, the code computes the maneuver and the propagation does not stop at “firingDate.shiftedBy(300)” but consider also the maneuver. Is this behaviour due to the default set of the date detector to stop the propagation at the first event date occurrence?
I hope this is clear, thank everyone for your support.