Commit Graph

37 Commits

Author SHA1 Message Date
Claus Assmann
9c057191b5 Fix comment typos 2015-06-07 16:31:56 +01:00
Mark Liversedge
b18d1a1b46 Added isSwim
.. to RideItem and DataFilter
2015-01-07 10:14:53 +00:00
Mark Liversedge
17fecc41c7 Reinstate Ramp Rate (RR)
.. on LTM plots

.. and rr(metric) function in datafilter
2015-01-02 12:05:41 +00:00
Mark Liversedge
d80a326d66 DataFilter Dynamic Bug
.. leaf traversal returned parent dynamic not ours.
2015-01-01 20:04:27 +00:00
Mark Liversedge
b3dbeb2517 Leaf::isDynamic SEGV
.. traversing null branches.
2015-01-01 19:30:34 +00:00
Mark Liversedge
4d381b877c Dynamic DataFilter Query
.. will rerun as ride selection changes.

.. but will never stop until cleared so use at your
   own risk, as will run EVERY time you select a
   different ride.
2015-01-01 17:57:36 +00:00
Mark Liversedge
fb5c6a2bcf Datafilter date 'current' to complement 'today'
.. but need to think how we can refresh when current ride changes.
2015-01-01 16:40:40 +00:00
Mark Liversedge
5692d362d0 ConfigChanged Part 1 of 3
.. introduce concept of configChanged(what) to
   pass details of what config has been changed

.. fixed zones changes to re-read after write
   to correct the save twice to get changes to
   zones bug.

.. next parts need to spot changes (part 2) and
   then action appropriately (part 3)
2014-12-29 13:41:50 +00:00
Mark Liversedge
f88a85b244 Add Date strings to datafilter
.. to enable queries such as;

   Date > "2014/02/28"
   for rides since 28th February 2014

.. might be useful to allow localised dates
   but using this makes it easier to document !

.. a query like today > "1900/01/01" will pass
   on all rides, but user being an idiot.
2014-12-25 09:49:42 +00:00
Mark Liversedge
da679d3f20 Add Date arithmetic to DataFilter
.. use "Date" and "Today" which evaluate to the number
   of days since 1st Jan 1900.

.. so a filter for the last 90 days would be:
   (Today - Date) < 30

.. will add date strings next.
2014-12-25 09:12:34 +00:00
Mark Liversedge
b11c750ae8 Add ATL, CTL, TSB aliases to DataFilter
.. for sts(TSS), lts(TSS) and sb(TSS)
2014-12-21 19:01:02 +00:00
Mark Liversedge
118a5fc4e4 Add PMC data filter functions
lts(metric), sts(metric), sb(metric) all return the PMC
value for the metric in question for the date of the ride
and therefore allow you to select rides based upon PMC data.

e.g. sb(TSS) > -5

could be considered a way of looking for rides when you were
in a well tapered state, or at least, when you should be able
to perform well.

or, e.g. lts(TSS) > 100

could be a way of looking for rides at peak form (if 100 is
a peak CTL for you).
2014-12-21 17:34:21 +00:00
Mark Liversedge
b737dcbebd Introduce Specification class
.. used to create a 'specification' against which we match
   a rideitem when plotting etc.

.. so rather than passing an array/vector/list of data when
   calling a plot, we pass the 'specification' to use instead.

.. the plots themselves should now iterate across the shared
   ride cache only plotting the items that pass the specification.

.. this should reduce memory usage and increase performance.
2014-12-17 10:57:57 +00:00
Mark Liversedge
ead01c69e9 Migrate DataFilter to use RideCache
.. no longer uses metricDB but traverses in memory cache
   and should be a lot faster.

NOTE: the line endings for DataFilter.{cpp,h} have been
     changed from dos to unix format which has resulted in
     the entire file being changed, apologies but needed to
     clean that up anyway.
2014-12-16 10:57:22 +00:00
Mark Liversedge
27f23fe4f9 Allow isRun in Filter
.. isRun is a bool, so isRun = 0 or isRun = 1
   will filter for runs.

.. note isRun does more than just look at sport
   it also checks if there are running data series
   in the file and may extend to more over time
2014-09-26 14:33:26 +01:00
Mark Liversedge
42ad13f848 DataFilter handle metadata numerics
.. code assumed numeric fields always metrics when they
   could also be metadata.

.. this also fixes checkbox tests too
2014-06-19 21:25:58 +01:00
Mark Liversedge
0fce4b27e8 Use w/kg units always, not wpk
.. and also allow lrbalance in data filter
2014-06-15 09:26:45 +01:00
Joern
fd61805bd7 Bikescore (TM) unique Handling (Part 2)
... have the same consistent handling for (TM) at all visible places
... do not allow Translation of BikeScore (since it's a TM and might
cause unexpected behavior)
... Have (TM) sign everwhere visible - only in Searches just use
"BikeScore" as Symbol
2014-06-11 18:55:23 +02:00
Joern
46ca3fb77a Data Filter - Internal Field Names + Multiple tr()
... allow/use only internal field names (delivered by Column Chooser) in
Data Filter expressions
... multipe tr()

