Commit Graph

73 Commits

Author SHA1 Message Date
Mark Liversedge
cf59ac938e UI Nits: Less vibrant gradients
.. go back to more GC-like color defaults, which became a little
too vibrant in a recent update to introduce linear gradients to
the CP, Histogram and LTM plots.
2013-02-23 16:34:09 +00:00
Mark Liversedge
b389555bef Shade Selector on CP chart
- none - no shading on the all curve
- derived CP - as before using the CP value derived from all curve data
- CP - the value of CP for the time of the ride

NOTE: When in rangemode (i.e. on home) the CP is set to the mean CP for
the date range selected.
2013-02-16 13:41:55 +00:00
Jaime
f2da9a8b4f Code Cleanup: CpintPlot Memory leak
.. kept allocating a new RideFileCache but didn't delete
the previous one. Given their relatively large size this
can lead large amounts of memory lost in a short amount
of time.
2013-02-12 06:57:34 +00:00
Mark Liversedge
9f3f6112cd Code Cleanup: CP chart 2013-02-10 21:11:39 +00:00
Jaime
9280f5dd65 Move initialization of curveTitle to CpintPlot constructor from calculate() so the Cp title doesn't get overriden to blank after its first showing. 2013-01-24 21:15:34 -05:00
Andy Bryson
ff546e8471 Remove Boost Dependency - The Easy Bits
Replace boost stuff with QT or C++ equivalents
2012-12-27 17:04:36 +00:00
Mark Liversedge
c73b8fdc25 CP 'this' curve more prominent
Made 2px line rather than 1px to make it more
prominent on the CP chart.
2012-12-22 11:05:04 +00:00
Mark Liversedge
a4832d020f Tone down CP linear gradient
My eyes started to bleed at the burst of color
on the cp plot after the introduction of a
linear gradient there. Just toned it down a bit
for the "rainbow" all curve.
2012-12-22 10:53:19 +00:00
Mark Liversedge
ba1950cc27 UI Polish: More linear gradient on CP curve
Added linear gradient shading to the CP curve
2012-12-22 10:35:17 +00:00
Damien
aedc39e423 Choose Metric/Imperial units in New Athlete dialog
fixes #34
2012-11-26 23:35:35 +01:00
Mark Liversedge
a5bcec5265 Data Filter (Part 3 of 3)
Last part of the search/filter functionality;

* SearchBox now incorporates filter and search
  with a new widget. We can update this widget
  to include more fancy UI/Interactions without
  having to change the ride list or charts etc.

* Added search/filter widget to the relevant charts
  and screens; Metrics, TreeMap, CP, Histogram,
  Activity Log, Ride list (refactored out of MainWindow)

* Added namedsearches.xml and adding/selecting them
  from a drop down menu on the search box.

* Fixed some performance bugs related to duplicate
  signals and redraw/reprocessing. Also ensured that
  CLucene remains optional -- but means no search or
  filter functionality unless it is available.
2012-11-05 15:44:01 +00:00
Damien
02e95b140d Add Watts/Kg in the cpx cache files and in the CP plot
modified:   src/CpintPlot.cpp
	modified:   src/CriticalPowerWindow.cpp
	modified:   src/CriticalPowerWindow.h
	modified:   src/HistogramWindow.cpp
	modified:   src/RideFile.cpp
	modified:   src/RideFile.h
	modified:   src/RideFileCache.cpp
	modified:   src/RideFileCache.h
2012-07-08 11:03:20 +01:00
Damien
2f9130cd76 Qwt 6.0.1 Support
Upgrade to QWT 6.0.1, but still uses a locally patched copy
since support for 8 axes has not been included, despite it
being a relatively simple patch.

Fixes #634.
Fixes #567.
2012-02-12 10:43:15 +00:00
Mark Liversedge
5e53731443 Show date on CP bests tooltip 2011-12-25 11:47:37 +00:00
Mark Liversedge
2b73dc2cf7 Reinstate CP/AWC CP curve parameters on CP plot 2011-08-20 17:24:06 +01:00
Mark Liversedge
dcf78eaf3a Add VAM to CP curve
Very basic start, this will now let you plot
VAM on the CP curve. VAM is a measure of climbing
speed and for comparative purposes should be
normalised to the slope climbed.

In this first pass of implementation the VAM metric
is not normalised in any way. It merely represents
the climbing rate, in meters per hour, that was
sustained over each time interval from 5mins to the
ride duration.

If the ride is undulating then only ascension is
included, any time on the flat or descending is
included but meters climbed will be zero. This is
akin to the way we handle power where we include time
when freewheeling.

More sophistication is needed, especially normalising
the value to a common gradient (e.g. 10%). But this
will prove challenging when VAM is comprised of
undulating elements (i.e. gradient is cumulatively
zero, but could contain segments with steep parts).

It may be more appropriate to only measure VAM for
sustained climbing i.e. ignore ride sections when
descending or on the flat.

More thought needed.

Fixes #414.
2011-08-18 19:15:20 +01:00
Mark Liversedge
0c5b002501 Fix annoying gap in CP curve. 2011-07-09 20:18:10 +01:00
Mark Liversedge
f737579964 UI Cosmetics & Nits
Added a dropshadow effect for window tiles and made the
title embossed for a more professional look.

Also fixed a couple more compile time nits introduced
by recent commits.
2011-06-03 18:07:01 +01:00
Mark Liversedge
f39c3361c8 Sidebar, Ride List and Aeshetics
An update to the ride list on the left hand side
to enable the user to choose and sort or group-by
metrics, metadata fields and ride information.

In addition, the sidebar has been 'improved'
cosmetically and to require less screen estate.

Also, the ticks and frames on plots have been
adjusted to be more aesthtically appealling.

There is more to come on the look-and-feel front,
but this patch heralds some work on the sidebar
which needs to be resolved.
2011-06-01 16:34:24 +01:00
Mark Liversedge
ab3b7290ad Fix CP xPower/NP zoning. 2011-05-04 23:24:46 +01:00
Mark Liversedge
65fcf86ef6 CP Plot xPower/NP with color zones. 2011-05-04 22:27:10 +01:00
Mark Liversedge
d780719cf4 Mark Rages' Superfast Mean Max Computer
Mark Rages has developed a super fast and innovative
approach to identifying max-mean intervals. This
approach is 20% faster than the current approach and
importantly does not require "downsampling" of data
yielding much higher resolution for longer intervals.

The code has not been 'adjusted' to adopt QT style
containers (e.g. QVector) and uses malloc/free.

The primary innovations include:
* integrating the data series to reduce the operation
  for identifying an interval sum to a single subtract
  operation.

* Searching for max sum via a window-search rather
  than iterating over the entire series (divide / conquer)

Interestingly, now we have retained high resolution the
xPower algorithm still yields differing results to the
existing metric code. I have contacted Sean to get some
insight into why this might be the case, but suspect it
is related to the implementation of the xPower 25s EWMA.

Tip o' the hat to Mark Rages for this -- sometimes you
just have to accept that no matter how smart you think
you are, there are some folk who /really are/ smart!
2011-05-04 21:19:49 +01:00
Mark Liversedge
abef9e76ce Tooltip in CP chart
A tooltip is now shown on the CP chart if you move
the cursor over a point in the chart. The old picker
ribbon is still shown when using left-click with
the dates and values shown in the controls.
2011-04-29 14:14:20 +01:00
Mark Liversedge
35f52fdc9e Add xPower and Normalized Power to Critical Plot
The Skiba and Coggan metrics for xPower and NP
respectively can now be plotted on the CP curve.

There are two issues;
* Downsampling of data to 5s samples skews xPower's EWMA
* Setting scale to start at 30mins breaks the x-axis scale engine

Both issues need fixing, since the first skews xPower upwards and
the second suggests that xPower/NP are meaningful for durations
less than 30 minutes.

