[chronojump] IE, Arms Using Index, IRna, IRa calculated by heights as default (changeable on preferences)



commit 279a556185fe9fffa097db2137e68875a85360e0
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Jul 15 16:30:48 2014 +0200

    IE, Arms Using Index, IRna, IRa calculated by heights as default (changeable on preferences)

 glade/chronojump.glade          |  908 +++++++++++++++++++++++++++------------
 src/gui/chronojump.cs           |    9 +-
 src/gui/preferences.cs          |   15 +-
 src/gui/report.cs               |    3 +-
 src/gui/stats.cs                |    3 +-
 src/report.cs                   |    8 +
 src/sqlite/main.cs              |   14 +-
 src/sqlite/preferences.cs       |    1 +
 src/sqlite/stat.cs              |   28 +-
 src/statType.cs                 |   18 +-
 src/stats/graphs/jumpIndexes.cs |   15 +-
 src/stats/jumpIndexes.cs        |   16 +-
 src/stats/main.cs               |    2 +
 13 files changed, 740 insertions(+), 300 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index b898b22..291f8c7 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -6185,6 +6185,9 @@ Second Chronopic to platforms.</property>
                                                         <child>
                                                           <placeholder/>
                                                         </child>
+                                                        <child>
+                                                          <placeholder/>
+                                                        </child>
                                                       </widget>
                                                       <packing>
                                                         <property name="expand">True</property>
@@ -6786,6 +6789,9 @@ Second Chronopic to platforms.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             </child>
                                                             <child>
@@ -7521,6 +7527,9 @@ Second Chronopic to platforms.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="position">2</property>
@@ -8015,6 +8024,9 @@ Second Chronopic to platforms.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="position">4</property>
@@ -17278,6 +17290,9 @@ by you</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -17680,6 +17695,9 @@ by you</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -18498,6 +18516,12 @@ by you</property>
             <child>
               <placeholder/>
             </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
           </widget>
           <packing>
             <property name="expand">True</property>
@@ -25970,6 +25994,24 @@ options</property>
                             <child>
                               <placeholder/>
                             </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
                           </widget>
                         </child>
                       </widget>
@@ -27762,6 +27804,9 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
                                 <child>
                                   <placeholder/>
                                 </child>
+                                <child>
+                                  <placeholder/>
+                                </child>
                               </widget>
                             </child>
                           </widget>
@@ -28223,6 +28268,9 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -28568,317 +28616,630 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
                       <widget class="GtkViewport" id="viewport1">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
+                        <property name="shadow_type">none</property>
                         <child>
-                          <widget class="GtkVBox" id="vbox122">
+                          <widget class="GtkVBox" id="vbox11">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="border_width">8</property>
                             <property name="spacing">8</property>
                             <child>
-                              <widget class="GtkCheckButton" id="checkbutton_height">
-                                <property name="label" translatable="yes">Show height</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="use_underline">True</property>
-                                <property name="draw_indicator">True</property>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkHBox" id="hbox1">
+                              <widget class="GtkFrame" id="frame4">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
-                                <property name="spacing">8</property>
+                                <property name="label_xalign">0</property>
+                                <property name="label_yalign">0.69999998807907104</property>
+                                <property name="shadow_type">out</property>
                                 <child>
