The call to RideFile::getWeight() in RideFileCache
computation ends up with a call the read the measures
table in the DB. This is BAD since it is called from
a thread.
We now call getWeight() in the metric aggregator before
launching the ridefilecache computation -- this will cache
the weight and avoid db access.
I've also removed the duplicate code in the w/kg metric code
too and it should be marginally faster at computing metrics
now.
BIG THANKS TO ILJA BOOIJ FOR HIGHLIGHTING THIS, DESPITE MY
INITIAL SCEPTICISM. I OWE HIM A PINT (OR TWO) :)
Fixes#604
Update to the histogram plot to now plot long term metrics.
It enables you to plot distribution of say, Intensity Factor
for a season or cycle.
You can select the y-axis metric too, so rather than just
plotting duration you could plot say, TSS accumulated for
different ride intensities.
Fixes#560
1. Use the whitespace analyzer so its easier to search for
tokens that are a mix of letters and numbers e.g. workout
codes and TT route names.
2. Search as you type. Since we have very small collections
to search across (typically no more than a couple of thousand)
there is no major overhead in searching as you type.
3. Search all texts by default not just the Notes field. This is
a more appropriate default and is less likely to confuse new
users. In addition, it is most likely what most users want to
do anyway.
Last commit added a new metric but didn't increment the DBAccess
DB schema version, causing DB functions to break. This patch just
increments the version to ensure the DB is rebuilt to include
the new metric.
A few months ago I commented out the calculation of metrics
for manual ride files. This was a hack to avoid fixing the code
to handle metric calculations from overrides where there are no
data points.
This annoyingly meant that the 'rides' metric was zero for manual
ride files, and any derived metrics similarly were zero.
This patch fixes that.
This might be meaningless for actual analysis, but helps to match numbers
of devices, that exclude time with zero power from the average
calculation.
While it's controversal to be usefull, this leaves the choice to the user.
There was a unit conversion from km->miles being applied to cadence. I have
removed the offending line.
I've also changed the precision so the we report cadence as an integer.
Fixes#601.
More complex than I had hoped for, to add
Temperature I needed to;
* introduce two new metrics Avg/Max temperature
* adjust metric conversion to include a conversionSum
for the C to F conversion
* handle temperature as a metadata field as well as a
ride data series
* handle the RideFile::noTemp value rather than just
averaging or calculating max.
Fixes#603.
All the existing wpk metrics concentrate
on the wpk for a fixed period, which is great
but we should also support it for an interval
(where it is arguably most interesting).
This patch fixes that.
Fixes#467.
Some users often switch between v2 and v3 of GC. Either
because they are testing or they are transitioning from
v2 stable to v3 development builds.
But at launch the metricDB is refreshed each time, since
the v2 and v3 metrics are so different.
To avoid this, from version 3 the metricDB file will be
called metricDBv3 to avoid conflicting with the original
metricDB file.
Fixes#376.
A popup bubble when hovering over the activity
history or an entry on the calendar.
It is a pre-cursor for the activity bar for
selecting rides and is available for any
widget to call (it is a member of mainwindow).
To support the data series indicator icons a
new metadata field 'Data' has been added to
store a string to represent the data series
that are present.
In addition, the Sport code is used to decide
if a bike/run/swim icon should be shown instead
of a string (but needs translation support when
we get round to that).
Lastly, it has been coded for horizontal alignment
but will need to be updated for the activity bar
to support vertical alignment.
This is an experimental feature and will develop
over time, specifically;
* you cannot define which metrics are show in the
bubble -- they are hardcoded at present
* the coloring is hardcoded, as is the font size
* Only the activity list and diary use it.
The background color on the calendar now reflects
the color configration.
The color for each ride is precomputed and stored
in the metricDB (so we don't have to scan the ride
everytime we need to determine its color).
As a happy by-product the ride navigator no longer
scans the text to determine the row color and is an
order of magnitude faster when repainting (although
most users are unlikely to notice in practice).
Fixes#448.
The DBAccess functions instantiate a local SpecialFields object in
almost every method. Profiling by Fredrik Lingvall has shown this
is rather expensive (and also unneccessary since they do not
change at runtime).
A specialFields member has been added to the MainWindow class
and is instantiated at startup and referenced in the DBAccess
methods instead.
Rough tests suggest a 10% speed improvement in metric refreshes.
Fixes previous CalDAV support, as MobileMe based calendars
now work ok. Additionally, a new 'id' field has been created
to provide a persistent and immutable identifier for a ride
file (regardless of changes to date/filename).
The URL provided in the Calendar config pane can now include
'@' symbols (they are translated to %40).
The CalDAV URL should be provided for a calendar collection and
not for a principal. Examples being (trailing slash is significant):
Google : https://www.google.com/calendar/dav/xxxx@gmail.com/events/
MobileMe: https://cal.me.com:8443/calendars/users/x.xxxxxxxxxx/home/
This patch introduces new functionality for working with
Heartrate based data.
* HR Zones can be defined, from Resting, Maximum and Lactate HR
* TRIMP metrics are calculated; TRIMP, TRIMP100 and Zonal TRIMP
* TRIMP metrics can be used to drive the PMC
* Time In Zone metrics for HR have been added
* Histogram window will now work with Power/HR zones
* User Settings have been added to record gender, weight and others
* RideFile has a new tag "Athlete" which is set to the athlete name
Fixes#140
The zone ranges configuration page caused a SEGV when deleting the
last zone. On inspection the zone configuration needed to be
revised since the UI was confusing and didn't allow fine grained
user editing (relying upon manual editing of the power.zones file).
The UI has been redesigned and fine grained editing of ranges, zones
and default zones is now supported.
The Zones class has been slightly modified to support the new UI and
existing members are better commented. In addition, the read/write
functions have been updated to always include the DEFAULTS section and
to set defaults according to manual zone setups when it is not present
(legacy support).
There are now 10 TimeInZone metrics to match the maximum of 10 zones
the user can define.
Fixes#78.
Fixes#34.
User configurable data entry for recording information about
each workout.
FEATURES:
* Config UI for defining tabs and fields to maintain
* Config UI for defining keywords and colors
* Data maintenance UI on RideSummaryWindow
* "Special" Metadata fields are related to current variables
* Read/Write new fields/metric overrides via GcRideFile
* Metadata extraction in WKO files
* Calendar uses keyword and color config
* Numeric metadata is plottable on the Metric charts
*Metric refresh has been optimised
A user configurable chart for showing ride metrics and
other calculated values over time.
* Uses SQLITE database to store metrics
* Supports any metric available from the metric factory
* Adds new MaxHr, VI, Peak Power and Time In Zone metric
* Also includes LTS/STS/SB for PM charting
* Aggregates in days, weeks, months or years
* Reads and Updates seasons.xml
* Adds cycles and adhoc date ranges in seasons.xml
* Date ranges can be selected on the plot with shift-left click
* Allows users to customise preferences for color, symbols et al
* Allows user to customise metric names and unit names
* Supports smooth curves and topN highlighting
* Has a linear regress trend line function
* Allows users to save charts to charts.xml
* A default charts.xml is built-in
* A chart manager to import/export/rename/delete charts etc
* Provides a tooltip to provide basic datapoint information
* Performance Manager adjusted to use the MetricDB
* User configurable setting for SB calculation (today/tomorrow)