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
516518d1
Commit
516518d1
authored
4 years ago
by
Stefan Hendricks
Browse files
Options
Downloads
Patches
Plain Diff
bugfix
parent
38d8223a
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
+3
-3
3 additions, 3 deletions
floenavi/__init__.py
with
3 additions
and
3 deletions
floenavi/__init__.py
+
3
−
3
View file @
516518d1
...
@@ -706,7 +706,7 @@ class FloeNaviGrid(object):
...
@@ -706,7 +706,7 @@ class FloeNaviGrid(object):
else
:
else
:
self
.
basestation_dict
[
mmsi
].
append
(
pos
)
self
.
basestation_dict
[
mmsi
].
append
(
pos
)
def
get_virtual_reference_station_positions
(
self
,
time_resolution_sec
=
10
.0
,
**
refstat_kwargs
):
def
get_virtual_reference_station_positions
(
self
,
time_resolution_sec
=
10
,
**
refstat_kwargs
):
"""
"""
Compute the position objects of two virtual reference stations, based on the number of available
Compute the position objects of two virtual reference stations, based on the number of available
basestations. This is primary input for the icedrift correction in the icedrift module.
basestations. This is primary input for the icedrift correction in the icedrift module.
...
@@ -718,8 +718,8 @@ class FloeNaviGrid(object):
...
@@ -718,8 +718,8 @@ class FloeNaviGrid(object):
# Compute common timestamp
# Compute common timestamp
logger
.
info
(
"
Compute timestamp of virtual base stations [resolution: %.2f sec]
"
%
time_resolution_sec
)
logger
.
info
(
"
Compute timestamp of virtual base stations [resolution: %.2f sec]
"
%
time_resolution_sec
)
duration_seconds
=
(
self
.
time_bounds
[
1
]
-
self
.
time_bounds
[
0
]).
seconds
duration_seconds
=
(
self
.
time_bounds
[
1
]
-
self
.
time_bounds
[
0
]).
seconds
seconds_increments
=
np
.
arange
(
0
,
duration_seconds
+
time_resolution_sec
,
time_resolution_sec
)
.
astype
(
int
)
seconds_increments
=
np
.
arange
(
0
,
duration_seconds
+
time_resolution_sec
,
time_resolution_sec
)
time
=
np
.
array
([
self
.
time_bounds
[
0
]
+
timedelta
(
seconds
=
sec
)
for
sec
in
seconds_increments
])
time
=
np
.
array
([
self
.
time_bounds
[
0
]
+
timedelta
(
seconds
=
int
(
sec
)
)
for
sec
in
seconds_increments
])
# Create a collection of all base stations
# Create a collection of all base stations
# NOTE: Making sure all base stations have the same temporal resolutions
# NOTE: Making sure all base stations have the same temporal resolutions
...
...
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