[chronojump] Encoder analyzer: Final improvements to Load - Speed (with M0)
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Encoder analyzer: Final improvements to Load - Speed (with M0)
- Date: Tue, 18 Oct 2022 17:37:53 +0000 (UTC)
commit 1c2ef634ef1d630cb1cd66482040d593a83d0973
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Oct 18 19:36:26 2022 +0200
Encoder analyzer: Final improvements to Load - Speed (with M0)
encoder/graph.R | 10 +++++-----
src/gui/app1/encoder.cs | 7 +++----
2 files changed, 8 insertions(+), 9 deletions(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index f73befae1..f7d955fa3 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -2064,7 +2064,6 @@ paintCrossVariables <- function (paf, varX, varY, option,
}
else {
#is "Force,Power" but using Force to have less problems, or
- #is "Load,Power" but using Load to have less problems
if(varX == "Speed" && (varY == "Force" || varY == "Load"))
{
fit = lm(y ~ x)
@@ -2093,12 +2092,13 @@ paintCrossVariables <- function (paf, varX, varY, option,
#draw points and mtext
points(V0,0,col="darkgreen")
points(0,F0,col="blue")
- text(x=V0, y=0, paste("V0=", round(V0,2), "m/s", sep=""),
col="darkgreen", pos = 3)
+ text(x=V0, y=0, paste("V0 = ", round(V0,2), " m/s", sep=""),
col="darkgreen", pos = 3)
if(varY == "Force")
{
- text(x=0, y=F0, paste("F0=", round(F0,2), "N",
sep=""), col="blue", pos = 4)
+ text(x=0, y=F0, paste("F0 = ", round(F0,2), " N",
sep=""), col="blue", pos = 4)
} else { #(varY == "Load")
- text(x=0, y=F0, paste("L0=", round(F0,2), "Kg",
sep=""), col="blue", pos = 4)
+ text(x=0, y=F0, paste("L0 = ", round(F0,2), " Kg",
sep=""), col="blue", pos = 4)
+ text(x=V0*.25, y=F0*.25, paste("M0 (F0*V0/2) =\n",
round(F0*V0/2,2), " Kg*m/2", sep=""), col="black")
}
} else {
plot(x,y, xlab=varXut, ylab="", pch=pchVector,
col=colBalls,bg=bgBalls,cex=cexBalls,axes=F)
@@ -2155,7 +2155,7 @@ paintCrossVariables <- function (paf, varX, varY, option,
text.col = c("Blue", "darkgreen", "black"), cex = 1.3,
legend = c(paste("L0 = ", round(F0, digits = 0), "
Kg", sep = ""),
paste("V0 = ", round(V0, digits = 2), "
m/s", sep = ""),
- paste("Momentum = ", round(F0*V0/2, digits
= 2), " Kg*m/s", sep = "")
+ paste("M0 = ", round(F0*V0/2, digits = 2),
" Kg*m/s", sep = "")
#,paste("Load = ", round(optimLoad,
digits=1), "Kg", sep = "")),
))
}
diff --git a/src/gui/app1/encoder.cs b/src/gui/app1/encoder.cs
index aeaa9a6b8..c0f891a0f 100644
--- a/src/gui/app1/encoder.cs
+++ b/src/gui/app1/encoder.cs
@@ -3549,14 +3549,13 @@ public partial class ChronoJumpWindow
crossName == "Pmax(F0,V0)" ||
crossName == "(Speed,Power) - Load" ||
crossName == "(Force,Power) - Speed"||
- crossName == "(Load,Power) - Speed"||
+ crossName == "Load - Speed"||
crossName == "Power - Speed" )
{
if(crossName == "Pmax(F0,V0)")
analysisVariables = "Pmax(F0,V0);Pmax(F0,V0)"; //this is not used but
we want to preserve chunks between ';'
else {
//convert: "(Force,Power) - Speed" in: "(Force,Power);Speed;mean"
- //convert: "(Load,Power) - Speed" in: "(Load,Power);Speed;mean"
string [] crossNameFull = crossName.Split(new char[] {' '});
//remove the '(', ')'
@@ -4840,7 +4839,7 @@ public partial class ChronoJumpWindow
"Pmax(F0,V0)",
"(Speed,Power) - Load",
"(Force,Power) - Speed",
- "(Load,Power) - Speed",
+ "Load - Speed",
"Power - Speed"
};
comboAnalyzeCrossOptionsTranslated = new string [] {
@@ -4850,7 +4849,7 @@ public partial class ChronoJumpWindow
"Pmax(F0,V0)", //will not be translated
Catalog.GetString ("(Speed,Power) - Load"),
Catalog.GetString ("(Force,Power) - Speed"),
- Catalog.GetString ("(Load,Power) - Speed"),
+ Catalog.GetString ("Load - Speed"),
Catalog.GetString ("Power - Speed")
}; //if added more, change the int in the 'for' below
encoderAnalyzeCrossTranslation = new String [comboAnalyzeCrossOptions.Length];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]