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

Re: Re: [Orekit Users] CPython interface question



Hi Petrus,
the example on the wiki also fails on the same propagate step. Changing the propagator does not change this behavior. All the transforms and problem setup till the propagate step behave as expected as far as I can tell. Print statements result in reasonable values. I have attached a simple python file derived from the example on the wiki that causes the failure.

Here are more details about the machine that I'm working on:

Ubuntu 12.04 64-bit with Python 2.7 and JCC 2.11-3 (Default obtained using yum). My build script did not use the --shared or --arch flag .

Linux piyush-blah 3.2.0-35-generic #55-Ubuntu SMP Wed Dec 5 17:42:16 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Thanks,
Piyush
from orekit import initVM,  File
from orekit import DataProvidersManager, ZipJarCrawler, \
    FramesFactory, OneAxisEllipsoid,\
    TimeScalesFactory, KeplerianOrbit, \
    AbsoluteDate
from orekit import Constants, KeplerianPropagator

from math import radians
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap

## Setup Orekit
initVM()
DM = DataProvidersManager.getInstance()
datafile = File('orekit-data.zip')
if datafile.exists() == False:
    print 'File :', datafile.absolutePath, ' not found'

crawler = ZipJarCrawler(datafile)
DM.clearProviders()
DM.addProvider(crawler)

## Some Constants
ae = Constants.WGS84_EARTH_EQUATORIAL_RADIUS
mu = Constants.WGS84_EARTH_MU
utc = TimeScalesFactory.getUTC()

## Osculating orbit
#Initial orbit parameters
ra = 800 * 1000         # km Apogee!
rp = 700 * 1000         # km Perigee!
i = radians(98.55)      # inclination
omega = radians(90.0)   # perigee argument
raan = radians(5.1917)  # right ascension of ascending node
lv = radians(359.93)    # True anomaly
epochDate = AbsoluteDate(2012, 01, 26, 16, 00, 00.000, utc)

a = (rp + ra + 2 * ae) / 2.0    # semi major axis in km
e = 1.0 - (rp + ae) / a

## Inertial frame where the satellite is defined
inertialFrame = FramesFactory.getEME2000()

## Orbit construction as Keplerian
initialkeplerOrbit = KeplerianOrbit(a, e, i, omega, raan, lv,
                              KeplerianOrbit.TRUE_ANOMALY,
                              inertialFrame, epochDate, mu)

## Set up Propagator for reference orbit
eck_prop = KeplerianPropagator(initialkeplerOrbit) #,

## Create time vector
startDate = AbsoluteDate(2012, 03, 26, 11, 00, 00.000, utc)


## Orekit PV object array
print 'Before propagation'
pv = eck_prop.propagate(startDate).getPVCoordinates()
print 'After propagation: ', pv