[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orekit Users] DSSTPropagator.computeMeanState



Hello,

I have encountered an error and I would be grateful to have some feedback in
order to understand why is it happening.
Using the  DSSTPropagator.computeMeanState, I found the following error:

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 29
	at org.orekit.propagation.semianalytical.dsst.forces.DSSTZonal
$FourierCjSjCoefficients.getCj(DSSTZonal.java:1896)
	at
org.orekit.propagation.semianalytical.dsst.forces.DSSTZonal.computeCijSijCoefficients(DSSTZonal.java:762)
	at
org.orekit.propagation.semianalytical.dsst.forces.DSSTZonal.updateShortPeriodTerms(DSSTZonal.java:662)
	at
org.orekit.propagation.semianalytical.dsst.DSSTPropagator.computeMeanOrbit(DSSTPropagator.java:508)
	at
org.orekit.propagation.semianalytical.dsst.DSSTPropagator.computeMeanState(DSSTPropagator.java:369)

I was trying to transform an osculating orbit into a mean orbit with these
parameters:

sma =7040.956769 km
e =0.0011993
w =90.057 deg
i =98.125 deg
raan =136.71 deg
lm = -90 deg
date=01/03/2019 22h30

On the other hand, the code is the following:
public Orbit fromOscuToMean(Orbit orb) throws PropagationException,
OrekitException{
		Collection<DSSTForceModel> forces=DSST.getDsstForceModel(15,
0,
				true, true, false, 1, 1,
				true, 1, 2, orb.getI());
		SpacecraftState s0=new SpacecraftState(orb,3000);
		SpacecraftState
currentState=DSSTPropagator.computeMeanState(s0, forces);
		return currentState.getOrbit();
	}
Method DSST.getDsstForceModel:
static public Collection<DSSTForceModel> getDsstForceModel(
			int degree, int order, boolean sun, boolean moon,
			boolean srp, double srpCoef, double srpArea,
			boolean drag, double dragCoef, double dragArea,
			double inclination)
					throws OrekitException,
PropagationException {

		ArrayList<DSSTForceModel> forces = new
ArrayList<DSSTForceModel>();

		FactoryManagedFrame GTOD =
FramesFactory.getGTOD(IERSConventions.IERS_2010,false);
		UnnormalizedSphericalHarmonicsProvider provider =

GravityFieldFactory.getUnnormalizedProvider(degree, order);


		DSSTForceModel zonal= new DSSTZonal(provider, degree,
degree-2, (degree-1)*2);
		DSSTForceModel tesseral=new
DSSTTesseral(GTOD,Constants.WGS84_EARTH_ANGULAR_VELOCITY,
				provider, degree, order, 4, 12, degree, order,
4);
		forces.add(zonal);
		forces.add(tesseral);

		// DSST Third Body force
		CelestialBody sunBody = CelestialBodyFactory.getSun();
		if (sun)
			forces.add(new DSSTThirdBody(sunBody));
		if (moon)
			forces.add(new
DSSTThirdBody(CelestialBodyFactory.getMoon()));

		// DSST SRP
		if (srp)
			forces.add(new DSSTSolarRadiationPressure(srpCoef,
					srpArea,sunBody, LEOinput.AE));

		// DSST Drag
		if (drag) {
			Atmosphere atm =
getHarrisPriesterAtmosphere(inclination);
			forces.add(new DSSTAtmosphericDrag(atm, dragCoef,
dragArea));
		}

		return forces;
	}

I am using the version 7.2 and the library commons-math3-3.6.1.
Do you have any idea of what is wrong?

Best regards,

Elisabet