Extracting separate perturbing accelerations

Hello, I discovered Orekit recently and there is too much information so I’m a little lost:) I’d like to ask a couple of questions. I’m propagating a LEO orbit using Python wrapper, but the questions are not about the wrapper. I’m using a NumericalPropagator with DormandPrince853Integrator. Along with the main gravity provider I add several perturbing forces, for instance (without details):


and several others. I propagate the orbit for certain duration, recording states at predefined moments ‘time_moments’, like this:

states = [propagator_num.propagate(t) for t in time_moments]

All seems to be working well. But:

  1. Is there a simple way to get numerical values of different kinds of perturbing accelerations separately (from Moon, tides, even from a particular Stockes coefficient)? I mean, can full acceleration be split into pieces, at those moments ‘time_moments’ or at any arbitrary moment? I suppose it’s something about using internal acceleration functions for each ForceModel, but an example of code would be great!
  2. That question have arised mainly because of a problem with radiation pressure model. I tried to add simple model

sun = CelestialBodyFactory.getSun()
isotropicRadiationSingleCoeff = IsotropicRadiationSingleCoefficient( 1.0, 0.4 )
solarRadiationPressure = SolarRadiationPressure(sun, wgs84Ellipsoid.getEquatorialRadius(),

The area and reflection coefficient are close to reality, but adding this force seems to have virtually no impact on the orbit. After several revolutions I would expect a position shift by several meters w/r to the old orbit, but got less than a centimeter. So I want to see explicitly the acceleration produced by this pressure model to compare with expected. May be someone has an idea what is wrong with this pressure effect?

Hi @Aspern

Welcome to the Orekit forum!

You can directly call the acceleration method of the ForceModel.

moon_perturbation = ThirdBodyAttraction(CelestialBodyFactory.getMoon()))
acc = moon_perturbation.acceleration(state, moon_perturbation.getParameters())

Where state is the SpacecraftState for which you want to evaluate the acceleration of the perturbation. To exercise, you can try using your initial state or the propagated one.

Your code looks good.

What is your orbit? LEO, MEO, or GEO? Depending the orbit, the satellite can spend a lot of tine in eclise, so without solar radiation pressure.
In addition, did you set the mass of the spacecraft? By default the mass is 1000kg. I see you used 1.0 meters squared for satellite’s cross section. Therefore, the surface over mass ratio is small if you didn’t update the satellite’s mass. Combined with a small reflection coefficient value (0.4), it could explain why you see a small effect of the solar radiation pressure.

Best regards,

Another minor point as you are discovering Orekit.
If your time_moments are a regular sample, there is a faster way to get the states. You can use register a fixed step handler to the propagator along with the step size you want and propagate just once from beginning to end. Then your step handler will be called automatically and you can store the current state, for example in a list. This is much faster than performing the time loop by yourself, mainly for small sampling steps because it lets the underlying integrator choose the integration steps by itself, even to step sizes larger than your sampling rate (it uses its own internal model to provide you intermediate states).

Thank you both for a quick responce! Unfortunately the problem remains. I’ve tried

moon_perturbation = ThirdBodyAttraction(CelestialBodyFactory.getMoon())
acc = moon_perturbation.acceleration(state[0], moon_perturbation.getParameters())

for a saved SpacecraftState state[0], but got an error message

----> 2 acc = moon_perturbation.acceleration(state[0], moon_perturbation.getParameters())
AttributeError : ‘ThirdBodyAttraction’ object has no attribute ‘getParameters’

Also got the same error trying to do it with DragForce. I use orekit version 11.3.1 and see ‘getParameters’ among available class methods in drop-down list in my editor. May it be something with Python wrapper? My original whole code still work fine.

About the mass: I use 600 kg when I set up
initialState = SpacecraftState(initialOrbit, satellite_mass)
before setting up my numerical propagator. The satellite is one of the twin GRACE-Follow On satellites on a 450 km above surface orbit. According to the on-board accelerometer, acceleration from radiation pressure should be around 1e-7 - 1e-8 m/s^2 (very roughly), so after one revolution (1.5 hours) accumulated position shift is supposed to be 50-100 cm. I need to experiment with drag and pressure parameters more. If I have a box shaped satellite with different surface properties on each side - is it the best way to model it with BoxAndSolarArraySpacecraft class? With no solar arrays and a single (average) reflection coefficient?

luc, thank you for a reminder about the step-handler, I’ll certainly look into it (I think there are some subtleties in using it with Python).

Hi, @Aspern,

When using python wrapper, the polymorphism of Java is a common issue. You should cast it exactly.

Here, the method getParameters is a member of interface ForceModel, so the following cast is needed.



Thank you LiRW, that works! Now to figure out why radiation pressure is so low, while relativity effects are huge (almost as acceleration from the Sun)…