-                                  <widget class="GtkCheckButton" id="checkbutton_power">
-                                    <property name="label" translatable="yes">Show power</property>
+                                  <widget class="GtkAlignment" id="alignment4">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="use_underline">True</property>
-                                    <property name="draw_indicator">True</property>
-                                    <signal name="clicked" handler="on_checkbutton_power_clicked" 
swapped="no"/>
+                                    <property name="can_focus">False</property>
+                                    <property name="top_padding">6</property>
+                                    <property name="left_padding">12</property>
+                                    <child>
+                                      <widget class="GtkVBox" id="vbox122">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="border_width">8</property>
+                                        <property name="spacing">8</property>
+                                        <child>
+                                          <widget class="GtkTable" id="table4">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="n_rows">2</property>
+                                            <property name="n_columns">2</property>
+                                            <property name="column_spacing">8</property>
+                                            <property name="row_spacing">8</property>
+                                            <child>
+                                              <widget class="GtkCheckButton" id="checkbutton_height">
+                                                <property name="label" translatable="yes">Height</property>
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="use_underline">True</property>
+                                                <property name="draw_indicator">True</property>
+                                              </widget>
+                                            </child>
+                                            <child>
+                                              <widget class="GtkHBox" id="hbox1">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="spacing">8</property>
+                                                <child>
+                                                  <widget class="GtkCheckButton" id="checkbutton_power">
+                                                    <property name="label" 
translatable="yes">Power</property>
+                                                    <property name="visible">True</property>
+                                                    <property name="can_focus">True</property>
+                                                    <property name="receives_default">False</property>
+                                                    <property name="use_underline">True</property>
+                                                    <property name="draw_indicator">True</property>
+                                                    <signal name="clicked" 
handler="on_checkbutton_power_clicked" swapped="no"/>
+                                                  </widget>
+                                                  <packing>
+                                                    <property name="expand">False</property>
+                                                    <property name="fill">False</property>
+                                                    <property name="position">0</property>
+                                                  </packing>
+                                                </child>
+                                                <child>
+                                                  <widget class="GtkButton" id="button_help_power">
+                                                    <property name="label">gtk-help</property>
+                                                    <property name="visible">True</property>
+                                                    <property name="can_focus">True</property>
+                                                    <property name="receives_default">True</property>
+                                                    <property name="use_stock">True</property>
+                                                    <signal name="clicked" 
handler="on_button_help_power_clicked" swapped="no"/>
+                                                  </widget>
+                                                  <packing>
+                                                    <property name="expand">False</property>
+                                                    <property name="fill">True</property>
+                                                    <property name="position">1</property>
+                                                  </packing>
+                                                </child>
+                                              </widget>
+                                              <packing>
+                                                <property name="left_attach">1</property>
+                                                <property name="right_attach">2</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <widget class="GtkCheckButton" id="checkbutton_initial_speed">
+                                                <property name="label" translatable="yes">Initial 
speed</property>
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="use_underline">True</property>
+                                                <property name="draw_indicator">True</property>
+                                              </widget>
+                                              <packing>
+                                                <property name="top_attach">1</property>
+                                                <property name="bottom_attach">2</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <widget class="GtkCheckButton" id="checkbutton_angle">
+                                                <property name="label" translatable="yes">Knee 
angle</property>
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="use_underline">True</property>
+                                                <property name="draw_indicator">True</property>
+                                              </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>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkCheckButton" id="checkbutton_show_tv_tc_index">
+                                            <property name="label" translatable="yes">Indexes between TF and 
TC</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">False</property>
+                                            <property name="use_underline">True</property>
+                                            <property name="draw_indicator">True</property>
+                                            <signal name="clicked" 
handler="on_checkbutton_show_tv_tc_index_clicked" swapped="no"/>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkHBox" id="hbox_indexes">
+                                            <property name="can_focus">False</property>
+                                            <property name="spacing">6</property>
+                                            <child>
+                                              <widget class="GtkRadioButton" id="radiobutton_show_q_index">
+                                                <property name="label" translatable="yes">QIndex</property>
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="use_underline">True</property>
+                                                <property name="active">True</property>
+                                                <property name="draw_indicator">True</property>
+                                              </widget>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">False</property>
+                                                <property name="padding">12</property>
+                                                <property name="position">0</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <widget class="GtkRadioButton" id="radiobutton_show_dj_index">
+                                                <property name="label" translatable="yes">DjIndex</property>
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="use_underline">True</property>
+                                                <property name="draw_indicator">True</property>
+                                                <property name="group">radiobutton_show_q_index</property>
+                                              </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">2</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkAlignment" id="alignment5">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="top_padding">6</property>
+                                            <child>
+                                              <widget class="GtkTable" id="table1">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="n_rows">3</property>
+                                                <property name="n_columns">3</property>
+                                                <property name="column_spacing">6</property>
+                                                <property name="row_spacing">6</property>
+                                                <child>
+                                                  <widget class="GtkLabel" id="label3">
+                                                    <property name="visible">True</property>
+                                                    <property name="can_focus">False</property>
+                                                    <property name="xalign">0</property>
+                                                    <property name="label" translatable="yes">On statistics
+show elevation as:</property>
+                                                  </widget>
+                                                  <packing>
+                                                    <property name="x_options">GTK_FILL</property>
+                                                  </packing>
+                                                </child>
+                                                <child>
+                                                  <widget class="GtkLabel" id="label5">
+                                                    <property name="visible">True</property>
+                                                    <property name="can_focus">False</property>
+                                                    <property name="xalign">0</property>
+                                                    <property name="label" translatable="yes">Speed 
units:</property>
+                                                  </widget>
+                                                  <packing>
+                                                    <property name="top_attach">1</property>
+                                                    <property name="bottom_attach">2</property>
+                                                    <property name="x_options">GTK_FILL</property>
+                                                  </packing>
+                                                </child>
+                                                <child>
+                                                  <widget class="GtkLabel" id="label21">
+                                                    <property name="visible">True</property>
+                                                    <property name="can_focus">False</property>
+                                                    <property name="xalign">0</property>
+                                                    <property name="label" translatable="yes">Weight 
units:</property>
+                                                  </widget>
+                                                  <packing>
+                                                    <property name="top_attach">2</property>
+                                                    <property name="bottom_attach">3</property>
+                                                    <property name="x_options">GTK_FILL</property>
+                                                  </packing>
+                                                </child>
+                                                <child>
+                                                  <widget class="GtkRadioButton" id="radio_elevation_height">
+                                                    <property name="label" translatable="yes">Height 
(cm)</property>
+                                                    <property name="visible">True</property>
+                                                    <property name="can_focus">True</property>
+                                                    <property name="receives_default">False</property>
+                                                    <property name="xalign">0</property>
+                                                    <property name="active">True</property>
+                                                    <property name="draw_indicator">True</property>
+                                                  </widget>
+                                                  <packing>
+                                                    <property name="left_attach">1</property>
+                                                    <property name="right_attach">2</property>
+                                                    <property name="x_options">GTK_FILL</property>
+                                                  </packing>
+                                                </child>
+                                                <child>
+                                                  <widget class="GtkRadioButton" id="radio_elevation_tf">
+                                                    <property name="label">TF (s)</property>
+                                                    <property name="visible">True</property>
+                                                    <property name="can_focus">True</property>
+                                                    <property name="receives_default">False</property>
+                                                    <property name="xalign">0</property>
+                                                    <property name="draw_indicator">True</property>
+                                                    <property name="group">radio_elevation_height</property>
+                                                  </widget>
+                                                  <packing>
+                                                    <property name="left_attach">2</property>
+                                                    <property name="right_attach">3</property>
+                                                    <property name="x_options">GTK_FILL</property>
+                                                  </packing>
+                                                </child>
+                                                <child>
+                                                  <widget class="GtkRadioButton" id="radio_speed_ms">
+                                                    <property name="label">m/s</property>
+                                                    <property name="visible">True</property>
+                                                    <property name="can_focus">True</property>
+                                                    <property name="receives_default">False</property>
+                                                    <property name="xalign">0</property>
+                                                    <property name="active">True</property>
+                                                    <property name="draw_indicator">True</property>
+                                                  </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>
+                                                    <property name="x_options">GTK_FILL</property>
+                                                  </packing>
+                                                </child>
+                                                <child>
+                                                  <widget class="GtkRadioButton" id="radio_speed_km">
+                                                    <property name="label">Km/h</property>
+                                                    <property name="visible">True</property>
+                                                    <property name="can_focus">True</property>
+                                                    <property name="receives_default">False</property>
+                                                    <property name="xalign">0</property>
+                                                    <property name="draw_indicator">True</property>
+                                                    <property name="group">radio_speed_ms</property>
+                                                  </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>
+                                                    <property name="x_options">GTK_FILL</property>
+                                                  </packing>
+                                                </child>
+                                                <child>
+                                                  <widget class="GtkRadioButton" id="radio_weight_percent">
+                                                    <property name="label">%</property>
+                                                    <property name="visible">True</property>
+                                                    <property name="can_focus">True</property>
+                                                    <property name="receives_default">False</property>
+                                                    <property name="xalign">0</property>
+                                                    <property name="active">True</property>
+                                                    <property name="draw_indicator">True</property>
+                                                  </widget>
+                                                  <packing>
+                                                    <property name="left_attach">1</property>
+                                                    <property name="right_attach">2</property>
+                                                    <property name="top_attach">2</property>
+                                                    <property name="bottom_attach">3</property>
+                                                    <property name="x_options">GTK_FILL</property>
+                                                  </packing>
+                                                </child>
+                                                <child>
+                                                  <widget class="GtkRadioButton" id="radio_weight_kg">
+                                                    <property name="label">Kg</property>
+                                                    <property name="visible">True</property>
+                                                    <property name="can_focus">True</property>
+                                                    <property name="receives_default">False</property>
+                                                    <property name="xalign">0</property>
+                                                    <property name="draw_indicator">True</property>
+                                                    <property name="group">radio_weight_percent</property>
+                                                  </widget>
+                                                  <packing>
+                                                    <property name="left_attach">2</property>
+                                                    <property name="right_attach">3</property>
+                                                    <property name="top_attach">2</property>
+                                                    <property name="bottom_attach">3</property>
+                                                    <property name="x_options">GTK_FILL</property>
+                                                  </packing>
+                                                </child>
+                                              </widget>
+                                            </child>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">3</property>
+                                          </packing>
+                                        </child>
+                                      </widget>
+                                    </child>
                                   </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">0</property>
