Commit Graph

117 Commits

Author SHA1 Message Date
Mark Liversedge
c698ab4ebf Default Weight Refresh
.. if the default athlete weight is changed then all ride
   metrics need to be recalculated to reflect the new default

.. any cached values need to be invalidated so interval metrics
   reflect the new weight (if needed)

It would be better for users to maintain weight either against the
ride in the "Weight" field, or via Withings !
2014-07-26 11:38:00 +01:00
Mark Liversedge
1ab335b0b3 w/kg even in imperial !
Fixes #869
2014-07-02 20:34:18 +01:00
Mark Liversedge
1066dd2975 Fix W'bal compare mode
.. it was accidentally omitted and somehow got lost and
   never added back.

.. we now show w'bal in compare mode and its probably one of
   the most interesting comparisons !!!!

Fixes #958
2014-07-02 13:57:52 +01:00
Mark Liversedge
7c7989a803 Fix Average Temperature Issues
.. Don't include -255 in average

.. Don't show -255 in ride navigator

.. Don't show a value on summary if not preset
2014-06-20 12:59:03 +01:00
Mark Liversedge
c85e4aa651 RideFile(RideFile*) can set context too
.. so no need to do it everywhere we create a temporary
   ridefile for computing metrics.
2014-05-20 21:05:18 +01:00
Mark Liversedge
a0313732e1 Fix interval metrics that use CP and Weight
.. by making sure the temporary RideFile used to calculate the
   interval metrics contains the tags from the main Ridefile.
2014-05-20 18:47:37 +01:00
Mark Liversedge
587feca1e3 Fix RideFile::getWeight() Withings bug
.. the update in commit 53871e9 inadvertently broke
   withings weight being used.
2014-05-19 16:12:48 +01:00
Mark Liversedge
d19ae6ac43 Fix gcc compile time warnings
.. in preparation for 3.1 release
.. but still need to fixup for Mac clang too
2014-05-12 09:07:07 +01:00
Damien
84928380bd Add hemoglobin SmO2% and tHb data series (Moxy) 2014-04-19 09:22:06 +02:00
Mark Liversedge
1497fd0958 Add Pedal Data to Scatter Plot
.. now plots left and right curves for the
   Vector/Rotor balance/TE and PS data/
2014-04-14 17:04:06 +01:00
Mark Liversedge
cc70788085 Add Vector/Rotor TE and PS data series
.. Added the torque effectiveness and pedal smoothness
   data series to the RideFile structures.

.. The only file formats that support it at this stage
   are Fit and  GoldenCheetah JSON.

.. As more file formats support it we will add it here.

.. The charts/editor now need to be updated to support
   these new data series.
2014-04-11 13:46:10 +01:00
Mark Liversedge
885fe498d5 Anaerobic TISS update for RideFile
.. so ride plot of it as a data series is correct
2014-03-23 16:52:57 +00:00
Mark Liversedge
d69ebddb1d Anaerobic TISS
Added Anaerobic TISS from Dr Skiba to complement
the Aerobic TISS added recently.

Added to;
* Metrics
* Ride Plot
* PMC metrics
2014-03-22 10:47:44 +00:00
Mark Liversedge
42bfcdc7e2 Attempt to fix aPower calculation 2014-03-18 19:59:28 +00:00
Mark Liversedge
b81eb146fd Aerobic TISS fixup
.. for rides with samples other than 1s recording.
2014-03-17 21:54:30 +00:00
Mark Liversedge
89017fe2a5 Stress Metric Prototypes
Added a few new training stress metrics whilst discussing
and working on a multicomponent view of training stress.

This is all a wip falling out of discussions around stress
metrics beyond the old TSS/BikeScore models.

For now this just includes;
1. Aerobic Training Impact Scoring System on PM/PMC
2. Work (Kj) above/below CP on PM/PMC
3. Aerobic TISS on the Ride Plot

There is lots more to come; specifically around Anaerobic TISS,
looking again at polarised training and personalised training stress
based upon the individual's CP model.
2014-03-17 20:51:57 +00:00
Mark Liversedge
0144a3016e Fixup Unicode 'Delta' character
.. it didn't display properly on Linux (and possibly
   Windows).
2014-02-26 21:28:44 +00:00
Mark Liversedge
f65237e226 Delta Series Fixups
.. ignore hr drops
.. initialise datapoints
.. ignore time goes backwards
2014-02-26 11:38:47 +00:00
Mark Liversedge
d173dc586e Tidy Up Delta Series
.. simplified acceleration calculation to convert to m/s before calculation

.. removed distribution for deltas as they were HUGE and introduced a
   terrible performance degradation where aggregation took >30s for a
   ride set that previously took <5s.
