State Interpolator Invalid Arguments Error

Hi all,

I am using a DSST propagator where I set the max step to every few orbits, which results in sparse orbital data outputs. Unfortunately, only having satellite positional data once every few orbits leads to some interesting orbits in Cesium. In order to visualize this orbit in Cesium accurately so that the Cesium interpolation doesn’t lead to unusual visuals, I decided to try to implement the spacecraft state interpolator to generate more points in between the data from propagation. However, I am having trouble implementing the class. I get the following error,

state_interpolated = state_interpolator.interpolate(new_dates[idx], state_pairs)
orekit.InvalidArgsError: (<class ‘org.orekit.propagation.SpacecraftStateInterpolator’>, ‘interpolate’, (<AbsoluteDate: 2031-01-01T00:00:00.000002Z>, [<SpacecraftState: SpacecraftState{orbit=Keplerian parameters: {a: 7083137.0; e: 0.0; i: 98.19999999999999; pa: 0.0; raan: 0.0; v: 0.0;}, attitude=org.orekit.attitudes.Attitude@30c0d731, mass=6.0, additional={}, additionalDot={}}>, <SpacecraftState: SpacecraftState{orbit=equinoctial parameters: {a: 7073969.732352099; ex: -4.662468848297403E-4; ey: -3.0329160680545307E-7; hx: 1.1545078325623306; hy: -1.3486024884883569E-6; lv: 0.0026791290180058413;}, attitude=org.orekit.attitudes.Attitude@61c7222b, mass=6.0, additional={}, additionalDot={}}>])).

Any help or alternative suggestions for obtaining smooth orbital visualizations would be greatly appreciated.

You can use a step handler (fixed step handler is the simpler to use) to output the orbit at any step you want regardless of the step size used by the integrator. The step handler uses an internal interpolator that is consistent with the integrator.

Concerning the error you get, I wonder if this is not due to the second parameter. I think you provide an array with two points instead of a Collection object (typically a List, but could be a Sorted Set or something in this Collections hierarchy).

Hi Luc, thanks for the response. Unfortunately, the fixed step handler slows down the propagation significantly when I set the step equal to a size needed to get at least 5 points per orbit. Also, I pass in the two states in a list and still get the error.

Hi there

I think the wrapper is not able to turn your python list into a java collection. Try something like that:

states = ArrayList()
for tt in t:

Or maybe even directly with Collection. You can import it like that:
from java.util import Collections


1 Like

Hi Serrof,

That seemed to do the trick. Thanks!