-                                  </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkButton" id="button_help_power">
-                                    <property name="label">gtk-help</property>
+                                  <widget class="GtkLabel" id="label2">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">True</property>
-                                    <property name="use_stock">True</property>
-                                    <signal name="clicked" handler="on_button_help_power_clicked" 
swapped="no"/>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Show</property>
+                                    <property name="use_markup">True</property>
                                   </widget>
                                   <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">1</property>
+                                    <property name="type">label_item</property>
                                   </packing>
                                 </child>
                               </widget>
                               <packing>
                                 <property name="expand">False</property>
                                 <property name="fill">False</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkCheckButton" id="checkbutton_initial_speed">
-                                <property name="label" translatable="yes">Show initial speed</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="use_underline">True</property>
-                                <property name="draw_indicator">True</property>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkCheckButton" id="checkbutton_angle">
-                                <property name="label" translatable="yes">Show knee angle</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="use_underline">True</property>
-                                <property name="draw_indicator">True</property>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">3</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkCheckButton" id="checkbutton_show_tv_tc_index">
-                                <property name="label" translatable="yes">Show indexes between TF and 
TC</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="use_underline">True</property>
-                                <property name="draw_indicator">True</property>
-                                <signal name="clicked" handler="on_checkbutton_show_tv_tc_index_clicked" 
swapped="no"/>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">4</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkHBox" id="hbox_indexes">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="spacing">6</property>
-                                <child>
-                                  <widget class="GtkRadioButton" id="radiobutton_show_q_index">
-                                    <property name="label" translatable="yes">QIndex</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="use_underline">True</property>
-                                    <property name="active">True</property>
-                                    <property name="draw_indicator">True</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="padding">12</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkRadioButton" id="radiobutton_show_dj_index">
-                                    <property name="label" translatable="yes">DjIndex</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="use_underline">True</property>
-                                    <property name="draw_indicator">True</property>
-                                    <property name="group">radiobutton_show_q_index</property>
-                                  </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">True</property>
-                                <property name="position">5</property>
+                                <property name="position">0</property>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkTable" id="table1">
+                              <widget class="GtkFrame" id="frame5">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
-                                <property name="n_rows">3</property>
-                                <property name="n_columns">3</property>
-                                <property name="column_spacing">6</property>
-                                <property name="row_spacing">6</property>
-                                <child>
-                                  <widget class="GtkLabel" id="label2">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">On statistics
-show elevation as:</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="x_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
+                                <property name="label_xalign">0</property>
+                                <property name="label_yalign">0.69999998807907104</property>
+                                <property name="shadow_type">out</property>
                                 <child>
