diff --git a/orekit-conda-recipe/CHANGES.txt b/orekit-conda-recipe/CHANGES.txt deleted file mode 100644 index 6422a326d099e8940cac0b2a88beccea1e64a0c1..0000000000000000000000000000000000000000 --- a/orekit-conda-recipe/CHANGES.txt +++ /dev/null @@ -1,36 +0,0 @@ -Changelog python orekit package - -2016-11-13 Version 8.0 Build 1 -- Corrected the datetime to absolute conversions, microseconds was incorrectly converted - -2016-07-03 Version 8.0 Build 0 -- Updated to orekit 8.0 version with fixes as of 3rd July -- Changed from apache common maths3 to hipparhcus - -2016-02-07 Version 7.1 Build 0 -- Updated to orekit 7.1 release version - -2016-01-29 version 7.1dev Build 3 -- Updated to apache common math 3.6 final -- orekit 7.1dev version from repository - -2015-10-05 Version 7.1dev Build 1 -- Updated to apache common math 3.6 -- Orekit 7.1dev version from repository - -2015-05-18 Version 7.1dev Build 0 -- Updated to apache common math 3.5 -- Orekit 7.1dev version from repository (including bugfix for events) - -2014-12-29 Version 7.0 Build 1 -- Based on orekit 7.0 and apache commons math 3.4 -- Updated wrappers based on new architecture -- Several event detector wrappers removed as they are not needed to subclass in new architecture -- Added unittests for all java classes that are specific to the python wrapper - -2014-02-12 Version 6.1 Build 5 -- Added python wrapping of UnivariateFunction from maths commons - -Version 6.1 Build 4 -------------------- -- Removed wrapping of detector since not usable in orekit 6.1 \ No newline at end of file diff --git a/orekit-conda-recipe/bld.bat b/orekit-conda-recipe/bld.bat index e4255c67c47c5a72ab2a2d70c0c8af3fe4b50b71..f61ca0b92abdc5316659dc6fb1ed7fb937cc5590 100644 --- a/orekit-conda-recipe/bld.bat +++ b/orekit-conda-recipe/bld.bat @@ -1,92 +1,25 @@ +:: Paths assume openjdk installed by conda +set JCC_JDK=%JAVA_HOME% -set - +:: JCC needs to have libraries in PATH +set PATH=%JCC_JDK%\jre\bin\server;%JCC_JDK%;%JCC_JDK%\jre\bin;%JCC_JDK%\jre\lib;%PATH% +set JCC_INCLUDES=%JCC_JDK%\include;%JCC_JDK%\include\win32 +set JCC_LFLAGS=/DLL;/LIBPATH:%JCC_JDK%\lib;Ws2_32.lib;jvm.lib -"%PYTHON%" -m jcc ^ ---use_full_names ^ ---python orekit ^ ---version 8.0 ^ ---jar %RECIPE_DIR%\orekit-8.1-SNAPSHOT.jar ^ ---jar %RECIPE_DIR%\hipparchus-core-1.0.jar ^ ---jar %RECIPE_DIR%\hipparchus-fitting-1.0.jar ^ ---jar %RECIPE_DIR%\hipparchus-geometry-1.0.jar ^ ---jar %RECIPE_DIR%\hipparchus-ode-1.0.jar ^ ---jar %RECIPE_DIR%\hipparchus-optim-1.0.jar ^ ---jar %RECIPE_DIR%\hipparchus-stat-1.0.jar ^ ---package java.io ^ ---package java.util ^ ---package java.text ^ ---package org.orekit ^ -java.io.BufferedReader ^ -java.io.FileInputStream ^ -java.io.FileOutputStream ^ -java.io.InputStream ^ -java.io.InputStreamReader ^ -java.io.ObjectInputStream ^ -java.io.ObjectOutputStream ^ -java.io.PrintStream ^ -java.io.StringReader ^ -java.io.StringWriter ^ -java.lang.System ^ -java.text.DecimalFormat ^ -java.text.DecimalFormatSymbols ^ -java.util.ArrayList ^ -java.util.Arrays ^ -java.util.Collection ^ -java.util.Collections ^ -java.util.Date ^ -java.util.HashMap ^ -java.util.HashSet ^ -java.util.List ^ -java.util.Locale ^ -java.util.Map ^ -java.util.Set ^ -java.util.TreeSet ^ ---module %RECIPE_DIR%\pyhelpers ^ ---reserved INFINITE ^ ---reserved ERROR ^ ---reserved NAN ^ ---reserved OVERFLOW ^ ---reserved NO_DATA ^ ---reserved min ^ ---reserved max ^ ---reserved mean ^ ---build ^ ---install +set +"%PYTHON%" setup.py install --single-version-externally-managed --record record.txt if errorlevel 1 exit 1 -:: Add PATH to anaconda java-jdk / jre - -echo import os > header.txt -echo os.environ["PATH"] = r"%PREFIX%\Library\jre\bin\server" + os.pathsep + os.environ["PATH"] >> header.txt +:: ensure that JCC_JDK is set correctly by invoking an activate script +set ACTIVATE_DIR=%PREFIX%\etc\conda\activate.d +set DEACTIVATE_DIR=%PREFIX%\etc\conda\deactivate.d +mkdir %ACTIVATE_DIR% +mkdir %DEACTIVATE_DIR% -IF "%ARCH%"=="32" ( - ::win32 ARCH == 32 - type %SP_DIR%\%PKG_NAME%-%PKG_VERSION%-py2.7-win32.egg\%PKG_NAME%\__init__.py >> header.txt - del %SP_DIR%\%PKG_NAME%-%PKG_VERSION%-py2.7-win32.egg\%PKG_NAME%\__init__.py - del %SP_DIR%\%PKG_NAME%-%PKG_VERSION%-py2.7-win32.egg\%PKG_NAME%\__init__.pyc - ren header.txt __init__.py - move __init__.py %SP_DIR%\%PKG_NAME%-%PKG_VERSION%-py2.7-win32.egg\%PKG_NAME%\ -) - -IF "%ARCH%"=="64" ( - ::amd64 - type %SP_DIR%\%PKG_NAME%-%PKG_VERSION%-py2.7-win-amd64.egg\%PKG_NAME%\__init__.py >> header.txt - del %SP_DIR%\%PKG_NAME%-%PKG_VERSION%-py2.7-win-amd64.egg\%PKG_NAME%\__init__.py - del %SP_DIR%\%PKG_NAME%-%PKG_VERSION%-py2.7-win-amd64.egg\%PKG_NAME%\__init__.pyc - ren header.txt __init__.py - move __init__.py %SP_DIR%\%PKG_NAME%-%PKG_VERSION%-py2.7-win-amd64.egg\%PKG_NAME%\ -) - -:: See -:: http://docs.continuum.io/conda/build.html -:: for a list of environment variables that are set during the build process. +copy %RECIPE_DIR%\scripts\activate.bat %ACTIVATE_DIR%\jcc-activate.bat +if errorlevel 1 exit 1 -::amd64 -::type %SP_DIR%\orekit-7.0.0-py2.7-win-amd64.egg\orekit\__init__.py >> header.txt -::del %SP_DIR%\orekit-7.0.0-py2.7-win-win32.egg\orekit\__init__.py -::del %SP_DIR%\orekit-7.0.0-py2.7-win-win32.egg\orekit\__init__.pyc -::ren header.txt __init__.py -::move __init__.py %SP_DIR%\orekit-7.0.0-py2.7-win-win32.egg\orekit\ +copy %RECIPE_DIR%\scripts\deactivate.bat %DEACTIVATE_DIR%\jcc-deactivate.bat +if errorlevel 1 exit 1 diff --git a/orekit-conda-recipe/build.sh b/orekit-conda-recipe/build.sh index eb6584b72b44546585cfaad10e160e3090478416..8654fd5df38598c17cf8d22fb83fc519fe0de966 100644 --- a/orekit-conda-recipe/build.sh +++ b/orekit-conda-recipe/build.sh @@ -1,73 +1,36 @@ #!/bin/bash -# add --shared for building shared version -# classes directly on the list are wrapped as well as the jar's -# This section is setting up the build to use the coda package java-jdk -export JCC_JDK=$PREFIX -export JAVA_HOME=$JCC_JDK -export JAVAHOME=$JCC_JDK -export LD_LIBRARY_PATH=$PREFIX/jre/lib/amd64/server:$PREFIX/jre/lib/amd64:$LD_LIBRARY_PATH +export JCC_JDK=$JAVA_HOME -export JCC_ARGSEP=";" -export JCC_INCLUDES="$PREFIX/include;$PREFIX/include/linux" -export JCC_LFLAGS="-L$PREFIX/jre/lib/amd64;-ljava;-L$PREFIX/jre/lib/amd64/server;-ljvm;-lverify;-Wl,-rpath=$PREFIX/jre/lib/amd64:$PREFIX/jre/lib/amd64/server" -export JCC_JAVAC=$PREFIX/bin/javac +if [ "$(uname)" == "Darwin" ] +then + export JCC_ARGSEP=";" + export JCC_INCLUDES="$PREFIX/include;$PREFIX/include/darwin" + export JCC_LFLAGS="-v;-L$PREFIX/jre/lib;-ljava;-L$PREFIX/jre/lib/server;-ljvm;-Wl,-rpath;-Wl,$PREFIX/jre/lib;-Wl,-rpath;-Wl,$PREFIX/jre/lib/server;-mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET" + export JCC_CFLAGS="-fno-strict-aliasing;-Wno-write-strings;-Qunused-arguments;-mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET;-std=c++11;-stdlib=libc++" + export NO_SHARED=1 + printenv -$PYTHON -m jcc \ ---use_full_names \ ---python orekit \ ---version 8.0 \ ---jar $RECIPE_DIR/orekit-8.1-SNAPSHOT.jar \ ---jar $RECIPE_DIR/hipparchus-core-1.0.jar \ ---jar $RECIPE_DIR/hipparchus-fitting-1.0.jar \ ---jar $RECIPE_DIR/hipparchus-geometry-1.0.jar \ ---jar $RECIPE_DIR/hipparchus-ode-1.0.jar \ ---jar $RECIPE_DIR/hipparchus-optim-1.0.jar \ ---jar $RECIPE_DIR/hipparchus-stat-1.0.jar \ ---package java.io \ ---package java.util \ ---package java.text \ ---package org.orekit \ -java.io.BufferedReader \ -java.io.FileInputStream \ -java.io.FileOutputStream \ -java.io.InputStream \ -java.io.InputStreamReader \ -java.io.ObjectInputStream \ -java.io.ObjectOutputStream \ -java.io.PrintStream \ -java.io.StringReader \ -java.io.StringWriter \ -java.lang.System \ -java.text.DecimalFormat \ -java.text.DecimalFormatSymbols \ -java.util.ArrayList \ -java.util.Arrays \ -java.util.Collection \ -java.util.Collections \ -java.util.Date \ -java.util.HashMap \ -java.util.HashSet \ -java.util.List \ -java.util.Locale \ -java.util.Map \ -java.util.Set \ -java.util.TreeSet \ ---module $RECIPE_DIR/pyhelpers \ ---reserved INFINITE \ ---reserved ERROR \ ---reserved OVERFLOW \ ---reserved NO_DATA \ ---reserved NAN \ ---reserved min \ ---reserved max \ ---reserved mean \ ---build \ ---install + $PYTHON setup.py install --single-version-externally-managed --record record.txt -# Add more build steps here, if they are necessary. +else + # GNU/Linux recipe + export JCC_ARGSEP=";" + export JCC_LFLAGS="-v;-Wl,-v;-L$PREFIX/jre/lib/amd64;-ljava;-L$PREFIX/jre/lib/amd64/server;-ljvm;-lverify;-Wl,-rpath=$PREFIX/jre/lib/amd64:$PREFIX/jre/lib/amd64/server" + export JCC_JAVAC=$PREFIX/bin/javac + export JCC_CFLAGS="-v;-fno-strict-aliasing;-Wno-write-strings;-D__STDC_FORMAT_MACROS" + printenv -# See -# http://docs.continuum.io/conda/build.html -# for a list of environment variables that are set during the build process. + $PYTHON setup.py install --single-version-externally-managed --record record.txt + +fi +# ensure that JCC_JDK is set correctly by invoking an activate script + +ACTIVATE_DIR=$PREFIX/etc/conda/activate.d +DEACTIVATE_DIR=$PREFIX/etc/conda/deactivate.d +mkdir -p $ACTIVATE_DIR +mkdir -p $DEACTIVATE_DIR + +cp $RECIPE_DIR/scripts/activate.sh $ACTIVATE_DIR/jcc-activate.sh +cp $RECIPE_DIR/scripts/deactivate.sh $DEACTIVATE_DIR/jcc-deactivate.sh \ No newline at end of file diff --git a/orekit-conda-recipe/hipparchus-core-1.0.jar b/orekit-conda-recipe/hipparchus-core-1.0.jar deleted file mode 100644 index d7c8e8b87a95bd3447bea1078454dab7d7413fa7..0000000000000000000000000000000000000000 Binary files a/orekit-conda-recipe/hipparchus-core-1.0.jar and /dev/null differ diff --git a/orekit-conda-recipe/hipparchus-fitting-1.0.jar b/orekit-conda-recipe/hipparchus-fitting-1.0.jar deleted file mode 100644 index f9aa7928a29f072f058b88434f045505bd39d297..0000000000000000000000000000000000000000 Binary files a/orekit-conda-recipe/hipparchus-fitting-1.0.jar and /dev/null differ diff --git a/orekit-conda-recipe/hipparchus-geometry-1.0.jar b/orekit-conda-recipe/hipparchus-geometry-1.0.jar deleted file mode 100644 index 9c4610b28a0e21dd6e766c09e12f7e5faa906a95..0000000000000000000000000000000000000000 Binary files a/orekit-conda-recipe/hipparchus-geometry-1.0.jar and /dev/null differ diff --git a/orekit-conda-recipe/hipparchus-ode-1.0.jar b/orekit-conda-recipe/hipparchus-ode-1.0.jar deleted file mode 100644 index 7c0654ed8319b910ad1edfe50467c41edf49ac5d..0000000000000000000000000000000000000000 Binary files a/orekit-conda-recipe/hipparchus-ode-1.0.jar and /dev/null differ diff --git a/orekit-conda-recipe/hipparchus-optim-1.0.jar b/orekit-conda-recipe/hipparchus-optim-1.0.jar deleted file mode 100644 index 25699b825bc224d9d19e56db133f10d1286009c9..0000000000000000000000000000000000000000 Binary files a/orekit-conda-recipe/hipparchus-optim-1.0.jar and /dev/null differ diff --git a/orekit-conda-recipe/hipparchus-stat-1.0.jar b/orekit-conda-recipe/hipparchus-stat-1.0.jar deleted file mode 100644 index d37347731b12136af316fe1f7596c35eded82568..0000000000000000000000000000000000000000 Binary files a/orekit-conda-recipe/hipparchus-stat-1.0.jar and /dev/null differ diff --git a/orekit-conda-recipe/meta.yaml b/orekit-conda-recipe/meta.yaml index a7dae071fc3d85a1fd37fe21324d0d2c73e13f66..3e66fc0a9f9180340b47258633037da392df58f9 100644 --- a/orekit-conda-recipe/meta.yaml +++ b/orekit-conda-recipe/meta.yaml @@ -1,86 +1,68 @@ +{% set name = "jcc" %} +{% set version = "3.3.dev2" %} +{% set sha256 = "025382e6610fb08a00480ea5f0f460d4b8680511c4f6687510323d628775782c" %} + package: - name: orekit - version: '8.0' + name: {{ name|lower }} + version: {{ version }} + +source: + fn: {{ name }}-{{ version }}.zip + url: https://github.com/petrushy/jcc_svn_import/raw/master/{{ name }}-{{ version }}.zip + sha256: {{ sha256 }} build: + skip: true # [win32 or linux32] + + number: 0 - # If this is a new build for the same version, increment the build - # number. If you do not include this key, it defaults to 0. - number: 1 - # Builds: - # 1 - orekit 7.1dev0 version from git 2015-10-05 - # 2 - orekit 7.1dev0 version from git 2015-12-17 - # 3 - orekit 7.1dev0 version from git 2015-12-29 - # 0 - orekit 7.1 release version of orekit 2016-02-07 - # 0 - orekit 8.0 release version of orekit 2016-07-03 - #has_prefix_files: - # Lib/site-packages/orekit/__init__.py - rpaths: - - lib/ + rpaths: # only valid for linux + - lib - jre/lib/amd64/ - jre/lib/amd64/server/ + has_prefix_files: + - {{SP_DIR}}/jcc/config.py # [linux or osx] requirements: build: - - jcc 2.21 + - {{ compiler('c') }} + - {{ compiler('cxx') }} + host: - python - setuptools - - java-jdk #[linux] - + - openjdk 8.0.152 # Force anaconda openjdk run: - python - - java-jdk [linux] - #- jcc 2.21 - #- setuptools + - openjdk 8.0.152 # Force anaconda openjdk test: - # Python imports imports: - - orekit - - files: - - test/orekit-data.zip - - test/AltitudeDetectorTest.py - - test/NodeDetectorTest.py - - test/ImpulseManeuverTest.py - - test/BackAndForthDetectorTest.py - - test/KeplerianConverterTest.py - - test/EventHandlerTest.py - - test/AbstractDetectorTest.py - - test/EventDetectorTest.py - - test/SmallManeuverAnalyticalModelTest.py - - test/GroundFieldOfViewDetectorTest.py - - - commands: - # You can put test commands to be run here. Use this to test that the - # entry points work. - - python AltitudeDetectorTest.py - - python NodeDetectorTest.py - - python ImpulseManeuverTest.py - - python BackAndForthDetectorTest.py - - python KeplerianConverterTest.py - - python EventHandlerTest.py - - python AbstractDetectorTest.py - - python EventDetectorTest.py - - python SmallManeuverAnalyticalModelTest.py - - python GroundFieldOfViewDetectorTest.py - - # You can also put a file called run_test.py in the recipe that will be run - # at test time. + - jcc requires: - # Put any additional test requirements here. For example - #- orekit - #- jcc - #- java-jdk [win] + - {{ compiler('c') }} + - {{ compiler('cxx') }} + + files: + - test/*.py + - test/java-example/build_and_wrap.bat + - test/java-example/build_and_wrap.sh + - test/java-example/test1class.java about: - home: https://www.orekit.org/ - license: Apache Software License + home: http://lucene.apache.org/pylucene/jcc/index.html + + license: Apache-2.0 + license_file: LICENSE + + summary: 'a C++ code generator for calling Java from C++/Python' + description: | + JCC is a C++ code generator for producing the code necessary to call into Java classes from CPython via Java’s Native Invocation Interface (JNI). + + doc_url: http://lucene.apache.org/pylucene/jcc/index.html -# See -# http://docs.continuum.io/conda/build.html for -# more information about meta.yaml +extra: + recipe-maintainers: + - petrushy diff --git a/orekit-conda-recipe/orekit-8.1-SNAPSHOT.jar b/orekit-conda-recipe/orekit-8.1-SNAPSHOT.jar deleted file mode 100644 index ef119ebd57c49d60bbac76651ccd22d07b18d2a5..0000000000000000000000000000000000000000 Binary files a/orekit-conda-recipe/orekit-8.1-SNAPSHOT.jar and /dev/null differ diff --git a/orekit-conda-recipe/pyhelpers.py b/orekit-conda-recipe/pyhelpers.py deleted file mode 100644 index 0e2064d430fc7d1cf8336182d804fe29ff613e8e..0000000000000000000000000000000000000000 --- a/orekit-conda-recipe/pyhelpers.py +++ /dev/null @@ -1,116 +0,0 @@ -# encoding: utf-8 - -# Copyright 2014 SSC -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" This document contains classes that are useful for using the orekit -library in Python. """ - -# Set up the orekit namespace -import orekit - -from java.io import File - -from org.orekit.data import DataProvidersManager, ZipJarCrawler -from org.orekit.time import TimeScalesFactory, AbsoluteDate -from org.orekit.utils import ElevationMask -from orekit import JArray - -import math -from datetime import datetime - - -def setup_orekit_curdir(): - '''Setup the java engine with orekit. - - This functionsand loads the orekit-data.zip from the current directory - and sets up the orekit DataProviders to access it. - - The JVM needs to be initiated prior to calling this function: - - orekit.initVM() - - ''' - - DM = DataProvidersManager.getInstance() - datafile = File('orekit-data.zip') - if not datafile.exists(): - print 'File :', datafile.absolutePath, ' not found' - - crawler = ZipJarCrawler(datafile) - DM.clearProviders() - DM.addProvider(crawler) - - -def absolutedate_to_datetime(orekit_absolutedate): - ''' Converts between orekit.AbsoluteDate objects - and python datetime objects (utc)''' - - utc = TimeScalesFactory.getUTC() - or_comp = orekit_absolutedate.getComponents(utc) - or_date = or_comp.getDate() - or_time = or_comp.getTime() - seconds = or_time.getSecond() - return datetime(or_date.getYear(), - or_date.getMonth(), - or_date.getDay(), - or_time.getHour(), - or_time.getMinute(), - int(math.floor(seconds)), - int(1000000.0 * (seconds - math.floor(seconds)))) - -def datetime_to_absolutedate(dt_date): - ''' Converts between orekit.AbsoluteDate objects - and python datetime objects (utc) - - Args: - dt_date (datetime): python datetime object to convert - - Returns: - AbsoluteDate: time in orekit format''' - - utc = TimeScalesFactory.getUTC() - return AbsoluteDate(dt_date.year, - dt_date.month, - dt_date.day, - dt_date.hour, - dt_date.minute, - dt_date.second + dt_date.microsecond / 1000000., - utc) - - -def to_elevationmask(az, el): - ''' Converts an array of azimuths and elevations to a - orekit ElevationMask object. All unts in degrees. - - mask = to_elevationmask([0, 90, 180, 270], [5,10,8,5]) - - ''' - - mask = JArray('object')(len(az)) - - for i in range(len(az)): - mask[i] = JArray('double')([math.radians(az[i]), - math.radians(el[i])]) - - return ElevationMask(mask) - -def JArray_double2D(x, y): - '''Returns an JCC wrapped 2D double array''' - - arr = JArray('object')(x) - - for i in range(x): - arr[i] = JArray('double')(y) - - return arr \ No newline at end of file diff --git a/orekit-conda-recipe/run_test.bat b/orekit-conda-recipe/run_test.bat index 268170753036072ccfd4c99a7c237f40534768e5..e548bc0930cafa4431655b42213a5f3820006df2 100644 --- a/orekit-conda-recipe/run_test.bat +++ b/orekit-conda-recipe/run_test.bat @@ -1,3 +1,13 @@ -set JCC_JDK=C:\Program Files (x86)\Java\jdk1.6.0_35 -set JAVA_HOME=%JCC_JDK% -set PATH=%JCC_JDK%\jre\bin\client;%JCC_JDK%\bin;%JCC_JDK%\lib;%PATH% \ No newline at end of file +"%PYTHON%" test/myrun_test.py +if errorlevel 1 exit 1 + +pushd test\java-example + call "build_and_wrap.bat" + if errorlevel 1 exit 1 +popd + +"%PYTHON%" test/test_test1.py +if errorlevel 1 exit 1 + +"%PYTHON%" test/test_double_array.py +if errorlevel 1 exit 1 \ No newline at end of file diff --git a/orekit-conda-recipe/test/AbstractDetectorTest.py b/orekit-conda-recipe/test/AbstractDetectorTest.py deleted file mode 100644 index a683b68f0f654d0047ad2e27db04330cbf7eb3f7..0000000000000000000000000000000000000000 --- a/orekit-conda-recipe/test/AbstractDetectorTest.py +++ /dev/null @@ -1,115 +0,0 @@ -# -*- coding: utf-8 -*- - -import orekit -orekit.initVM() - -from org.orekit.frames import FramesFactory, TopocentricFrame -from org.orekit.bodies import OneAxisEllipsoid, GeodeticPoint -from org.orekit.time import AbsoluteDate, TimeScalesFactory -from org.orekit.orbits import KeplerianOrbit -from org.orekit.utils import Constants -from org.orekit.propagation.analytical import KeplerianPropagator -from org.orekit.utils import PVCoordinates, IERSConventions -from org.orekit.propagation.events.handlers import EventHandler -from org.hipparchus.geometry.euclidean.threed import Vector3D -from org.orekit.python import PythonEventHandler, PythonAbstractDetector -from org.orekit.propagation.events.handlers import ContinueOnEvent, StopOnEvent - -from math import radians -import math -import unittest -import sys - -from orekit.pyhelpers import setup_orekit_curdir -setup_orekit_curdir() - -class PassCounter(PythonEventHandler): - """Eventhandler that counts positive events""" - passes = 0 - - def eventOccurred(self, s, T, increasing): - if increasing: - self.passes = self.passes + 1 - - return EventHandler.Action.CONTINUE - - def resetState(self, detector, oldState): - return oldState; - - -class MyElevationDetector(PythonAbstractDetector): - - def __init__(self, elevation, topo, handler=None): - self.elevation = elevation - self.topo = topo - - dmax = float(PythonAbstractDetector.DEFAULT_MAXCHECK) - dthresh = float(PythonAbstractDetector.DEFAULT_THRESHOLD) - dmaxiter = PythonAbstractDetector.DEFAULT_MAX_ITER - if handler == None: - handler = StopOnEvent().of_(MyElevationDetector) - - super(MyElevationDetector, self).__init__(dmax, dthresh, dmaxiter, handler) #super(maxCheck, threshold, maxIter, handler); - - def init(self, *args, **kw): - pass - - def getElevation(self): - return self.elevation - - def getTopocentricFrame(self): - return self.topo - - def g(self, s): - tmp = self.topo.getElevation(s.getPVCoordinates().getPosition(), s.getFrame(), s.getDate())-self.elevation - return tmp - - def create(self, newMaxCheck, newThreshHold, newMaxIter, newHandler): - return MyElevationDetector(self.elevation, self.topo, handler=newHandler) - -class AbstractDetectorTest(unittest.TestCase): - - def testOwnElevationDetector(self): - - initialDate = AbsoluteDate(2014, 01, 01, 23, 30, 00.000, TimeScalesFactory.getUTC()) - inertialFrame = FramesFactory.getEME2000() # inertial frame for orbit definition - position = Vector3D(-6142438.668, 3492467.560, -25767.25680) - velocity = Vector3D(505.8479685, 942.7809215, 7435.922231) - pvCoordinates = PVCoordinates(position, velocity) - initialOrbit = KeplerianOrbit(pvCoordinates, - inertialFrame, - initialDate, - Constants.WGS84_EARTH_MU) - - kepler = KeplerianPropagator(initialOrbit) - - ITRF = FramesFactory.getITRF(IERSConventions.IERS_2010, True) - earth = OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS, - Constants.WGS84_EARTH_FLATTENING, - ITRF) - - # Station - longitude = radians(45.0) - latitude = radians(25.0) - altitude = 0 - station1 = GeodeticPoint(latitude, longitude, float (altitude)) - sta1Frame = TopocentricFrame(earth, station1, "station 1") - - elevation = math.radians(5.0) - - detector = MyElevationDetector(elevation, sta1Frame) - - mycounter = PassCounter().of_(MyElevationDetector) - detector = detector.withHandler(mycounter) - - kepler.addEventDetector(detector) - - finalState = kepler.propagate(initialDate.shiftedBy(60*60*24.0*15)) - - print mycounter.passes - self.assertEquals(52, mycounter.passes) - -if __name__ == '__main__': - suite = unittest.TestLoader().loadTestsFromTestCase(AbstractDetectorTest) - ret = not unittest.TextTestRunner(verbosity=2).run(suite).wasSuccessful() - sys.exit(ret) diff --git a/orekit-conda-recipe/test/AltitudeDetectorTest.py b/orekit-conda-recipe/test/AltitudeDetectorTest.py deleted file mode 100644 index f2d8214d1bb65f58f066becc9b97a713265b8400..0000000000000000000000000000000000000000 --- a/orekit-conda-recipe/test/AltitudeDetectorTest.py +++ /dev/null @@ -1,77 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - -/* Copyright 2002-2013 CS Syst��mes d'Information - * Licensed to CS Syst��mes d'Information (CS) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * CS licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -Python version translated from Java by Petrus Hyvönen, SSC 2014 - - """ - -#Python orekit specifics -import orekit -orekit.initVM() -from orekit.pyhelpers import setup_orekit_curdir -setup_orekit_curdir() # orekit-data.zip shall be in current dir -#from math import abs - -from org.hipparchus.util import FastMath; -from org.orekit.bodies import CelestialBodyFactory; -from org.orekit.bodies import OneAxisEllipsoid; -from org.orekit.frames import FramesFactory; -from org.orekit.orbits import KeplerianOrbit; -from org.orekit.orbits import PositionAngle; -from org.orekit.propagation import SpacecraftState; -from org.orekit.propagation.analytical import KeplerianPropagator; -from org.orekit.propagation.events.handlers import StopOnEvent; -from org.orekit.time import AbsoluteDate; -from org.orekit.time import TimeScalesFactory; -from org.orekit.propagation.events import AltitudeDetector - -EME2000 = FramesFactory.getEME2000(); -initialDate = AbsoluteDate(2009,1,1,TimeScalesFactory.getUTC()); -a = 8000000.0; -e = 0.1; -earthRadius = 6378137.0; -earthF = 1.0 / 298.257223563; -apogee = a*(1+e); -alt = apogee - earthRadius - 500; - -#// initial state is at apogee -initialOrbit = KeplerianOrbit(a,e,0.0,0.0,0.0,FastMath.PI,PositionAngle.MEAN,EME2000, - initialDate,CelestialBodyFactory.getEarth().getGM()); -initialState = SpacecraftState(initialOrbit) -kepPropagator = KeplerianPropagator(initialOrbit) -altDetector = AltitudeDetector(alt, - OneAxisEllipsoid(earthRadius, earthF, EME2000)).withHandler(StopOnEvent().of_(AltitudeDetector)) - -# altitudeDetector should stop propagation upon reaching required altitude -kepPropagator.addEventDetector(altDetector) - -#// propagation to the future -finalState = kepPropagator.propagate(initialDate.shiftedBy(1000.0)) -assert abs(finalState.getPVCoordinates().getPosition().getNorm()-earthRadius -alt)<1e-5 -assert abs(44.079 - finalState.getDate().durationFrom(initialDate))< 1.0e-3 - -#// propagation to the past -kepPropagator.resetInitialState(initialState); -finalState = kepPropagator.propagate(initialDate.shiftedBy(-1000.0)); -assert abs(finalState.getPVCoordinates().getPosition().getNorm()-earthRadius - alt)< 1e-5 -assert abs(-44.079 - finalState.getDate().durationFrom(initialDate))< 1.0e-3 - -print "AltitudeDetectorTest successfully run" \ No newline at end of file diff --git a/orekit-conda-recipe/test/BackAndForthDetectorTest.py b/orekit-conda-recipe/test/BackAndForthDetectorTest.py deleted file mode 100644 index 87a260ceca70dbb06b20497ad9050fa3ed60220e..0000000000000000000000000000000000000000 --- a/orekit-conda-recipe/test/BackAndForthDetectorTest.py +++ /dev/null @@ -1,117 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - -/* Copyright 2002-2013 CS Syst��mes d'Information - * Licensed to CS Syst��mes d'Information (CS) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * CS licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -Python version translated from Java by Petrus Hyvönen, SSC 2014 - - """ - -import orekit -orekit.initVM() -from orekit.pyhelpers import setup_orekit_curdir -setup_orekit_curdir() - -from org.orekit.bodies import GeodeticPoint -from org.orekit.bodies import OneAxisEllipsoid -from org.orekit.frames import TopocentricFrame -from org.orekit.orbits import KeplerianOrbit -from org.orekit.frames import FramesFactory -from org.orekit.orbits import PositionAngle -from org.orekit.propagation.analytical import KeplerianPropagator -from org.orekit.propagation.events.handlers import EventHandler -from org.orekit.python import PythonEventHandler -from org.orekit.time import AbsoluteDate -from org.orekit.time import TimeScalesFactory -from org.orekit.utils import Constants -from org.orekit.utils import IERSConventions -from org.orekit.propagation.events import ElevationDetector -import unittest -import sys -import math - - -class Visibility(PythonEventHandler): # implements EventHandler<ElevationDetector> { - - def __init__(self): - self._visiNb = 0 - super(Visibility, self).__init__() - - def getVisiNb(self): - return self._visiNb - - def eventOccurred(self, s, ed, increasing): - self._visiNb += 1 - return EventHandler.Action.CONTINUE -# - def resetState(self, detector, oldState): - return oldState - -class BackAndForthDetectorTest(unittest.TestCase): - - def testBackAndForth(self): - utc = TimeScalesFactory.getUTC() - date0 = AbsoluteDate(2006, 12, 27, 12, 0, 0.0, utc) - date1 = AbsoluteDate(2006, 12, 27, 22, 50, 0.0, utc) - date2 = AbsoluteDate(2006, 12, 27, 22, 58, 0.0, utc) - - # Orbit - a = 7274000.0 - e = 0.00127 - i = math.radians(90.) - w = math.radians(0.) - raan = math.radians(12.5) - lM = math.radians(60.) - iniOrb = KeplerianOrbit(a, e, i, w, raan, lM, - PositionAngle.MEAN, - FramesFactory.getEME2000(), date0, - Constants.WGS84_EARTH_MU) - - # Propagator - propagator = KeplerianPropagator(iniOrb) - - # Station - stationPosition = GeodeticPoint(math.radians(0.), math.radians(100.), 110.); - earth = OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS, - Constants.WGS84_EARTH_FLATTENING, - FramesFactory.getITRF(IERSConventions.IERS_2010, True)); - - stationFrame = TopocentricFrame(earth, stationPosition, "") - - # Detector - visi = Visibility() #.of_(ElevationDetector); - det = ElevationDetector(stationFrame).withConstantElevation(math.radians(10.0)).withHandler(visi) - propagator.addEventDetector(det) - - # Forward propagation (AOS + LOS) - propagator.propagate(date1) - propagator.propagate(date2) - # Backward propagation (AOS + LOS) - propagator.propagate(date1) - propagator.propagate(date0) - - self.assertEquals(4, visi.getVisiNb()) - -if __name__ == '__main__': - #unittest.main() - - suite = unittest.TestLoader().loadTestsFromTestCase(BackAndForthDetectorTest) - ret = not unittest.TextTestRunner(verbosity=2).run(suite).wasSuccessful() - sys.exit(ret) - diff --git a/orekit-conda-recipe/test/EventDetectorTest.py b/orekit-conda-recipe/test/EventDetectorTest.py deleted file mode 100644 index 50aa8a3b5c7b7b42673eebe41580f0aa56ea07be..0000000000000000000000000000000000000000 --- a/orekit-conda-recipe/test/EventDetectorTest.py +++ /dev/null @@ -1,129 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - -/* Copyright 2014 SSC - * Licensed to CS Syst��mes d'Information (CS) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * CS licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - - """ - -import orekit -orekit.initVM() -#orekit.initVM(vmargs='-Xcheck:jni,-verbose:jni,-verbose:class,-XX:+UnlockDiagnosticVMOptions') - -from org.orekit.frames import FramesFactory, TopocentricFrame -from org.orekit.bodies import OneAxisEllipsoid, GeodeticPoint -from org.orekit.time import AbsoluteDate, TimeScalesFactory -from org.orekit.orbits import KeplerianOrbit -from org.orekit.utils import Constants -from org.orekit.propagation.analytical import KeplerianPropagator -from org.orekit.utils import PVCoordinates, IERSConventions -from org.orekit.propagation.events.handlers import EventHandler -from org.hipparchus.geometry.euclidean.threed import Vector3D -from org.orekit.python import PythonEventHandler, PythonAbstractDetector, PythonEventDetector - -from math import radians -import math -import unittest -import sys - -from orekit.pyhelpers import setup_orekit_curdir -setup_orekit_curdir() - -class MyElevationDetector(PythonEventDetector): - passes = 0 - - def __init__(self, elevation, topo): - self.elevation = elevation - self.topo = topo - super(MyElevationDetector, self).__init__() - - def init(self, s, T): - pass - - def getThreshold(self): - return float(PythonAbstractDetector.DEFAULT_THRESHOLD) - - def getMaxCheckInterval(self): - return float(PythonAbstractDetector.DEFAULT_MAXCHECK) - - def getMaxIterationCount(self): - return PythonAbstractDetector.DEFAULT_MAX_ITER - - def g(self, s): - tmp = self.topo.getElevation(s.getPVCoordinates().getPosition(), s.getFrame(), s.getDate())-self.elevation - return tmp - - def eventOccurred(self, s, increasing): - if increasing: - self.passes = self.passes + 1 - - return EventHandler.Action.CONTINUE - - def resetState(self, oldState): - return oldState - - def getElevation(self): - return self.elevation - - def getTopocentricFrame(self): - return self.topo - - -class EventDetectorTest(unittest.TestCase): - - def testOwnElevationDetector(self): - - initialDate = AbsoluteDate(2014, 01, 01, 23, 30, 00.000, TimeScalesFactory.getUTC()) - inertialFrame = FramesFactory.getEME2000() # inertial frame for orbit definition - position = Vector3D(-6142438.668, 3492467.560, -25767.25680) - velocity = Vector3D(505.8479685, 942.7809215, 7435.922231) - pvCoordinates = PVCoordinates(position, velocity) - initialOrbit = KeplerianOrbit(pvCoordinates, - inertialFrame, - initialDate, - Constants.WGS84_EARTH_MU) - - kepler = KeplerianPropagator(initialOrbit) - - ITRF = FramesFactory.getITRF(IERSConventions.IERS_2010, True) - earth = OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS, - Constants.WGS84_EARTH_FLATTENING, - ITRF) - - # Station - longitude = radians(45.0) - latitude = radians(25.0) - altitude = 0 - station1 = GeodeticPoint(latitude, longitude, float (altitude)) - sta1Frame = TopocentricFrame(earth, station1, "station 1") - - elevation = math.radians(5.0) - - detector = MyElevationDetector(elevation, sta1Frame) - kepler.addEventDetector(detector) - - finalState = kepler.propagate(initialDate.shiftedBy(60*60*24.0*15)) - - print detector.passes - self.assertEquals(52, detector.passes) - -if __name__ == '__main__': - suite = unittest.TestLoader().loadTestsFromTestCase(EventDetectorTest) - ret = not unittest.TextTestRunner(verbosity=2).run(suite).wasSuccessful() - sys.exit(ret) diff --git a/orekit-conda-recipe/test/EventHandlerTest.py b/orekit-conda-recipe/test/EventHandlerTest.py deleted file mode 100644 index 4956660cc714188f81cb247ba58dbb6af0451d9c..0000000000000000000000000000000000000000 --- a/orekit-conda-recipe/test/EventHandlerTest.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - -/* Copyright 2002-2013 CS Syst��mes d'Information - * Licensed to CS Syst��mes d'Information (CS) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * CS licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -Python version translated from Java by Petrus Hyvönen, SSC 2014 - - """ - -import orekit -orekit.initVM() - -from org.orekit.frames import FramesFactory, TopocentricFrame -from org.orekit.bodies import OneAxisEllipsoid, GeodeticPoint -from org.orekit.time import AbsoluteDate, TimeScalesFactory -from org.orekit.orbits import KeplerianOrbit -from org.orekit.utils import Constants -from org.orekit.propagation.analytical import KeplerianPropagator -from org.orekit.utils import PVCoordinates, IERSConventions -from org.orekit.propagation.events import ElevationDetector -from org.orekit.propagation.events.handlers import EventHandler -from org.hipparchus.geometry.euclidean.threed import Vector3D -from org.orekit.python import PythonEventHandler -from org.orekit.propagation.events import EventsLogger - - -from math import radians -import math -import unittest -import sys - -#%% Setup Orekit -from orekit.pyhelpers import setup_orekit_curdir -setup_orekit_curdir() - -#%% -class EventHandlerTest(unittest.TestCase): - - def testOwnContinueOnEvent(self): - initialDate = AbsoluteDate(2014, 01, 01, 23, 30, 00.000, TimeScalesFactory.getUTC()) - inertialFrame = FramesFactory.getEME2000() # inertial frame for orbit definition - position = Vector3D(-6142438.668, 3492467.560, -25767.25680) - velocity = Vector3D(505.8479685, 942.7809215, 7435.922231) - pvCoordinates = PVCoordinates(position, velocity) - initialOrbit = KeplerianOrbit(pvCoordinates, - inertialFrame, - initialDate, - Constants.WGS84_EARTH_MU) - - # Propagator : consider a simple keplerian motion (could be more elaborate) - kepler = KeplerianPropagator(initialOrbit) - - #Earth and frame - ITRF = FramesFactory.getITRF(IERSConventions.IERS_2010, True) - earth = OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS, - Constants.WGS84_EARTH_FLATTENING, - ITRF) - - # Station - longitude = radians(45.0) - latitude = radians(25.0) - altitude = 0 - station1 = GeodeticPoint(latitude, longitude, float (altitude)) - sta1Frame = TopocentricFrame(earth, station1, "station 1") - - elevation = math.radians(5.0) - #%% - class myContinueOnEvent(PythonEventHandler): - - def eventOccurred(self, s, T, increasing): - return EventHandler.Action.CONTINUE - - def resetState(self, detector, oldState): - return oldState; - - - #%% detectors - detector = ElevationDetector(sta1Frame).withConstantElevation(elevation) - detector = detector.withHandler(myContinueOnEvent().of_(ElevationDetector)) - - logger = EventsLogger() - kepler.addEventDetector(logger.monitorDetector(detector)) - - #%%Propagate from the initial date to the first raising or for the fixed duration - finalState = kepler.propagate(initialDate.shiftedBy(60*60*24.0*15)) - - - taken_passes = 0 - - mylog = logger.getLoggedEvents() - for ev in mylog: - #print 'Date: ',ev.getState().getDate(), ' Start pass: ',ev.isIncreasing() - if ev.isIncreasing(): - taken_passes = taken_passes + 1 - - #print 'Taken passes:',taken_passes - self.assertEquals(52, taken_passes) - - -if __name__ == '__main__': - suite = unittest.TestLoader().loadTestsFromTestCase(EventHandlerTest) - ret = not unittest.TextTestRunner(verbosity=2).run(suite).wasSuccessful() - sys.exit(ret) diff --git a/orekit-conda-recipe/test/GroundFieldOfViewDetectorTest.py b/orekit-conda-recipe/test/GroundFieldOfViewDetectorTest.py deleted file mode 100644 index 4a809a3028385d9f9f7dc0ca17736b70f53c40b1..0000000000000000000000000000000000000000 --- a/orekit-conda-recipe/test/GroundFieldOfViewDetectorTest.py +++ /dev/null @@ -1,111 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - -/* Copyright 2002-2016 CS Syst��mes d'Information - * Licensed to CS Syst��mes d'Information (CS) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * CS licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -Python version translated from Java by Petrus Hyvönen, SSC 2016 - - """ - -import orekit - -orekit.initVM() - -from org.orekit.frames import FramesFactory, TopocentricFrame -from org.orekit.bodies import OneAxisEllipsoid, GeodeticPoint -from org.orekit.time import AbsoluteDate -from org.orekit.orbits import KeplerianOrbit, PositionAngle -from org.orekit.utils import Constants -from org.orekit.propagation.analytical import KeplerianPropagator -from org.orekit.utils import IERSConventions -from org.orekit.propagation.events import ElevationDetector, EventsLogger, FieldOfView, GroundFieldOfViewDetector -from org.hipparchus.geometry.euclidean.threed import Vector3D - -from math import radians -import math -import unittest -import sys - -from orekit.pyhelpers import setup_orekit_curdir - -setup_orekit_curdir() - - -class GroundFieldOfViewDetectorTest(unittest.TestCase): - def testGroundFieldOfViewDetector(self): - date = AbsoluteDate.J2000_EPOCH # arbitrary date - endDate = date.shiftedBy(Constants.JULIAN_DAY) - eci = FramesFactory.getGCRF() - ecef = FramesFactory.getITRF(IERSConventions.IERS_2010, True) - earth = OneAxisEllipsoid( - Constants.WGS84_EARTH_EQUATORIAL_RADIUS, - Constants.WGS84_EARTH_FLATTENING, - ecef) - - gp = GeodeticPoint(radians(39), radians(77), 0.0) - topo = TopocentricFrame(earth, gp, "topo") - - # iss like orbit - orbit = KeplerianOrbit( - 6378137.0 + 400e3, 0.0, radians(51.65), 0.0, 0.0, 0.0, - PositionAngle.TRUE, eci, date, Constants.EGM96_EARTH_MU) - - prop = KeplerianPropagator(orbit) - - # compute expected result - elevationDetector = ElevationDetector(topo).withConstantElevation(math.pi / 6.0).withMaxCheck(5.0) - logger = EventsLogger() - prop.addEventDetector(logger.monitorDetector(elevationDetector)) - prop.propagate(endDate) - expected = logger.getLoggedEvents() - - # action - # construct similar FoV based detector - # half width of 60 deg pointed along +Z in antenna frame - # not a perfect small circle b/c FoV makes a polygon with great circles - - fov = FieldOfView(Vector3D.PLUS_K, Vector3D.PLUS_I, math.pi / 3.0, 16, 0.0) - - # simple case for fixed pointing to be similar to elevation detector. - # could define new frame with varying rotation for slewing antenna. - fovDetector = GroundFieldOfViewDetector(topo, fov).withMaxCheck(5.0) - self.assertEqual(topo, fovDetector.getFrame()) - self.assertEqual(fov, fovDetector.getFieldOfView()) - logger = EventsLogger() - - prop = KeplerianPropagator(orbit) - prop.addEventDetector(logger.monitorDetector(fovDetector)) - prop.propagate(endDate) - actual = logger.getLoggedEvents() - - # verify - self.assertEquals(2, expected.size()) - self.assertEquals(2, actual.size()) - - for i in xrange(0, 1): - expectedDate = expected.get(i).getState().getDate() - actualDate = actual.get(i).getState().getDate() - # same event times to within 1s. - self.assertAlmostEqual(expectedDate.durationFrom(actualDate), 0.0, delta=1.0) - - -if __name__ == '__main__': - suite = unittest.TestLoader().loadTestsFromTestCase(GroundFieldOfViewDetectorTest) - ret = not unittest.TextTestRunner(verbosity=2).run(suite).wasSuccessful() - sys.exit(ret) diff --git a/orekit-conda-recipe/test/ImpulseManeuverTest.py b/orekit-conda-recipe/test/ImpulseManeuverTest.py deleted file mode 100644 index 8c69688071eb977037615591fefba00ddca8a27d..0000000000000000000000000000000000000000 --- a/orekit-conda-recipe/test/ImpulseManeuverTest.py +++ /dev/null @@ -1,93 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - -/* Copyright 2002-2013 CS Syst��mes d'Information - * Licensed to CS Syst��mes d'Information (CS) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * CS licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -Python version translated from Java by Petrus Hyvönen, SSC 2014 - - """ - -#Python orekit specifics -import orekit -orekit.initVM() -from orekit.pyhelpers import setup_orekit_curdir -setup_orekit_curdir() - -from org.hipparchus.geometry.euclidean.threed import Vector3D; -from org.hipparchus.util import FastMath; -from org.orekit.attitudes import LofOffset; -from org.orekit.frames import FramesFactory; -from org.orekit.frames import LOFType; -from org.orekit.orbits import KeplerianOrbit; -from org.orekit.orbits import PositionAngle; -from org.orekit.propagation.analytical import KeplerianPropagator; -from org.orekit.propagation.events import NodeDetector; -from org.orekit.time import AbsoluteDate; -from org.orekit.time import DateComponents; -from org.orekit.time import TimeComponents; -from org.orekit.time import TimeScalesFactory; -from org.orekit.forces.maneuvers import ImpulseManeuver -import unittest -import sys -import math - -class ImpulseManeuverTest(unittest.TestCase): - - def testInclinationManeuver(self): - initialOrbit = KeplerianOrbit(24532000.0, - 0.72, - 0.3, - FastMath.PI, - 0.4, - 2.0, - PositionAngle.MEAN, - FramesFactory.getEME2000(), - AbsoluteDate(DateComponents(2008, 06, 23), - TimeComponents(14, 18, 37.0), - TimeScalesFactory.getUTC()), - 3.986004415e14); - - a = initialOrbit.getA(); - e = initialOrbit.getE(); - i = initialOrbit.getI(); - mu = initialOrbit.getMu(); - vApo = math.sqrt(mu * (1 - e) / (a * (1 + e))); - dv = 0.99 * math.tan(i) * vApo; - - propagator = KeplerianPropagator(initialOrbit, - LofOffset(initialOrbit.getFrame(), LOFType.VVLH)); - - det = ImpulseManeuver(NodeDetector(initialOrbit, - FramesFactory.getEME2000() ), - Vector3D(dv, Vector3D.PLUS_J), 400.0); - det = det.of_(NodeDetector) - - propagator.addEventDetector(det) - - propagated = propagator.propagate(initialOrbit.getDate().shiftedBy(8000.0)); - - self.assertAlmostEqual(0.0028257, propagated.getI(), delta=1.0e-6) - -if __name__ == '__main__': - #unittest.main() - - suite = unittest.TestLoader().loadTestsFromTestCase(ImpulseManeuverTest) - ret = not unittest.TextTestRunner(verbosity=2).run(suite).wasSuccessful() - sys.exit(ret) - diff --git a/orekit-conda-recipe/test/KeplerianConverterTest.py b/orekit-conda-recipe/test/KeplerianConverterTest.py deleted file mode 100644 index 1d3f6715cd12da981a9e140a11f352b1429581e8..0000000000000000000000000000000000000000 --- a/orekit-conda-recipe/test/KeplerianConverterTest.py +++ /dev/null @@ -1,125 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - -/* Copyright 2002-2013 CS Syst��mes d'Information - * Licensed to CS Syst��mes d'Information (CS) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * CS licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -Python version translated from Java by Petrus Hyvönen, SSC 2014 - - """ - -import orekit -orekit.initVM() -from orekit.pyhelpers import setup_orekit_curdir - -from org.orekit.frames import FramesFactory; -from org.orekit.propagation.analytical import KeplerianPropagator; -from org.orekit.time import AbsoluteDate; -from org.hipparchus.geometry.euclidean.threed import Vector3D -from org.orekit.orbits import EquinoctialOrbit -from org.orekit.orbits import Orbit; -from org.orekit.orbits import OrbitType; -from org.orekit.orbits import PositionAngle; -from org.orekit.utils import PVCoordinates -from org.orekit.propagation.conversion import FiniteDifferencePropagatorConverter -from org.orekit.propagation.conversion import KeplerianPropagatorBuilder -import unittest -import sys -from java.util import Arrays - - -class KeplerianConverterTest(unittest.TestCase): - - position = Vector3D(7.0e6, 1.0e6, 4.0e6); - velocity = Vector3D(-500.0, 8000.0, 1000.0); - mu = 3.9860047e14; - - def checkFit(self, orbit, - duration, - stepSize, - threshold, - positionOnly, - expectedRMS, - *args): - - p = KeplerianPropagator(orbit) - - sample = [] - dt = 0.0 - while dt < duration: - sample.append(p.propagate(orbit.getDate().shiftedBy(dt))) - dt += stepSize - - - builder = KeplerianPropagatorBuilder(OrbitType.KEPLERIAN.convertType(orbit), - PositionAngle.MEAN, - 1.0) - - fitter = FiniteDifferencePropagatorConverter(builder, threshold, 1000) - - fitter.convert(Arrays.asList(sample), positionOnly, []) - - self.assertAlmostEqual(fitter.getRMS(), 0.01 * expectedRMS, delta=expectedRMS) - - prop = fitter.getAdaptedPropagator(); #(KeplerianPropagator) - fitted = prop.getInitialState().getOrbit(); - - eps = 1.0e-12; - self.assertAlmostEqual(orbit.getPVCoordinates().getPosition().getX(), - fitted.getPVCoordinates().getPosition().getX(), - delta = eps * orbit.getPVCoordinates().getPosition().getX()) - self.assertAlmostEqual(orbit.getPVCoordinates().getPosition().getY(), - fitted.getPVCoordinates().getPosition().getY(), - delta = eps * orbit.getPVCoordinates().getPosition().getY()); - self.assertAlmostEqual(orbit.getPVCoordinates().getPosition().getZ(), - fitted.getPVCoordinates().getPosition().getZ(), - delta = eps * orbit.getPVCoordinates().getPosition().getZ()); - - self.assertAlmostEqual(orbit.getPVCoordinates().getVelocity().getX(), - fitted.getPVCoordinates().getVelocity().getX(), - delta = -eps * orbit.getPVCoordinates().getVelocity().getX()); - self.assertAlmostEqual(orbit.getPVCoordinates().getVelocity().getY(), - fitted.getPVCoordinates().getVelocity().getY(), - delta = eps * orbit.getPVCoordinates().getVelocity().getY()); - self.assertAlmostEqual(orbit.getPVCoordinates().getVelocity().getZ(), - fitted.getPVCoordinates().getVelocity().getZ(), - delta = eps * orbit.getPVCoordinates().getVelocity().getZ()); - - def testConversionPositionVelocity(self): - self.checkFit(self.orbit, 86400, 300, 1.0e-3, False, 1.89e-8) - - def testConversionPositionOnly(self): - self.checkFit(self.orbit, 86400, 300, 1.0e-3, True, 2.90e-8) - -# #@Test(expected = OrekitException.class) -# def testConversionWithFreeParameter(self): -# self.checkFit(self.orbit, 86400, 300, 1.0e-3, True, 2.65e-8, "toto"); - - def setUp(self): - setup_orekit_curdir() - - self.initDate = AbsoluteDate.J2000_EPOCH.shiftedBy(584.); - self.orbit = EquinoctialOrbit(PVCoordinates(self.position, self.velocity), - FramesFactory.getEME2000(), self.initDate, self.mu); - - -if __name__ == '__main__': - - suite = unittest.TestLoader().loadTestsFromTestCase(KeplerianConverterTest) - ret = not unittest.TextTestRunner(verbosity=2).run(suite).wasSuccessful() - sys.exit(ret) diff --git a/orekit-conda-recipe/test/NodeDetectorTest.py b/orekit-conda-recipe/test/NodeDetectorTest.py deleted file mode 100644 index 75038b28f9b3fb93b799067d96c679446f920d39..0000000000000000000000000000000000000000 --- a/orekit-conda-recipe/test/NodeDetectorTest.py +++ /dev/null @@ -1,103 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - -/* Copyright 2002-2013 CS Syst��mes d'Information - * Licensed to CS Syst��mes d'Information (CS) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * CS licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -Python version translated from Java by Petrus Hyvönen, SSC 2014 - - """ - -# Python orekit specifics -import orekit -orekit.initVM() - -from orekit.pyhelpers import setup_orekit_curdir -setup_orekit_curdir() # orekit-data.zip shall be in current dir - -from org.orekit.propagation.events import EventsLogger -from org.orekit.propagation.events import NodeDetector -from org.hipparchus.ode.nonstiff import DormandPrince853Integrator; -from org.hipparchus.util import FastMath; -from org.orekit.frames import FramesFactory; -from org.orekit.orbits import KeplerianOrbit; -from org.orekit.orbits import PositionAngle; -from org.orekit.propagation import SpacecraftState; -from org.orekit.propagation.events.handlers import ContinueOnEvent; -from org.orekit.propagation.numerical import NumericalPropagator; -from org.orekit.time import AbsoluteDate; -from org.orekit.time import TimeScalesFactory; -from org.orekit.utils import Constants; -from orekit import JArray_double - -# Floats are needed to be specific in the orekit interface -a = 800000.0 + Constants.WGS84_EARTH_EQUATORIAL_RADIUS; -e = 0.0001; -i = FastMath.toRadians(98.0); -w = -90.0; -raan = 0.0; -v = 0.0; - -inertialFrame = FramesFactory.getEME2000() -initialDate = AbsoluteDate(2014, 01, 01, 0, 0, 0.0, TimeScalesFactory.getUTC()) -finalDate = initialDate.shiftedBy(70*24*60*60.0) -initialOrbit = KeplerianOrbit(a, e, i, w, raan, v, PositionAngle.TRUE, inertialFrame, initialDate, Constants.WGS84_EARTH_MU) -initialState = SpacecraftState(initialOrbit, 1000.0) - -tol = NumericalPropagator.tolerances(10.0, initialOrbit, initialOrbit.getType()) - -# Double array of doubles needs to be retyped to work -integrator = DormandPrince853Integrator(0.001, 1000.0, - JArray_double.cast_(tol[0]), - JArray_double.cast_(tol[1])) - -propagator = NumericalPropagator(integrator); -propagator.setInitialState(initialState); - -# Define 2 instances of NodeDetector: -rawDetector = NodeDetector(1e-6, - initialState.getOrbit(), - initialState.getFrame()).withHandler(ContinueOnEvent().of_(NodeDetector)) - -logger1 = EventsLogger(); -node1 = logger1.monitorDetector(rawDetector); -logger2 = EventsLogger(); -node2 = logger2.monitorDetector(rawDetector); - -propagator.addEventDetector(node1); -propagator.addEventDetector(node2); - -# First propagation -propagator.setEphemerisMode(); -propagator.propagate(finalDate); - -assert 1998==logger1.getLoggedEvents().size() -assert 1998== logger2.getLoggedEvents().size(); -logger1.clearLoggedEvents(); -logger2.clearLoggedEvents(); - -postpro = propagator.getGeneratedEphemeris(); - -# Post-processing -postpro.addEventDetector(node1); -postpro.addEventDetector(node2); -postpro.propagate(finalDate); -assert 1998==logger1.getLoggedEvents().size() -assert 1998==logger2.getLoggedEvents().size() - -print "NodeDetectorTest Successfully run" diff --git a/orekit-conda-recipe/test/SmallManeuverAnalyticalModelTest.py b/orekit-conda-recipe/test/SmallManeuverAnalyticalModelTest.py deleted file mode 100644 index f33445b4ec3dca531523bd4e4b3e927d144ecf9a..0000000000000000000000000000000000000000 --- a/orekit-conda-recipe/test/SmallManeuverAnalyticalModelTest.py +++ /dev/null @@ -1,226 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - -/* Copyright 2002-2015 CS Syst��mes d'Information - * Licensed to CS Syst��mes d'Information (CS) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * CS licenses this file to You under the Apache License, Version 2.0 - * (the "License") you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -Python version translated from Java by Petrus Hyvönen, SSC 2015 - - """ -import orekit - -orekit.initVM() -from orekit.pyhelpers import setup_orekit_curdir - -setup_orekit_curdir() - -from orekit import JArray_double, JArray - -from org.orekit.forces.maneuvers import SmallManeuverAnalyticalModel, ConstantThrustManeuver - -from org.hipparchus.geometry.euclidean.threed import Vector3D -from org.hipparchus.ode.nonstiff import DormandPrince853Integrator -from org.hipparchus.util import FastMath -from org.orekit.utils import Constants -from org.orekit.attitudes import LofOffset - -from org.orekit.frames import FramesFactory -from org.orekit.frames import LOFType -from org.orekit.orbits import CircularOrbit -from org.orekit.orbits import KeplerianOrbit -from org.orekit.orbits import PositionAngle -from org.orekit.propagation import SpacecraftState -from org.orekit.propagation.numerical import NumericalPropagator -from org.orekit.time import AbsoluteDate -from org.orekit.time import DateComponents -from org.orekit.time import TimeComponents -from org.orekit.time import TimeScalesFactory -from org.orekit.utils import Constants -from org.orekit.utils import PVCoordinates - -from math import radians - -# from org.orekit.forces.maneuvers import getEphemeris - -import unittest -import sys - - -class SmallManeuverAnalyticalModelTest(unittest.TestCase): - def testLowEarthOrbit1(self): - leo = CircularOrbit(7200000.0, -1.0e-5, 2.0e-4, - radians(98.0), - radians(123.456), - 0.0, PositionAngle.MEAN, - FramesFactory.getEME2000(), - AbsoluteDate(DateComponents(2004, 01, 01), - TimeComponents(23, 30, 00.000), - TimeScalesFactory.getUTC()), - Constants.EIGEN5C_EARTH_MU) - mass = 5600.0 - t0 = leo.getDate().shiftedBy(1000.0) - dV = Vector3D(-0.01, 0.02, 0.03) - f = 20.0 - isp = 315.0 - withoutManeuver = self.getEphemeris(leo, mass, t0, Vector3D.ZERO, f, isp) - withManeuver = self.getEphemeris(leo, mass, t0, dV, f, isp) - model = SmallManeuverAnalyticalModel(withoutManeuver.propagate(t0), dV, isp) - - self.assertEquals(t0.toString(), model.getDate().toString()) - - t = withoutManeuver.getMinDate() - while t.compareTo(withoutManeuver.getMaxDate()) < 0: - pvWithout = withoutManeuver.getPVCoordinates(t, leo.getFrame()) - pvWith = withManeuver.getPVCoordinates(t, leo.getFrame()) - pvModel = model.apply(withoutManeuver.propagate(t)).getPVCoordinates(leo.getFrame()) - nominalDeltaP = PVCoordinates(pvWith, pvWithout).getPosition().getNorm() - modelError = PVCoordinates(pvWith, pvModel).getPosition().getNorm() - if t.compareTo(t0) < 0: - # before maneuver, all positions should be equal - self.assertEquals(0, nominalDeltaP, 1.0e-10) - self.assertEquals(0, modelError, 1.0e-10) - else: - # after maneuver, model error should be less than 0.8m, - # despite nominal deltaP exceeds 1 kilometer after less than 3 orbits - if t.durationFrom(t0) > 0.1 * leo.getKeplerianPeriod(): - self.assertTrue(modelError < 0.009 * nominalDeltaP) - - self.assertTrue(modelError < 0.8) - - t = t.shiftedBy(60.0) - - def testLowEarthOrbit2(self): - - leo = CircularOrbit(7200000.0, -1.0e-5, 2.0e-4, - radians(98.0), - radians(123.456), - 0.0, PositionAngle.MEAN, - FramesFactory.getEME2000(), - AbsoluteDate(DateComponents(2004, 01, 01), - TimeComponents(23, 30, 00.000), - TimeScalesFactory.getUTC()), - Constants.EIGEN5C_EARTH_MU) - mass = 5600.0 - t0 = leo.getDate().shiftedBy(1000.0) - dV = Vector3D(-0.01, 0.02, 0.03) - f = 20.0 - isp = 315.0 - withoutManeuver = self.getEphemeris(leo, mass, t0, Vector3D.ZERO, f, isp) - withManeuver = self.getEphemeris(leo, mass, t0, dV, f, isp) - model = SmallManeuverAnalyticalModel(withoutManeuver.propagate(t0), dV, isp) - self.assertEquals(t0.toString(), model.getDate().toString()) - - t = withoutManeuver.getMinDate() - while t.compareTo(withoutManeuver.getMaxDate()) < 0: - pvWithout = withoutManeuver.getPVCoordinates(t, leo.getFrame()) - pvWith = withManeuver.getPVCoordinates(t, leo.getFrame()) - pvModel = model.apply(withoutManeuver.propagate(t).getOrbit()).getPVCoordinates(leo.getFrame()) - nominalDeltaP = PVCoordinates(pvWith, pvWithout).getPosition().getNorm() - modelError = PVCoordinates(pvWith, pvModel).getPosition().getNorm() - if t.compareTo(t0) < 0: - # before maneuver, all positions should be equal - self.assertEquals(0, nominalDeltaP, 1.0e-10) - self.assertEquals(0, modelError, 1.0e-10) - else: - # after maneuver, model error should be less than 0.8m, - # despite nominal deltaP exceeds 1 kilometer after less than 3 orbits - if t.durationFrom(t0) > 0.1 * leo.getKeplerianPeriod(): - self.assertTrue(modelError < 0.009 * nominalDeltaP) - - self.assertTrue(modelError < 0.8) - - t = t.shiftedBy(60.0) - - def testEccentricOrbit(self): - - heo = KeplerianOrbit(90000000.0, 0.92, FastMath.toRadians(98.0), - radians(12.3456), - radians(123.456), - radians(1.23456), PositionAngle.MEAN, - FramesFactory.getEME2000(), - AbsoluteDate(DateComponents(2004, 01, 01), - TimeComponents(23, 30, 00.000), - TimeScalesFactory.getUTC()), - Constants.EIGEN5C_EARTH_MU) - mass = 5600.0 - t0 = heo.getDate().shiftedBy(1000.0) - dV = Vector3D(-0.01, 0.02, 0.03) - f = 20.0 - isp = 315.0 - withoutManeuver = self.getEphemeris(heo, mass, t0, Vector3D.ZERO, f, isp) - withManeuver = self.getEphemeris(heo, mass, t0, dV, f, isp) - model = SmallManeuverAnalyticalModel(withoutManeuver.propagate(t0), dV, isp) - - self.assertEquals(t0.toString(), model.getDate().toString()) - - t = withoutManeuver.getMinDate() - while t.compareTo(withoutManeuver.getMaxDate()) < 0: - pvWithout = withoutManeuver.getPVCoordinates(t, heo.getFrame()) - pvWith = withManeuver.getPVCoordinates(t, heo.getFrame()) - pvModel = model.apply(withoutManeuver.propagate(t)).getPVCoordinates(heo.getFrame()) - nominalDeltaP = PVCoordinates(pvWith, pvWithout).getPosition().getNorm() - modelError = PVCoordinates(pvWith, pvModel).getPosition().getNorm() - if t.compareTo(t0) < 0: - # before maneuver, all positions should be equal - self.assertEquals(0, nominalDeltaP, 1.0e-10) - self.assertEquals(0, modelError, 1.0e-10) - else: - # after maneuver, model error should be less than 1700m, - # despite nominal deltaP exceeds 300 kilometers at perigee, after 3 orbits - if t.durationFrom(t0) > 0.01 * heo.getKeplerianPeriod(): - self.assertTrue(modelError < 0.005 * nominalDeltaP) - - self.assertTrue(modelError < 1700) - t = t.shiftedBy(600.0) - - # Jacobian test removed due to the large amount of manual work currently with 2D java arrays - - def getEphemeris(self, orbit, mass, t0, dV, f, isp): - - law = LofOffset(orbit.getFrame(), LOFType.LVLH) - initialState = SpacecraftState(orbit, law.getAttitude(orbit, orbit.getDate(), orbit.getFrame()), mass) - - # set up numerical propagator - dP = 1.0 - tolerances = NumericalPropagator.tolerances(dP, orbit, orbit.getType()) - - integrator = DormandPrince853Integrator(0.001, 1000.0, JArray_double.cast_(tolerances[0]), - JArray_double.cast_(tolerances[1])) - - integrator.setInitialStepSize(orbit.getKeplerianPeriod() / 100.0) - propagator = NumericalPropagator(integrator) - propagator.setOrbitType(orbit.getType()) - propagator.setInitialState(initialState) - propagator.setAttitudeProvider(law) - - if dV.getNorm() > 1.0e-6: - # set up maneuver - vExhaust = Constants.G0_STANDARD_GRAVITY * isp - dt = -(mass * vExhaust / f) * FastMath.expm1(-dV.getNorm() / vExhaust) - maneuver = ConstantThrustManeuver(t0, dt, f, isp, dV.normalize()) - propagator.addForceModel(maneuver) - - propagator.setEphemerisMode() - propagator.propagate(t0.shiftedBy(5 * orbit.getKeplerianPeriod())) - return propagator.getGeneratedEphemeris() - - -if __name__ == '__main__': - suite = unittest.TestLoader().loadTestsFromTestCase(SmallManeuverAnalyticalModelTest) - ret = not unittest.TextTestRunner(verbosity=2).run(suite).wasSuccessful() - sys.exit(ret) diff --git a/orekit-conda-recipe/test/orekit-data.zip b/orekit-conda-recipe/test/orekit-data.zip deleted file mode 100644 index 95db9654fb23f6eee43c1180a2bca4bb8ec96d1e..0000000000000000000000000000000000000000 Binary files a/orekit-conda-recipe/test/orekit-data.zip and /dev/null differ