Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
wjw058
Orekit Python Wrapper
Commits
e13d6e64
Commit
e13d6e64
authored
Apr 03, 2019
by
Petrus Hyvönen
Browse files
Updates for v 9.3.1
parent
b838cfb5
Changes
7
Hide whitespace changes
Inline
Side-by-side
orekit-conda-recipe/bld.bat
View file @
e13d6e64
...
...
@@ -10,7 +10,7 @@
--use
_full_names
^
--python
orekit
^
--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
-filtering
-
1
.4.jar
^
--jar
%SRC_DIR%
\hipparchus
-fitting
-
1
.4.jar
^
...
...
orekit-conda-recipe/build.sh
View file @
e13d6e64
...
...
@@ -4,7 +4,7 @@ $PYTHON -m jcc \
--use_full_names
\
--python
orekit
\
--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-filtering-1.4.jar
\
--jar
$SRC_DIR
/hipparchus-fitting-1.4.jar
\
...
...
orekit-conda-recipe/meta.yaml
View file @
e13d6e64
{
%
set name = "orekit" %
}
{
%
set version = "9.3" %
}
{
%
set filename = "v9_3_
2
" %
}
{
%
set sha256 = "
c369e544442a32d39fc12cf5de569b4d5afd29174a73b8cd0c006c07dbe916d8
" %
}
{
%
set version = "9.3
.1
" %
}
{
%
set filename = "v9_3_
1_0
" %
}
{
%
set sha256 = "
8b6b84599542927a419261667ad0374c82b4d92daded52483fc9ce658af82217
" %
}
package
:
name
:
{{
name|lower
}}
...
...
@@ -13,7 +13,7 @@ source:
sha256
:
{{
sha256
}}
build
:
number
:
2
number
:
0
rpaths
:
-
lib/
...
...
orekit-conda-recipe/run_test.bat
View file @
e13d6e64
cd
test
for
%%f
in
(*
.py
)
do
python
"
%%f
"
||
exit
/b
1
for
%%f
in
(*
.py
)
do
(
python
"
%%f
"
if
errorlevel
1
exit
1
)
orekit-conda-recipe/run_test.sh
View file @
e13d6e64
#!/usr/bin/env bash
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
python_files/pyhelpers.py
View file @
e13d6e64
...
...
@@ -60,8 +60,8 @@ def setup_orekit_curdir(filename='orekit-data.zip'):
def
absolutedate_to_datetime
(
orekit_absolutedate
):
""" Converts
between
orekit.AbsoluteDate objects
and
python datetime objects (utc)"""
""" Converts
from
orekit.AbsoluteDate objects
to
python datetime objects (utc)"""
utc
=
TimeScalesFactory
.
getUTC
()
or_comp
=
orekit_absolutedate
.
getComponents
(
utc
)
...
...
@@ -76,9 +76,10 @@ def absolutedate_to_datetime(orekit_absolutedate):
int
(
math
.
floor
(
seconds
)),
int
(
1000000.0
*
(
seconds
-
math
.
floor
(
seconds
))))
def
datetime_to_absolutedate
(
dt_date
):
""" Converts
between orekit.AbsoluteDat
e objects
and python datetim
e objects
(utc)
""" Converts
from python datetim
e objects
(utc)
to orekit.AbsoluteDat
e objects
.
Args:
dt_date (datetime): python datetime object to convert
...
...
@@ -97,12 +98,12 @@ def datetime_to_absolutedate(dt_date):
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.
mask = to_elevationmask([0, 90, 180, 270], [5,10,8,5])
'''
"""
mask
=
JArray
(
'object'
)(
len
(
az
))
...
...
@@ -112,12 +113,21 @@ def to_elevationmask(az, el):
return
ElevationMask
(
mask
)
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
)
for
i
in
range
(
x
):
arr
[
i
]
=
JArray
(
'double'
)(
y
)
return
arr
\ No newline at end of file
return
arr
python_files/test/InterSatDirectViewDetectorTest.py
View file @
e13d6e64
...
...
@@ -76,7 +76,7 @@ class GrazingHandler(PythonEventHandler):
testvalue
=
FastMath
.
abs
(
FastMath
.
toDegrees
(
topo
.
getAzimuth
(
pSlave
,
frame
,
grazingDate
)
-
topo
.
getAzimuth
(
pMaster
,
frame
,
grazingDate
)))
assert
-
6.0e-14
<
testvalue
-
180.0
<
6.0e-1
5
assert
-
6.0e-14
<
testvalue
-
180.0
<
6.0e-1
4
return
EventHandler
.
Action
.
CONTINUE
...
...
@@ -142,7 +142,7 @@ class InterSatDirectViewDetectorTest(unittest.TestCase):
FastMath
.
toRadians
(
56.0
),
FastMath
.
toRadians
(
111.0
),
o1
.
getAlphaM
()
+
2.2e-6
,
PositionAngle
.
MEAN
,
o1
.
getFrame
(),
o1
.
getDate
(),
Constants
.
EIGEN5C_EARTH_MU
)
;
Constants
.
EIGEN5C_EARTH_MU
)
# LEO as master, MEO as slave
pA
=
KeplerianPropagator
(
o1
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment