Commit Graph

69 Commits

Author SHA1 Message Date
Alejandro Martinez
92c89d43ea Metric to Imperial conversion applied twice in Trends->RideSummary
Now it is done by RideMetric::toString. Fixes #1424
2015-06-30 19:25:55 -03:00
Mark Liversedge
8a09fe0ca2 Enable user to configure autodiscovery
.. select which kind of intervals we want

.. makes it faster and also reduces the size of
   the rideDB.json file quite dramatically which
   may be useful for some users.
2015-06-27 12:30:27 +01:00
Alejandro Martinez
0275d4b52f Use sport specific metric for PMC in RideSummaryWindow
For single ride use sport specific base metric
For date range use sport specific base metric if filtered activity
list is homogeneous or combined otherwise.
2015-06-07 22:52:33 -03:00
Mark Liversedge
51077668e5 Route Search Refactor Part 2 of 2
.. Route segments are found during interval refresh

.. Config/routes.xml only holds config now

.. The fingerprint for a rideitem includes the route
   fingerprint now so it will refresh automatically
   when the routes config changes

.. if no routes are defined then no work is done, so the
   amount of work is really defined by the user

NOTE: RouteWindow, and now, RouteItem will need to
      be reworked and fixed up for v4.0
2015-05-23 18:40:10 +01:00
Mark Liversedge
bf4ca0af64 Remove old Intervals View
.. we are taking a different approach for v3.2

.. the auto discovery will augment rides and maintain a cache
   of all intervals across all rides

.. the discovered intervals will be selectable alongside ride
   intervals in the sidebar

.. new interval views will be developed in v4.0
2015-05-01 14:03:40 +01:00
grauser
49e964f585 Interval: Add interval type (Device, User, Peak, Route,...) 2015-04-30 18:20:22 +02:00
Mark Liversedge
ae29908a3d Add Ward/Smith Model 2015-04-06 11:47:06 +01:00
Joern
5df7503904 Report- File "Open for Write" errors
... for all config files, which need to be written, show error Popup, if
file cannot be openend in "Write" mode
2015-02-21 19:03:23 +01:00
Joern
fe93793e5b Estimates Plot - some fixes
... shift plot if start date is earlier than any Power Estimates exist
... enhance grouping (calculation of averages for month/years/all
grouping)
... adjust estimates calculation
... to calculate non-overlapping weeks data
... to not create any "infinite" data for weeks before the first Power
based actitivity exists
2015-02-15 16:11:58 +01:00
Alejandro Martinez
9348dcf52d Removed special case for Pace in RideSummary
Used RideItem::getStringForSymbol
Modified RideCache::getAggregate to use RideMetric::toString
2015-02-04 21:30:47 -03:00
Mark Liversedge
efe7a5d0dd Fix RideNavigator::cursorRide()
.. new ridecache model and proxy interaction needed
   fixing up -- cursorRide() was not working at all !

Fixes #1300
2015-02-04 20:34:54 +00:00
Alejandro Martinez
436128f340 Fixed lower-is-best for Pace metrics
Also removed isTime since time formatting assumes seconds and they are in minutes,
it remains pending to change formating to mm:ss.
2015-02-03 15:06:10 -03:00
Mark Liversedge
df94e42e58 Deprecate Lucene
.. use a simple free text search against the ridecache now we
   have all the texts available and in memory

.. no need to maintain an index, no dependency on a horrid lib
   with nasty dependencies and its faster too

.. the free text search is very simple, will need to bolster it
   over time e.g. it matches text not words
