Commit Graph

36 Commits

Author SHA1 Message Date
Mark Liversedge
9acef56545 MetricAggregator less heap
Noticed when looking for memory/stack overflow issues that
the importRide function allocates an aggregator on the heap
for the lifetime of the method. No biggie, but better to use
stack for that.
2013-02-09 11:48:11 +00:00
Andy Bryson
49d8eb0fc3 Remove Boost
Replace boost checksum stuff.
Remove boost from versions
Remove Boost from src.pro
Remove Boost from gcconfig.pri.in
2012-12-29 22:59:28 +00:00
Mark Liversedge
a9d3bd6650 User configure Field to set colors from
The user can now select a metadata text field to use when
setting colors from keywords.

Fixes #32.
2012-11-23 22:01:41 +00:00
Damien
098a18d980 Refresh metrics for rides after a new weight form Withings download 2012-11-18 16:13:15 +00:00
Mark Liversedge
fe5fb53870 UI Nits: Daily/Weekly/Monthly Summary
You can now add the summary chart to the diary
view to get a summary of the date range currently
being summarised on that view.

Once the Home view has its own sidebar that selects
date ranges you will be able to add it there too
and summarise seasons etc.
2012-11-13 13:27:36 +00:00
g3rg
3d3af3b293 #381 Prevent statistics from refreshing for each file saved on close, and just run for the last file. Also covers #506 and #656 which are duplicates.
Fixes #381.
2012-10-22 22:30:00 +01:00
Mark Liversedge
9f17835732 Lucene should be optional
Fixup some of the recent commit for searching with support by
ensuring it is only used if lucene support is available.
2012-10-21 17:31:35 +01:00
Mark Liversedge
7a8d4377b9 Search/Filter using Lucene
Searching and filtering the ride list using a search box.
This is implemented using a new optional dependency on
CLucene.

Fixes #627.
2012-10-21 15:28:26 +01:00
Mark Liversedge
dd933e983d Fix JSON ride files going "missing"
The metric aggregator did not clear the "errors"
string list when refreshing metrics. This caused
the Json parser to always fail if preceding files
had warning messages.

This was quite common with fit files.

Fixes #552.
2012-01-06 09:00:41 +00:00
Mark Liversedge
b0c04b6824 Train View controls in Toolbar
Updated the realtime view (Train) to put the
realtime controls in the toolbar and removed
the old realtime controls chart.  They only
appear in Train view.

Additionally, the workout list and media list
are now in the sidebar under 'Workout Library'.

Finally, the first device configured is always
selected at startup, but this is a temporary
change until the realtime device wizard is coded
to set a default device.
2011-11-06 19:34:46 +00:00
Mark Liversedge
d144599ef8 Activity Popup Bubble
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.
2011-09-10 22:36:13 +01:00
Mark Liversedge
a119c6e55d Reinstate Colors on Calendar
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.
2011-09-05 10:54:40 +01:00
Mark Liversedge
f0511755c8 Improve metricDB query performance
Remarkably, using transactions even when querying
SQLITE databases improves performance. If you have
a lot of metric charts on the home window then this
patch will make startup a lot faster.

Additionally, as we refresh the charts as rides are
added and deleted this should help to reduce the
performance impact when lots of charts are open.

There is an SQLITE performance FAQ that provides
more background here;

http://web.utk.edu/~jplyon/sqlite/SQLite_optimization_FAQ.html
2011-08-07 11:13:25 +01:00
Mark Liversedge
8fa171c5d8 Metric refresh performance improvement (nosync)
The SQLITE database syncs (writes) to the metricDB file after
every atomic transaction. As the size of the database grows this
becomes very expensive (suspect it is writing the entire DB).

To avoid this behaviour the Metric refresh code opens and commits
a LUW for the entire refresh. This has shown to improve the performance
of the metric refresh quite dramatically (50% reduction in overall
time to complete a metric refresh).

Big props to Fredrik Lingvall for detailed analysis and profiling
of the code to identify the inefficiencies.
2011-05-12 20:13:55 +01:00
Mark Liversedge
ef1df5f2c3 More 'orphaned' Widgets
RideMetadata widget in mainindow is never placed into a layout
since it is not used for user entry/display.

MetricAggregator used QWidget as a base class, this should of
course have been QObject. It uses signal/slots but has no GUI.
2011-05-07 14:10:52 +01:00
Mark Liversedge
073631346a Refresh CPX file when importing ride files. 2011-05-07 11:26:59 +01:00
Mark Liversedge
543ce0b1fd merge srhea/GoldenCheetah.git release_3.0.0dev fixups. 2011-04-25 17:43:08 +01:00
Mark Liversedge
26dd0d7316 Fix CP calculation crash
Fixes SEGV in RideFileCache caused by incorrect recIntSecs setting
for a ridefile. Other reported issues with high power values for
short intervals was data related and not a bug.

Fixes #314.
2011-04-25 16:44:16 +01:00
Mark Liversedge
5999fe7600 Plot more data on the CP plot and use a binary cache file
This patch enables more data series to be plotted on a CP plot.
We can now show curves for heartrate, cadence, speed and torque
as well as the original power and energy.

The CP code is refactored into the plotting functions and a new
RideFileCache that precomputes the mean-max as well as distribution
data (for a later patch to show histograms across date ranges).

The code for computing mean-max values has been re-written and
significantly optimised by;
* computing 1s intervals up to 5mins only
* computing 20s intervals for the remainder of the ride
* downsampling data to 5s samples for longer durations
* using a binary file format (cpx) for faster read/aggregation
* using multiple threads

Testing on an old Athlon dual-core showed an increase in performance
over the old cpi code of approximately x20, but since new data series
are now computed it is only x4 faster. Quad/Octo core systems will
show a greater performance increase though.

Fixes #312.
Fixes #285.
2011-04-25 02:46:53 +01:00
Mark Liversedge
c4494524fd Plot more data on the CP plot and use a binary cache file
This patch enables more data series to be plotted on a CP plot.
We can now show curves for heartrate, cadence, speed and torque
as well as the original power and energy.

The CP code is refactored into the plotting functions and a new
RideFileCache that precomputes the mean-max as well as distribution
data (for a later patch to show histograms across date ranges).

The code for computing mean-max values has been re-written and
significantly optimised by;
* computing 1s intervals up to 5mins only
* computing 20s intervals for the remainder of the ride
* downsampling data to 5s samples for longer durations
* using a binary file format (cpx) for faster read/aggregation
* using multiple threads

Testing on an old Athlon dual-core showed an increase in performance
over the old cpi code of approximately x20, but since new data series
are now computed it is only x4 faster. Quad/Octo core systems will
show a greater performance increase though.
2011-04-25 02:20:19 +01:00
Mark Liversedge
ef4fc0781e Improved Calendar Support
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/
2011-01-22 18:54:05 +00:00
Mark Liversedge
60764d4e62 Export Metrics to CSV
A new menu option to export the ride metric data
as a CSV format file for manipulation in tools like
Excel.

It exports all rides (no date range) and outputs the
date in US format month/day/year, with time in 24hr format.

Additionally, a 'hack' to export all rides in GC format has
been removed since it was erroneously included in the initial
v3 branch.
2011-01-11 19:28:35 +00:00
Mark Liversedge
805e74de5a Inital V3 Branch 2010-12-30 17:35:23 +00:00
Damien GRAUSER
d2e8c63ed2 HR Zones and TRIMP Metrics
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
2010-10-31 18:08:48 +00:00
Mitsukuni Sato
effeb0f43b japanese translation 2010-05-01 10:22:25 -07:00
Mark Liversedge
74636b53e5 User Configurable Metadata
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
2010-04-01 10:29:13 -04:00
Mark Liversedge
0288579ce0 Long Term Metrics
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)
2010-02-25 08:01:43 -08:00
Sean Rhea
7446be0c24 MetricAgg gets const Zones 2009-12-10 10:16:58 -08:00
Sean Rhea
d3f8ad3a03 add descriptions to RideFile types
...and use these to get rid of the explicit list of ride file type
descriptions in the import wizard.
2009-10-31 15:00:37 -04:00
Sean Rhea
bdcd24af5b add RideFileFactory::suffixes() and use it
...to eliminate the problem of enumerating all possible file suffixes
all over the code.
2009-10-30 19:13:37 -04:00
Sean Rhea
8357a3bb6c fix absolutely atrocious use of tabs 2009-10-30 19:08:29 -04:00
Justin F. Knotzke
46d6001896 This code should now allow GC to be run off a USB stick.. or the Qollector. If GC finds a Library/GoldenCheetah next to the executable, it will use that location to store all of its settings and Libraries. Otherwise, it reverts to how GC handled settings previously. 2009-08-11 06:07:36 -04:00
Justin F. Knotzke
b5af19a4e9 Dan Connelly's MEGA patch.
It includes both powerzones and weekly summary plots.

  Thanks Dan.
2009-06-22 02:22:39 +00:00
Justin F. Knotzke
855f420e11 Fixed skiba_xpower bug. 2009-04-07 23:29:18 +00:00
Justin F. Knotzke
8c7cbc9d9e Small fix to LTM. Still in comments 2009-04-07 22:09:22 +00:00
Justin F. Knotzke
007b30681c This is the new Metrics SQL Database support. 2009-04-06 01:24:30 +00:00