Best aPower

Peak aPower durations now computed and cached;

* updated RideFileCache to work with aPower
* CP curve now allows you to plot aPower
* LTM plot allows you to plot aPower peaks
* DataFilter allows 'best(apower, duration)' function
This commit is contained in:
Mark Liversedge
2013-11-06 16:41:25 +00:00
parent ad559394c8
commit d2c4d88e19
7 changed files with 59 additions and 8 deletions

View File

@@ -43,6 +43,7 @@ Leaf *root; // root node for parsed statement
static RideFile::SeriesType nameToSeries(QString name)
{
if (!name.compare("power", Qt::CaseInsensitive)) return RideFile::watts;
if (!name.compare("apower", Qt::CaseInsensitive)) return RideFile::aPower;
if (!name.compare("cadence", Qt::CaseInsensitive)) return RideFile::cad;
if (!name.compare("hr", Qt::CaseInsensitive)) return RideFile::hr;
if (!name.compare("speed", Qt::CaseInsensitive)) return RideFile::kph;
@@ -145,7 +146,7 @@ void Leaf::validateFilter(DataFilter *df, Leaf *leaf)
case Leaf::Function :
{
// is the symbol valid?
QRegExp bestValidSymbols("^(power|hr|cadence|speed|torque|vam|xpower|np|wpk)$", Qt::CaseInsensitive);
QRegExp bestValidSymbols("^(apower|power|hr|cadence|speed|torque|vam|xpower|np|wpk)$", Qt::CaseInsensitive);
QRegExp tizValidSymbols("^(power|hr)$", Qt::CaseInsensitive);
QString symbol = *(leaf->series->lvalue.n);