Negative eccentricity computed while propagating with Brouwer-Lyddane algorithm
Hello/Bonjour,
I'm trying to use a Brouwer-Lyddane propagator with a step handler in it, but it fails as it calculates a negative eccentricity during the computation. If I remove the StepHandler, it works.
Here is the code :
`
@Test
public void testBL() {
final double x1 = -1772.619869591273 * 1000;
final double y1 = -3908.6521138424428 * 1000;
final double z1 = 5266.68093513367 * 1000;
final double dx1 = 6.35969327821623 * 1000;
final double dy1 = -4.165238186695803 * 1000;
final double dz1 = -0.9458311825913897 * 1000;
Vector3D position1 = new Vector3D(x1, y1, z1);
Vector3D velocity1 = new Vector3D(dx1, dy1, dz1);
TimeScale tai = TimeScalesFactory.getTAI();
AbsoluteDate date = new AbsoluteDate(2023, 3, 1, 14, 6, 29.639584, tai);
CircularOrbit orbit1 = new CircularOrbit(new PVCoordinates(position1, velocity1), FramesFactory.getGCRF(),
date, Constants.EGM96_EARTH_MU);
System.out.println(orbit1);
BrouwerLyddanePropagator blPropagator = new BrouwerLyddanePropagator(orbit1, 1000.,
Constants.IERS2010_EARTH_EQUATORIAL_RADIUS, Constants.IERS2010_EARTH_MU, Constants.EIGEN5C_EARTH_C20,
Constants.EIGEN5C_EARTH_C30, Constants.EIGEN5C_EARTH_C40, Constants.EIGEN5C_EARTH_C50,
BrouwerLyddanePropagator.M2);
List<SpacecraftState> listSpState = new ArrayList<>();
blPropagator.setStepHandler(10, listSpState::add);
AbsoluteDate startDate = new AbsoluteDate(2023, 3, 1, 14, 6, 29.639584, tai);
AbsoluteDate endDate = new AbsoluteDate(2023, 3, 1, 15, 6, 29.639584, tai);
blPropagator.propagate(startDate, endDate);
}
`
Do you have an idea of how I could bypass this error? I tried using all the different orbit types (Cartesian, Keplerian, Circular & Equinoctial), but no one works.