Hello community!
I would like to convert a cartesian state into mean equinoctial elements using the DSST theory (I have not looked into the subject before, so please excuse in advance any incorrect statement).
To my knowledge, I found two ways to do so in Orekit:
- use DSSTPropagator.computeMeanState static method (requiring the osculating SpacecraftState and a list of DSST force models)
- use the OsculatingToMeanElementsConverter class, that requires a DSSTPropagator instance
I wrote a simple script that compares the results by the two converters, and the two state’s PV coordinates are not matching. I was wondering then what is the best way to do this conversion.
Thank you!
Frame inertialFrame = FramesFactory.getEME2000();
Frame earthFrame = FramesFactory.getITRF(IERSConventions.IERS_2010, true);
FrameAlignedProvider attitudeProvider = new FrameAlignedProvider(inertialFrame);
DormandPrince853Integrator integrator =
new DormandPrince853Integrator(0.001, 100.0, 1.0e-12, 1.0e-12);
DSSTPropagator propagator =
new DSSTPropagator(integrator, PropagationType.MEAN, attitudeProvider);
List<DSSTForceModel> forces = new ArrayList<>();
UnnormalizedSphericalHarmonicsProvider gravityProvider =
GravityFieldFactory.getUnnormalizedProvider(10, 10);
forces.add(new DSSTZonal(earthFrame, gravityProvider));
forces.add(new DSSTTesseral(earthFrame, Constants.WGS84_EARTH_ANGULAR_VELOCITY, gravityProvider));
OneAxisEllipsoid earthShape = new OneAxisEllipsoid(
Constants.WGS84_EARTH_EQUATORIAL_RADIUS,
Constants.WGS84_EARTH_FLATTENING,
earthFrame
);
CelestialBody sun = CelestialBodyFactory.getSun();
CelestialBody moon = CelestialBodyFactory.getMoon();
forces.add(new DSSTThirdBody(sun, Constants.WGS84_EARTH_MU));
forces.add(new DSSTThirdBody(moon, Constants.WGS84_EARTH_MU));
HarrisPriester atmosphere = new HarrisPriester(sun, earthShape, 6.0);
DragForce dragForce = new DragForce(atmosphere, new IsotropicDrag(1.0, 2.2));
forces.add(new DSSTAtmosphericDrag(dragForce, Constants.WGS84_EARTH_MU));
IsotropicRadiationSingleCoefficient srpCoeff = new IsotropicRadiationSingleCoefficient(1.0, 1.8);
forces.add(new DSSTSolarRadiationPressure(sun, earthShape, srpCoeff, Constants.WGS84_EARTH_MU));
for (DSSTForceModel force : forces) {
propagator.addForceModel(force);
}
PVCoordinates coord = new PVCoordinates(
new Vector3D(7_100_000, 0, 1_300_000),
new Vector3D(0, 7_350, 1_000)
);
AbsoluteDate date = new AbsoluteDate("2025-03-24T12:34:00.445Z", TimeScalesFactory.getUTC());
CartesianOrbit cartOrbit = new CartesianOrbit(coord, inertialFrame, date, Constants.WGS84_EARTH_MU);
EquinoctialOrbit eqOrbit = new EquinoctialOrbit(cartOrbit);
SpacecraftState state = new SpacecraftState(eqOrbit).withMass(1000.0);
SpacecraftState mean1 = DSSTPropagator.computeMeanState(state, null, propagator.getAllForceModels());
OsculatingToMeanElementsConverter converter =
new OsculatingToMeanElementsConverter(state, 1, propagator, 1000.0);
SpacecraftState mean2 = converter.convert();