[chronojump] RaceAnalzyer export rownames of dist segments with decimal as comma when needed
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] RaceAnalzyer export rownames of dist segments with decimal as comma when needed
- Date: Mon, 14 Feb 2022 16:14:02 +0000 (UTC)
commit 1999ba7a39f8e123bdee6a33ae8a5deb2571312a
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Feb 14 17:13:31 2022 +0100
RaceAnalzyer export rownames of dist segments with decimal as comma when needed
r-scripts/sprintEncoder.R | 2 +-
r-scripts/sprintPhotocells.R | 2 +-
r-scripts/sprintUtil.R | 12 +++++++++---
src/gui/app1/chronojump.cs | 6 ------
4 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/r-scripts/sprintEncoder.R b/r-scripts/sprintEncoder.R
index d969cf3b7..774585ad7 100644
--- a/r-scripts/sprintEncoder.R
+++ b/r-scripts/sprintEncoder.R
@@ -796,7 +796,7 @@ testEncoderCJ <- function(filename, filenameInstantaneous, testLength, splitLeng
plotStartDetection = TRUE)
#splitPositionAll is NULL on (op$singleOrMultiple == "TRUE")
- exportRow = exportSprintDynamicsPrepareRow(sprintFittedDynamics, sprintRawDynamics$splitTime,
sprintRawDynamics$splitPosition, splitPositionAll)
+ exportRow = exportSprintDynamicsPrepareRow(sprintFittedDynamics, sprintRawDynamics$splitTime,
sprintRawDynamics$splitPosition, splitPositionAll, op$decimalCharAtExport == ",")
if(filenameInstantaneous != "")
{
diff --git a/r-scripts/sprintPhotocells.R b/r-scripts/sprintPhotocells.R
index 086ea063a..e59b42566 100644
--- a/r-scripts/sprintPhotocells.R
+++ b/r-scripts/sprintPhotocells.R
@@ -264,7 +264,7 @@ drawSprintFromPhotocells <- function(sprintDynamics, splitTimes, positions, titl
paste("pmax =", round(sprintDynamics$pmax.rel.fitted, digits = 2), "W/kg")),
text.col = c("black", "black", "black", "magenta", "blue", "red"))
- return (exportSprintDynamicsPrepareRow(sprintDynamics, splitTimes, positions, NULL))
+ return (exportSprintDynamicsPrepareRow(sprintDynamics, splitTimes, positions, NULL,
op$decimalCharAtExport == ","))
}
testPhotocellsCJ <- function(positions, splitTimes, mass, personHeight, tempC, personName)
diff --git a/r-scripts/sprintUtil.R b/r-scripts/sprintUtil.R
index 893a6761a..e4b61eaaa 100644
--- a/r-scripts/sprintUtil.R
+++ b/r-scripts/sprintUtil.R
@@ -99,7 +99,7 @@ getDynamicsFromSprint <- function(K, Vmax, Mass, T0 = 0, Temperature = 25, Heigh
p.fitted = p.fitted ))
}
-exportSprintDynamicsPrepareRow <- function(sprintDynamics, splitTime, splitPosition, splitPositionAll)
+exportSprintDynamicsPrepareRow <- function(sprintDynamics, splitTime, splitPosition, splitPositionAll,
decimalIsComma)
{
splits = NULL
@@ -109,7 +109,10 @@ exportSprintDynamicsPrepareRow <- function(sprintDynamics, splitTime, splitPosit
if(is.null(splitPositionAll))
{
splits = as.list(splitTime)
- names(splits) = paste(splitPosition, "m", sep="")
+ if(decimalIsComma)
+ names(splits) = gsub("\\.",",",paste(splitPosition, "m", sep=""))
+ else
+ names(splits) = paste(splitPosition, "m", sep="")
} else
{
splitTimeVector = NULL
@@ -125,7 +128,10 @@ exportSprintDynamicsPrepareRow <- function(sprintDynamics, splitTime, splitPosit
}
splits = as.list(splitTimeVector)
- names(splits) = paste(splitPositionAll, "m", sep="")
+ if(decimalIsComma)
+ names(splits) = gsub("\\.",",",paste(splitPositionAll, "m", sep=""))
+ else
+ names(splits) = paste(splitPositionAll, "m", sep="")
}
#print("exportSprintDynamicsPrepareRow names(splits):")
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 87eed3b03..17ddfb890 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -1,9 +1,3 @@
-
-
-//canviar segmentM també a R, que pilli cm. en el update sql si segmentM és < 10, passar-ho a cm
(multiplicar per 100) o mirar si hi ha una millor manera de resoldre-ho
-//provar també el exportFiles
-
-
/*
//La camera 1 va mes rapid que la 0, provar de canviar i activatr primer la 1 a veure que tal
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]