Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
dhomm
Bachelor Thesis - Sensor Localization
Commits
8023ee18
Commit
8023ee18
authored
Jan 15, 2022
by
dhomm
Browse files
change decider to finder names
parent
327b30bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Thesis-Code/combined-sensor-finder/combined-sensor-finder.py
View file @
8023ee18
...
...
@@ -114,7 +114,7 @@ def combined_sensor_finder(sensors, placement, acc_freq=0, gyr_freq=0):
bp
=
[]
for
a
,
g
in
p_s
:
#print("Hallo: ",[i[0].info.metadata[position_key] for i in p_s])
bp
.
append
(
placement_
deci
der
(
a
,
g
,
freq
=
freq
))
bp
.
append
(
placement_
fin
der
(
a
,
g
,
freq
=
freq
))
# 3 Valid Sensors
if
len
(
p_s
)
==
3
:
if
len
([
i
for
i
in
bp
if
i
in
high_bp
])
>
2
:
...
...
@@ -211,7 +211,7 @@ def combined_sensor_finder(sensors, placement, acc_freq=0, gyr_freq=0):
# comparisons between sensors
bp
=
[]
for
a
,
g
in
p_s
:
bp
.
append
(
placement_
deci
der
(
a
,
g
,
freq
=
freq
))
bp
.
append
(
placement_
fin
der
(
a
,
g
,
freq
=
freq
))
if
True
:
if
not
"shin"
in
bp
:
...
...
@@ -248,7 +248,7 @@ def combined_sensor_finder(sensors, placement, acc_freq=0, gyr_freq=0):
# comparisons between sensors
bp
=
[]
for
a
,
g
in
p_s
:
bp
.
append
(
placement_
deci
der
(
a
,
g
,
freq
=
freq
))
bp
.
append
(
placement_
fin
der
(
a
,
g
,
freq
=
freq
))
if
len
(
p_s
)
==
2
:
if
len
([
i
for
i
in
bp
if
i
in
high_bp
])
==
2
:
return
p_s
[
get_n_min_max
(
p_s
,
"pps_gyr"
,
1
,
"min"
)[
0
]]
...
...
Thesis-Code/combined-sensor-finder/placement_finder.py
View file @
8023ee18
...
...
@@ -10,7 +10,7 @@ import numpy as np
from
numpy
import
mean
,
sqrt
,
square
,
var
,
corrcoef
,
std
,
quantile
,
percentile
from
scipy.stats
import
skew
,
kurtosis
def
placement_
deci
der
(
walking_acc
,
walking_gyro
,
freq
=
100
,
walking_mag
=
0
):
def
placement_
fin
der
(
walking_acc
,
walking_gyro
,
freq
=
100
,
walking_mag
=
0
):
"""
This placement decider takes some statistical moments
to decide which body_part is the most probably
...
...
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