(cherry picked from commit bc4164adab74dd82c0a0307d7d0fbb736f95ef0d)
2014-06-09 20:26:43 +02: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
d33f07661a Add Filter Sidebar
To allow selection of filters aka Named Searches when
plotting charts.

Fixes #732
2013-12-05 14:30:42 +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
5f67c9da7e Fast Best and TIZ queries
Added static functions to ridefilecache
to get best and tiz values for series and duration
or zones and glued them in to the datafilter code
recently added.

It uses seek (via QDataStream::skipRawData) and is
quite fast on my Linux development PC.

We now need to update the LTM settings dialogs to
the new mockups so we can plot custom durations for
peak power / NP etc too.

NOTE: Not tried on Windows / Mac, so may not be quite
      so fast there, will need to check.

      To try this out, in the search filter box type:

            best(power, 3600) > 250

      to filter only those rides where the best hour
      power is greater than 250 watts. It should
      return almost instantly.
2013-08-04 15:45:55 +01:00
Mark Liversedge
ab3524bb7f Fix segv on filter '(NP)'
Fixes the crash but the eval code is a bit of a
fuck up. It was evaluating children instead of
using recursion, and now we have lots more types
and expressions its all a bit of a mess.

Will need to rewrite to use recursion and it will
be a lot simpler!
2013-08-04 11:40:44 +01:00
Mark Liversedge
eb2a082293 Forgot wpk 2013-08-03 22:16:12 +01:00
Mark Liversedge
89108f3ff0 DataFilter update for formulas
Will now allow users to specify a formula using
the * / + - ^ operators. This can be used to specify
values (e.g. TSS > 100*2) or to calculate a totally
new user metric (e.g. Average_Heart_Rate / RPE).

Also added two functions as well;

1. best (series, duration)   which returns the best value
                             for the series of the given
                             duration in seconds.

                             Where series is one of; power,
                             hr, cadence, speed, torque,
                             xpower, np.

2. tiz (series, zone)        which returns the time spent
                             in the given series and zone
                             Where series is either power
                             or hr and zone is 1-10.

NOTE:

We know need to add the functions for retrieving the best and
tiz values from the ridefilecache without having to read the
entire file (ie. read the header and use lseek).
2013-08-03 21:25:26 +01:00
Mark Liversedge
59fd0db564 Move specialFields from MainWindow to Context
.. and tidy up a few unneccessary references to mainWindow
2013-07-14 11:51:34 +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
Mark Liversedge
52bfcc9f9a Fix Filter on BikeScore and 95% heart rate
As the parser fell over on them due to special characters
and having to convert the TM symbol to an HTML escape.
2013-04-26 17:13:16 +01:00
Mark Liversedge
4d5dffbf34 Code Cleanup: Win compile with CLucene 2013-03-16 11:16:56 +00:00
Mark Liversedge
cd2fca9346 Code Cleanup: Remove #if 0 code
As a personal habit I tend to use the C pre-processor to
comment out code blocks I don't want to remove. This is in
case the code will be required in the future.

I think it is now safe to say the code commented out is not
required -- most of it is legacy and marks the transition from
earlier designs or legacy code.

I've done this in one big commit since in theory it has no
functional change, and in future can look in this commit for any
code we may want to reinstate.
2013-02-11 15:00:00 +00:00
Mark Liversedge
0134931638 Fix compiler warnings
All are harmless but for the sake of clarity have
fixed them all bar a couple;

- Lucene grumbles about signed/unsigned conversion which
  is/isn't valid depending upon the version of CLucene you
  compile with. Either way it is harmless.

- QxtScheduleView has a bunch of issues, but since it is a
  third party widget its better to leave it unchanged.
2013-02-06 15:54:32 +00:00
Mark Liversedge
d0b009c922 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
Mark Liversedge
ebc0fbb7cf Silly cut and paste coding error
DataFilter code for string operations was
duplicated as cut and paste but not edited.
2012-10-29 18:44:53 +00:00
Mark Liversedge
66668018b0 Data Filter (Part 2 of 3)
Added evaluation of filters and integrated with the ride list, this
means the user can filter the rides listed.

Additionally the search box will highlight the filter in red if
it doesn't parse correctly, and a tooltip describes the errors.
2012-10-29 15:33:08 +00:00
Mark Liversedge
8993be1ff0 DataFilter fix compile on Mac
Conflicts between yacc symbols (LT) and HrZones.h means we
need to split out the cpp code and yacc grammar code.
2012-10-28 21:01:03 +00:00