Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
Orekit Python Wrapper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Orekit Labs
Orekit Python Wrapper
Commits
0dc4af80
Commit
0dc4af80
authored
4 years ago
by
Petrus Hyvönen
Browse files
Options
Downloads
Patches
Plain Diff
Changed from getInstance to getDefault for DataContext.
parent
b50d687d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python_files/pyhelpers.py
+7
-6
7 additions, 6 deletions
python_files/pyhelpers.py
with
7 additions
and
6 deletions
python_files/pyhelpers.py
+
7
−
6
View file @
0dc4af80
...
@@ -31,7 +31,6 @@ from org.orekit.data import DataProvidersManager, ZipJarCrawler, DirectoryCrawle
...
@@ -31,7 +31,6 @@ from org.orekit.data import DataProvidersManager, ZipJarCrawler, DirectoryCrawle
from
org.orekit.time
import
TimeScalesFactory
,
AbsoluteDate
from
org.orekit.time
import
TimeScalesFactory
,
AbsoluteDate
from
org.orekit.utils
import
ElevationMask
from
org.orekit.utils
import
ElevationMask
try
:
try
:
import
urllib.request
as
urlrequest
import
urllib.request
as
urlrequest
except
ImportError
:
except
ImportError
:
...
@@ -76,24 +75,24 @@ def setup_orekit_curdir(filename='orekit-data.zip'):
...
@@ -76,24 +75,24 @@ def setup_orekit_curdir(filename='orekit-data.zip'):
"""
"""
DM
=
DataProvidersManager
.
getInstance
()
DM
=
DataContext
.
getDefault
().
get
DataProvidersManager
()
datafile
=
File
(
filename
)
datafile
=
File
(
filename
)
if
not
datafile
.
exists
():
if
not
datafile
.
exists
():
print
(
'
File or folder:
'
,
datafile
.
absolutePath
,
'
not found
'
)
print
(
'
File or folder:
'
,
datafile
.
absolutePath
,
'
not found
'
)
print
(
"""
print
(
"""
The Orekit library relies on some external data for physical models.
The Orekit library relies on some external data for physical models.
Typical data are the Earth Orientation Parameters and the leap seconds history,
Typical data are the Earth Orientation Parameters and the leap seconds history,
both being provided by the IERS or the planetary ephemerides provided by JPL.
both being provided by the IERS or the planetary ephemerides provided by JPL.
Such data is stored in text or binary files with specific formats that Orekit knows
Such data is stored in text or binary files with specific formats that Orekit knows
how to read, and needs to be provided for the library to work.
how to read, and needs to be provided for the library to work.
You can download a starting file with this data from the orekit gitlab at:
You can download a starting file with this data from the orekit gitlab at:
https://gitlab.orekit.org/orekit/orekit-data
https://gitlab.orekit.org/orekit/orekit-data
or by the function:
or by the function:
orekit.pyhelpers.download_orekit_data_curdir()
orekit.pyhelpers.download_orekit_data_curdir()
"""
)
"""
)
if
os
.
path
.
isdir
(
filename
):
if
os
.
path
.
isdir
(
filename
):
...
@@ -103,6 +102,8 @@ def setup_orekit_curdir(filename='orekit-data.zip'):
...
@@ -103,6 +102,8 @@ def setup_orekit_curdir(filename='orekit-data.zip'):
else
:
else
:
print
(
'
filename
'
,
filename
,
'
is neither a file nor a folder
'
)
print
(
'
filename
'
,
filename
,
'
is neither a file nor a folder
'
)
DM
.
clearProviders
()
DM
.
clearProviders
()
DM
.
clearLoadedDataNames
()
DM
.
clearFilters
()
DM
.
addProvider
(
crawler
)
DM
.
addProvider
(
crawler
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment