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

[Orekit Users] CPython interface question



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)