Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FloeNavi Toolbox
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
FloeNavi - Coordinate Reference System
FloeNavi Toolbox
Commits
38d8223a
Commit
38d8223a
authored
4 years ago
by
Stefan Hendricks
Browse files
Options
Downloads
Patches
Plain Diff
add optional grid solver output
parent
8e6203d6
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
floenavi/__init__.py
+14
-6
14 additions, 6 deletions
floenavi/__init__.py
with
14 additions
and
6 deletions
floenavi/__init__.py
+
14
−
6
View file @
38d8223a
...
...
@@ -119,7 +119,8 @@ class FloeNavi(object):
# --- Update the data set in place ----
dset
.
update_floenavi_coords
(
ice_pos
.
xc
,
ice_pos
.
yc
)
def
get_virtual_reference_stations
(
self
,
dataset_time_bounds
,
basestation_setup
=
None
,
**
refstat_kwargs
):
def
get_virtual_reference_stations
(
self
,
dataset_time_bounds
,
basestation_setup
=
None
,
return_grid_solution
=
False
,
**
refstat_kwargs
):
"""
Get two virtual reference stations (origin ref and heading ref) from merging
the information of all available FloeNavi reference stations. The step is
...
...
@@ -131,8 +132,10 @@ class FloeNavi(object):
position on the the FloeNavi grid.
:param dataset_time_bounds: (datetime list) time range of the dataset
:param basestation_setup: (FloeNaviBaseStationSetup instance)
:return:
:param basestation_setup: (FloeNaviBaseStationSetup instance, optional)
:param return_grid_solution: (bool) If set to true, the method will return the refstation
and the grid solution
:return: icedrift.GeoReferenceStation (+ FloeNaviGrid if return_grid_solution is True)
"""
# Use default base station setup
...
...
@@ -145,9 +148,14 @@ class FloeNavi(object):
floenavi_grid
.
set_time_bounds
(
dataset_time_bounds
)
# Get Reference station data from two positions
pos_ref
,
pos_hdg
=
floenavi_grid
.
get_virtual_reference_station_positions
(
**
refstat_kwargs
)
pos_ref
,
pos_hdg
,
fngrid
=
floenavi_grid
.
get_virtual_reference_station_positions
(
**
refstat_kwargs
)
refstat_ais
=
GeoReferenceStation
.
from_two_basestations
(
pos_ref
,
pos_hdg
)
return
refstat_ais
# Return value
if
not
return_grid_solution
:
return
refstat_ais
else
:
return
refstat_ais
,
fngrid
class
FloeNaviConfig
(
object
):
...
...
@@ -732,7 +740,7 @@ class FloeNaviGrid(object):
# Get the virtual origin and heading position data objects
logger
.
info
(
"
Compute origin and heading station positions
"
)
orig
,
hdg
=
fngrid
.
get_reference_stations
(
**
refstat_kwargs
)
return
orig
,
hdg
return
orig
,
hdg
,
fngrid
class
FloeNaviGridSolver
(
object
):
...
...
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