-                                  <widget class="GtkLabel" id="label3">
+                                  <widget class="GtkAlignment" id="alignment3">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">Speed units:</property>
+                                    <property name="top_padding">6</property>
+                                    <property name="left_padding">12</property>
+                                    <child>
+                                      <widget class="GtkVBox" id="vbox12">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="spacing">8</property>
+                                        <child>
+                                          <widget class="GtkLabel" id="label22">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="xalign">0</property>
+                                            <property name="label" translatable="yes">How to calculate these 
statistics:</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkHBox" id="hbox7">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <child>
+                                              <widget class="GtkLabel" id="label23">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label">IE</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="label32">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label">, </property>
+                                              </widget>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">False</property>
+                                                <property name="position">1</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <widget class="GtkLabel" id="label24">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label" translatable="yes">Arms Use 
Index</property>
+                                              </widget>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">True</property>
+                                                <property name="position">2</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <widget class="GtkLabel" id="label33">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label">, </property>
+                                              </widget>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">False</property>
+                                                <property name="position">3</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <widget class="GtkLabel" id="label25">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label">IRna</property>
+                                              </widget>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">True</property>
+                                                <property name="position">4</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <widget class="GtkLabel" id="label34">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label">, </property>
+                                              </widget>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">False</property>
+                                                <property name="position">5</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <widget class="GtkLabel" id="label26">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label">IRa</property>
+                                              </widget>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">True</property>
+                                                <property name="position">6</property>
+                                              </packing>
+                                            </child>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkHBox" id="hbox_indexes1">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="spacing">6</property>
+                                            <child>
+                                              <widget class="GtkRadioButton" 
id="radio_use_heights_on_jump_indexes">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="use_underline">True</property>
+                                                <property name="active">True</property>
+                                                <property name="draw_indicator">True</property>
+                                                <child>
+                                                  <widget class="GtkHBox" id="hbox8">
+                                                    <property name="visible">True</property>
+                                                    <property name="can_focus">False</property>
+                                                    <property name="spacing">6</property>
+                                                    <child>
+                                                      <widget class="GtkLabel" id="label27">
+                                                        <property name="visible">True</property>
+                                                        <property name="can_focus">False</property>
+                                                        <property name="label" translatable="yes">Use 
height</property>
+                                                      </widget>
+                                                      <packing>
+                                                        <property name="expand">True</property>
+                                                        <property name="fill">True</property>
+                                                        <property name="position">0</property>
+                                                      </packing>
+                                                    </child>
+                                                    <child>
+                                                      <widget class="GtkHBox" id="hbox9">
+                                                        <property name="visible">True</property>
+                                                        <property name="can_focus">False</property>
+                                                        <child>
+                                                          <widget class="GtkLabel" id="label28">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label">(</property>
+                                                          </widget>
+                                                          <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">0</property>
+                                                          </packing>
+                                                        </child>
+                                                        <child>
+                                                          <widget class="GtkLabel" id="label29">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label" 
translatable="yes">default</property>
+                                                          </widget>
+                                                          <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">1</property>
+                                                          </packing>
+                                                        </child>
+                                                        <child>
+                                                          <widget class="GtkLabel" id="label30">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label">)</property>
+                                                          </widget>
+                                                          <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">2</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="expand">False</property>
+                                                <property name="fill">False</property>
+                                                <property name="padding">12</property>
+                                                <property name="position">0</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <widget class="GtkRadioButton" 
id="radio_do_not_use_heights_on_jump_indexes">
+                                                <property name="label" translatable="yes">Use flight 
time</property>
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="receives_default">False</property>
+                                                <property name="use_underline">True</property>
+                                                <property name="draw_indicator">True</property>
+                                                <property 
name="group">radio_use_heights_on_jump_indexes</property>
+                                              </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">True</property>
+                                            <property name="position">2</property>
+                                          </packing>
+                                        </child>
+                                      </widget>
+                                    </child>
                                   </widget>
-                                  <packing>
-                                    <property name="top_attach">1</property>
-                                    <property name="bottom_attach">2</property>
-                                    <property name="x_options">GTK_FILL</property>
-                                  </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkLabel" id="label5">
+                                  <widget class="GtkLabel" id="label31">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">Weight units:</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="top_attach">2</property>
-                                    <property name="bottom_attach">3</property>
-                                    <property name="x_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkRadioButton" id="radio_elevation_height">
-                                    <property name="label" translatable="yes">Height (cm)</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="xalign">0</property>
-                                    <property name="active">True</property>
-                                    <property name="draw_indicator">True</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="right_attach">2</property>
-                                    <property name="x_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkRadioButton" id="radio_elevation_tf">
-                                    <property name="label">TF (s)</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="xalign">0</property>
-                                    <property name="draw_indicator">True</property>
-                                    <property name="group">radio_elevation_height</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="left_attach">2</property>
-                                    <property name="right_attach">3</property>
-                                    <property name="x_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkRadioButton" id="radio_speed_ms">
-                                    <property name="label">m/s</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="xalign">0</property>
-                                    <property name="active">True</property>
-                                    <property name="draw_indicator">True</property>
-                                  </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>
-                                    <property name="x_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkRadioButton" id="radio_speed_km">
-                                    <property name="label">Km/h</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="xalign">0</property>
-                                    <property name="draw_indicator">True</property>
-                                    <property name="group">radio_speed_ms</property>
-                                  </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>
-                                    <property name="x_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkRadioButton" id="radio_weight_percent">
-                                    <property name="label">%</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="xalign">0</property>
-                                    <property name="active">True</property>
-                                    <property name="draw_indicator">True</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="right_attach">2</property>
-                                    <property name="top_attach">2</property>
-                                    <property name="bottom_attach">3</property>
-                                    <property name="x_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkRadioButton" id="radio_weight_kg">
-                                    <property name="label">Kg</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="xalign">0</property>
-                                    <property name="draw_indicator">True</property>
-                                    <property name="group">radio_weight_percent</property>
+                                    <property name="label" translatable="yes">Calculations</property>
+                                    <property name="use_markup">True</property>
                                   </widget>
                                   <packing>
-                                    <property name="left_attach">2</property>
-                                    <property name="right_attach">3</property>
-                                    <property name="top_attach">2</property>
-                                    <property name="bottom_attach">3</property>
-                                    <property name="x_options">GTK_FILL</property>
+                                    <property name="type">label_item</property>
                                   </packing>
                                 </child>
                               </widget>
                               <packing>
                                 <property name="expand">False</property>
                                 <property name="fill">False</property>
-                                <property name="padding">2</property>
-                                <property name="position">6</property>
+                                <property name="position">1</property>
                               </packing>
                             </child>
                           </widget>
@@ -30166,6 +30527,9 @@ show elevation as:</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                       <packing>
                         <property name="left_attach">2</property>
@@ -30232,6 +30596,9 @@ show elevation as:</property>
                     <child>
                       <placeholder/>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </widget>
                 </child>
               </widget>
@@ -30313,6 +30680,9 @@ show elevation as:</property>
                     <child>
                       <placeholder/>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </widget>
                 </child>
               </widget>
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 6f17d87..15aeb08 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -361,6 +361,7 @@ public partial class ChronoJumpWindow
        private static bool metersSecondsPreferred;
        private static string CSVExportDecimalSeparator; //"COMMA" or "POINT"
        private static bool RGraphsTranslate;
+       private static bool useHeightsOnJumpIndexes;
 
        private static Person currentPerson;
        private static Session currentSession;
@@ -952,6 +953,8 @@ public partial class ChronoJumpWindow
                CSVExportDecimalSeparator = SqlitePreferences.Select("CSVExportDecimalSeparator");
                
                RGraphsTranslate = SqlitePreferences.Select("RGraphsTranslate") == "True";
+               
+               useHeightsOnJumpIndexes = SqlitePreferences.Select("useHeightsOnJumpIndexes") == "True";
 
                //change language works on windows. On Linux let's change the locale
                //if(UtilAll.IsWindows())
@@ -963,6 +966,7 @@ public partial class ChronoJumpWindow
                report.WeightStatsPercent = weightPercentPreferred;
                report.Progversion = progVersion;
                report.GraphTranslate = RGraphsTranslate;
+               report.UseHeightsOnJumpIndexes = useHeightsOnJumpIndexes;
 
 
                Log.WriteLine ( Catalog.GetString ("Preferences loaded") );
@@ -2833,7 +2837,7 @@ public partial class ChronoJumpWindow
                                SqlitePreferences.Select("language"),
                                encoderPropulsive, encoderSmoothCon,
                                videoDevices, videoDeviceNum, SqlitePreferences.Select("encoder1RMMethod"),
-                               CSVExportDecimalSeparator, RGraphsTranslate
+                               CSVExportDecimalSeparator, RGraphsTranslate, useHeightsOnJumpIndexes
                                );
                myWin.Button_accept.Clicked += new EventHandler(on_preferences_accepted);
        }
@@ -2921,6 +2925,8 @@ public partial class ChronoJumpWindow
                CSVExportDecimalSeparator = SqlitePreferences.Select("CSVExportDecimalSeparator");
                
                RGraphsTranslate = SqlitePreferences.Select("RGraphsTranslate") == "True"; 
