Commit 2c47b20f authored by jlopez's avatar jlopez
Browse files

Add check if no acceleration

parent 21743293
......@@ -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")
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment