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

Re: Re: [Orekit Users] Passing 2D arrays to orekit functions in python



I tried a couple of other ways to make this work but the auto-generated python
interface for DSSTCentralBody does not seem to like 2D arrays. Strangely
enough, another instance of 2Darrays seems to work fine. Here are both
examples:

#####Working example
tols = orekit.NumericalPropagator.tolerances(0.01, initOrbit,
orekit.OrbitType.CARTESIAN)
orbIntg = orekit.DormandPrince853Integrator(minStep, maxStep,
orekit.JArray_double.cast_(tols[0]), orekit.JArray_double.cast_(tols[1]))

In this case, tols is a 2D array that is returned and I can easily break it
into two 1D arrays and everything seems to work.


####Non-working example
PotlProvider = orekit.GravityFieldFactory.getPotentialProvider()
Cnm = PotlProvider.getC(gDegree, gOrder, False)
Snm = PotlProvider.getS(gDegree, gOrder, False)
gForce = orekit.DSSTCentralBody(wvel, ae, mu, Cnm, Snm)

In this case, Cnm and Snm are also of the same type as tols in the working
example. However, passing it directly does not seem to work. It keeps reporting
an invalidargs error.

Piyush