+               
+               useHeightsOnJumpIndexes = SqlitePreferences.Select("useHeightsOnJumpIndexes") == "True";
 
                videoDeviceNum = Convert.ToInt32(SqlitePreferences.Select("videoDevice"));
                if(checkbutton_video.Active) {
@@ -2949,6 +2955,7 @@ public partial class ChronoJumpWindow
                        report.HeightPreferred = heightPreferred;
                        report.WeightStatsPercent = weightPercentPreferred;
                        report.GraphTranslate = RGraphsTranslate;
+                       report.UseHeightsOnJumpIndexes = useHeightsOnJumpIndexes;
                        
                        
                        createTreeView_jumps (treeview_jumps);
diff --git a/src/gui/preferences.cs b/src/gui/preferences.cs
index 495ec2a..fa294ff 100644
--- a/src/gui/preferences.cs
+++ b/src/gui/preferences.cs
@@ -87,6 +87,10 @@ public class PreferencesWindow {
        [Widget] Gtk.RadioButton radio_graphs_translate;
        [Widget] Gtk.RadioButton radio_graphs_no_translate;
 
+       [Widget] Gtk.RadioButton radio_use_heights_on_jump_indexes;
+       [Widget] Gtk.RadioButton radio_do_not_use_heights_on_jump_indexes;
+
+
 //     [Widget] Gtk.Box hbox_language_row;
 //     [Widget] Gtk.Box hbox_combo_language;
 //     [Widget] Gtk.ComboBox combo_language;
@@ -127,7 +131,7 @@ public class PreferencesWindow {
                        bool askDeletion, bool weightStatsPercent, bool heightPreferred, bool 
metersSecondsPreferred, 
                        string language, bool encoderPropulsive, double encoderSmoothCon,
                        string [] videoDevices, int videoDeviceNum, string encoder1RMMethod,
-                       string CSVExportDecimalSeparator, bool RGraphsTranslate)
+                       string CSVExportDecimalSeparator, bool RGraphsTranslate, bool useHeightsOnJumpIndexes)
        {
                if (PreferencesWindowBox == null) {
                        PreferencesWindowBox = new PreferencesWindow ();
@@ -249,6 +253,12 @@ public class PreferencesWindow {
                        PreferencesWindowBox.radio_graphs_translate.Active = true;
                else
                        PreferencesWindowBox.radio_graphs_no_translate.Active = true;
+               
+               if(useHeightsOnJumpIndexes)
+                       PreferencesWindowBox.radio_use_heights_on_jump_indexes.Active = true;
+               else
+                       PreferencesWindowBox.radio_do_not_use_heights_on_jump_indexes.Active = true;
+
 
                PreferencesWindowBox.preferences.Show ();
                return PreferencesWindowBox;
@@ -593,6 +603,9 @@ public class PreferencesWindow {
                
                SqlitePreferences.Update("RGraphsTranslate", 
                                PreferencesWindowBox.radio_graphs_translate.Active.ToString(), true);
+               
+               SqlitePreferences.Update("useHeightsOnJumpIndexes", 
+                               PreferencesWindowBox.radio_use_heights_on_jump_indexes.Active.ToString(), 
true);
        
                string encoder1RMMethod = "";   
                if(PreferencesWindowBox.radio_encoder_1RM_nonweighted.Active)
diff --git a/src/gui/report.cs b/src/gui/report.cs
index 046d500..b545e91 100644
--- a/src/gui/report.cs
+++ b/src/gui/report.cs
@@ -327,7 +327,8 @@ public class ReportWindow {
                                                graphROptions,
                                                true,   //graph
                                                false,  //always false in this class
-                                               report.GraphTranslate
+                                               report.GraphTranslate,
+                                               report.UseHeightsOnJumpIndexes
                                                );
                                myStatType.ChooseStat();
                        }
diff --git a/src/gui/stats.cs b/src/gui/stats.cs
index ed78720..d47cc08 100644
--- a/src/gui/stats.cs
+++ b/src/gui/stats.cs
@@ -870,7 +870,8 @@ public partial class ChronoJumpWindow {
                                graphROptions,
                                graph,
                                toReport,  //always false in this class
-                               RGraphsTranslate
+                               RGraphsTranslate,
+                               useHeightsOnJumpIndexes
                                );
 
                //if we just made a graph, store is not made, 
diff --git a/src/report.cs b/src/report.cs
index 249b236..cad9ac8 100644
--- a/src/report.cs
+++ b/src/report.cs
@@ -42,6 +42,7 @@ public class Report : ExportSession
        public bool ShowReactionTimes;
        public bool ShowPulses;
        private bool graphTranslate = true;
+       private bool useHeightsOnJumpIndexes = true;
        
        bool toReport = true;
 
@@ -367,6 +368,7 @@ public class Report : ExportSession
                                        false,                  //graph
                                        toReport,
                                        graphTranslate,
+                                       useHeightsOnJumpIndexes,
                                        writer,
                                        "",
                                        statCount
@@ -397,6 +399,7 @@ public class Report : ExportSession
                                        true,                   //graph
                                        toReport,
                                        graphTranslate,
+                                       useHeightsOnJumpIndexes,
                                        writer,
                                        fileName,               //fileName for exporting there
                                        statCount
@@ -437,6 +440,11 @@ public class Report : ExportSession
                get { return graphTranslate; }
        }
        
+       public bool UseHeightsOnJumpIndexes {
+               set { useHeightsOnJumpIndexes = value; }
+               get { return useHeightsOnJumpIndexes; }
+       }
+       
        ~Report() {}
           
 }
diff --git a/src/sqlite/main.cs b/src/sqlite/main.cs
index c30c945..25c755e 100644
--- a/src/sqlite/main.cs
+++ b/src/sqlite/main.cs
@@ -74,7 +74,7 @@ class Sqlite
         * Important, change this if there's any update to database
         * Important2: if database version get numbers higher than 1, check if the comparisons with 
currentVersion works ok
         */
-       static string lastChronojumpDatabaseVersion = "1.08";
+       static string lastChronojumpDatabaseVersion = "1.09";
 
        public Sqlite() {
        }
@@ -1584,6 +1584,17 @@ class Sqlite
 
                                currentVersion = "1.08";
                        }
+                       if(currentVersion == "1.08") {
+                               dbcon.Open();
+                       
+                               Log.WriteLine("Added option on preferences to useHeightsOnJumpIndexes 
(default) or not");
+                               
+                               SqlitePreferences.Insert ("useHeightsOnJumpIndexes", "True"); 
+                               SqlitePreferences.Update ("databaseVersion", "1.09", true); 
+                               dbcon.Close();
+
+                               currentVersion = "1.09";
+                       }
                
                
 
@@ -1728,6 +1739,7 @@ class Sqlite
                SqliteCountry.initialize();
                
                //changes [from - to - desc]
+               //1.08 - 1.09 Converted DB to 1.09 Added option on preferences to useHeightsOnJumpIndexes 
(default) or not
                //1.07 - 1.08 Converted DB to 1.08 Added translate statistics graph option to preferences
                //1.06 - 1.07 Converted DB to 1.07 Added jump_dj_a.png
                //1.05 - 1.06 Converted DB to 1.06 Curves are now linked to signals
diff --git a/src/sqlite/preferences.cs b/src/sqlite/preferences.cs
index 1b52572..44f4d8b 100644
--- a/src/sqlite/preferences.cs
+++ b/src/sqlite/preferences.cs
@@ -79,6 +79,7 @@ class SqlitePreferences : Sqlite
                Insert ("inertialmomentum", "0.01");
                Insert ("CSVExportDecimalSeparator", Util.GetDecimalSeparatorFromLocale());
                Insert ("RGraphsTranslate", "True");
+               Insert ("useHeightsOnJumpIndexes", "True");
        }
 
        public static void Insert(string myName, string myValue)
diff --git a/src/sqlite/stat.cs b/src/sqlite/stat.cs
index a4a5fa9..00bfa8f 100644
--- a/src/sqlite/stat.cs
+++ b/src/sqlite/stat.cs
@@ -870,31 +870,29 @@ Log.WriteLine(intervalSpeeds);
                return myArray;
        }
 
