[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orekit Users] CPython interface question
- To: orekit-users@orekit.org
- Subject: Re: [Orekit Users] CPython interface question
- From: "Petrus Hyvönen" <petrus.hyvonen@gmail.com>
- Date: Tue, 25 Dec 2012 12:19:55 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=LFpFNnyaytlRyphk7lRO/wZmpxZG6kDOLcJvF+5pPIg=; b=mPJu8y7W+OKNnpUa0V3rtay8vSxKKz1ByPovicIxiYnnDnFsPHfqKQSPEdwMI4FWH6 nbyp1iI+og40d4yc8U0p8PQHPEb0oqKFU875fnaesrYBNeyDwaV1KSW4xHXDJrIG+MwG J1MNtZdFyeQoliw+aUS4rtUjElAQrMsps/AzcOyzphOSRDT3ei+JZ8lTHSh8ii+DbKn7 /I+ZWcVBav/cJrNNoSTF+8pOsR046thC8pPRQuWrrSHo0h2f5LZHJoJJTWw5u1BgC5S+ b48YaObS0GOqe0WnwrOx4ciZrKSky+BCubdP8T48igthJrwE+Eo9bHCXEr6Y7aamT6cO yJCQ==
- In-reply-to: <50D96F4B.7030305@gps.caltech.edu>
- References: <50D96F4B.7030305@gps.caltech.edu>
Hi Piyush,
As expected, the example works here, so should indeed be something with the wrapping with JCC. I do not remember experience this error but would recommend to upgrade JCC to latest version from svn/pypi (2.14).
Since some time I have been testing a new feature in JCC, non-flat namespace. Don't know if would affect your problem, but it gives a cleaner buildfile without problems of duplicate names, and a import syntax close to the java original.
For the non-flat namespace I have the buildfile:
python -m jcc \
--arch x86_64 \
--shared \
--use_full_names \
--python orekit \
--version 6.0.0 \
--jar orekit-6.0-SNAPSHOT.jar \
--jar commons-math3-3.0.jar \
--package java.io \
--package java.io.InputStream \
--package java.util java.util.Arrays \
java.util.HashMap \
java.util.HashSet \
java.util.List \
java.util.ArrayList \
java.util.Collection \
java.util.Collections \
java.util.Date \
java.util.Map \
--package java.io java.io.StringReader \
java.io.InputStreamReader \
java.io.FileInputStream \
--package org.apache.commons.math3.geometry.euclidean.threed.Vector3D \
--reserved INFINITE \
--reserved ERROR \
--reserved OVERFLOW \
--reserved NO_DATA \
--build \
--install
The import statements then for your example looks like:
import orekit
orekit.initVM()
from org.orekit.data import DataProvidersManager, ZipJarCrawler
from org.orekit.frames import FramesFactory
from org.orekit.bodies import OneAxisEllipsoid
from org.orekit.time import TimeScalesFactory, AbsoluteDate
from org.orekit.orbits import KeplerianOrbit
from org.orekit.utils import Constants
from org.orekit.propagation.analytical import KeplerianPropagator
from java.io import File
Best Regards
/Petrus
On 25 dec 2012, at 10:18, Piyush Agram <piyush@gps.caltech.edu> wrote:
> 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
> <simple_orekit.py>