Fixes #307.
2011-04-28 23:51:55 +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
805e74de5a Inital V3 Branch 2010-12-30 17:35:23 +00:00
Mark Liversedge
a6a3c90c54 User Configurable Colors
A new config pane for defining color preferences for chart
curves, shading, background and grid lines et al. Default values
echo the current hard-coded values.
2010-04-01 10:29:13 -04:00
Mark Liversedge
79862d537f NULL/Empty ride checks
RideItem or RideFile or dataPoints() may be null or empty. This
is especially true of manual ridefiles. This patch adds some
checks for this situation and acts accordingly. Additionally, the
disable/enable of tabs depending upon ridefile type has been
adjusted to also include files with not dataPoints.
2010-03-25 09:16:29 -07:00
Mitsukuni Sato
93937badee add calls to tr() for translation 2009-12-17 19:10:36 -05:00
Sean Rhea
f0fda23b10 bug fix: don't let high go negative
You can recreate the bug by creating a new cyclist with only one
relatively slow and short ride, then clicking on the CP plot.
2009-12-13 18:21:05 -05:00
Damien Grauser
b0c60cbced add language selector and French translations 2009-12-12 15:23:46 -05:00
Sean Rhea
41ec865985 cp plot gets zones in its constructor 2009-12-10 10:16:57 -08:00
Sean Rhea
327cc57c1c RideItem::zones is just a pointer
...not a pointer to a pointer.
2009-12-10 10:16:57 -08:00
Sean Rhea
359fef980b fix season selector in cp plot 2009-11-27 16:46:09 -05:00
Sean Rhea
3b781ba89f need <algorithm> for std::lower_bound in Linux
Thanks to Mark Liversedge for pointing this out.
2009-11-15 19:53:18 -08:00
Sean Rhea
2ca6096b0e add y-axis shows work mode to CP plot
This mode is fun because the "CP Curve" is a straight line,
just like in the model:

  work = CP * time + AWC

You can also see that the AWC is the y-intercept.
2009-11-09 09:05:03 -08:00
Sean Rhea
1de1120cd8 fix bug in 2f8d101, need to strip path
The filename argument actually contained the whole path.  This fix passes
the filename and directory separately, so that the anchored regex works.
2009-11-09 09:50:51 -05:00
Sean Rhea
d2c108c296 misc cleanup 2009-11-07 14:42:09 -05:00
Sean Rhea
7394df755f delete NULL is a no-op 2009-11-07 14:27:01 -05:00
Sean Rhea
6150d4435f drop read_cpi_file, cleanup read_one 2009-11-07 14:23:51 -05:00
Sean Rhea
935d5846d9 don't fill in bestDates for today's ride 2009-11-07 14:19:46 -05:00
Sean Rhea
5c206f7b26 errors should be QMessageBoxes, not printfs 2009-11-07 14:15:36 -05:00
Sean Rhea
0b5cc3591c simplify very confusing code 2009-11-07 13:53:33 -05:00
Sean Rhea
0a411a6e4f little bits of CpintPlot cleanup
Cleanup whitespace, use scoped_ptr, prefer QVector over QList, etc.
2009-11-07 13:52:22 -05:00
Sean Rhea
eb17f53c08 progress dialog doesn't need to be a class member
We can also allocate it on the stack.
2009-11-07 13:52:09 -05:00
Sean Rhea
4373e89617 anchor regexp
Anchoring this regexp (i.e., making it start with a "^") reduces the time
it takes to load the first CP plot from 10 seconds to 6.5 seconds on
Sean's three years of rides.  Unbelievable, but repeatable.
2009-11-06 23:43:35 -05:00
Sean Rhea
46e87837a9 clean up and sorten cpi_filename_to_date 2009-11-06 23:36:43 -05:00
Sean Rhea
b72c32dc1a ~qwt_plot_item calls detach 2009-11-06 09:13:59 -05:00
Sean Rhea
9699e2d0c5 use foreach, tidy up code 2009-11-06 08:49:54 -05:00
Sean Rhea
252a19c9d5 fix leaked CPCurve 2009-11-06 08:38:38 -05:00