[chronojump] Fixed force on extra weight jumps on jumpsWeightFVProfile
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixed force on extra weight jumps on jumpsWeightFVProfile
- Date: Tue, 21 Jul 2020 16:32:50 +0000 (UTC)
commit 2a43bed9e62c7047bde2023207e15d1026737d19
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Jul 21 18:16:29 2020 +0200
Fixed force on extra weight jumps on jumpsWeightFVProfile
src/jumpsWeightFVProfile.cs | 6 +++++-
src/util.cs | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/jumpsWeightFVProfile.cs b/src/jumpsWeightFVProfile.cs
index d4d3a2bb..bd6ccdb6 100644
--- a/src/jumpsWeightFVProfile.cs
+++ b/src/jumpsWeightFVProfile.cs
@@ -25,6 +25,8 @@ public class JumpsWeightFVProfile
{
private List<PointF> point_l;
LeastSquaresLine ls;
+ private double hp0; //meters
+ private double g = 9.81;
//constructor
public JumpsWeightFVProfile()
@@ -33,6 +35,8 @@ public class JumpsWeightFVProfile
public void Calculate (int personID, int sessionID, double personWeight, double trochanterToe, double
trochanterFloorOnFlexion)
{
+ hp0 = (trochanterToe - trochanterFloorOnFlexion) / 100.0;
+
//1 get data
List<Jump> jump_l = SqliteJump.SelectJumpsWeightFVProfile (personID, sessionID, false);
//TODO:true);
@@ -51,7 +55,7 @@ public class JumpsWeightFVProfile
//Samozino formula is F = m*g*( (h/hp0) +1)
//h is jump's height
//hp0 = trochanterToe - trochanterFloorOnFlexion
- double force = (personWeight + j.Weight) * 9.81 * ( (
Util.GetHeightInCentimeters(j.Tv) / (trochanterToe - trochanterFloorOnFlexion) ) + 1 );
+ double force = (personWeight + (personWeight * j.Weight / 100.0)) * 9.81 * ( (
Util.GetHeightInMeters(j.Tv) / hp0 ) + 1 );
point_l.Add(new PointF(
Util.GetInitialSpeed(j.Tv, true), //TODO: pass
preferences.metersSecondsPreferred and show it on graph label
diff --git a/src/util.cs b/src/util.cs
index e5fb6a2b..30773a93 100644
--- a/src/util.cs
+++ b/src/util.cs
@@ -472,9 +472,13 @@ public class Util
}
//new code (2019 ...) sends and returns doubles
public static double GetHeightInCentimeters (double tv) {
- // s = 4.9 * (tv/2)^2
+ // s = 100 * 4.9 * (tv/2)^2
return 100 * 4.9 * Math.Pow( tv / 2.0 , 2 );
}
+ public static double GetHeightInMeters (double tv) {
+ // s = 4.9 * (tv/2)^2
+ return 4.9 * Math.Pow( tv / 2.0 , 2 );
+ }
public static double WeightFromKgToPercent (double jumpKg, double personKg) {
return (double) jumpKg *100 / (double) personKg;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]