Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
wendelin
Commits
077f0e28
Commit
077f0e28
authored
Aug 19, 2024
by
Léo-Paul Géneau
👾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_wendelin_drone: work with floats
parent
4d1d87b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
bt5/erp5_wendelin_drone/PathTemplateItem/portal_callables/DataAnalysisLine_convertDroneDataArrayToScoreArray.py
...les/DataAnalysisLine_convertDroneDataArrayToScoreArray.py
+13
-14
No files found.
bt5/erp5_wendelin_drone/PathTemplateItem/portal_callables/DataAnalysisLine_convertDroneDataArrayToScoreArray.py
View file @
077f0e28
...
...
@@ -122,7 +122,7 @@ for name in not_seen_list:
splitted_filename
=
name
[:
-
4
].
split
(
'_'
)
distance_list_tuple
=
([],[],
[],
[],
[])
simulated_flight
=
nparray_to_dataframe
(
sim_array
.
get
(
name
))
simulated_flight
=
simulated_flight
.
applymap
(
lambda
value
:
np
.
format_float_scientific
(
float
(
value
))
if
isinstance
(
value
,
str
)
and
'e'
in
value
else
value
)
simulated_flight
=
simulated_flight
.
applymap
(
float
)
simulated_flight_list
.
append
(
simulated_flight
)
timestamp_diff
=
simulated_flight
[
'timestamp (ms)'
].
min
()
-
real_flight
[
'timestamp (ms)'
].
min
()
max_simulator_timestamp
=
simulated_flight
[
'timestamp (ms)'
].
max
()
-
timestamp_diff
...
...
@@ -139,24 +139,23 @@ for name in not_seen_list:
except
IndexError
:
continue
over_timestamp
=
simulated_flight
[
simulated_flight
[
'timestamp (ms)'
]
-
timestamp_diff
>=
row
[
'timestamp (ms)'
]].
head
(
1
)
rate
=
(
float
(
over_timestamp
[
"timestamp (ms)"
])
-
timestamp_diff
-
row
[
"timestamp (ms)"
])
/
(
float
(
over_timestamp
[
"timestamp (ms)"
])
-
float
(
under_timestamp
[
"timestamp (ms)"
])
)
rate
=
(
over_timestamp
[
"timestamp (ms)"
]
-
timestamp_diff
-
row
[
"timestamp (ms)"
])
/
(
over_timestamp
[
"timestamp (ms)"
]
-
under_timestamp
[
"timestamp (ms)"
]
)
for
criterion
in
distance_criterion_tuple
:
tmp_sim
[
criterion
].
append
(
rated_value
(
float
(
over_timestamp
[
criterion
]),
float
(
under_timestamp
[
criterion
])
,
rate
))
tmp_sim
[
criterion
].
append
(
rated_value
(
over_timestamp
[
criterion
],
under_timestamp
[
criterion
]
,
rate
))
tmp_real
[
criterion
].
append
(
row
[
criterion
])
for
index
,
value
in
enumerate
((
row
[
'timestamp (ms)'
]
/
1000
,
distance
(
row
[
'latitude ()'
],
row
[
'longitude ()'
],
tmp_sim
[
'latitude ()'
][
-
1
],
tmp_sim
[
'longitude ()'
][
-
1
],
),
tmp_sim
[
'AMSL (m)'
][
-
1
],
tmp_sim
[
'ground speed (m/s)'
][
-
1
],
tmp_real
[
'climb rate (m/s)'
][
-
1
]
)):
row
[
'timestamp (ms)'
]
/
1000
,
distance
(
row
[
'latitude ()'
],
row
[
'longitude ()'
],
tmp_sim
[
'latitude ()'
][
-
1
],
tmp_sim
[
'longitude ()'
][
-
1
],
),
tmp_sim
[
'AMSL (m)'
][
-
1
],
tmp_sim
[
'ground speed (m/s)'
][
-
1
],
tmp_real
[
'climb rate (m/s)'
][
-
1
],
)):
distance_list_tuple
[
index
].
append
(
value
)
# If we have at least 100 entries (timestamps) analysed, add the filename to the list
...
...
Write
Preview
Markdown
is supported
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