Skip to content
Snippets Groups Projects
Commit e13d6e64 authored by Petrus Hyvönen's avatar Petrus Hyvönen
Browse files

Updates for v 9.3.1

parent b838cfb5
No related branches found
No related tags found
No related merge requests found
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
--use_full_names ^ --use_full_names ^
--python orekit ^ --python orekit ^
--version %PKG_VERSION% ^ --version %PKG_VERSION% ^
--jar %SRC_DIR%\orekit-9.3.jar ^ --jar %SRC_DIR%\orekit-9.3.1.jar ^
--jar %SRC_DIR%\hipparchus-core-1.4.jar ^ --jar %SRC_DIR%\hipparchus-core-1.4.jar ^
--jar %SRC_DIR%\hipparchus-filtering-1.4.jar ^ --jar %SRC_DIR%\hipparchus-filtering-1.4.jar ^
--jar %SRC_DIR%\hipparchus-fitting-1.4.jar ^ --jar %SRC_DIR%\hipparchus-fitting-1.4.jar ^
......
...@@ -4,7 +4,7 @@ $PYTHON -m jcc \ ...@@ -4,7 +4,7 @@ $PYTHON -m jcc \
--use_full_names \ --use_full_names \
--python orekit \ --python orekit \
--version ${PKG_VERSION} \ --version ${PKG_VERSION} \
--jar $SRC_DIR/orekit-9.3.jar \ --jar $SRC_DIR/orekit-9.3.1.jar \
--jar $SRC_DIR/hipparchus-core-1.4.jar \ --jar $SRC_DIR/hipparchus-core-1.4.jar \
--jar $SRC_DIR/hipparchus-filtering-1.4.jar \ --jar $SRC_DIR/hipparchus-filtering-1.4.jar \
--jar $SRC_DIR/hipparchus-fitting-1.4.jar \ --jar $SRC_DIR/hipparchus-fitting-1.4.jar \
......
{% set name = "orekit" %} {% set name = "orekit" %}
{% set version = "9.3" %} {% set version = "9.3.1" %}
{% set filename = "v9_3_2" %} {% set filename = "v9_3_1_0" %}
{% set sha256 = "c369e544442a32d39fc12cf5de569b4d5afd29174a73b8cd0c006c07dbe916d8" %} {% set sha256 = "8b6b84599542927a419261667ad0374c82b4d92daded52483fc9ce658af82217" %}
package: package:
name: {{ name|lower }} name: {{ name|lower }}
...@@ -13,7 +13,7 @@ source: ...@@ -13,7 +13,7 @@ source:
sha256: {{ sha256 }} sha256: {{ sha256 }}
build: build:
number: 2 number: 0
rpaths: rpaths:
- lib/ - lib/
......
cd test cd test
for %%f in (*.py) do python "%%f" || exit /b 1 for %%f in (*.py) do (
python "%%f"
if errorlevel 1 exit 1
)
#!/usr/bin/env bash #!/usr/bin/env bash
cd test cd test
set -e
for f in *.py; do python "$f"; done || exit 1
for f in *.py; do
if python "$f"; then
echo "Test reported ok"
else
echo "Trying to Fail!"
exit 1
fi
done
exit 0
...@@ -60,8 +60,8 @@ def setup_orekit_curdir(filename='orekit-data.zip'): ...@@ -60,8 +60,8 @@ def setup_orekit_curdir(filename='orekit-data.zip'):
def absolutedate_to_datetime(orekit_absolutedate): def absolutedate_to_datetime(orekit_absolutedate):
""" Converts between orekit.AbsoluteDate objects """ Converts from orekit.AbsoluteDate objects
and python datetime objects (utc)""" to python datetime objects (utc)"""
utc = TimeScalesFactory.getUTC() utc = TimeScalesFactory.getUTC()
or_comp = orekit_absolutedate.getComponents(utc) or_comp = orekit_absolutedate.getComponents(utc)
...@@ -76,9 +76,10 @@ def absolutedate_to_datetime(orekit_absolutedate): ...@@ -76,9 +76,10 @@ def absolutedate_to_datetime(orekit_absolutedate):
int(math.floor(seconds)), int(math.floor(seconds)),
int(1000000.0 * (seconds - math.floor(seconds)))) int(1000000.0 * (seconds - math.floor(seconds))))
def datetime_to_absolutedate(dt_date): def datetime_to_absolutedate(dt_date):
""" Converts between orekit.AbsoluteDate objects """ Converts from python datetime objects (utc)
and python datetime objects (utc) to orekit.AbsoluteDate objects.
Args: Args:
dt_date (datetime): python datetime object to convert dt_date (datetime): python datetime object to convert
...@@ -97,12 +98,12 @@ def datetime_to_absolutedate(dt_date): ...@@ -97,12 +98,12 @@ def datetime_to_absolutedate(dt_date):
def to_elevationmask(az, el): def to_elevationmask(az, el):
''' Converts an array of azimuths and elevations to a """ Converts an array of azimuths and elevations to a
orekit ElevationMask object. All unts in degrees. orekit ElevationMask object. All unts in degrees.
mask = to_elevationmask([0, 90, 180, 270], [5,10,8,5]) mask = to_elevationmask([0, 90, 180, 270], [5,10,8,5])
''' """
mask = JArray('object')(len(az)) mask = JArray('object')(len(az))
...@@ -112,12 +113,21 @@ def to_elevationmask(az, el): ...@@ -112,12 +113,21 @@ def to_elevationmask(az, el):
return ElevationMask(mask) return ElevationMask(mask)
def JArray_double2D(x, y): def JArray_double2D(x, y):
'''Returns an JCC wrapped 2D double array''' """Returns an JCC wrapped 2D double array
Args:
x: Number of rows in the array
y: Number of columns in the array
Note that the rows and columns are returned as objects and
are likely needed to be casted manually.
"""
arr = JArray('object')(x) arr = JArray('object')(x)
for i in range(x): for i in range(x):
arr[i] = JArray('double')(y) arr[i] = JArray('double')(y)
return arr return arr
\ No newline at end of file
...@@ -76,7 +76,7 @@ class GrazingHandler(PythonEventHandler): ...@@ -76,7 +76,7 @@ class GrazingHandler(PythonEventHandler):
testvalue = FastMath.abs(FastMath.toDegrees(topo.getAzimuth(pSlave, frame, grazingDate) - testvalue = FastMath.abs(FastMath.toDegrees(topo.getAzimuth(pSlave, frame, grazingDate) -
topo.getAzimuth(pMaster, frame, grazingDate))) topo.getAzimuth(pMaster, frame, grazingDate)))
assert -6.0e-14 < testvalue - 180.0 < 6.0e-15 assert -6.0e-14 < testvalue - 180.0 < 6.0e-14
return EventHandler.Action.CONTINUE return EventHandler.Action.CONTINUE
...@@ -142,7 +142,7 @@ class InterSatDirectViewDetectorTest(unittest.TestCase): ...@@ -142,7 +142,7 @@ class InterSatDirectViewDetectorTest(unittest.TestCase):
FastMath.toRadians(56.0), FastMath.toRadians(111.0), FastMath.toRadians(56.0), FastMath.toRadians(111.0),
o1.getAlphaM() + 2.2e-6, PositionAngle.MEAN, o1.getFrame(), o1.getAlphaM() + 2.2e-6, PositionAngle.MEAN, o1.getFrame(),
o1.getDate(), o1.getDate(),
Constants.EIGEN5C_EARTH_MU); Constants.EIGEN5C_EARTH_MU)
# LEO as master, MEO as slave # LEO as master, MEO as slave
pA = KeplerianPropagator(o1) pA = KeplerianPropagator(o1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment