private void button6_Click(object sender, EventArgs e) { double ftp = PowerCalc.GetFtp(dataFromFileOriginal, -1); string msg = String.Format("Functional Threshhold Power is {0} watts", ftp); MessageBox.Show(msg); }
private void button5_Click_1(object sender, EventArgs e) { if (!IsFileLoaded()) { textClearInterval.Text = "To detect interval you must load a file first."; return; } int intervals = PowerCalc.DetectClearInterval(dataFromFileOriginal); List <List <string[]> > totalData = BreakDataIntoChunks(intervals, dataFromFileOriginal); string average = CalculateAverageOfChunks(totalData); this.Cursor = Cursors.Arrow; chunkedData = average.Replace("\n", Environment.NewLine); tabControl1.SelectedIndex = 4; textClearInterval.Text = "There were " + Convert.ToString(intervals) + " intervals during the period of cycling."; }
/// <summary> /// Updates the GUI as per the required details /// </summary> private void UpdateAdvanceMetrics() { // calculate normalized power double np = PowerCalc.GetNormalizedPower(dataFromFileOriginal, 3); lblNormalizedPower.Text = Convert.ToString(PowerCalc.LimitTo2(np)); double ftp = PowerCalc.GetFtp(dataFromFileOriginal, 3); lblFunctionalThreshhold.Text = Convert.ToString(PowerCalc.LimitTo2(ftp)); double intf = PowerCalc.GetIf(np, ftp); lblIntensityFactor.Text = Convert.ToString(intf); double tss = PowerCalc.GetTss(dataFromFileOriginal.Count, np, intf, ftp); lblTrainingStressScore.Text = Convert.ToString(tss); double pb = PowerCalc.GetPowerBalance(dataFromFileOriginal); lblPowerBalance.Text = Convert.ToString(PowerCalc.LimitTo2(pb)); }
private void button7_Click(object sender, EventArgs e) { int intervals = PowerCalc.DetectClearInterval(dataFromFileOriginal); }
private void button8_Click(object sender, EventArgs e) { int res = PowerCalc.DetectClearInterval(dataFromFileOriginal); MessageBox.Show(Convert.ToString(res)); }
private void button5_Click(object sender, EventArgs e) { double normalizedPowerValue = PowerCalc.GetNormalizedPower(dataFromFileOriginal, -1); MessageBox.Show("Normalized power of the :: " + normalizedPowerValue); }