2014-02-26 09:18:44 +00:00
Mark Liversedge
4e9d26d2e0 Delta Watts, Torque, Cadence and HR
.. Following on from the recent update to add acceleration
   this update adds other derived data series based upon the
   rate of change.

.. Added to the ride plot and the CP plot.

Not sure of the overall utility of these updates but bear in
mind that they are targetting sprinting and track users and
analysis.

As well as the positive side of this (development of power
cadence etc) we also want to think about and collect data
on fatigue rate (possibly only power and torque)
- fatigue over time
- fatigue over pedal stroke
2014-02-25 18:44:53 +00:00
Mark Liversedge
a101581dc2 Fixup CP interval plot
.. w/kg and accel were a mess and the code didn't honour
   decimal places properly.
2014-02-22 15:12:52 +00:00
Mark Liversedge
734f690e1b Acceleration is m/s/s
.. so don't apply metric to imperial conversion and don't
   label it as km/s !
2014-02-22 13:45:01 +00:00
Mark Liversedge
ec3ddfaaca Add Acceleration Data Series
.. to ride plot only at this point, but will add to
   CP curve etc later

.. will also need to add rate of change for HR, Cadence
   Power as well too.
2014-02-21 20:04:07 +00:00
Mark Liversedge
d590e58e41 Ride Plot Highlight Interval on Hover
.. As you mouse over the ride plot it will now highlight
   the shortest interval that that point is within.

.. If an interval has been selected in the sidebar it will
   refrain from hover highlighting as it is distracting

.. Also fixed up the way the highlight curve works so it
   has its own axis and works regardless of the data series
   selected.
2014-02-10 19:24:04 +00:00
Mark Liversedge
121a4c691a Minimum CP for W'bal going negative
.. on ride plot, when W'bal is plotted we put a mesage to say
   that CP is wrong, and autosolve for W'bal to zero.

.. this patch also optimises WPrime to make it a member of the
   ridefile class and this always available (even for intervals).

.. fixed a SEGV when computing metrics for intervals by shifting
   the timestamps to always start from zero.
2014-01-22 20:48:42 +00:00
Mark Liversedge
87ba542197 What's in a name ?
The 4 views have been shown to be confusing -- it is not clear
to new users what their purpose is, and hence how or why they
are different.

So in an effort to reduce the confusion I've renamed a few
things to be much more explicit and specific.

.. We embrace the fact we are a cycling program and use the term
   RIDES not ACTIVITIES for all files

.. HOME is confusing, renamed to TRENDS

.. the ANALYSIS view name is confusing, its all about ANALYSIS
   to renamed to RIDES

There will no doubt be areas that are not renamed properly we
can fix those when the arise.
2014-01-12 13:06:00 +00:00
Mark Liversedge
df15888b0b AllPlot Compare Mode
.. extending the interval compare to the allplot chart.
2014-01-03 14:59:20 +00:00
Mark Liversedge
aa8605e8d5 QT5 -- 1 of 3
Porting the codebase to QT 5 (5.2) to get the
latest bug fixes, performance and improved platform
support.

This first part is to fixup the codebase to compile
on Qt 5, but some aspects have been broken (video).

The second part is to migrate from Qwt 6.0.1 to the
latest Qwt for multiaxis support.

The third part will be to fixup any platform specific
issues or issues identified at runtime.
2013-12-09 09:57:13 +00:00
Mark Liversedge
bef02d6783 Remove References in Dialog
.. you can now choose to remove reference lines in the
   allplot when you double click on the axis.

.. we might want to put the table and buttons for deleting
   references into the chart settings too (?)
2013-11-12 13:16:44 +00:00
Mark Liversedge
d4b6e0a1c3 Add Derived Series to Ride Plot
You can now plot NP, xPower and aPower on the
ride plot.

This has been done to provide transparency &
insight into the relationship between the derived
values and the recorded power values,
2013-11-07 12:04:44 +00:00
Mark Liversedge
d2c4d88e19 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
2013-11-06 16:41:25 +00:00
Mark Liversedge
e7fe0eb42f Add citation and references for aPower
Added comment in ridefile.cpp to reference the book
and research paper that aPower is based upon:

// Calculate derived data series, including a new metric aPower
// aPower is based upon the models and research presented in
// "Altitude training and Athletic Performance" by Randall L. Wilber
// and Peronnet et al. (1991): Peronnet, F., G. Thibault, and D.L. Cousineau 1991.
// "A theoretical analisys of the effect of altitude on running
// performance." Journal of Applied Physiology 70:399-404
2013-11-05 20:18:06 +00:00
Mark Liversedge
393fe9f0e7 Average aPower
Added an average aPower metric.

