Commit 0f309740 authored by Xavier de Blas's avatar Xavier de Blas

Added index F/V (task: 273) in stats and graphs

new files: /src/stats/fv.cs /src/stats/graphs/fv.cs

stats/global now does not show any indexes, only results of jumps,
now gets more simplified for the user, i think it was no relevant info

Stats indexes IE and IUB now in stats simple, subtypes: "No indexes", "IE", "IUB"

Added files src/stats/djQ.cs and src/stats/graphs/djQ.cs (forgot in last CVS update)

fixed bug in stats current sessions/selected sessions radiobuttons group
parent 4df6f918
......@@ -19,8 +19,8 @@ MCS = mcs
CHRONOJUMP = chronojump
CHRONOJUMP_DEP_GUI = src/gui/confirm.cs src/gui/error.cs src/gui/jump.cs src/gui/jumpType.cs src/gui/run.cs src/gui/runType.cs src/gui/person.cs src/gui/preferences.cs src/gui/session.cs src/gui/stats.cs
CHRONOJUMP_DEP_STATS = src/stats/main.cs src/stats/global.cs src/stats/sjCmjAbk.cs src/stats/sjCmjAbkPlus.cs src/stats/djIndex.cs src/stats/djQ.cs src/stats/rjIndex.cs src/stats/rjPotencyBosco.cs src/stats/rjEvolution.cs src/stats/ieIub.cs
CHRONOJUMP_DEP_GRAPHS = src/stats/graphs/graphData.cs src/stats/graphs/graphSerie.cs src/stats/graphs/global.cs src/stats/graphs/sjCmjAbk.cs src/stats/graphs/sjCmjAbkPlus.cs src/stats/graphs/djIndex.cs src/stats/graphs/djQ.cs src/stats/graphs/rjIndex.cs src/stats/graphs/rjPotencyBosco.cs src/stats/graphs/rjEvolution.cs src/stats/graphs/ieIub.cs
CHRONOJUMP_DEP_STATS = src/stats/main.cs src/stats/global.cs src/stats/sjCmjAbk.cs src/stats/sjCmjAbkPlus.cs src/stats/djIndex.cs src/stats/djQ.cs src/stats/rjIndex.cs src/stats/rjPotencyBosco.cs src/stats/rjEvolution.cs src/stats/ieIub.cs src/stats/fv.cs
CHRONOJUMP_DEP_GRAPHS = src/stats/graphs/graphData.cs src/stats/graphs/graphSerie.cs src/stats/graphs/global.cs src/stats/graphs/sjCmjAbk.cs src/stats/graphs/sjCmjAbkPlus.cs src/stats/graphs/djIndex.cs src/stats/graphs/djQ.cs src/stats/graphs/rjIndex.cs src/stats/graphs/rjPotencyBosco.cs src/stats/graphs/rjEvolution.cs src/stats/graphs/ieIub.cs src/stats/graphs/fv.cs
......
CHANGELOG:
26 aug 2005
Added index F/V (task: 273) in stats and graphs
new files: /src/stats/fv.cs /src/stats/graphs/fv.cs
stats/global now does not show any indexes, only results of jumps,
now gets more simplified for the user, i think it was no relevant
info
Stats indexes IE and IUB now in stats simple, subtypes: "No indexes", "IE",
"IUB"
Added files src/stats/djQ.cs and src/stats/graphs/djQ.cs (forgot in
last CVS update)
fixed bug in stats current sessions/selected sessions radiobuttons
group
25 aug 2005
drop jump "Q index" (tv/tc) added (closes task: 260) added:
src/stats/djQ.cs and src/stats/graphs/djQ.cs
......
No preview for this file type
......@@ -4434,7 +4434,7 @@ DD/MM/YYYY</property>
<widget class="GtkWindow" id="person_recuperate">
<property name="border_width">10</property>
<property name="width_request">400</property>
<property name="height_request">400</property>
<property name="height_request">420</property>
<property name="visible">True</property>
<property name="title" translatable="yes">Load persons</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
......@@ -4459,10 +4459,11 @@ DD/MM/YYYY</property>
<child>
<widget class="GtkLabel" id="label33">
<property name="visible">True</property>
<property name="label" translatable="yes">Select persons you want to load</property>
<property name="label" translatable="yes">Select persons you want to load.
(Persons in current session are not listed)</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
......@@ -7507,6 +7508,7 @@ options</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<property name="group">radiobutton_current_session</property>
<signal name="clicked" handler="on_radiobuttons_stat_session_toggled" last_modification_time="Tue, 04 Jan 2005 12:56:10 GMT"/>
</widget>
<packing>
......
......@@ -83,7 +83,7 @@ public class StatsWindow {
Catalog.GetString("Simple"),
Catalog.GetString("With TC"),
Catalog.GetString("Reactive"),
Catalog.GetString("Indexes")
//Catalog.GetString("Indexes")
};
private static string [] comboStatsSubTypeWithTCOptions = {
......@@ -97,7 +97,10 @@ public class StatsWindow {
Catalog.GetString("Evolution")
};
private static string [] comboStatsSubTypeIndexesOptions = {
//private static string [] comboStatsSubTypeIndexesOptions = {
private static string [] comboStatsSubTypeSimpleOptions = {
Catalog.GetString("No indexes"),
"F/V sj+(100%)/sj *100",
"IE (cmj-sj)*100/sj",
"IUB (abk-cmj)*100/cmj"
};
......@@ -216,15 +219,19 @@ public class StatsWindow {
combo_stats_stat_apply_to.PopdownStrings =
SqlitePersonSession.SelectCurrentSession(currentSession.UniqueID);
combo_stats_stat_apply_to.Sensitive = true;
} else if (combo_stats_stat_type.Entry.Text == Catalog.GetString("Simple") )
}
else if (combo_stats_stat_type.Entry.Text == Catalog.GetString("Simple") )
{
combo_stats_stat_subtype.PopdownStrings = nullOptions;
combo_stats_stat_subtype.Sensitive = false;
combo_stats_stat_subtype.PopdownStrings = comboStatsSubTypeSimpleOptions;
combo_stats_stat_subtype.Sensitive = true;
//by default show all simple nonTC jumps, but if combo_stats_subtype changed
//updateComboStatsSubType() will do the work
combo_stats_stat_apply_to.PopdownStrings =
SqliteJumpType.SelectJumpTypes(allJumpsName, "nonTC", true); //only select name
combo_stats_stat_apply_to.Sensitive = true;
} else if (combo_stats_stat_type.Entry.Text == Catalog.GetString("With TC") )
}
else if (combo_stats_stat_type.Entry.Text == Catalog.GetString("With TC") )
{
combo_stats_stat_subtype.PopdownStrings = comboStatsSubTypeWithTCOptions;
combo_stats_stat_subtype.Sensitive = true;
......@@ -232,7 +239,8 @@ public class StatsWindow {
combo_stats_stat_apply_to.PopdownStrings =
SqliteJumpType.SelectJumpTypes(allJumpsName, "TC", true); //only select name
combo_stats_stat_apply_to.Sensitive = true;
} else if (combo_stats_stat_type.Entry.Text == Catalog.GetString("Reactive") )
}
else if (combo_stats_stat_type.Entry.Text == Catalog.GetString("Reactive") )
{
combo_stats_stat_subtype.PopdownStrings = comboStatsSubTypeReactiveOptions;
combo_stats_stat_subtype.Sensitive = true;
......@@ -240,18 +248,32 @@ public class StatsWindow {
combo_stats_stat_apply_to.PopdownStrings =
SqliteJumpType.SelectJumpRjTypes(allJumpsName, true); //only select name
combo_stats_stat_apply_to.Sensitive = true;
} else if (combo_stats_stat_type.Entry.Text == Catalog.GetString("Indexes") )
{
combo_stats_stat_subtype.PopdownStrings = comboStatsSubTypeIndexesOptions;
combo_stats_stat_subtype.Sensitive = true;
combo_stats_stat_apply_to.PopdownStrings = nullOptions;
combo_stats_stat_apply_to.Sensitive = false;
}
fillTreeView_stats(false);
}
private void updateComboStatsSubType() {
if (combo_stats_stat_type.Entry.Text == Catalog.GetString("Simple") )
{
if(combo_stats_stat_subtype.Entry.Text == Catalog.GetString("No indexes")) {
combo_stats_stat_apply_to.PopdownStrings =
SqliteJumpType.SelectJumpTypes(allJumpsName, "nonTC", true); //only select name
combo_stats_stat_apply_to.Sensitive = true;
} else if (combo_stats_stat_subtype.Entry.Text == "IE (cmj-sj)*100/sj") {
combo_stats_stat_apply_to.Entry.Text = "CMJ, SJ";
combo_stats_stat_apply_to.Sensitive = false;
} else if (combo_stats_stat_subtype.Entry.Text == "IUB (abk-cmj)*100/cmj") {
combo_stats_stat_apply_to.Entry.Text = "ABK, CMJ";
combo_stats_stat_apply_to.Sensitive = false;
} else {
//"F/V sj+(100%)/sj *100",
combo_stats_stat_apply_to.Entry.Text = "SJ+(100%), SJ";
combo_stats_stat_apply_to.Sensitive = false;
}
}
}
//way of accessing from chronojump.cs
public void FillTreeView_stats (bool graph, bool force)
{
......@@ -359,58 +381,112 @@ public class StatsWindow {
Console.WriteLine("Simple-ret");
return false;
}
JumpType myType = new JumpType(statisticApplyTo);
//manage all weight jumps and the "All jumps" (simple)
if(myType.HasWeight ||
statisticApplyTo == allJumpsName)
if(statisticSubType != Catalog.GetString("No indexes"))
{
if(graph) {
myStat = new GraphSjCmjAbkPlus (
sendSelectedSessions,
prefsDigitsNumber, statisticApplyTo,
checkbutton_stats_sex.Active,
statsJumpsType,
limit,
weightStatsPercent,
heightPreferred
);
myStat.PrepareData();
myStat.CreateGraph();
} else {
myStat = new StatSjCmjAbkPlus (treeview_stats,
sendSelectedSessions,
prefsDigitsNumber, statisticApplyTo,
checkbutton_stats_sex.Active,
statsJumpsType,
limit,
weightStatsPercent,
heightPreferred
);
myStat.PrepareData();
string indexType = "";
if(statisticSubType == "IE (cmj-sj)*100/sj") {
indexType = "IE";
} else if(statisticSubType == "IUB (abk-cmj)*100/cmj") {
indexType = "IUB";
} else if(statisticSubType == "F/V sj+(100%)/sj *100") {
indexType = "F/V";
}
} else {
if(graph) {
myStat = new GraphSjCmjAbk (
sendSelectedSessions,
prefsDigitsNumber, statisticApplyTo,
checkbutton_stats_sex.Active,
statsJumpsType,
limit,
heightPreferred
);
myStat.PrepareData();
myStat.CreateGraph();
if(indexType == "IE" || indexType == "IUB") {
if(graph) {
myStat = new GraphIeIub (
sendSelectedSessions,
indexType,
prefsDigitsNumber, checkbutton_stats_sex.Active,
statsJumpsType,
limit);
myStat.PrepareData();
myStat.CreateGraph();
} else {
myStat = new StatIeIub(treeview_stats,
sendSelectedSessions,
indexType,
prefsDigitsNumber, checkbutton_stats_sex.Active,
statsJumpsType,
limit);
myStat.PrepareData();
}
} else { //F/V
if(graph) {
myStat = new GraphFv (
sendSelectedSessions,
indexType,
prefsDigitsNumber, checkbutton_stats_sex.Active,
statsJumpsType,
limit);
myStat.PrepareData();
myStat.CreateGraph();
} else {
myStat = new StatFv(treeview_stats,
sendSelectedSessions,
indexType,
prefsDigitsNumber, checkbutton_stats_sex.Active,
statsJumpsType,
limit);
myStat.PrepareData();
}
}
}
else {
JumpType myType = new JumpType(statisticApplyTo);
//manage all weight jumps and the "All jumps" (simple)
if(myType.HasWeight ||
statisticApplyTo == allJumpsName)
{
if(graph) {
myStat = new GraphSjCmjAbkPlus (
sendSelectedSessions,
prefsDigitsNumber, statisticApplyTo,
checkbutton_stats_sex.Active,
statsJumpsType,
limit,
weightStatsPercent,
heightPreferred
);
myStat.PrepareData();
myStat.CreateGraph();
} else {
myStat = new StatSjCmjAbkPlus (treeview_stats,
sendSelectedSessions,
prefsDigitsNumber, statisticApplyTo,
checkbutton_stats_sex.Active,
statsJumpsType,
limit,
weightStatsPercent,
heightPreferred
);
myStat.PrepareData();
}
} else {
myStat = new StatSjCmjAbk (treeview_stats,
sendSelectedSessions,
prefsDigitsNumber, statisticApplyTo,
checkbutton_stats_sex.Active,
statsJumpsType,
limit,
heightPreferred
);
myStat.PrepareData();
if(graph) {
myStat = new GraphSjCmjAbk (
sendSelectedSessions,
prefsDigitsNumber, statisticApplyTo,
checkbutton_stats_sex.Active,
statsJumpsType,
limit,
heightPreferred
);
myStat.PrepareData();
myStat.CreateGraph();
} else {
myStat = new StatSjCmjAbk (treeview_stats,
sendSelectedSessions,
prefsDigitsNumber, statisticApplyTo,
checkbutton_stats_sex.Active,
statsJumpsType,
limit,
heightPreferred
);
myStat.PrepareData();
}
}
}
}
......@@ -542,50 +618,6 @@ public class StatsWindow {
}
}
}
else if(statisticType == Catalog.GetString("Indexes")) {
if(statisticSubType == "IE (cmj-sj)*100/sj")
{
if(graph) {
myStat = new GraphIeIub (
sendSelectedSessions,
"IE",
prefsDigitsNumber, checkbutton_stats_sex.Active,
statsJumpsType,
limit);
myStat.PrepareData();
myStat.CreateGraph();
} else {
myStat = new StatIeIub(treeview_stats,
sendSelectedSessions,
"IE",
prefsDigitsNumber, checkbutton_stats_sex.Active,
statsJumpsType,
limit);
myStat.PrepareData();
}
}
else if(statisticSubType == "IUB (abk-cmj)*100/cmj")
{
if(graph) {
myStat = new GraphIeIub (
sendSelectedSessions,
"IUB",
prefsDigitsNumber, checkbutton_stats_sex.Active,
statsJumpsType,
limit);
myStat.PrepareData();
myStat.CreateGraph();
} else {
myStat = new StatIeIub(treeview_stats,
sendSelectedSessions,
"IUB",
prefsDigitsNumber, checkbutton_stats_sex.Active,
statsJumpsType,
limit);
myStat.PrepareData();
}
}
}
//show enunciate of the stat in textview_enunciate
TextBuffer tb = new TextBuffer (new TextTagTable());
......@@ -721,6 +753,8 @@ public class StatsWindow {
//the on_combo_stats_stat_type_changed it's called two times?
//in the first the value of Entry.Text is "";
updateComboStatsSubType();
string myText = combo_stats_stat_type.Entry.Text;
string myText2 = combo_stats_stat_subtype.Entry.Text;
string myText3 = combo_stats_stat_apply_to.Entry.Text;
......
......@@ -767,6 +767,85 @@ class SqliteStat : Sqlite
return myArray;
}
public static ArrayList Fv (string sessionString, bool multisession, string ini, string end, string jump1, string jump2, bool showSex)
{
string heightJump1 = " 100*4.9* (j1.tv/2) * (j1.tv/2) "; //jump1 tv converted to height
string heightJump2 = " 100*4.9* (j2.tv/2) * (j2.tv/2) "; //jump2 tv converted to height
string orderByString = "ORDER BY ";
string moreSelect = "";
if(ini == "MAX(") {
//search MAX of two jumps, not max index!!
moreSelect = " ( MAX(" + heightJump1 + ") )*100/MAX(" + heightJump2 + ") AS myIndex, " +
"MAX(" + heightJump1 + "), MAX(" + heightJump2 + ") ";
} else if(ini == "AVG(") {
moreSelect = " ( AVG(" + heightJump1 + ") )*100/AVG(" + heightJump2 + ") AS myIndex, " +
"AVG(" + heightJump1 + "), AVG(" + heightJump2 + ")";
}
//if we use AVG or MAX, then we have to group by the results
//if there's more than one session, it sends the avg or max
string groupByString = "";
if (ini.Length > 0) {
groupByString = " GROUP BY j1.personID, j1.sessionID ";
}
//if multisession, order by person.name, sessionID for being able to present results later
if(multisession) {
orderByString = orderByString + " person.name, j1.sessionID, ";
}
dbcon.Open();
dbcmd.CommandText = "SELECT person.name, person.sex, j1.sessionID, " + moreSelect +
" FROM jump AS j1, jump AS j2, person " +
sessionString +
" AND j1.type == '" + jump1 + "' " +
" AND j2.type == '" + jump2 + "' " +
//weight of SJ+ jump is 100% or equals de person weight
//the || is "the || concatenation operator which gives a string result."
//http://sqlite.org/lang_expr.html
" AND (j1.weight == \"100%\" OR j1.weight == person.weight||'" + "Kg' ) " +
" AND j1.personID == person.uniqueID " +
" AND j2.personID == person.uniqueID " +
groupByString +
orderByString + " myIndex DESC ";
Console.WriteLine(dbcmd.CommandText.ToString());
dbcmd.ExecuteNonQuery();
SqliteDataReader reader;
reader = dbcmd.ExecuteReader();
string showSexString = "";
string returnSessionString = "";
string returnJump1String = "";
string returnJump2String = "";
ArrayList myArray = new ArrayList(2);
while(reader.Read()) {
if(showSex) {
showSexString = "." + reader[1].ToString() ;
}
if(multisession) {
returnSessionString = ":" + reader[2].ToString();
} else {
//in multisession we show only one column x session
//in simplesession we show all
//FIXME: convert this to an integer (with percent or kg, depending on bool percent)
returnJump1String = ":" + reader[4].ToString();
returnJump2String = ":" + reader[5].ToString();
}
myArray.Add (reader[0].ToString() + showSexString +
returnSessionString + ":" + //session
reader[3].ToString() + //index
returnJump1String + //jump1
returnJump2String //jump2
);
}
reader.Close();
dbcon.Close();
return myArray;
}
public static ArrayList GlobalNormal (string sessionString, string operation, bool sexSeparated,
int personID, bool heightPreferred)
{
......@@ -827,6 +906,10 @@ class SqliteStat : Sqlite
return myArray;
}
//currently disabled GlobalIndexes in stats global
//only for showing less info in global.
//If enable another time, remember to create a GlobalIndexes for IndexQ, FV an others
/*
public static ArrayList GlobalOthers (string statName, string statFormulae, string jumpTable, string jumpType, string sessionString, string operation, bool sexSeparated, int personID)
{
dbcon.Open();
......@@ -889,7 +972,12 @@ class SqliteStat : Sqlite
return myArray;
}
*/
//currently disabled GlobalIndexes in stats global
//only for showing less info in global.
//If enable another time, remember to create a GlobalIndexes for IndexQ, FV an others
/*
public static ArrayList GlobalIndexes (string statName, string jump1, string jump2, string sessionString, string operation, bool sexSeparated, int personID)
{
dbcon.Open();
......@@ -967,5 +1055,6 @@ class SqliteStat : Sqlite
return myArray;
}
*/
}
/*
* This file is part of ChronoJump
*
* ChronoJump is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* ChronoJump is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Xavier de Blas:
* http://www.xdeblas.com, http://www.deporteyciencia.com (parleblas)
*/
using System;
using System.Data;
using Gtk;
using System.Collections; //ArrayList
public class StatDjQ : Stat
{
protected string [] columnsString = {
Catalog.GetString("Jumper"),
Catalog.GetString("Q Index"),
Catalog.GetString("Height"),
Catalog.GetString("TV"),
Catalog.GetString("TC"),
Catalog.GetString("Fall") };
//if this is not present i have problems like (No overload for method `xxx' takes `0' arguments) with some inherited classes
public StatDjQ ()
{
this.showSex = false;
this.statsJumpsType = 0;
this.limit = 0;
}
public StatDjQ (Gtk.TreeView treeview, ArrayList sessions, int newPrefsDigitsNumber, string jumpType, bool showSex, int statsJumpsType, int limit)
{
this.dataColumns = 5; //for simplesession (index, height, tv, tc, fall)
this.jumpType = jumpType;
this.limit = limit;
if(sessions.Count > 1) {
store = getStore(sessions.Count +3); //+3 (for jumper, the AVG horizontal and SD horizontal)
} else {
store = getStore(dataColumns +1); //jumper, index, height, tv, tc, fall
}
treeview.Model = store;
completeConstruction (treeview, sessions, newPrefsDigitsNumber, showSex, statsJumpsType);
prepareHeaders(columnsString);
}
public override void PrepareData()
{
string sessionString = obtainSessionSqlString(sessions);
bool multisession = false;
if(sessions.Count > 1) {
multisession = true;
}
string indexType = "indexQ";
if(statsJumpsType == 3) { //avg of each jumper
if(multisession) {
string operation = "AVG";
processDataMultiSession (
SqliteStat.DjIndexes(indexType, sessionString, multisession,
operation, jumpType, showSex),
true, sessions.Count);
} else {
string operation = "AVG";
processDataSimpleSession ( cleanDontWanted (
SqliteStat.DjIndexes(indexType, sessionString, multisession,
operation, jumpType, showSex),
statsJumpsType, limit),
true, dataColumns);
}
} else {
//if more than on session, show only the avg or max of each jump/jumper
if(multisession) {
string operation = "MAX";
processDataMultiSession ( SqliteStat.DjIndexes(indexType, sessionString, multisession,
operation, jumpType, showSex),
true, sessions.Count);
} else {
string operation = ""; //no need of "MAX", there's an order by jump.tv desc
//and clenaDontWanted will do his work
processDataSimpleSession ( cleanDontWanted (
SqliteStat.DjIndexes(indexType, sessionString, multisession,
operation, jumpType, showSex),
statsJumpsType, limit),
true, dataColumns);
}
}
}
public override string ToString ()
{
return "pending";
}
}
/*
* This file is part of ChronoJump
*
* ChronoJump is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* ChronoJump is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Xavier de Blas:
* http://www.xdeblas.com, http://www.deporteyciencia.com (parleblas)
*/
using System;
using System.Data;
using Gtk;
using System.Collections; //ArrayList
public class StatFv : StatIeIub
{
public StatFv () {
}
public StatFv (Gtk.TreeView treeview, ArrayList sessions, string indexType, int newPrefsDigitsNumber, bool showSex, int statsJumpsType, int limit)
{
this.dataColumns = 3; //for simplesession (IE, cmj, sj)
this.limit = limit;
this.indexType = indexType; //"IE" or "IUB"
jump1="SJ+";
jump2="SJ";
if(sessions.Count > 1) {
store = getStore(sessions.Count +3); //+3 (for jumper, the AVG horizontal and SD horizontal)
} else {
store = getStore(dataColumns +1); //jumper, IE, cmj, sj
}
treeview.Model = store;
completeConstruction (treeview, sessions, newPrefsDigitsNumber, showSex, statsJumpsType);
columnsString[0] = Catalog.GetString("Jumper");
columnsString[1] = indexType;
columnsString[2] = jump1 + " (" + Catalog.GetString("height") + ")";
columnsString[3] = jump2 + " (" + Catalog.GetString("height") + ")";
prepareHeaders(columnsString);
}
public override void PrepareData()
{
string sessionString = obtainSessionSqlStringIndexes(sessions);
bool multisession = false;
if(sessions.Count > 1) {
multisession = true;
}
if(statsJumpsType == 3) { //avg of each jumper
if(multisession) {
processDataMultiSession (
SqliteStat.Fv(sessionString, multisession, "AVG(", ")", jump1, jump2, showSex),
true, sessions.Count);
} else {
processDataSimpleSession ( cleanDontWanted (
SqliteStat.Fv(sessionString, multisession, "AVG(", ")", jump1, jump2, showSex),
statsJumpsType, limit),
true, dataColumns);
}
} else {
//if more than on session, show only the avg or max of each jump/jumper
//FIXME: indexes max value have two possibilities:
//max jump1, max jump2 (seems more real)
//max jump1, min jump2 (index goes greater)
if(multisession) {
processDataMultiSession ( SqliteStat.Fv(sessionString, multisession, "MAX(", ")", jump1, jump2, showSex),
true, sessions.Count);
} else {
processDataSimpleSession ( SqliteStat.Fv(sessionString, multisession, "MAX(", ")", jump1, jump2, showSex),
true, dataColumns);
}
}
}
public override string ToString ()
{
return "pending";
}
}
......@@ -82,6 +82,11 @@ public class StatGlobal : Stat
processDataMultiSession ( SqliteStat.GlobalNormal(sessionString, operation, showSex,
personID, heightPreferred),
true, sessions.Count );
//currently disabled GlobalIndexes in stats global
//only for showing less info in global.
//If enable another time, remember to create a GlobalIndexes for IndexQ, FV an others
/*
processDataMultiSession ( SqliteStat.GlobalOthers("DjIndex", "(100*((tv-tc)/tc))", "jump", "DJ",
sessionString, operation, showSex, personID),
false, sessions.Count );
......@@ -102,6 +107,7 @@ public class StatGlobal : Stat
processDataMultiSession ( SqliteStat.GlobalIndexes("IUB", "ABK", "CMJ",
sessionString, operation, showSex, personID),
false, sessions.Count );
*/
}
public override string ToString ()
......
/*
* This file is part of ChronoJump
*
* ChronoJump is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* ChronoJump is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Xavier de Blas: