Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
jlopez
mandrill
Commits
2c47b20f
Commit
2c47b20f
authored
May 23, 2019
by
jlopez
Browse files
Add check if no acceleration
parent
21743293
Changes
1
Hide whitespace changes
Inline
Side-by-side
main.R
View file @
2c47b20f
...
...
@@ -28,7 +28,7 @@ timeE <- "2018-11-27 11:59:59"
# ici avec 2 mandrills
#mandrill_uuid <- c("32-38-31-39-58-36-8e-0c", "32-38-31-39-62-36-8f-0c")
mandrill_uuid
<-
c
(
"32-38-31-39-
58
-36-
8e
-0c"
)
mandrill_uuid
<-
c
(
"32-38-31-39-
67
-36-
63
-0c"
)
# Si le vecteur est vide cela signifie qu'on ne prend aucun mandrills
...
...
@@ -94,7 +94,9 @@ mandrillM <- filter(mandrill_mouvement, uuid == uuid[1])
mandrillA
<-
filter
(
mandrill_acceleration
,
uuid
==
uuid
[
1
])
par
(
mfrow
=
c
(
2
,
1
))
plot
(
mandrillM
$
date
,
mandrillM
$
mouvement
,
type
=
"l"
,
col
=
"purple"
,
ylim
=
c
(
minMA
,
maxMA
),
main
=
"Mouvement"
)
plot
(
mandrillA
$
date
,
mandrillA
$
x
,
type
=
"l"
,
col
=
"blue"
,
ylim
=
c
(
minMA
,
maxMA
),
main
=
"Acceleration X"
)
if
(
nrow
(
mandrill_acceleration
)
>
0
)
{
plot
(
mandrillA
$
date
,
mandrillA
$
x
,
type
=
"l"
,
col
=
"blue"
,
ylim
=
c
(
minMA
,
maxMA
),
main
=
"Acceleration X"
)
}
# Position Y
...
...
@@ -102,7 +104,9 @@ mandrillM <- filter(mandrill_mouvement, uuid == uuid[1])
mandrillA
<-
filter
(
mandrill_acceleration
,
uuid
==
uuid
[
1
])
par
(
mfrow
=
c
(
2
,
1
))
plot
(
mandrillM
$
date
,
mandrillM
$
mouvement
,
type
=
"l"
,
col
=
"purple"
,
ylim
=
c
(
minMA
,
maxMA
),
main
=
"Mouvement"
)
plot
(
mandrillA
$
date
,
mandrillA
$
y
,
type
=
"l"
,
col
=
"red"
,
ylim
=
c
(
minMA
,
maxMA
),
main
=
"Acceleration Y"
)
if
(
nrow
(
mandrill_acceleration
)
>
0
)
{
plot
(
mandrillA
$
date
,
mandrillA
$
y
,
type
=
"l"
,
col
=
"red"
,
ylim
=
c
(
minMA
,
maxMA
),
main
=
"Acceleration Y"
)
}
# Position Z
...
...
@@ -110,6 +114,7 @@ mandrillM <- filter(mandrill_mouvement, uuid == uuid[1])
mandrillA
<-
filter
(
mandrill_acceleration
,
uuid
==
uuid
[
1
])
par
(
mfrow
=
c
(
2
,
1
))
plot
(
mandrillM
$
date
,
mandrillM
$
mouvement
,
type
=
"l"
,
col
=
"purple"
,
ylim
=
c
(
minMA
,
maxMA
),
main
=
"Mouvement"
)
plot
(
mandrillA
$
date
,
mandrillA
$
z
,
type
=
"l"
,
col
=
"green"
,
ylim
=
c
(
minMA
,
maxMA
),
main
=
"Acceleration Z"
)
if
(
nrow
(
mandrill_acceleration
)
>
0
)
{
plot
(
mandrillA
$
date
,
mandrillA
$
z
,
type
=
"l"
,
col
=
"green"
,
ylim
=
c
(
minMA
,
maxMA
),
main
=
"Acceleration Z"
)
}
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