[chronojump] gui/cairo/jumpsWeightFVProfile.cs show F0, V0, Pmax



commit 7693feb3a3367179379030d6332696beecade95e
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Jul 21 12:21:33 2020 +0200

    gui/cairo/jumpsWeightFVProfile.cs show F0, V0, Pmax

 src/gui/cairo/jumpsWeightFVProfile.cs | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/src/gui/cairo/jumpsWeightFVProfile.cs b/src/gui/cairo/jumpsWeightFVProfile.cs
index 55f4949f..5a20e353 100644
--- a/src/gui/cairo/jumpsWeightFVProfile.cs
+++ b/src/gui/cairo/jumpsWeightFVProfile.cs
@@ -92,9 +92,20 @@ public class JumpsWeightFVProfileGraph : CairoXY
 
        protected override void writeTitle()
        {
-               writeTextAtRight(-5, title, true);
-               writeTextAtRight(-4, "FV Profile", false);
-               //writeTextAtRight(-3, "Jumptype: " + jumpType, false);
-               writeTextAtRight(-2, date, false);
+               int ypos = -6;
+
+               writeTextAtRight(ypos++, title, true);
+               writeTextAtRight(ypos++, "FV Profile", false);
+               writeTextAtRight(ypos++, date, false);
+
+               double f0 = intercept;
+               double v0 = -f0 / slope;
+               double pmax = (f0 * v0) /4;
+
+               ypos++;
+               writeTextAtRight(ypos++, string.Format("F0: {0} N", Math.Round(f0,2)), false);
+               writeTextAtRight(ypos++, string.Format("V0: {0} m/s", Math.Round(v0,2)), false);
+               writeTextAtRight(ypos++, string.Format("Pmax: {0} W", Math.Round(pmax,1)), false);
+//             writeTextAtRight(ypos++, "Imbalance: ?", false);
        }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]