2015-01-13 20:52:01 +00:00
Joern
f655dbdde8 Introducing /quarantine for acvitities cause RideCache to crash/dump
... for RideImport and RideDownload the created .JSON files are firstly
stored in /tempActivities and only moved to /activities after
successfull updating RideCache (with this files with "bad data" cause
RideCache calculations to crash can be identified when starting GC again

... in GC CrashDialog the /tempActivities are documented in the Crash
Log and moved to /quarantine for further analysis

... small addition - the existence of the new directory structure is
verified when opening an Athlete - missing directories are added to
ensure a consistent structure being in place at all times
2015-01-11 13:22:47 +01:00
Mark Liversedge
0af1bf78a5 Fix CP Estimates
.. we filtered out the CP2 and CP3 estimates by checking
   for non-zero values for PMax and FTP that neither of
   these models provide estimates for !
2015-01-08 15:39:55 +00:00
Mark Liversedge
dc8cb24f43 Delete Rides during refresh
.. place on a delete list and clear them once
   the ridecache refresh completes.
2015-01-07 15:32:05 +00:00
Mark Liversedge
f5ba4743da Restart RideCache refresh on Config changes
.. need to restart any in-progress refresh if you change
   config that affects it whilst it is running !
2015-01-07 15:08:41 +00:00
Damien
bae36e6b2a BasicRideMetrics: Add metrics for Garmin Cycling Dynamics - part 1 (Avg) 2015-01-05 23:00:44 +01:00
Claus Assmann
b71aa39d3a Backup Rename error message
.. the "bak" directory was added during the development cycle
   and will not be present for users that worked with an early
   development build

.. when deleting rides the "bak" rename will fail due to the missing
   directory

.. the error message has been changed to provide the details of the
   directory where the failure is occurring to help signpost users
   to the problem
2015-01-01 13:13:32 +00:00
Mark Liversedge
6c5f726bf5 Fix delete/add ride bugs
.. fix a few SEGV!
2015-01-01 09:58:11 +00:00
Mark Liversedge
3f6b6d2577 Refresh done, remove qDebug
.. refresh is complete pending a couple of tricky
   scenarios to resolve in the next week or so.
2014-12-31 17:48:10 +00:00
Mark Liversedge
b28d7a5a40 Refresh AllPlot when WBAL config changes
.. extracted out CONFIG_WBAL to support this
2014-12-31 15:22:55 +00:00
Mark Liversedge
56b5114af7 Update Note coloring during RideItem::checkStale()
.. it takes as long to check if its out of date
   as it does to just change it !

.. would be pointless to kick of a refresh just for this.
2014-12-31 14:06:21 +00:00
Mark Liversedge
ec217367c3 Notify config changed - UNITS, GENERAL, PMC
.. Weight changes when units change which is a bit
   crappy, should fix that somehow.
2014-12-31 10:26:28 +00:00
Mark Liversedge
d78c0bf402 Notify config changed - ATHLETE
.. notify if Athlete weight or height were changed by
   the user during the config dialog

.. no longer included in zones fingerprint

.. ridecache now picks up on specific config changes
2014-12-31 09:32:47 +00:00
Mark Liversedge
3b4e2b4372 Developer slow refresh
.. add DEFINES += SLOW_REFRESH to slow down the
   background refresh on hosts with good performance
   when testing refresh code !
2014-12-30 10:39:07 +00:00
Mark Liversedge
30cfaf853a Withings, Summary + Cache refresh update
.. when downloading withings data the cache is refreshed

.. when the cache refreshes it notifies the *current* ride
   changes if it is refreshed

.. ridesummary has been updated to process rideChanged() signals.
2014-12-29 22:41:08 +00:00
Claus Assmann
47801c2b52 Clucene is optional ! 2014-12-29 19:37:04 +00:00
Mark Liversedge
07bc4249e3 Remove qDebug
.. can uncomment during development
2014-12-29 16:29:29 +00:00
Mark Liversedge
254f463760 Introduce Context::rideChanged() signal
.. to let charts etc know that the *current* ride has
   changed and will need to be replotted

.. the editor / dataprocessor functions have also been
   integrated into the RideItem to notify the change

.. there is a qDebug() in RideCache in lieu of updating
   all the charts to refresh on this signal.
2014-12-29 16:03:02 +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
e7399ba4f2 Lucene empty index optimisation
.. rather than check if lucene index contains every ride
   upon startup just force a rebuild of the index is missing.

.. if the index gets out of sync its because people are copying
   data and so they should delete the index when they do so
   to make sure it stays in sync
2014-12-29 10:24:10 +00:00
Mark Liversedge
78e2b63596 RideDB ::save() after ::refresh()
.. rather than waiting for close, since if there is a
   crash etc after the refresh it needs to run again.
2014-12-27 14:20:55 +00:00
Mark Liversedge
4cb47c7abd Fix Meta Autocomplete ranking
.. when using '*' for values we autocomplete based upon
   previously entered values for the field, but we didn't
   take into account ranking.

.. now the autocomplete list is ranked to most popular values
   complete first.
2014-12-26 10:56:33 +00:00
Mark Liversedge
98720f099e Use C++ <cmath> not C <math.h>
.. it clashes, and also its deprecated for C++ sources
2014-12-25 20:38:18 +00:00
Mark Liversedge
7ad2bda418 RideFileCache now refreshed in RideItem
.. and fixed sort order problem
2014-12-25 13:59:38 +00:00
Mark Liversedge
44aea09d97 Deprecate SQL metricDB
.. removes across the code base

.. need to fixup RideFileCache and Lucene refresh
   within the RideItem/RideCache framework, they will
   NOT be refreshed at present

.. need to look at how charts get refreshed on data
   changes now RideItem provides a more granular
   mechanism (look for XXXREFRESH in code)

.. New Intervals code will definitely NOT compile
   and needs to be redesigned/reimplemented to fit
   in with the ride cache
2014-12-24 20:24:34 +00:00
Mark Liversedge
fe2e9b467b RideCacheModel Part 1 of 3
.. getting the model in and integrated with the
   ride list and diary

.. next steps to connect up to ridecache methods
   ::addRide and ::removeCurrentRide.

.. then fix up nits/bugs with diary view etc
2014-12-24 17:36:46 +00:00
Mark Liversedge
a399c73de8 Fix SEGV on delete ride in AllPlot hover
.. tries to traverse the ride data after its been deleted.
2014-12-21 21:53:30 +00:00
Mark Liversedge
40b9be717f Rename SummaryBest to AthleteBest
.. and move to RideCache.h
2014-12-18 14:59:18 +00:00
Mark Liversedge
8f034fa5b2 RideCache::refreshUpdate(QDate)
.. updated to now pass the date at which the update has
   got to. So charts on need to refresh if the data they
   need is prior.
2014-12-18 13:57:06 +00:00
Mark Liversedge
7a5ca6f36a Fix reverse sorting of RideItem*
.. qSort needed a greaterThan function that worked
   with pointers not objects, so now we really do
   refresh in reverse.
2014-12-18 12:27:15 +00:00
Mark Liversedge
9f35459b55 RideCache refresh in reverse
.. also uses a copy to avoid delete/insert issues when adding
   and deleting rides during a refresh

.. but still need to consider the delete operation and marking
   items as in process or something
2014-12-18 11:35:18 +00:00
Mark Liversedge
698a598927 Migrate RideSummary (DateRange) to use RideCache
.. but compare mode still uses metricDB

.. and the code is still in need of tidy up
2014-12-17 17:03:45 +00:00
Mark Liversedge
bf7c80b73d Migrate TreeMap LTMPopup to use RideCache
.. the other half, LTMWindow using LTMPopup is now commented
   out and will need to be fixed when LTMWindow migrates to RideCache
2014-12-17 14:36:21 +00:00
Mark Liversedge
e88ac85f29 PD Estimates use 12 week rolling window
.. the clunky old way of using a 2 month rolling window has
   been reworked to use a 12 week rolling window making the
   code less susceptible to jumping around esp. on 1st of the month!
2014-12-15 15:05:18 +00:00
Mark Liversedge
96d2bea2d8 Refresh cache when version changes
.. so ONLY change version number of a refresh is going
   to be needed !!!

.. I updated rideDB version to 1.1 to ensure present gets
   refreshed as it is used by the PD model estimate code
2014-12-13 09:26:59 +00:00
Mark Liversedge
3a1c7309f3 Migrate refreshPDEstimates
.. from MetricAggregator to RideCache

.. will need to wipe out your rideDB.json before
   running to ensure present is set correctly.
2014-12-12 14:56:48 +00:00
Mark Liversedge
e97045703a Add RideItem ::color, ::isRun and ::present
.. as primary fields, and also load/save to cache.
2014-12-12 14:08:11 +00:00
Mark Liversedge
4b3abd3787 Migrate getRideMetrics() and friends
.. from DBAccess to RideCache

.. and also SummaryMetrics::getForSymbol() now available in
   RideItem to access the precomputed metrics for a single
   ride.
2014-12-12 12:53:40 +00:00