[chronojump] Better message on SprintEncoder analyze when no enough accel or no sprint
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Better message on SprintEncoder analyze when no enough accel or no sprint
- Date: Wed, 20 Jul 2022 07:37:59 +0000 (UTC)
commit 8d0b4ada56a5f933c143acb2c740b0784d06b5ca
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Jul 20 09:37:32 2022 +0200
Better message on SprintEncoder analyze when no enough accel or no sprint
r-scripts/sprintEncoder.R | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/r-scripts/sprintEncoder.R b/r-scripts/sprintEncoder.R
index d063548b1..2fee11933 100644
--- a/r-scripts/sprintEncoder.R
+++ b/r-scripts/sprintEncoder.R
@@ -183,13 +183,13 @@ getSprintFromEncoder <- function(filename, testLength, Mass, Temperature = 25, H
#plot error if no enough acceleration
if(trimmingSamples$start == -1 & trimmingSamples$end == -1)
{
- plot(position, type = "l", ylab = "Position (m)")
- text(x = length(position)/2, y = max(position)/2,
- labels = "The capture has not enough accel", cex = 2, pos = 3)
- text(x = length(position)/2, y = max(position)/3,
- labels = paste("Max raw detected accel: ", round(max(accel),2), "\nMinimum raw accel
needed: ", startAccel), cex = 2, pos = 3)
- text(x = length(position)/2, y = max(position)/4,
- labels = "or does not seem a sprint", cex = 2, pos = 3)
+ plot(position, type = "n", ylab = "Position (m)")
+ text(x = length(position)/2, y = max(position) * .75,
+ labels = "The capture has not enough accel", cex = 2)
+ text(x = length(position)/2, y = max(position) *.5,
+ labels = paste("Max raw detected accel: ", round(max(accel),2), "\nMinimum raw accel
needed: ", startAccel), cex = 2)
+ text(x = length(position)/2, y = max(position) * .25,
+ labels = "or does not seem a sprint", cex = 2)
print("Capture has not enough accel")
return(list(longEnough = longEnough, regressionDone = FALSE))
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]