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

Re: [Orekit Users] CPython interface question



Hi,

The floats are probably right, I use same method from numpy to get JCC to understand it as floats.

The error makes me confused. Does the example on the wiki run ok? https://www.orekit.org/forge/projects/orekit/wiki/Integration_in_Python

If you change the example to keplarian propagator, does it run ok?

Not sure if JCC is refering to a python argument string, but I can't see to match that somehow to your propagate or other call.

Can you scale the example down to a standalone test that fails, and I can try it from here?

Regards
/Petrus


On 24 dec 2012, at 21:24, Piyush Shanker Agram <piyush@gps.caltech.edu> wrote:

> I dont think the float statements are the problem. Python floats are 8 byte by default. Since orekit does not recognize numpy data types, I actually needed the explicit float conversions to make the transforms work.
> 
> The code crashes only on the final line. Intermediate results involving time and coordinate transforms seem to work fine. Here is the line where it crashes.
> 
>> 	finState = orb_prop.propagate(startDate)
> 
> There are no problems reported when initializing the orbit or the propagator.
> 
> The message indicates something is wrong while parsing some arguments in JCC.CPP .
> 
> Thanks
> Piyush
> 
> 
> piyush@gps.caltech.edu wrote:
> 
>> Hi everyone,
>>    I stumbled across orekit when looking for software for orbit propagation.
>> I'm trying to propagate given state vectors (position + velocity) for SAR
>> satellites in the forward and backward directions by a few minutes. I'm a heavy
>> Python user and chose to try the CPython interface. The interface works pretty
>> well and allows me to transform data easily between inertial and itrf frames.
>> However, everytime I try to propagate the orbit (tried a couple of methods) -
>> the program crashes with the following message. I'm not really familiar with
>> JCC and have trouble interpreting this error.
>> 
>> # A fatal error has been detected by the Java Runtime Environment:
>> #
>> #  SIGSEGV (0xb) at pc=0x00007f44841f7c5a, pid=16722, tid=139932295845632
>> #
>> # JRE version: 6.0_24-b24
>> # Java VM: OpenJDK 64-Bit Server VM (20.0-b12 mixed mode linux-amd64 compressed
>> oops)
>> # Derivative: IcedTea6 1.11.5
>> # Distribution: Ubuntu 12.04 LTS, package 6b24-1.11.5-0ubuntu1~12.04.1
>> # Problematic frame:
>> # C  [_orekit.so+0x358c5a]  _parseArgs(_object**, unsigned int, char*,
>> ...)+0x218a
>> #
>> 
>> 
>> Here is my code segment. Any suggestions would be helpful.
>> 
>> Thanks
>> Piyush
>> 
>> 	setup_orekit_curdir()	   #Reads data and includes initVM
>> 
>> 	#####Setup the ECEF frame
>> 	ecefframe = orekit.FramesFactory.getITRF2005()
>> 	ae = orekit.Constants.WGS84_EARTH_EQUATORIAL_RADIUS
>> 	flt = orekit.Constants.WGS84_EARTH_FLATTENING
>> 	mu = orekit.Constants.WGS84_EARTH_MU
>> 	earth = orekit.OneAxisEllipsoid(ae, flt, ecefframe)
>> 
>> 	######Setup the ECI Frame
>> 	eciframe = orekit.FramesFactory.getEME2000()
>> 
>> 	######Setup time frame
>> 	utc = orekit.TimeScalesFactory.getUTC()
>> 
>> 	#####Read in data from ROI_PAC state vector file	
>> 	hdrdata = np.loadtxt('hdr_pts.rsc')
>> 
>> 	ihr, imin, isec = secs_2_hhmmss(hdrdata[0,0])
>> 	ipos = orekit.Vector3D(float(hdrdata[0,1]), float(hdrdata[0,2]),
>> float(hdrdata[0,3]))
>> 	ivel = orekit.Vector3D(float(hdrdata[0,4]), float(hdrdata[0,5]),
>> float(hdrdata[0,6]))
>> 	iVect = orekit.PVCoordinates(ipos, ivel)
>> 	itime = hdrdata[0,0]
>> 	iDate = orekit.AbsoluteDate(2012, 4, 30, ihr, imin, isec, utc)
>> 
>> 
>> 	#######Create transforms using this
>> 	eci2ecef = eciframe.getTransformTo(ecefframe, iDate)
>> 	ecef2eci = eci2ecef.getInverse()
>> 
>> 	eVect = ecef2eci.transformPVCoordinates(iVect)
>> 	initOrbit = orekit.KeplerianOrbit(eVect, eciframe,iDate, mu)
>> 	orb_prop = orekit.KeplerianPropagator(initOrbit)
>> 	orb_prop.setSlaveMode()
>> 	
>> 	startDate = orekit.AbsoluteDate(iDate,float(hdrdata[1,0]-hdrdata[0,0]),
>> utc)
>> 	finState = orb_prop.propagate(startDate)