-       public static ArrayList JumpIndexes (string sessionString, bool multisession, string ini, string end, 
string jump1, string jump2, bool showSex)
+       //1.4.7 useHeights is the new default, because this indexes should use height instead of TV that has 
been used by default since now
+       public static ArrayList JumpIndexes (string sessionString, bool multisession, string ini, string end, 
string jump1, string jump2, bool showSex, bool useHeights)
        {
                string tp = Constants.PersonTable;
 
-               //What's this? TODO: check old versions of this file
-               /*
-               string ini2 = "";
-               if(ini == "MAX(") {
-                       ini2 = "MIN(";
-               } else if (ini == "AVG("){
-                       ini2 = "AVG(";
-               }
-               */
-                       
                string orderByString = "ORDER BY ";
                string moreSelect = ""; 
+
+               string j1value = "j1.tv";
+               string j2value = "j2.tv";
+               if(useHeights) {
+                       j1value = "j1.tv * j1.tv * 1.226";
+                       j2value = "j2.tv * j2.tv * 1.226";
+               }
                
                //*1.0 for having double division
                if(ini == "MAX(") {
                        //search MAX of two jumps, not max index!!
-                       moreSelect = " ( MAX(j1.tv) - MAX(j2.tv) )*100/(MAX(j2.tv)*1.0) AS myIndex, " +
-                               "MAX(j1.tv), MAX(j2.tv) ";
+                       moreSelect = " ( MAX(" + j1value + ") - MAX(" + j2value + ") )*100/(MAX(" + j2value + 
")*1.0) AS myIndex, " +
+                               "MAX(" + j1value + "), MAX(" + j2value + ") ";
                } else if(ini == "AVG(") {
-                       moreSelect = " ( AVG(j1.tv) - AVG(j2.tv) )*100/(AVG(j2.tv)*1.0) AS myIndex, " +
-                               "AVG(j1.tv), AVG(j2.tv)";
+                       moreSelect = " ( AVG(" + j1value + ") - AVG(" + j2value + ") )*100/(AVG(" + j2value + 
")*1.0) AS myIndex, " +
+                               "AVG(" + j1value + "), AVG(" + j2value + ")";
                }
 
                //if we use AVG or MAX, then we have to group by the results
diff --git a/src/statType.cs b/src/statType.cs
index d2fa728..b607f96 100644
--- a/src/statType.cs
+++ b/src/statType.cs
@@ -42,13 +42,14 @@ public class StatTypeStruct
        
        public bool ToReport;
        public bool GraphTranslate;
+       public bool UseHeightsOnJumpIndexes;
        
        public StatTypeStruct (string statisticApplyTo, 
                        ArrayList sendSelectedSessions, int prefsDigitsNumber, bool sex_active, 
                        int statsJumpsType, int limit, bool heightPreferred, bool weightStatsPercent, 
                        ArrayList markedRows, 
                        GraphROptions gRO,
-                       bool toReport, bool graphTranslate)
+                       bool toReport, bool graphTranslate, bool useHeightsOnJumpIndexes)
        {
                this.StatisticApplyTo = statisticApplyTo;
                this.SendSelectedSessions =  sendSelectedSessions;
@@ -62,6 +63,7 @@ public class StatTypeStruct
                this.GRO = gRO;
                this.ToReport = toReport;
                this.GraphTranslate = graphTranslate;
+               this.UseHeightsOnJumpIndexes = useHeightsOnJumpIndexes;
        }
 }
 
