[chronojump] New feature: jumps asymmetry graph (bilateral & asymmetry) 90% done
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] New feature: jumps asymmetry graph (bilateral & asymmetry) 90% done
- Date: Fri, 23 Sep 2022 18:44:22 +0000 (UTC)
commit 611d0c80445aa5a407ab6f82e79c93355e9481fe
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Sep 23 20:43:37 2022 +0200
New feature: jumps asymmetry graph (bilateral & asymmetry) 90% done
glade/app1.glade | 409 +++++++++++++++++++++++++++++++++---
src/Makefile.am | 2 +
src/gui/app1/chronojump.cs | 21 +-
src/gui/app1/icons.cs | 4 +
src/gui/cairo/jumpsRunsEvolution.cs | 64 ++++++
src/gui/chronojumpImporter.cs | 1 +
src/sqlite/jump.cs | 51 ++++-
src/sqlite/main.cs | 1 +
8 files changed, 522 insertions(+), 31 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 6e2bdcfe8..6cba60d8f 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -17737,11 +17737,11 @@ Resisted race analyzer</property>
<widget class="GtkHBox"
id="hbox_radio_mode_contacts_analyze_buttons">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">20</property>
+ <property name="spacing">16</property>
<child>
<widget class="GtkHBox"
id="hbox_radio_mode_contacts_analyze_jump_simple_buttons">
<property name="can_focus">False</property>
- <property name="spacing">20</property>
+ <property name="spacing">16</property>
<child>
<widget class="GtkRadioButton"
id="radio_mode_contacts_jumps_profile">
<property name="visible">True</property>
@@ -17886,6 +17886,54 @@ Resisted race analyzer</property>
<property name="position">2</property>
</packing>
</child>
+ <child>
+ <widget class="GtkRadioButton"
id="radio_mode_contacts_jumps_asymmetry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property
name="receives_default">False</property>
+ <property name="relief">half</property>
+ <property name="draw_indicator">False</property>
+ <property
name="group">radio_mode_contacts_advanced</property>
+ <signal name="toggled"
handler="on_radio_mode_contacts_jumps_asymmetry_toggled" swapped="no"/>
+ <child>
+ <widget class="GtkHBox" id="hbox577">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">4</property>
+ <child>
+ <widget class="GtkImage"
id="image_tab_jumps_asymmetry">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property
name="stock">gtk-missing-image</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_mode_contacts_jumps_asymmetry">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Asymmetry</property>
+ <property name="justify">center</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
<child>
<widget class="GtkRadioButton"
id="radio_mode_contacts_jumps_evolution">
<property name="visible">True</property>
@@ -17931,7 +17979,7 @@ Resisted race analyzer</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">3</property>
+ <property name="position">4</property>
</packing>
</child>
</widget>
@@ -18144,7 +18192,7 @@ Resisted race analyzer</property>
<property name="show_tabs">False</property>
<property name="show_border">False</property>
<child>
- <widget class="GtkAlignment" id="alignment3">
+ <widget class="GtkAlignment" id="alignment_statistics">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="top_padding">6</property>
@@ -21390,7 +21438,7 @@ Concentric</property>
</packing>
</child>
<child>
- <widget class="GtkAlignment" id="alignment57">
+ <widget class="GtkAlignment"
id="alignment_jumps_weight_fv_profile">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="top_padding">6</property>
@@ -21610,6 +21658,282 @@ Concentric</property>
<property name="type">tab</property>
</packing>
</child>
+ <child>
+ <widget class="GtkAlignment"
id="alignment_jumps_asymmetry">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <child>
+ <widget class="GtkVBox" id="vbox_jumps_asymmetry">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">2</property>
+ <child>
+ <widget class="GtkHBox" id="hbox574">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">20</property>
+ <child>
+ <widget class="GtkVBox" id="vbox132">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">4</property>
+ <child>
+ <widget class="GtkRadioButton"
id="radio_jumps_asymmetry_bilateral">
+ <property name="label"
translatable="yes">Bilateral deficit</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property
name="receives_default">False</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled"
handler="on_radio_jumps_asymmetry_bilateral_toggled" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton"
id="radio_jumps_asymmetry_asymmetry">
+ <property name="label"
translatable="yes">Asymmetry</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property
name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ <property
name="group">radio_jumps_asymmetry_bilateral</property>
+ <signal name="toggled"
handler="on_radio_jumps_asymmetry_asymmetry_toggled" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkTable" id="table5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">4</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">4</property>
+ <child>
+ <widget class="GtkLabel" id="label282">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Jumps</property>
+ </widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox"
id="hbox_combo_select_jumps_asymmetry_bilateral">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox"
id="hbox_combo_select_jumps_asymmetry_1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox"
id="hbox_combo_select_jumps_asymmetry_2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_jumps_asymmetry_bilateral">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Bilateral</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label408">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Left</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label409">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Right</property>
+ </widget>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox576">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">4</property>
+ <child>
+ <widget class="GtkDrawingArea"
id="drawingarea_jumps_asymmetry">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <signal name="button_press_event"
handler="on_drawingarea_jumps_asymmetry_button_press_event" swapped="no"/>
+ <signal name="expose_event"
handler="on_drawingarea_jumps_asymmetry_expose_event" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox103">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkButton"
id="button_jumps_asymmetry_save_image">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip" translatable="yes">Save
image</property>
+ <child>
+ <widget class="GtkVBox" id="vbox104">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">4</property>
+ <child>
+ <widget class="GtkImage"
id="image_jumps_asymmetry_save">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property
name="stock">gtk-missing-image</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkImage"
id="image_forcesensor_analyze_image_save8">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property
name="stock">gtk-missing-image</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label281">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">jumps asymmetry</property>
+ </widget>
+ <packing>
+ <property name="position">4</property>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
<child>
<widget class="GtkAlignment" id="alignment59">
<property name="visible">True</property>
@@ -21771,7 +22095,7 @@ Concentric</property>
</child>
</widget>
<packing>
- <property name="position">4</property>
+ <property name="position">5</property>
</packing>
</child>
<child>
@@ -21781,7 +22105,7 @@ Concentric</property>
<property name="label">jumps evolution</property>
</widget>
<packing>
- <property name="position">4</property>
+ <property name="position">5</property>
<property name="tab_fill">False</property>
<property name="type">tab</property>
</packing>
@@ -22169,7 +22493,7 @@ Concentric</property>
</child>
</widget>
<packing>
- <property name="position">5</property>
+ <property name="position">6</property>
</packing>
</child>
<child>
@@ -22179,7 +22503,7 @@ Concentric</property>
<property name="label">jump_rj</property>
</widget>
<packing>
- <property name="position">5</property>
+ <property name="position">6</property>
<property name="tab_fill">False</property>
<property name="type">tab</property>
</packing>
@@ -22374,7 +22698,7 @@ Concentric</property>
</child>
</widget>
<packing>
- <property name="position">6</property>
+ <property name="position">7</property>
</packing>
</child>
<child>
@@ -22384,7 +22708,7 @@ Concentric</property>
<property name="label">runs evolution</property>
</widget>
<packing>
- <property name="position">6</property>
+ <property name="position">7</property>
<property name="tab_fill">False</property>
<property name="type">tab</property>
</packing>
@@ -23313,7 +23637,7 @@ Concentric</property>
</child>
</widget>
<packing>
- <property name="position">7</property>
+ <property name="position">8</property>
</packing>
</child>
<child>
@@ -23323,7 +23647,7 @@ Concentric</property>
<property name="label">Sprint</property>
</widget>
<packing>
- <property name="position">7</property>
+ <property name="position">8</property>
<property name="tab_fill">False</property>
<property name="type">tab</property>
</packing>
@@ -26767,6 +27091,15 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -29923,7 +30256,7 @@ Concentric</property>
</child>
</widget>
<packing>
- <property name="position">8</property>
+ <property name="position">9</property>
</packing>
</child>
<child>
@@ -29933,7 +30266,7 @@ Concentric</property>
<property name="label">force sensor</property>
</widget>
<packing>
- <property name="position">8</property>
+ <property name="position">9</property>
<property name="tab_fill">False</property>
<property name="type">tab</property>
</packing>
@@ -31425,7 +31758,7 @@ Concentric</property>
</child>
</widget>
<packing>
- <property name="position">9</property>
+ <property name="position">10</property>
</packing>
</child>
<child>
@@ -31435,7 +31768,7 @@ Concentric</property>
<property name="label">raceencoder</property>
</widget>
<packing>
- <property name="position">9</property>
+ <property name="position">10</property>
<property name="tab_fill">False</property>
<property name="type">tab</property>
</packing>
@@ -33566,6 +33899,18 @@ Concentric</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
+ <widget class="GtkLabel"
id="label_video_encoder_tests_will_be_filmed">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Tests
will be filmed</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
<widget class="GtkHBox"
id="hbox_video_encoder_capturing">
<property name="can_focus">False</property>
<property name="spacing">4</property>
@@ -33602,18 +33947,6 @@ Concentric</property>
</packing>
</child>
<child>
- <widget class="GtkLabel"
id="label_video_encoder_tests_will_be_filmed">
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Tests
will be filmed</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
<widget class="GtkHBox"
id="hbox_video_encoder_no_capturing">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -43076,6 +43409,15 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -51170,6 +51512,15 @@ Since Chronojump 2.1.3, backups contain the complete data.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
diff --git a/src/Makefile.am b/src/Makefile.am
index 38e161118..ca7d249fa 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -10,6 +10,7 @@ SOURCES = \
gui/app1/chronojumpPersons.cs\
gui/app1/encoder.cs\
gui/app1/icons.cs\
+ gui/app1/jumpsAsymmetry.cs\
gui/app1/jumpsProfile.cs\
gui/app1/jumpsDjOptimalFall.cs\
gui/app1/jumpsRunsEvolution.cs\
@@ -217,6 +218,7 @@ SOURCES = \
json/compujumpOther.cs\
json/exhibitions.cs\
jump.cs\
+ jumpsAsymmetry.cs\
jumpsProfile.cs\
jumpsDjOptimalFall.cs\
jumpsRunsEvolution.cs\
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index b713b846c..29ad26aaa 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -136,6 +136,7 @@ public partial class ChronoJumpWindow
[Widget] Gtk.RadioButton radio_mode_contacts_jumps_profile;
[Widget] Gtk.RadioButton radio_mode_contacts_jumps_dj_optimal_fall;
[Widget] Gtk.RadioButton radio_mode_contacts_jumps_weight_fv_profile;
+ [Widget] Gtk.RadioButton radio_mode_contacts_jumps_asymmetry;
[Widget] Gtk.RadioButton radio_mode_contacts_jumps_evolution;
[Widget] Gtk.RadioButton radio_mode_contacts_jumps_rj_fatigue;
[Widget] Gtk.RadioButton radio_mode_contacts_runs_evolution;
@@ -515,7 +516,7 @@ public partial class ChronoJumpWindow
private enum notebook_start_pages { PROGRAM, SENDLOG, EXITCONFIRM, SOCIALNETWORKPOLL }
private enum notebook_sup_pages { START, CONTACTS, ENCODER, SESSION, NETWORKSPROBLEMS, HELP, NEWS,
MICRODISCOVER }
private enum notebook_contacts_execute_or_pages { EXECUTE, INSTRUCTIONS, FORCESENSORADJUST,
RACEINSPECTOR }
- private enum notebook_analyze_pages { STATISTICS, JUMPSPROFILE, JUMPSDJOPTIMALFALL,
JUMPSWEIGHTFVPROFILE, JUMPSEVOLUTION, JUMPSRJFATIGUE,
+ private enum notebook_analyze_pages { STATISTICS, JUMPSPROFILE, JUMPSDJOPTIMALFALL,
JUMPSWEIGHTFVPROFILE, JUMPSASYMMETRY, JUMPSEVOLUTION, JUMPSRJFATIGUE,
RUNSEVOLUTION, SPRINT, FORCESENSOR, RACEENCODER }
private string runningFileName; //useful for knowing if there are two chronojump instances
@@ -686,6 +687,7 @@ public partial class ChronoJumpWindow
createComboSelectJumps(true);
createComboSelectJumpsDjOptimalFall(true);
createComboSelectJumpsWeightFVProfile(true);
+ createComboSelectJumpsAsymmetry(true);
createComboSelectJumpsEvolution(true);
createComboSelectJumpsRj(true);
createComboSelectJumpsRjFatigue(true);
@@ -1410,6 +1412,8 @@ public partial class ChronoJumpWindow
jumpsDjOptimalFallDo(true); //calculate data
else if(notebook_analyze.CurrentPage ==
Convert.ToInt32(notebook_analyze_pages.JUMPSWEIGHTFVPROFILE))
jumpsWeightFVProfileDo(true); //calculate data
+ else if(notebook_analyze.CurrentPage ==
Convert.ToInt32(notebook_analyze_pages.JUMPSASYMMETRY))
+ jumpsAsymmetryDo(true); //calculate data
else if(notebook_analyze.CurrentPage ==
Convert.ToInt32(notebook_analyze_pages.JUMPSEVOLUTION))
jumpsEvolutionDo(true); //calculate data
}
@@ -7247,6 +7251,7 @@ LogB.Debug("mc finished 5");
createComboSelectJumps(false);
createComboSelectJumpsDjOptimalFall(false);
createComboSelectJumpsWeightFVProfile(false);
+ createComboSelectJumpsAsymmetry(false);
createComboSelectJumpsEvolution(false);
pre_fillTreeView_jumps(false);
@@ -8217,6 +8222,12 @@ LogB.Debug("mc finished 5");
jumpsWeightFVProfileDo(true);
}
+ if(radio_mode_contacts_jumps_asymmetry.Active)
+ {
+ notebook_analyze.CurrentPage =
Convert.ToInt32(notebook_analyze_pages.JUMPSASYMMETRY);
+ jumpsAsymmetryDo(true);
+ }
+
if(radio_mode_contacts_jumps_evolution.Active)
{
notebook_analyze.CurrentPage =
Convert.ToInt32(notebook_analyze_pages.JUMPSEVOLUTION);
@@ -8281,6 +8292,14 @@ LogB.Debug("mc finished 5");
jumpsWeightFVProfileDo(true);
}
}
+ private void on_radio_mode_contacts_jumps_asymmetry_toggled (object o, EventArgs args)
+ {
+ if (radio_mode_contacts_jumps_asymmetry.Active)
+ {
+ notebook_analyze.CurrentPage = Convert.ToInt32(notebook_analyze_pages.JUMPSASYMMETRY);
+ jumpsAsymmetryDo(true);
+ }
+ }
private void on_radio_mode_contacts_jumps_evolution_toggled (object o, EventArgs args)
{
if(radio_mode_contacts_jumps_evolution.Active)
diff --git a/src/gui/app1/icons.cs b/src/gui/app1/icons.cs
index 4b7a140d0..b73780b8a 100644
--- a/src/gui/app1/icons.cs
+++ b/src/gui/app1/icons.cs
@@ -266,6 +266,7 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Image image_forcesensor_analyze_image_save5;
[Widget] Gtk.Image image_forcesensor_analyze_image_save6;
[Widget] Gtk.Image image_forcesensor_analyze_image_save7;
+ [Widget] Gtk.Image image_forcesensor_analyze_image_save8;
[Widget] Gtk.Image image_force_sensor_analyze_table_save;
[Widget] Gtk.Image image_force_sensor_analyze_table_save_1;
[Widget] Gtk.Image image_run_encoder_analyze_table_save;
@@ -694,6 +695,7 @@ public partial class ChronoJumpWindow
extra_window_jumps_rj_image_weight.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"extra-mass.png");
image_tab_jumps_weight_fv_profile.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"jumps-fv.png");
+ image_tab_jumps_asymmetry.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
"laterality-both.png");
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "line_session_avg.png");
@@ -858,6 +860,7 @@ public partial class ChronoJumpWindow
image_jumps_profile_save.Pixbuf = pixbuf;
image_jumps_dj_optimal_fall_save.Pixbuf = pixbuf;
image_jumps_weight_fv_profile_save.Pixbuf = pixbuf;
+ image_jumps_asymmetry_save.Pixbuf = pixbuf;
image_jumps_evolution_save.Pixbuf = pixbuf;
image_runs_evolution_save.Pixbuf = pixbuf;
image_jumps_rj_fatigue_save.Pixbuf = pixbuf;
@@ -888,6 +891,7 @@ public partial class ChronoJumpWindow
image_forcesensor_analyze_image_save5.Pixbuf = pixbuf;
image_forcesensor_analyze_image_save6.Pixbuf = pixbuf;
image_forcesensor_analyze_image_save7.Pixbuf = pixbuf;
+ image_forcesensor_analyze_image_save8.Pixbuf = pixbuf;
image_runs_evolution_analyze_image_save.Pixbuf = pixbuf;
image_force_sensor_analyze_table_save_1.Pixbuf = pixbuf;
image_button_contacts_run_encoder_capture_save_image_disk.Pixbuf = pixbuf;
diff --git a/src/gui/cairo/jumpsRunsEvolution.cs b/src/gui/cairo/jumpsRunsEvolution.cs
index d9707bc7b..b2bc2ac87 100644
--- a/src/gui/cairo/jumpsRunsEvolution.cs
+++ b/src/gui/cairo/jumpsRunsEvolution.cs
@@ -239,4 +239,68 @@ public class RunsEvolutionGraph : EvolutionGraph
writeTextAtRight(ypos++, runTypeStr + " " + runType, false);
writeTextAtRight(ypos++, date, false);
}
+
+}
+
+public class JumpsAsymmetryGraph : EvolutionGraph //to inherit paintGridDatetime()
+{
+ //constructor when there are no points
+ public JumpsAsymmetryGraph (DrawingArea area, string jumpType, string font)
+ {
+ this.area = area;
+
+ initGraph(font, .8);
+
+ g.SetFontSize(16);
+ printText(area.Allocation.Width /2, area.Allocation.Height /2, 24, textHeight,
+ needToExecuteJumpsStr + " " + jumpType + ".", g, alignTypes.CENTER);
+
+ endGraphDisposing(g, surface, area.GdkWindow);
+ }
+
+ //regular constructor
+ public JumpsAsymmetryGraph (
+ List<PointF> point_l, List<DateTime> dates_l,
+ double slope, double intercept,
+ DrawingArea area, string title,
+ string jumpType,
+ string date,
+ bool showTime, bool metersSecondsPreferred)
+ {
+ this.point_l = point_l;
+ this.dates_l = dates_l;
+ this.slope = slope;
+ this.intercept = intercept;
+ this.area = area;
+ this.title = title;
+ this.jumpType = jumpType;
+ this.date = date;
+ this.colorBackground = colorFromGdk(Config.ColorBackground); //but note if we are using
system colors, this will not match
+
+ xVariable = dateStr;
+ yVariable = "Index";
+
+ xUnits = "";
+ yUnits = "";
+
+ area.AddEvents((int) Gdk.EventMask.ButtonPressMask); //to have mouse clicks
+ mouseX = -1;
+ mouseY = -1;
+ }
+
+ //on jumpsAsymmetry is overrided and only prints time
+ protected override string printXDateTime (DateTime dt)
+ {
+ return (dt.ToShortDateString ());
+ }
+
+ protected override void writeTitle()
+ {
+ int ypos = -6;
+
+ //writeTextAtRight(ypos++, title, true);
+ //writeTextAtRight(ypos++, runTypeStr + " " + runType, false);
+ //writeTextAtRight(ypos++, date, false);
+ }
+
}
diff --git a/src/gui/chronojumpImporter.cs b/src/gui/chronojumpImporter.cs
index 2c30937ea..f46675fb8 100644
--- a/src/gui/chronojumpImporter.cs
+++ b/src/gui/chronojumpImporter.cs
@@ -169,6 +169,7 @@ public partial class ChronoJumpWindow
createComboSelectJumpsDjOptimalFall(false);
createComboSelectJumpsWeightFVProfile(false);
+ createComboSelectJumpsAsymmetry(false);
createComboSelectJumpsEvolution(false);
createComboSelectJumpsRjFatigue(false);
//createComboSelectJumpsRjFatigueNum(false); do not need because will be updated by
createComboSelectJumpsRjFatigue
diff --git a/src/sqlite/jump.cs b/src/sqlite/jump.cs
index aa8564d5b..6c02e3005 100644
--- a/src/sqlite/jump.cs
+++ b/src/sqlite/jump.cs
@@ -15,7 +15,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * Copyright (C) 2004-2020 Xavier de Blas <xaviblas gmail com>
+ * Copyright (C) 2004-2022 Xavier de Blas <xaviblas gmail com>
*/
using System;
@@ -272,6 +272,55 @@ class SqliteJump : Sqlite
return jmp_l;
}
+ /* returns:
+ 2022-09-20|CMJ|0.427596
+ 2022-09-20|SJ|0.456648
+ 2022-09-19|CMJ|0.733992
+ */
+ //TODO: if no date, select the session date
+ public static List<SqliteStruct.DateTypeResult> SelectJumpsStatsByDay (int pID, List<string> jumps_l,
StatType statType)
+ {
+ List<SqliteStruct.DateTypeResult> list = new List<SqliteStruct.DateTypeResult> ();
+ if (jumps_l.Count == 0)
+ return list;
+
+ Sqlite.Open();
+
+ //jumps previous to DB 1.82 have no datetime on jump
+ //find session datetime for that jumps
+ //List<Session> session_l = SqliteSession.SelectAll(true, Sqlite.Orders_by.DEFAULT);
+
+ string jumpTypes = "";
+ string orStr = "";
+ foreach (string str in jumps_l)
+ {
+ jumpTypes += orStr + string.Format ("type='{0}'", str);
+ orStr = " OR ";
+ }
+
+ dbcmd.CommandText = string.Format ("SELECT SUBSTR(datetime, 1, 10) AS day, type, {0}(tv) FROM
jump WHERE ({1}) AND personID={2} GROUP BY day, type ORDER BY day desc, type",
+ statType, jumpTypes, pID);
+
+ LogB.SQL(dbcmd.CommandText.ToString());
+ dbcmd.ExecuteNonQuery();
+
+ SqliteDataReader reader;
+ reader = dbcmd.ExecuteReader();
+
+ //note DB 2.41 forces all old jump, jumpRj, run, runI to have datetime
+ while (reader.Read())
+ list.Add (new SqliteStruct.DateTypeResult (
+ reader[0].ToString (),
+ reader[1].ToString (),
+
Convert.ToDouble(Util.ChangeDecimalSeparator(reader[2].ToString ()))
+ ));
+
+ reader.Close ();
+ Sqlite.Close ();
+
+ return list;
+ }
+
public static Jump SelectJumpData(int uniqueID, bool dbconOpened)
{
if(!dbconOpened)
diff --git a/src/sqlite/main.cs b/src/sqlite/main.cs
index 6a09fa038..f98a99de6 100644
--- a/src/sqlite/main.cs
+++ b/src/sqlite/main.cs
@@ -105,6 +105,7 @@ class Sqlite
public enum UpdatingDBFromEnum { LOCAL, IMPORTED_SESSION }
public static UpdatingDBFromEnum UpdatingDBFrom;
+ public enum StatType { MAX, AVG }
public enum Orders_by { DEFAULT, ID_ASC, ID_DESC }
//for db creation
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]