I also and found and fixed a couple of bugs along the way;

* intervals create a ridefile and need to explicitly call
  recalculateDerivedMetrics()

* the aPower calculation was using the calculated vo2max
  percentage the wrong way around (!)
2013-11-05 20:06:09 +00:00
Mark Liversedge
6353e6b329 Add aPower
Introduce altitude adjusted power 'aPower'.

This is a new ride data series that takes into account
the effect of altitude on power output.

At present we are only adding this as a derived data series
with the intention of making it possible to plot it on
the ride chart.

We will also introduce alternate metrics for average power,
bikescore etc that are based upon the aPower value.
2013-11-05 18:54:06 +00:00
Mark Liversedge
5cc70c2164 Add NP and xPower Derived Data Series
Calculate NP and xPower as a data series so we can
plot on the ride plot.

Have also added 'aPower' which will be coming in the
next few days - altitude adjusted power, which will also
have some associated metrics (a-xPower, a-NP, a-TSS etc).
2013-11-05 17:14:05 +00:00
Mark Liversedge
cc2a0efe3e Truncate Altitude values
We know the highesst point on Earth, so any activity that
contains an altitude greater than that is definitely incorrect.

This patch truncates the altitude to the maximum possible, this
has the happy by product of curing a major mem alloc crash in QWT
when trying to plot altitudes with very large values.

Fixes #700
2013-10-27 20:06:37 +00:00
Damien
ea2455a775 AllPlot: plot references lines 2013-07-18 21:51:07 +02:00
Mark Liversedge
d21ca376be MainWindow Refactor Part 3 of 5
Slowly migrating code  and data from the MainWindow
class to Athlete and Context classes.

This update moves the ride and interval lists and
data structures from MainWindow to Athlete.
2013-07-13 19:46:03 +01:00
Mark Liversedge
05f1d577db Refactor MainWindow Part 2 of 5
Decoupled classes from MainWindow to reference Context
and Athlete (and introduced a couple of new headers).

We no longer pass around a MainWindow pointer to children
but pass a context instead.

There are still a few pieces left in MainWindow that need
to move to a better place;
    * Setting/clearing filter selection
    * Working with Intervals
    * Adding/Deleting Rides
    * Save on Exit

As mentioned previously there are lots of other parts to
this refactor left to do;
    * break MainWindow Gui elements into Toolbar and Views

    * migrate from RideItem and Ridelist to ActivityCollection
      and Activity classes that are not tied into gui elements.

    * introduce Application Context and AthleteCollection
2013-07-11 14:02:02 +01:00
Mark Liversedge
e407237ac0 MainWindow Refactor Part 1 of 5
Breaking the MainWindow 'god object' into
separate classes for Athlete and Context.

Further updates will need to;
- break MainWindow Gui elements into Toolbar and Views

- migrate from RideItem and Ridelist to ActivityCollection
  and Activity classes that are not tied into gui elements.

- introduce Application Context and AthleteCollection

Once these are done we will be in a position to decouple
most classes from mainwindow and also introduce tabbed
athletes.
2013-07-07 15:50:28 +01:00
Damien
8a5ed3d4ba RideFile: Add Min, Max and Avg point 2013-06-22 14:42:18 +02:00
Mark Liversedge
44a023a30c getWeight() always sets weight_ to non-zero
Just in case .. to avoid threaded db access in RideFileCache.
2013-05-19 21:00:06 +01:00
Mark Liversedge
a53fe2f2e4 Fix SEGV on delete first activity
.. the RideFile::data member is used by the ride editor and was deleted
when a ridfefile is deleted, but we have no way of telling the editor.

.. now doesn't delete, which is a small memory leak.
2013-03-17 14:22:44 +00:00
Mark Liversedge
8bec8ff252 Code Cleanup: RideFile EditorData memory leak
.. when freeing memory for the ridefile we didn't delete
the memory allocated for editor data
2013-02-20 21:11:13 +00:00
Walter Bürki
d370fdee42 added left/right balance values into ridefile 2013-02-18 11:06:32 +01:00
Alejandro Martinez
dd17383ebe Enable RideFile seriesName translation
Also changed all references to QObject::tr for a version with the proper context
2012-12-20 15:55:47 -03:00
Damien
baed9f87c5 Remove warnings 2012-12-09 23:03:19 +01:00
Damien
7edb4fca0b Return cached value 2012-12-02 01:00:14 +01:00
Damien
7c9c7d68b8 The getWeight() method should find the last value of weight in measures if the last measure has no weight value 2012-12-02 00:53:05 +01:00
Damien
8eee2ddb25 Choose Metric/Imperial units in New Athlete dialog
fixes #34
2012-11-26 23:35:35 +01:00