@@ -79,6 +81,8 @@ public class StatType {
        bool graph;
        bool toReport;
        bool graphTranslate;
+       bool useHeightsOnJumpIndexes;
+       
        TextWriter writer;
        string fileName;
        int statCount; //optimal to create name of each graph on report: 1: 1.png; 2: 2.png
@@ -111,7 +115,7 @@ public class StatType {
                        ArrayList markedRows,  
                        int evolution_mark_consecutives, 
                        GraphROptions gRO,
-                       bool graph, bool toReport, bool graphTranslate)
+                       bool graph, bool toReport, bool graphTranslate, bool useHeightsOnJumpIndexes)
        {
                //some of this will disappear when we use myStatTypeStruct in all classes:
                this.statisticType = statisticType;
@@ -126,6 +130,7 @@ public class StatType {
                this.graph = graph;
                this.toReport = toReport;
                this.graphTranslate = graphTranslate;
+               this.useHeightsOnJumpIndexes = useHeightsOnJumpIndexes;
 
                myStatTypeStruct = new StatTypeStruct (
                                statisticApplyTo,
@@ -133,7 +138,7 @@ public class StatType {
                                statsJumpsType, limit, heightPreferred, weightStatsPercent, 
                                markedRows, 
                                gRO,
-                               toReport, graphTranslate);
+                               toReport, graphTranslate, useHeightsOnJumpIndexes);
 
                myStat = new Stat(); //create an instance of myStat
 
@@ -167,7 +172,8 @@ public class StatType {
                        ArrayList markedRows, 
                        int evolution_mark_consecutives, 
                        GraphROptions gRO,
-                       bool graph, bool toReport, bool graphTranslate, TextWriter writer, string fileName,
+                       bool graph, bool toReport, bool graphTranslate, bool useHeightsOnJumpIndexes, 
+                       TextWriter writer, string fileName,
                        int statCount 
                        )
        {
@@ -182,6 +188,8 @@ public class StatType {
                this.graph = graph;
                this.toReport = toReport;
                this.graphTranslate = graphTranslate;
+               this.useHeightsOnJumpIndexes = useHeightsOnJumpIndexes;
+
                this.writer = writer;
                this.fileName = fileName;
                this.statCount = statCount;
@@ -192,7 +200,7 @@ public class StatType {
                                statsJumpsType, limit, heightPreferred, weightStatsPercent, 
                                markedRows, 
                                gRO,
-                               toReport, graphTranslate);
+                               toReport, graphTranslate, useHeightsOnJumpIndexes);
 
                myStat = new Stat(); //create and instance of myStat
        }
diff --git a/src/stats/graphs/jumpIndexes.cs b/src/stats/graphs/jumpIndexes.cs
index 1dae5c5..e311f6b 100644
--- a/src/stats/graphs/jumpIndexes.cs
+++ b/src/stats/graphs/jumpIndexes.cs
@@ -57,11 +57,18 @@ public class GraphJumpIndexes : StatJumpIndexes
                        jump2="CMJ";
                }
                
-               
                columnsString[0] = "Jumper";
                columnsString[1] = indexType;
+               
                columnsString[2] = jump1;
+
+
+               if(useHeightsOnJumpIndexes)
+                       columnsString[2] = jump1 + " (" + translateYesNo("height") + ")";
+
                columnsString[3] = jump2;
+               if(useHeightsOnJumpIndexes)
+                       columnsString[3] = jump2 + " (" + translateYesNo("height") + ")";
                
                if (statsJumpsType == 2) {
                        this.operation = "MAX";
@@ -101,9 +108,15 @@ public class GraphJumpIndexes : StatJumpIndexes
                        serieJump2.IsLeftAxis = false;
 
                        CurrentGraphData.LabelLeft = translateYesNo("Index") + "(%)";
+                       
                        CurrentGraphData.LabelRight =
                                jump1 + " " + translateYesNo("TF") + "(s), " + 
                                jump2 + " " + translateYesNo("TF") + "(s)";
+                       if(useHeightsOnJumpIndexes)
+                               CurrentGraphData.LabelRight =
+                                       jump1 + " " + translateYesNo("height") + "(m), " + 
+                                       jump2 + " " + translateYesNo("height") + "(m)";
+
                } else {
                        for(int i=0; i < sessions.Count ; i++) {
                                string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'});
diff --git a/src/stats/jumpIndexes.cs b/src/stats/jumpIndexes.cs
index fff2504..152cb84 100644
--- a/src/stats/jumpIndexes.cs
+++ b/src/stats/jumpIndexes.cs
@@ -59,7 +59,7 @@ public class StatJumpIndexes : Stat
                        jump1="DJa";
                        jump2="CMJ";
                }
-               
+       
                if(sessions.Count > 1) {
                        store = getStore(sessions.Count +3); //+3 (for jumper, the AVG horizontal and SD 
horizontal)
                } else {
@@ -68,8 +68,14 @@ public class StatJumpIndexes : Stat
                
                columnsString[0] = Catalog.GetString("Jumper");
                columnsString[1] = indexType;
+
                columnsString[2] = jump1;
+               if(useHeightsOnJumpIndexes)
+                       columnsString[2] = jump1 + " (" + Catalog.GetString("height") + ")";
+
                columnsString[3] = jump2;
+               if(useHeightsOnJumpIndexes)
+                       columnsString[3] = jump2 + " (" + Catalog.GetString("height") + ")";
                
                if(toReport) {
                        reportString = prepareHeadersReport(columnsString);
@@ -90,11 +96,11 @@ public class StatJumpIndexes : Stat
                if(statsJumpsType == 3) { //avg of each jumper
                        if(multisession) {
                                processDataMultiSession ( 
-                                               SqliteStat.JumpIndexes(sessionString, multisession, "AVG(", 
")", jump1, jump2, showSex), 
+                                               SqliteStat.JumpIndexes(sessionString, multisession, "AVG(", 
")", jump1, jump2, showSex, useHeightsOnJumpIndexes),
                                                true, sessions.Count);
                        } else {
                                processDataSimpleSession ( cleanDontWanted (
-                                                       SqliteStat.JumpIndexes(sessionString, multisession, 
"AVG(", ")", jump1, jump2, showSex), 
+                                                       SqliteStat.JumpIndexes(sessionString, multisession, 
"AVG(", ")", jump1, jump2, showSex, useHeightsOnJumpIndexes),
                                                        statsJumpsType, limit),
                                                true, dataColumns);
                        }
@@ -102,10 +108,10 @@ public class StatJumpIndexes : Stat
                        //if more than on session, show only the avg or max of each jump/jumper
                        //some of this options are never called becase we don't allow radiobutton all and 
limit (only avg and best)
                        if(multisession) {
-                               processDataMultiSession ( SqliteStat.JumpIndexes(sessionString, multisession, 
"MAX(", ")", jump1, jump2, showSex),  
+                               processDataMultiSession ( SqliteStat.JumpIndexes(sessionString, multisession, 
"MAX(", ")", jump1, jump2, showSex, useHeightsOnJumpIndexes),
                                                true, sessions.Count);
                        } else {
-                               processDataSimpleSession ( SqliteStat.JumpIndexes(sessionString, 
multisession, "MAX(", ")", jump1, jump2, showSex), 
+                               processDataSimpleSession ( SqliteStat.JumpIndexes(sessionString, 
multisession, "MAX(", ")", jump1, jump2, showSex, useHeightsOnJumpIndexes),
                                                true, dataColumns);
                        }
                }
diff --git a/src/stats/main.cs b/src/stats/main.cs
index ee1200d..b0de712 100644
--- a/src/stats/main.cs
+++ b/src/stats/main.cs
@@ -79,6 +79,7 @@ public class Stat
        protected string reportString;
        
        protected bool graphTranslate = true;
+       protected bool useHeightsOnJumpIndexes;
 
 
        //for toString() in every stat
@@ -122,6 +123,7 @@ public class Stat
                this.gRO = myStatTypeStruct.GRO;
                this.toReport = myStatTypeStruct.ToReport;
                this.graphTranslate = myStatTypeStruct.GraphTranslate;
+               this.useHeightsOnJumpIndexes = myStatTypeStruct.UseHeightsOnJumpIndexes;
                
                this.treeview = treeview;
                



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