Commit Graph

26 Commits

Author SHA1 Message Date
Alejandro Martinez
3395c7a4c9 Fix 3b50dd8 for reentrancy
Changed static variable for a member one,
the problem was apparent when opening a
different athlete besides the initial one.
2024-04-12 12:10:50 -03:00
Alejandro Martinez
3b50dd81a9 RideCache - send less load update notifications
To minimize overhead and avoid crashes on Windows
Fixes #4471
2024-04-10 19:37:35 -03:00
Joachim Kohlhammer
8718974722 Added a graphical splashscreen (#4468)
* Based on QSplashScreen
* Shrinking the image for low resolutions (screen width <= 1280, < 1024)
* Dynamically adding Golden Cheetahs version and build id
* Showing messages related to the current loading state (including the
  current counter)
* Closing the splashscreen as close as possible to showing the MainWindow
* The image (splashscreen.svg) was created using Inkscape
2024-04-08 11:34:55 -03:00
Alejandro Martinez
94d4bf7b9d QTextStream::readAll is too slow in Qt6 for rideDB
Using the QString from QByteArray constructor and
QFile::readAll is way faster on Qt6.x and similar on Qt5.15
2024-01-30 23:00:45 -03:00
Alejandro Martinez
cf71437d79 Qt6: utf8 for QTextStream is the default
Fixes #3953
2024-01-12 11:28:30 -03:00
Andreas Buhr
a0582445a0 Some more workarounds about iterators which cannot +1 (#3979) 2024-01-11 11:41:08 -03:00
Mark Liversedge
6c2a260b7e DataFilter - isAero
.. if a ride has sport "Aero" or has "AERO" xdata then it is
   identified as an aero ride file

.. isBike will now also check for isAero and return true, so
   you can record aero data but the ride is still treat as a
   bike ride in filters
2023-12-09 10:54:38 +00:00
Ale Martinez
cde4ec0194 Access global metadata.xml instead of athlete specific one
In remaining places: TreeMapWindow constuctor and APIWebService::listRides
Complements 80d7eed
2020-10-18 20:07:21 -03:00
Mark Liversedge
7a4be49492 RideCache load performance improvement
.. string manipulation using raw C since its simple character
   replacement, halved time over previous approach.

.. lookup rideitem in ridecache via binary search (lower_bound)
   rather than serial. Minor speed up.

.. Overall, loading should be noticeably quicker for most users.
2020-07-30 15:44:02 +01:00
Mark Liversedge
11092bf436 Athlete View 1 of 3
.. introducing the athlete view

.. at startup the first athlete is loaded as normal, but once the
   mainwindow is open the athletes are managed from the athlete view

.. athlete ride cache restore happen in background (via a thread) to
   enable the GUI to remain responsive whilst it takes place (since
   for most non-trivial cases it can take 30 seconds or more).

.. multiple mainwindows has been deprecated and whilst each open
   athlete is selected via a tab, this will change to a combobox
   in later commits.

.. the tiles in the athlete view do very little apart from show the
   avatar and progress/load status when an athlete is being loaded.

.. future commits will introduce more detail and actions for the
   athlete tile and deprecate the athlete tab bar for a combo on
   the toolbar (amongst other things).
2020-07-29 21:38:38 +01:00
Ale Martinez
42fa49c50f Add sport field to RideItem/RideDB as primary field
Exiting isRun/isSwim are preserved and new isRide/isXtrain added.
Use them in DataFilter to provide isRide, isRun, isSwim and isXtrain
and in RideSummary for better filtering of activities in rides, runs
swims and xtrains.
Part 1 of #3280
2020-04-06 19:13:43 -03:00
Ale Martinez
d913e75402 REST API - use default metadata.xml when the file does not exist
Fixes #3368
2020-03-07 20:49:40 -03:00
Ale Martinez
9fec594d41 RideCach::save uses item instead of intervals to access interval metrics
This error was introduced in fa9a59d60c
Fixes #3244
2019-12-07 19:44:25 -03:00
Eric Christoffersen
fa9a59d60c Speedup critical string handling in RideCache Save 2019-12-02 19:54:48 -03:00
Ale Martinez
794e097f8f Changed RideDB to save metrics with aggregateZero even when value is zero
Since counts are relevant for averaging them between different rides.
Required to fix the issues when aggregating Time in Zones Percentages.
The previous solution worked until you exit GC since when the RideDB
was reloaded the counts with zero values were lost.
2019-05-20 17:14:56 -03:00
Mark Liversedge
a45fe546f9 Mark Performance Tests
.. allow the user to set a flag "Performance Test" against an interval
   within an activity.

.. the distinction is needed to highlight the section of an activity
   that was a test (as opposed to the entire activity containing
   test efforts.

.. this is so we can fit them to PD and IR models in the future
   avoiding the need to use algorithms to extract TTE type efforts.

.. the update was surprisingly complex since we need to update the
   ridefile to record this with the interval and also update the
   ride cache as well as adding the bool to all the interval helper
   functions.

.. along the way it became clear why user specified colors for
   intervals were getting lost (they are not in the ridefile) and
   will fix this in another post.

.. NOTE: ridefiles created with this version will not be backward
         compatible with earlier versions because they contain a
         new field for intervals marked as performance tests.
2018-07-29 16:08:19 +01:00
Mark Liversedge
a6a16124db Fix Compatibility metrics
.. were skipped when writing the ridecache file, so lost on restart!!

.. also now fix a refresh with new user metric version, almost certainly
   not needed but better to be safe than sorry.
2018-04-02 21:12:46 +01:00
Mark Liversedge
40819711bc Fix last commit on windows builds
.. appsettings is declared in Settings.h
2018-03-18 11:25:38 +00:00
Mark Liversedge
ef0c97c405 Add athlete info to opendata file
.. no PII info

.. just Year of Birth, Gender and unique id

.. the identity of the unique id is ONLY known by the contributor
2018-03-18 09:39:21 +00:00
Mark Liversedge
96a32697b7 Fix comment 2018-03-11 21:15:16 +00:00
Mark Liversedge
357ad396cb Fix last commit for Windows build
.. function must return a value in setup_mmp_durations()
2018-03-11 16:06:46 +00:00
Mark Liversedge
254fcc969e OpenData project file writing
.. the ride cache writer will write opendata format files
   when passed the right parameters.

.. the file does not contain PII or user metadata or sample
   level data.

.. instead it contains metrics as well as distribution and
   mmp summary level info for Power, HR, Cadence and Speed.
2018-03-11 12:36:35 +00:00
Mark Liversedge
9d0b0b9b27 HRV Support Add stdmean() and stdvariance() to RideMetric
.. Leif Warland is developing the HRV metric support
   and some of these are std deviations. When you
   aggregate std deviations the mean and variances
   are needed.

.. RideMetric::stdmean() and ::stdvariance() return
   a value that is stored in the RideDB if it is
   non-zero.

.. RideItem::getStdMeanForSymbol()
   RideItem::getStdVarianceForSymbol

   return the stored value for use when aggregating in
   the same way that RideItem::getCountForSymbol() does.
2017-02-22 09:45:48 +00:00
Mark Liversedge
d4a1cbc250 RideCache stores count for each metric
.. the RideMetric::count() value is written to the ride
   cache (rideDB.json) if it is non-zero.

.. it is not used in the aggregation logic yet, but the
   rideDB version number has been incremented to force
   a rebuild on first run.
2017-02-20 17:50:46 +00:00
Mark Liversedge
ac37f48033 XDATA in DataFilter 1 of 3
.. Filter rides for presence of XDATA by name using the syntax:
   XDATA("XDATANAME", "SERIESNAME", sparse|repeat|interpolate|resample)

.. this is the first of 2 commits, in this one we have added XDATA to
   the rideitem and rideDB.json so we can check if XDATA is present
   without opening the ridefile

.. this allows us to return true or false for an XDATA(..) call when
   working across rideitems (not data points) in DataFilter evaluate,
   note that the join control (sparse,repeat etc) is ignored when you
   are filtering ride items

.. in the next commit we will add the ability to get at the xdata
   values when iterating in user data or user metrics

.. there are likely to be further refinements for the outer join
   required to support interpolation and resampling in a third commit.
2016-07-16 11:46:35 +01:00
Mark Liversedge
4b5201c4c5 Restructure source directory
Introducing a directory structure to make it a bit less
daunting for new developers and perhaps even old hands.

The main folders all start with an upper character, so src
files are now located in;

* Core - Core data structures
* Gui - Main GUI elements
* Metrics - Models and Metrics
* FileIO - Device and File I/O
* Charts - All the chart types
* Cloud - Working with Web Resources
* Train - Anything Train View specific
* ANT - Our ANT+ Stack
* Resources - Images, Translations, Web etc

Apologies to anyone who needs to merge across this update.
2016-02-25 14:51:53 +00:00