Compare commits

..

1425 Commits

Author SHA1 Message Date
Mark Liversedge
3b72bfcd4f Fix SEGV LTM Edit
.. when using Moving Average trend.
2015-08-13 17:50:07 +01:00
Mark Liversedge
e2cb864d5b Version 3.2 Release
.. update of version numbers
2015-08-12 09:43:33 +01:00
Mark Liversedge
3d4425852c Merge pull request #1510 from prokoudine/master
Updated Russian translation
2015-08-12 09:30:48 +01:00
Alexandre Prokoudine
078534ca9e Update Russian translation 2015-08-12 10:47:01 +03:00
grauser
37ecb2c353 translation: small fix for french 2015-08-12 09:22:46 +02:00
grauser
f7bbc05835 translation: French for 3.2 (2/2) 2015-08-12 00:00:03 +02:00
Mark Liversedge
aa818bec00 Logical Expressions with >2 Primary Expressions
.. ie. expr && expr was supported but not
   expr && expr && expr
2015-08-11 20:08:07 +01:00
Mark Liversedge
4ae9d45695 Merge pull request #1509 from Joern-R/DE
LIBKML patch (only for Windows)
2015-08-11 20:02:39 +01:00
Joern
052ac8222d LIBKML patch (only for Windows)
... removing tests,... from LIBKML build
... allowing building of base functionality of LIBKML on Windows with MinGW
... covering the LIBKML functional scope used by GoldenCheetah
2015-08-11 20:27:45 +02:00
Mark Liversedge
c500d8bb36 Fix DataFilter grammar for logical expressions
.. NP > 200 && IF > 0.85 didn't work because the datafilter
   grammar needed fixing up for precedence of the && and || operators.

.. this has been fixed by embedding into the grammar; binary expressions
   and logical expressions are now declared individually.

.. the generated tree uses the same encoding so no changes required
   to the code, just the grammar
2015-08-11 09:14:43 +01:00
grauser
46769d6ca9 Translation: French for 3.2 (1/2) 2015-08-10 23:22:43 +02:00
grauser
3c5378f047 Export: Unable to export in CSV format
fix #1507
2015-08-10 21:46:58 +02:00
Mark Liversedge
aefb50b6b3 Merge pull request #1506 from Joern-R/DE
Update Translation DE
2015-08-09 15:40:01 +01:00
Joern
3200b9e334 Update Translation DE 2015-08-09 14:20:53 +02:00
Mark Liversedge
602b94b730 Merge pull request #1504 from amtriathlon/master
Updated Spanish Translation
2015-08-08 19:51:47 +01:00
Alejandro Martinez
c877e8731c Updated Spanish Translation
New backup message on upgrade
2015-08-08 15:49:28 -03:00
Mark Liversedge
6f87400368 Merge pull request #1503 from amtriathlon/master
Fixed overridden metrics not initialized in Medatada
2015-08-08 19:11:39 +01:00
Alejandro Martinez
5b211e1c69 Fixed overridden metrics not initialized in Medatada 2015-08-08 13:38:29 -03:00
Mark Liversedge
2823da7e2e Time Riding --> Time Moving
.. when reading older GC Json files; we need to rename both
   the tag and the override.
2015-08-08 17:31:37 +01:00
Mark Liversedge
02e4ca537f Fix Crash Edit Metric on Extra tab
.. don't allow editing there.
2015-08-08 17:22:16 +01:00
Mark Liversedge
94fea2b1c5 Merge pull request #1502 from Joern-R/Upgrade
Indicate the Path to Athlete Directory to backup during Upgrade
2015-08-08 15:19:21 +01:00
Joern
381ab7e987 Indicate the Path to Athlete Directory to backup during Upgrade (original code by GitHub user "mtbkeith" - thanks)
..show path in Upgrade Windows (separate from the scrolling section)
..allow path to be selected and copied to clipboard via Mouse
2015-08-08 15:41:06 +02:00
Mark Liversedge
5acf6210a3 Merge pull request #1499 from Joern-R/DE
Translation DE
2015-08-07 19:01:57 +01:00
Joern
ff16e2952e Translation DE 2015-08-07 19:56:18 +02:00
Mark Liversedge
4e99143943 Enforce types for First Class Metadata Fields
In case user borked them in setup, applies to:

- Ride Date (startTime.date)
- Ride Time (startTime.time)
- Device (deviceType)
- Recording Interval (recIntSecs)
- Identifier (Id)

Since latest update for metadata now honours user configuration.
2015-08-07 10:40:03 +01:00
Mark Liversedge
7f93f7a969 Merge pull request #1498 from amtriathlon/master
Fixed translate charts when config file is missing
2015-08-07 09:39:01 +01:00
Alejandro Martinez
bc011dfedd Updated Spanish Translation 2015-08-06 20:41:45 -03:00
Alejandro Martinez
49fb90f6e4 Updated chart titles according to charts.xml
To enable translation
2015-08-06 20:39:59 -03:00
Alejandro Martinez
82f7d590aa Fixed translate charts when config file is missing
Default config due to new user or deleted config should be translated
2015-08-06 18:03:43 -03:00
Mark Liversedge
d6c59d6b0d PMC (TRIMP) fixup
.. common axis Stress
.. look and feel like other PMCs
2015-08-06 21:14:39 +01:00
Mark Liversedge
3bf05fca18 Merge pull request #1496 from MaksVasilev/master
Make default PMC TRIMP chart to real TRIMP
2015-08-06 21:06:36 +01:00
Stranger
0171fd46ae Fix name for PMC (TRIMP) chart 2015-08-06 22:20:45 +03:00
Mark Liversedge
472fe3929a Texts frozen for v3.2
.. lupdate translations for all supported languages.
2015-08-06 19:56:24 +01:00
Mark Liversedge
bcad5c2cb4 Merge pull request #1493 from Joern-R/Translation
Update Translation DE
2015-08-06 19:42:56 +01:00
Stranger
a9ff348a9f Make default PMC TRIMP chart to real TRIMP 2015-08-06 21:40:56 +03:00
Joern
169a852b48 Update Translation DE 2015-08-06 20:35:43 +02:00
Mark Liversedge
7a665a3bf6 Merge pull request #1491 from amtriathlon/master
Fixed never translate charts in HomeWindow
2015-08-06 19:08:26 +01:00
Alejandro Martinez
9a39390b32 Fixed never translate charts in HomeWindow
Local variable defaultUsed was initialized to false and never updated
2015-08-06 14:50:06 -03:00
Mark Liversedge
0a2ddc9f6c FitRideFile Garmin Fenix 3 identifier
Fixes #1489
2015-08-06 18:24:16 +01:00
Mark Liversedge
46b2e6cfe2 Only translate chart titles once
.. not every time they are loaded.
2015-08-06 14:52:39 +01:00
Mark Liversedge
a7fa3a0b50 Add link to USARIEM
.. in the about dialog.
2015-08-06 11:00:23 +01:00
Mark Liversedge
4b87e84643 Add LOCALHEADERS/LOCALSOURCE to src.pro
.. allow local development/extensions without needing to update src.pro.
2015-08-06 10:40:05 +01:00
Mark Liversedge
9f6d7a6256 Merge pull request #1487 from amtriathlon/master
Add Pace to LTMPopup and change total distance according to sport
2015-08-06 08:59:16 +01:00
Alejandro Martinez
27cf3af4f3 Add Pace to LTMPopup and change total distance according to sport 2015-08-05 21:50:23 -03:00
Mark Liversedge
5ff676a237 Upgrade cosmetics
.. change LTM trend background to same as ride plot on upgrade
   as by default it will be black and look different

.. remove metal look on anything other than Mac prior to the
   10.10 Yosemite look. Metal looks naff these days.
2015-08-06 00:57:46 +01:00
Mark Liversedge
b65d9b178c Save Dialog should be on top
.. as it can be obscured by other windows
2015-08-06 00:20:11 +01:00
Mark Liversedge
02c77cf5d9 Sanity check LTMSettings
.. avoid crash with a sanity check
.. not sure why they got corrupted
.. need to investigate mixing 32/64bit runtime
2015-08-05 23:52:28 +01:00
Mark Liversedge
a8d08b5a06 Fix metric on Extra tab
.. stick to original functionality instead of borking.
2015-08-05 22:27:22 +01:00
Mark Liversedge
81b8a26d8a Merge pull request #1486 from Joern-R/Test
Fix Upload - VeloHero.de / Trainingstagebuch.org for QT 5 based builds
2015-08-05 21:43:49 +01:00
Joern
4ec2b793ff Fix Upload - VeloHero.de / Trainingstagebuch.org for QT 5 based builds
... tested on QT4.8.6 and QT 5.4.2
2015-08-05 20:03:29 +02:00
Mark Liversedge
acb1abf73f Merge pull request #1485 from amtriathlon/master
Add Route and RPE to SpecialFields
2015-08-05 18:16:32 +01:00
Alejandro Martinez
92e22b90e9 Add Route and RPE to SpecialFields
So this new metadata fields can be translated
2015-08-05 10:54:42 -03:00
Mark Liversedge
42e66dd14b Fixup Time Riding -> Time Moving
.. since we deal with more than just cycling now.
2015-08-05 11:38:28 +01:00
Mark Liversedge
091f4e6c4f Tidy Up metadata.xml
.. it had got wonky
.. also changed Time Riding to Time Moving
2015-08-05 11:29:00 +01:00
Mark Liversedge
75d3124cdc Recognise Mark Buller
.. for support wrt use of the TCore algorithm in GoldenCheetah
2015-08-04 20:22:03 +01:00
Mark Liversedge
4b2610dc1f Attribution for Core Temperature
.. we have been granted permission to use the TCore algorithm
   and so the attributions have been added to the code and about
   box.

.. Mark Buller should be added to the contributors too.
2015-08-04 20:22:03 +01:00
grauser
f451191cb2 Update french translation 2015-08-03 23:07:10 +02:00
grauser
fd5d1aac73 AllPlot: Correct Core Temp default 2015-08-03 23:07:10 +02:00
Mark Liversedge
3abbf4fea7 Edit Chart with Bests
.. clear old values
2015-08-02 19:04:13 +01:00
Mark Liversedge
d6fc1c58c6 Merge pull request #1482 from amtriathlon/master
Minor tweak in Histogram round numbers for labels
2015-08-02 18:17:32 +01:00
Alejandro Martinez
1b7e282bde Minor tweak in Histogram round numbers for labels
Truncation is rather odd, specially for percentages
2015-08-02 11:32:25 -03:00
Mark Liversedge
2b3f3bce3a More default charts
.. tss/if, bikescore/ri, cp analysis
2015-08-02 10:20:15 +01:00
Mark Liversedge
3b089b1e6d Tidy Trend View Layout
.. put chart in a logical sequence
.. remove all the TIZ charts as they're in the library
.. fix tracker 60m power as it shows speed
2015-08-02 10:09:50 +01:00
Mark Liversedge
adc534c575 Fix save metadata refresh of calendar text
.. via ^S or menu when focus in notes type box.
2015-08-01 22:30:25 +01:00
Mark Liversedge
76d1b7b391 Minor paint tweak for scope bar
.. overly rounded rectangles are de-riguer these days
   so make the scope bar a little squarer as per
   the new aesthetic in Yosemite.
2015-08-01 20:28:33 +01:00
Mark Liversedge
ebe8b5d2c4 Version 3.2 Release Candidate 4
.. update build for RC4
2015-08-01 10:19:19 +01:00
Mark Liversedge
63265af146 Fix Edit Bests LTMSettings SEGV
.. in sidebar chart edit.
2015-08-01 10:09:40 +01:00
grauser
545c895fd4 RideFileCache : XPower in MeanMaxComputer
Exponential moving average from first point for Xpower in MeanMaxComputer
2015-08-01 00:05:24 +02:00
grauser
6435c23591 RideFileCache : Correct weighting factor for Xpower in MeanMaxComputer
fix #1480
2015-07-31 23:35:51 +02:00
Mark Liversedge
903aeb5c65 More new user nits
.. chrome reset by 3.1 upgrade .. aaaargghhh.
.. set default date range to last 3 months not all
2015-07-31 09:55:11 +01:00
Mark Liversedge
5a6363b1c5 Fix "Chrome" default
.. Mac on Mac before Yosemite (when its flat)
.. Flat everywhere else
.. Use a lighter color
2015-07-31 09:31:15 +01:00
Mark Liversedge
f4ec8ea494 Cleanup of charts.xml
.. old / wrong-headed charts deleted.
2015-07-31 00:49:23 +01:00
Mark Liversedge
6780e1c80b More default charts 2015-07-31 00:43:01 +01:00
Mark Liversedge
64dfe28994 Fix LTM add chart SEGV on date range
.. by trying to plot backward date ranges
2015-07-31 00:09:56 +01:00
Mark Liversedge
0131bdb8f7 Celebrate the TdF with a new color scheme. 2015-07-30 23:08:10 +01:00
Mark Liversedge
09464dba1a Don't include "Calendar Text" in Meta CRC
.. otherwise it causes a refresh() when it is reconstructed
   due to config changes (not data changes!)
2015-07-30 20:24:22 +01:00
Mark Liversedge
dbe163d7d9 Merge pull request #1478 from amtriathlon/master
Fixed tab order in New Athlete and Manual Workout
2015-07-30 19:36:52 +01:00
Mark Liversedge
798e6e3ae9 Fix refresh of 'Calendar Text'
.. when the metadata config changes.
2015-07-30 19:33:05 +01:00
Alejandro Martinez
bee0f8e032 Changed GOVSS to TriScore in LTM stress metrics
They could be deprecated, but if left for consistency TriScore
is more useful than GOVSS.
2015-07-30 10:28:20 -03:00
Alejandro Martinez
c6c0c3204a Fixed tab order in New Athlete and Manual Workout
Fixes #1476
2015-07-30 10:15:14 -03:00
Mark Liversedge
7567f625fc Merge pull request #1475 from amtriathlon/master
New metadata fields and SwimScore copyrigth notice
2015-07-30 06:38:55 +01:00
Alejandro Martinez
4799137010 Updated Spanish Translation 2015-07-29 20:19:07 -03:00
Alejandro Martinez
28610f87cb Added copyrigth notice for SwimScore 2015-07-29 20:12:12 -03:00
Alejandro Martinez
81ae04f19e Some love for Session RPE and new metadata fields
Added RPE to metadata.xml to allow data entry in the Workout tab and
PMC (Session RPE) to charts.xml
Added Equipment to Workout tab
Added GOVSS and SwimScore to Metric tab, to allow metric override
2015-07-29 20:00:37 -03:00
Mark Liversedge
3ff81dc127 Switch to chart on import
.. when drag and dropping a chart onto mainwindow we now
   switch to trend view and select it, so the user doesn't
   have to track it down.
2015-07-29 11:59:58 +01:00
Mark Liversedge
1b3d72af7a Fix ^S clearing metadata
.. also optimised up the way metadata changed
   was signalled, which speeds up navigation
   somewhat.
2015-07-28 22:17:59 +01:00
Mark Liversedge
c2c0ae708f Merge pull request #1473 from Joern-R/DE
Update Translation DE
2015-07-28 20:19:50 +01:00
Joern
013e47025f Update Translation DE 2015-07-28 19:07:43 +02:00
Mark Liversedge
9efb920806 Fix Hide Non-curves on legend
.. trend, outliers, bests all failed to hide.
2015-07-28 15:19:54 +01:00
Mark Liversedge
41b80d8fa6 Select 'Library' chart automagically
.. when a preset is selected in the trend view sidebar
   we automatically switch to the library chart to
   show it.
2015-07-28 13:42:17 +01:00
Mark Liversedge
a0344d4fb5 Merge pull request #1471 from amtriathlon/master
Updated Spanish Translation
2015-07-28 06:35:33 +01:00
Alejandro Martinez
a0d637b239 Updated Spanish Translation
Includes a minor fix to avoid a lupdate warning and new chart names
2015-07-27 20:54:01 -03:00
Mark Liversedge
f7426957ca Fix Chart Add/Edit SEGV
.. halfwitted code deleted a widget, after moving the
   "Use sidebar settings" checkbox to it.
2015-07-27 21:07:39 +01:00
Mark Liversedge
9e66191e3c Merge pull request #1470 from amtriathlon/master
Fixed RideSummary refresh when filters change while not visible
2015-07-27 18:41:49 +01:00
Alejandro Martinez
6f1e25cdbb Fixed RideSummary refresh when filters change while not visible
The problem showed up only for date ranges not ending today
2015-07-27 14:34:32 -03:00
Mark Liversedge
64183a6647 Tidy up LTM Chart configuration
.. move use sidebar settings to basic page and
   disable the other pages if its using sidebar
   settings

.. when working in the sidebar, hide the basic
   page since it is not shared

.. make the add chart dialog bigger if the screen
   is large enough, since it needs to show a chart
   and the config pane which has grown a little
   over time.
2015-07-27 17:16:13 +01:00
Mark Liversedge
ed9b9197e7 Fixup Chart Preset Workflow and SEGV/Bug
.. remove all the editing/import/export functions
   from the chart settings now they have their own
   sidebar.

.. this also removes some of the problems with conflicts
   and bugs in the code e.g. setting the first chart name
   to "" by accident in the editingFinished() method (since
   that is no longer supported !)
2015-07-27 13:08:17 +01:00
grauser
32dfaf5875 LTMChartParser: no selection after drag/drop 2015-07-26 23:28:11 +02:00
grauser
6da6a43516 LTMChartParser: clearSelection 2015-07-26 23:10:27 +02:00
Mark Liversedge
6714e88e14 Small fix for SEGV chart drop to end
.. if you drag a chart in the LTM chart sidebar to beyond the
   end of the list the move results in a QList assert abort.

..  this small fix checks for -1 and adjusts accordingly.
2015-07-26 22:02:19 +01:00
grauser
1d9ebb2c44 LTMChartParser: Selection after drop 2015-07-26 22:54:53 +02:00
grauser
5ca8b816e8 LTMChartParser: Drap/Drop multiple selection 2015-07-26 22:28:04 +02:00
grauser
cb2dcd7f84 Update French translation 2015-07-26 22:14:06 +02:00
Mark Liversedge
df6790eae2 Force Chrome on Yosemite
.. to match the flat look of Yosemite (i.e. not metal) and
   to match the fixed colors for the title bar.
2015-07-26 17:18:30 +01:00
Mark Liversedge
081994038f Another Edit Chart SEGV
.. on the trend view sidebar
2015-07-26 16:48:23 +01:00
Mark Liversedge
91c47de934 Fix reading dates in ISO format 2015-07-26 14:09:34 +01:00
Mark Liversedge
a0c500f947 Fix Edit Chart SEGV !
.. setting date ranges before curves
2015-07-26 10:18:04 +01:00
Mark Liversedge
0b3eeab600 Enable Export of LTM Chart Configuration
.. and fix import of >1 chart file !
2015-07-26 09:48:09 +01:00
Mark Liversedge
e5a043e81e Trend Chart Sidebar Menu - Part 2 of 2
.. import/export charts

.. drag/drop them in the list to reorder

.. drop a 'charts.xml' (any .xml) file onto the mainwindow
   to import charts exported by someone else.
2015-07-25 21:29:08 +01:00
Mark Liversedge
7330ac66a5 Trend Chart Sidebar Menu - Part 1 of 2
.. added add, edit, delete and reset

.. still need to add import and export as well
   as the right-click context menu.
2015-07-25 12:58:19 +01:00
Mark Liversedge
ad85ce0560 Merge pull request #1468 from Joern-R/UpgradeFixTools
Upgrade/JSON Conversion - Switch off "Auto" Fix Tools
2015-07-25 09:04:21 +01:00
Joern
fc81383a3e Upgrade/JSON Conversion - Switch off "Auto" Fix Tools
... add feature to switch off "Auto" Fix tools
... switch off "Auto" Fix Tools during Upgrade/JSON Conversion
2015-07-25 09:59:41 +02:00
Mark Liversedge
5ade8926b0 View reset layout from goldencheetah.org/defaults
.. when resetting the layouts we first go try the default
   layouts from the goldencheetah website

   http://www.goldencheetah.org/defaults/<release>/xxx-layout.xml

.. this means we can update the default setup independently of
   the release binary; make tweaks etc

.. the same concept will shortly be introduced for resetting the
   standard charts.xml presets for the trend view
2015-07-24 21:18:15 +01:00
Mark Liversedge
c05f5bba27 Get rid of X-axis grid lines on CP plot 2015-07-24 17:40:51 +01:00
Mark Liversedge
3a1ed2c871 Fixup Core Temperature Gamma Constant
.. it was calculated incorrectly, 0.022 x 0.22 instead of
   0.022 x 0.022 so quite a significant order of magnitude !
2015-07-23 22:56:28 +01:00
Mark Liversedge
abfe642dea Merge pull request #1466 from amtriathlon/master
Fixed Endurance Index scale in CVchart
2015-07-23 20:58:10 +01:00
Alejandro Martinez
126af19b5d Fixed Endurance Index scale in CVchart
EI = C'/CV, W' in meters and CV in m/s, so EI units are seconds
2015-07-23 16:22:12 -03:00
Mark Liversedge
858e467851 Merge pull request #1465 from amtriathlon/master
Fixed D' display in CVChart
2015-07-23 06:45:51 +01:00
Alejandro Martinez
e02fddd4d7 Fixed D' display in CVChart
To have better resolution and to show in m/yd.
2015-07-22 20:34:47 -03:00
Mark Liversedge
1a0f9993c6 Merge pull request #1464 from Joern-R/Translation
Update Translation DE
2015-07-22 10:04:53 +01:00
Joern
cc781d8f68 Update Translation DE 2015-07-22 10:50:52 +02:00
Mark Liversedge
7588098a31 Merge pull request #1463 from amtriathlon/master
Translation fixes
2015-07-22 06:47:03 +01:00
Alejandro Martinez
a5a42a6878 Added Q_OBJECT macro to ComputrainerController and FortiusController
So lupdate stop complaining, it may require to run qmake
2015-07-21 19:24:46 -03:00
Alejandro Martinez
4c79caadcc Updated spanish translation 2015-07-21 19:24:11 -03:00
Alejandro Martinez
e12c250e61 Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-07-21 17:31:42 -03:00
Mark Liversedge
068baafb0d Tidy up default charts
.. PMC charts all largely look  the same

.. remove all the crappy ones

.. we should think about more we could add
2015-07-21 20:02:45 +01:00
Mark Liversedge
aa9da6c98a Fix Top/Lowest curves not being removed 2015-07-21 20:01:40 +01:00
Mark Liversedge
6d68128eb8 Merge pull request #1462 from Joern-R/Calendar
Fix "MiniCalendar" does not show colors on first open
2015-07-21 19:28:49 +01:00
Mark Liversedge
fa56273204 Revert "LTM high and low curves not deleted"
This reverts commit 9e852faf5c.
2015-07-21 19:19:21 +01:00
Mark Liversedge
b56e87e649 LTM high and low curves not deleted
.. if you select e.g. the TriScore PMC in the Library chart
   in Trends, the high/low curves get left behind because they
   use the same name (Best_xxx).

.. ironically this was already worked around by creating a name
   that included the symbol, but this was not used when adding to
   the curve mapping.
2015-07-21 19:15:53 +01:00
Mark Liversedge
f83d2df3d7 Merge pull request #1461 from amtriathlon/master
Fixed default button in Edit Interval dialog
2015-07-21 19:02:00 +01:00
Alejandro Martinez
36e6960af5 Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-07-21 15:01:38 -03:00
Alejandro Martinez
7fb3306390 Fixed default button in Edit Interval dialog
It was color button, now it is Ok button
2015-07-21 14:59:11 -03:00
Joern
9e39714b2e Fix "MiniCalendar" does not show colors on first open
... ensures that Month is changed to month of current ride (which fixes the missing color)
... tested also for new Athlete creation (without any Ride data)

Note: Root cause may be a sequence issue of setting the calendar month, setting the ride, setting to current ride.
So there might be a better way to fix the problem.
2015-07-21 19:01:57 +02:00
Mark Liversedge
8844166fad Merge pull request #1459 from amtriathlon/master
Fixed PMC (TriScore) and Run Pace in charts.xml
2015-07-21 16:13:30 +01:00
Mark Liversedge
dd3e168b31 Merge pull request #1460 from prokoudine/master
Typo fixes and updated Russian translation
2015-07-21 16:13:03 +01:00
Alexandre Prokoudine
9101eca7ef Updated Russian translation 2015-07-21 03:26:33 +03:00
Alexandre Prokoudine
dffc8a0e44 Fix a typo in a user-visible message 2015-07-21 02:13:21 +03:00
Alexandre Prokoudine
a744802374 Fix a typo in a user-visible message 2015-07-21 01:16:26 +03:00
Alejandro Martinez
9409b8d654 Fixed PMC (TriScore) and Run Pace in charts.xml
Units were wrong due to the translation problem recently fixed
2015-07-20 16:16:08 -03:00
Mark Liversedge
735dd4d0e6 Merge pull request #1458 from Joern-R/LTMTranslatePrep
LTM Translation Preparation
2015-07-20 15:36:20 +01:00
Mark Liversedge
9268dd5fff Merge pull request #1457 from amtriathlon/translation
Updated Metrics translation in LTM
2015-07-20 15:31:01 +01:00
Joern
6e9f88c5c9 LTM Translation Preparation
... fill "units" field with original "units" from Metrics if new Chart is created
... store original "unit" into LTMSettings for later reference in automatic translation
... use a new version of LTMSettings to be compatible with any written version
2015-07-20 14:40:52 +02:00
Alejandro Martinez
bec9369082 Updated Metrics translation in LTM
- Code cleanup, removing deprecated code and refactoring
- Metrics translation is now done in a method for LTMSettings
- User defined metric name (uname) is translated if it matches english name
- User defined units (uunit) is only translated if it matches saved units
2015-07-19 14:37:13 -03:00
Mark Liversedge
7eb07fa038 Reinstate Withings Measures
.. bodyfat kg, lean kg, bodyfat percent
.. fixup charts.xml to use it

NOTE: RideItem changes so touch *.y or
      make clean after pulling this commit
2015-07-18 20:18:51 +01:00
Mark Liversedge
ce9476ca32 LTM translation only if not English
.. saves time, since translation not required

.. also avoids messing up the uunits when charts are customised
   to have common y-axis e.g. Stress Ae and An Stress and PMC
   using Stress instead of ATL, CTL, TSB etc
2015-07-17 21:24:24 +01:00
Mark Liversedge
1b5e6beff9 More agressive EWMA
.. set the default too lax.
2015-07-17 20:04:28 +01:00
Mark Liversedge
6d4afd844c Merge pull request #1456 from Joern-R/UI
UI Nit - RideImportWizard
2015-07-17 18:29:24 +01:00
Joern
f1cbecdcf3 UI Nit - RideImportWizard 2015-07-17 19:24:17 +02:00
Mark Liversedge
ef676cd412 Merge pull request #1455 from Joern-R/TE1
Translation Enablement
2015-07-17 18:14:08 +01:00
Joern
71b824830c Translation Enablement 2015-07-17 18:59:07 +02:00
Mark Liversedge
fa443ba705 Fixup default charts
.. cleanup PMC in home layout
.. fix weight tracking chart
2015-07-17 17:45:02 +01:00
Mark Liversedge
befbd75902 Merge pull request #1454 from amtriathlon/master
Added default filters for multisport use
2015-07-17 16:34:23 +01:00
Alejandro Martinez
745e4b36a9 Added default filters for multisport use
Only when there is no named searchs defined yet
2015-07-17 11:55:08 -03:00
Mark Liversedge
305e07b939 Add Moving Average Trend Line
.. using the Holt-Winters double exponential smoothing to avoid
   low on rising and high on falling data series.

.. works best with relatively noisy and contiguous data
2015-07-17 12:11:09 +01:00
Mark Liversedge
324c7af370 Merge pull request #1453 from amtriathlon/master
Add Pace metrics for runs and swims
2015-07-17 06:59:15 +01:00
Alejandro Martinez
af7c2c6d8e Add Pace metrics for runs and swims
- to default interval metrics
- to default summary metrics
- conditionally to Summary averages
2015-07-16 19:50:26 -03:00
Mark Liversedge
4d5fd3e514 Merge pull request #1452 from amtriathlon/master
Translation fixes for Diary
2015-07-16 11:39:59 +01:00
Alejandro Martinez
8851ddf470 Translation fixes for Diary
Navigator title and days of the week in mini-calendar
2015-07-15 20:10:51 -03:00
Mark Liversedge
a14820fcca Merge pull request #1451 from amtriathlon/master
Fixes ordering of time columns in Navigator
2015-07-15 20:19:14 +01:00
Alejandro Martinez
0992e54736 Fixes ordering of time columns in Navigator
Using a QTime for isTime metrics
2015-07-15 15:21:43 -03:00
Mark Liversedge
58aa68b427 Merge pull request #1450 from amtriathlon/master
Minor Translation Related Fixes
2015-07-15 15:30:32 +01:00
Alejandro Martinez
d4b222efac Minor Translation Related Fixes
"Metric Pace" translatable
Format for time columns in Navigator
2015-07-15 09:20:32 -03:00
Mark Liversedge
7c5a17a934 Merge pull request #1449 from amtriathlon/master
Added Distance Swim metric
2015-07-14 06:32:26 +01:00
Alejandro Martinez
a9bd516150 Added Distance Swim metric
To show distance in swimming units, useful for non-metric configurations
2015-07-13 22:07:29 -03:00
Mark Liversedge
fd652c506e Merge pull request #1447 from amtriathlon/master
Made WPrime metrics not relevant for runs and swims
2015-07-13 21:30:14 +01:00
Alejandro Martinez
4f2e5ed5f4 Made WPrime metrics not relevant for runs and swims 2015-07-13 15:14:50 -03:00
Mark Liversedge
9a6eefaf7e Merge pull request #1446 from amtriathlon/master
Extended Critical Power Estimator for Running and Swimming
2015-07-13 06:47:07 +01:00
Alejandro Martinez
6a02939ac6 Extended Critical Power Estimator for Running and Swimming
Also fixed some translation issues
2015-07-12 23:09:55 -03:00
Mark Liversedge
c3f89ff968 Last Month / Last Week Date Ranges
.. added as they are handy for quick compare of changes
   in the near term, without having to add temporary
   date ranges

.. we should think about an "easy" way to do this for all
   years and months for quick comparisons, in v4.0
2015-07-12 21:11:10 +01:00
Mark Liversedge
7eedd915b9 Merge pull request #1445 from Joern-R/Translation2
Translation DE
2015-07-12 17:34:40 +01:00
Joern
80f9eb6787 Translation DE
.. update and corrections
2015-07-12 17:00:56 +02:00
gcoco
d6a5323d0c Change 3.1.0 to 3.2.0 2015-07-11 20:57:35 -04:00
Mark Liversedge
148087ee27 Climb intervals discovery config
.. off by one error stopped user from enabling the
   climb interval discovery.
2015-07-11 22:18:59 +01:00
Mark Liversedge
498b2b3c4c RC3 versioning 2015-07-11 21:09:17 +01:00
Mark Liversedge
9b880e751a Fix compare allplot short distance
.. was using an int instead of a double for KM, so any interval
   less than a KM long was rounded to zero length.
2015-07-11 20:49:57 +01:00
grauser
a4df9014f0 JouleDevice: Changes for Joule GPS+ 2015-07-11 17:01:43 +02:00
Mark Liversedge
aa83502765 Activity list sort order hack
.. fixes 80% of the issues with sorting 'strings'

.. we cannot just return metric values since they
   need to be formatted to have the righ precision
   or conversion to pace/duration etc.
2015-07-11 08:39:38 +01:00
Mark Liversedge
3820845542 Fix PD model w/kg parameter save
.. was skipping 2p and 3p saves because it was agressively
   checking W', FTP and Pmax when they didn't apply or
   for values that were possibly correct (e.g. W'/kg > 100)
2015-07-11 07:45:35 +01:00
Mark Liversedge
dce6491f91 Fix absolute v per kg vo2max estimate
.. no need to pass across weight since we maintain two
   models; absolute and per kg already.

NOTE: this has highlighted a bug in the code related to
      estimated w/kg bests for 2 and 3 parameter models
      that will be fixed shortly.
2015-07-11 06:40:32 +01:00
Mark Liversedge
21db619f57 Merge pull request #1443 from amtriathlon/master
Override toString for AvgTemp and MaxTemp metrics
2015-07-11 06:17:27 +01:00
Alejandro Martinez
a293733efc Override isRelevantForRide for metrics not relevant for runs and swims 2015-07-10 21:36:45 -03:00
Alejandro Martinez
30da13e2e7 Override toString for AvgTemp and MaxTemp metrics
To show "-" when internal value is RideFile::NoTemp
2015-07-10 19:59:14 -03:00
Mark Liversedge
125ae8e261 Add Vo2max to Chart Library
.. and also fix up related code nits
2015-07-10 21:16:59 +01:00
Mark Liversedge
3211995df5 Vo2max Estimate from PD Model
.. to augment the existing vo2max estimate using peak 5m
   data in a ridefile, this now adds it as an estimate from
   the PD model estimate for 5m peak power.
2015-07-10 20:33:14 +01:00
Mark Liversedge
69b0296e4a Merge pull request #1442 from amtriathlon/master
Minor Fixes WPrime::summarize units and Spanish Translation
2015-07-10 15:45:41 +01:00
Alejandro Martinez
70454be78f Minor Fixes WPrime::summarize units and Spanish Translation 2015-07-10 11:15:03 -03:00
Mark Liversedge
d3233906e0 Withings Download Message
.. simpler and more user friendly

.. old message made little sense grammatically too !
2015-07-10 09:25:33 +01:00
Mark Liversedge
865d87d589 Merge pull request #1440 from amtriathlon/master
Updated Spanish Translation
2015-07-10 08:21:10 +01:00
Alejandro Martinez
7de96e0802 Updated Spanish Translation 2015-07-09 23:58:11 -03:00
Mark Liversedge
c2698de16c Merge pull request #1439 from Joern-R/Translation
Update Translation DE
2015-07-09 18:01:38 +01:00
Joern
49f529c37e Update Translation DE 2015-07-09 19:06:39 +02:00
Mark Liversedge
12e7554af9 Fixup WPrime.cpp translation snafu
.. use 'tr()' not missing 'QT_TRANSALATION_NOOP'
2015-07-08 23:24:16 +01:00
Mark Liversedge
e716319c6a Merge pull request #1437 from prokoudine/master
Fixes for user-visible messages and updated Russian translation, take two
2015-07-08 23:16:44 +01:00
Alexandre Prokoudine
4081d7707c Updated Russian translation 2015-07-09 01:04:27 +03:00
Alexandre Prokoudine
077cd11ea9 Refer to Bluetooth/BLE for pairing BLE devices rather than to ANT+ 2015-07-09 00:46:41 +03:00
Mark Liversedge
847623c67b Get wbalzone user-visible messages to show up in translation files 2015-07-09 00:45:42 +03:00
Alexandre Prokoudine
ab836d6f99 Rename rides to activities for multi-sport athletes 2015-07-09 00:38:37 +03:00
Alexandre Prokoudine
5d6dd1bf6b Fix a typo in a user-visible message 2015-07-09 00:35:50 +03:00
Mark Liversedge
9266cee05d Revert "Edit interval distance"
This reverts commit c4c15ada67.
2015-07-08 14:57:47 +01:00
Mark Liversedge
501b8fea06 Merge pull request #1435 from amtriathlon/master
Fixed default CV value when pace units change
2015-07-08 06:46:34 +01:00
Alejandro Martinez
30927e706f Edit interval distance
Implements #1432 as an option for Edit Interval, the user must
enable it via checkbox and confirm before it modifies speed and
distance for the underlying samples.
2015-07-07 23:14:50 -03:00
Alejandro Martinez
52ca9c4635 Fixed default CV value when pace units change 2015-07-07 19:06:37 -03:00
Mark Liversedge
4638af6cad Recognise Simon Brewer
.. in contributors
2015-07-07 09:08:53 +01:00
Simon Brewer
8b6cd2b3dd Fix SEGV in LTM PMC plot when no data
.. if there is no data available for the period slected
   the LTM plot crashed due to an uninitialised variable.
2015-07-07 09:08:52 +01:00
Mark Liversedge
9cec4855a3 Merge pull request #1434 from amtriathlon/master
Added some charts for multisport usage
2015-07-06 21:30:44 +01:00
Alejandro Martinez
266ff03fb4 CP Chart - set search intervals when changing to Ward-Smith model
Used the same defaults as CP3model (30'-60'), inline with PDModel.cpp,
although they seem rather odd, IMHO. Part of #1424.
2015-07-06 10:57:07 -03:00
Alejandro Martinez
c7fcba5160 Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-07-05 17:57:02 -03:00
Alejandro Martinez
5292adee01 Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-07-05 17:40:54 -03:00
Mark Liversedge
988a70aed3 Reduce MeanMax search space
.. to speed up extracting the mean maximals.

.. we still work at 1s intervals for very short durations
   but gradually increase to longer as the duration gets
   over an hour.

.. for almost all usage this will not make a difference to the
   values extracted since the actual values are largely rounded
   to integer values (and therefore the granularity was already
   being disposed after the search).

.. the exact durations are;

        Duration    Increment
        <120        1
        <600        2
        <1200       5
        <3600       20
        <7200       120
        >= 7200     300
2015-07-05 21:37:43 +01:00
Alejandro Martinez
2350141712 Added some charts for multisport usage
Activities: CV
Trends: CV and Speed histogram
Library: PMC (TriScore), Time in Pace Zones, Run and Swim Pace
2015-07-05 16:27:43 -03:00
Mark Liversedge
a19f67f586 Check Season Range after edit/load
.. to make sure the date range is not negative, since that
   causes SEGV all over the codebase, which assumes a date
   range is always positive.
2015-07-05 09:40:22 +01:00
Mark Liversedge
47d19d6f19 Revert "Add support for reading multi sport FIT files."
This reverts commit 7fdedf0bfe.

.. we will come back to look at multisport FIT files in v4.0
   The main problem is related to the position of the SESSION
   header within the file.
2015-07-04 18:15:01 +01:00
Jan de Visser
c49ec37db8 Link libdl.so for D2XX on Linux/BSD hosts
.. libdl enables dynamic linking, this is required when
   D2XX support is compiled in.
2015-07-03 15:16:54 +01:00
Mark Liversedge
b6f715bbde Support Moxy Firmware v1.0
.. fit file manu:76 identified as Moxy
.. support 7 field CSV, ignore session number

NOTE: support for UTC dates is not present since we
      have no way of checking what TZ the ride was
      recorded in !
2015-07-03 14:57:09 +01:00
Mark Liversedge
e28be2ff78 Add Ae/An TISS to peak power charts
.. show the An / Ae stress to provide context to the
   changes in peak power durations.

.. or "why my anaerobic power isn't getting any better
   despite spending all my time doing sweetspot"
2015-07-02 08:39:21 +01:00
Mark Liversedge
42274f87ae Interval Discovery config default no PEAKS
.. since interval discovery impacts load time (reading from backing
   store) and refresh time (computing metrics for intervals) we do
   not search for PEAK power/pace by default.

.. if the user wants that info (which is of limited value) then they
   can switch it on in preferences/options.

.. should help to reduce performance overhead for startup and refresh
   especially as an experience immediately after upgrading to v3.2
2015-07-02 07:45:27 +01:00
Mark Liversedge
10a85702f3 Merge pull request #1429 from amtriathlon/master
Metric to Imperial conversion applied twice in Trends->RideSummary
2015-07-01 06:41:26 +01:00
Alejandro Martinez
edf490b8d4 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
d0112d057b Merge pull request #1426 from Joern-R/translation
Update Translation DE - 2nd commit
2015-06-28 19:09:47 +01:00
Joern
92f957c1f8 Update Translation DE - 2nd commit
.. missed some parts
2015-06-28 20:15:05 +02:00
Joern
ecd6f36830 Update Translation DE
.. add missing translation
.. fix some texts
2015-06-28 20:06:55 +02:00
Mark Liversedge
f87d833578 Merge pull request #1425 from Joern-R/translation
Update Translation DE
2015-06-28 19:02:08 +01:00
Mark Liversedge
976d305388 V3.2 Release Candidate 2
.. updated build number
2015-06-28 15:19:41 +01:00
Mark Liversedge
e7b122360a Fix Mac QT4.8 showhideToolbar compile error 2015-06-28 14:55:07 +01:00
Mark Liversedge
20f93af2dc Fix SEGV on Mac QT4.8
.. referencing the QAction showhideToolbar that is not
   used if QT < 5.2.1 results in a crash.
2015-06-28 08:25:38 +01:00
Mark Liversedge
e94f3577c8 Fix SEGV with Power Phase on AllPlot
.. lots of scenarios to cause the SEGV but all related
   to the CurveColors::save/restore state functions that
   cast QwtPlotIntervalCurves to the wrong type and BOOM!

.. thanks to Simon Brewer for the ride file that had this data.
2015-06-27 19:03:49 +01:00
Mark Liversedge
1b916549d8 Fix tHb units
.. its grams per decilitre
2015-06-27 17:40:37 +01:00
Mark Liversedge
8ee944ab6e Add Moxy tHb metrics
.. to match the smO2 ones.
2015-06-27 17:22:31 +01:00
Mark Liversedge
7484045f4c TrainingPeaks download nits
.. window is too small by default
.. reinstate ^L shortcut
2015-06-27 16:48:12 +01:00
Mark Liversedge
56c79ed71d Fix SEGV on save config during refresh
.. by cancelling refresh before saving
2015-06-27 16:15:58 +01:00
Mark Liversedge
b7e9073d3b Merge pull request #1423 from amtriathlon/master
Setup pace zones for running and swimming in New Athlete
2015-06-27 15:48:38 +01:00
Alejandro Martinez
7c4f056f09 Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-06-27 11:03:56 -03:00
Alejandro Martinez
7bb725ce20 Setup pace zones for running and swimming in New Athlete
Changed CV default according to sport
Part of #1298
2015-06-27 11:02:40 -03:00
Mark Liversedge
9151ae61ae Merge pull request #1422 from dresco/temptest
Small fix for C -> F temperature conversion
2015-06-27 13:00:17 +01:00
Jon Escombe
3062e273ca Small fix for C -> F temperature conversion 2015-06-27 12:50:09 +01:00
Mark Liversedge
e6f9c2e65f Don't skip user intervals for peaks etc
.. when the autodiscovery has been switched off.
2015-06-27 12:45:14 +01:00
Mark Liversedge
28b2a12bc3 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
Mark Liversedge
97eede8a03 Remove ColumnChooser "duplicates"
.. where metadata fields are actually for metric
   overrides we do not need to add to the list -
   since they are already there as metrics.
2015-06-27 08:58:07 +01:00
Mark Liversedge
89b4daf9ea "Calendar_Text" and Filtering
.. if you filter the ride list the reset will search for
   a heading "Calendar_Text" that will not exist since it
   is prettified to "Calendar Text" in the constructor.
2015-06-26 20:44:47 +01:00
Mark Liversedge
f71cf2cb4e Fix Column Chooser 'Z' fields
.. a throwback from the old SQL model days and not required
   any more. Also helps to explain issues with calendar text.
2015-06-26 20:33:54 +01:00
Mark Liversedge
cc281e6e7a Merge pull request #1421 from amtriathlon/master
Fixed interval alignment
2015-06-25 20:12:44 +01:00
Alejandro Martinez
7dd10d7c75 Fixed interval alignment
To be inline with the new interval structure
Problem was clearly visible in swim workouts (Manual, TCX and PWX).
2015-06-25 11:12:59 -03:00
Mark Liversedge
49d7ff7a7d Fix SEGV on time going backwards
.. as demonstrated in Günter Speckhofer file after
   some editing in the editor.
2015-06-23 22:18:58 +01:00
Mark Liversedge
06cf774867 Minor cosmetic tweaks for Core Temp
.. disappeared on plots for numerous reasons
.. now has its own color config
.. chart axis tweaked to be more appropriate
2015-06-21 15:25:09 +01:00
Mark Liversedge
63597dc82d Fix Core Temp SEGV
.. importing ride < 60s long

Fixes #1411
2015-06-21 12:57:11 +01:00
Mark Liversedge
187359a271 V3.2 RC1X
.. Release Candidate after some late commits
   before RC1 was issued.
2015-06-19 15:07:51 +01:00
Mark Liversedge
483f7fafa0 RideMetric::isLowerBetter()
.. seems redundant, but at least reflect the type() of
   metric when deciding; if the metric is defined as
   being of type RideMetric::Low then return true
   otherwise false.

.. the metric can override this method if needed if
   is is still only an average (e.g. weight ?)
2015-06-19 09:02:41 +01:00
Mark Liversedge
7bf1e73154 Merge pull request #1409 from amtriathlon/master
Added error message for unsupported Lap Swimming FIT files
2015-06-19 07:47:21 +01:00
Alejandro Martinez
132e8cd196 Added error message for unsupported Lap Swimming FIT files
Until proper handling is added better to give an error message,
otherwise an activity with no data is created causing confusion.
2015-06-18 20:26:25 -03:00
Mark Liversedge
40fdc66a1b Add Core Temperature
.. New derived data series representing an estimate of core temperature
   on the basis of HR changes.

   * shown on AllPlot and RideSummary
   * 2 new metrics; max and avg core temperature

.. This has been based upon "Estimation of human core temperature from
   sequential heart rate observations" Mark J Buller, William J Tharion,
   Samuel N Cheuvront, Scott J Montain, Robert W Kenefick, John
   Castellani, William A Latzka, Warren S Roberts, Mark Richter,
   Odest Chadwicke Jenkins and Reed W Hoyt. (2013). Physiological
   Measurement. IOP Publishing 34 (2013) 781–798.
2015-06-18 18:41:04 +01:00
Mark Liversedge
de146c3b24 Merge pull request #1408 from amtriathlon/master
Peak Pace metrics need to be RideMetric::Low
2015-06-18 13:48:36 +01:00
Alejandro Martinez
56fadcbd4b Peak Pace metrics need to be RideMetric::Low
For "Group By" to work properly in LTM charts
2015-06-18 09:38:53 -03:00
Mark Liversedge
855dc18a74 Merge pull request #1404 from amtriathlon/master
Fixed wrong caching when CPPlot is filtered by activity type
2015-06-17 17:11:22 +01:00
Alejandro Martinez
1be8e93356 Enable Efficiency Factor and Aerobic Decoupling metrics for Running
Fixes #1407
2015-06-17 11:28:58 -03:00
Mark Liversedge
55e8255154 V3.2 Release Candidate 1
.. all features now complete, bar a couple of minor
   pending changes.

.. upgrade process feature complete, bar some minor
   cosmetic nits for colors/metadata

.. time to validate the code changes since February
   with the user community and freeze new features
2015-06-17 12:39:48 +01:00
Mark Liversedge
749b6f00fc Add W'bal Time In Zone (3c of 3c)
.. add W'bal Zoned to Histogram
   - for a ride
   - for a date range
   - *NOT* for a compared ride
   - for a compared date range

This makes the last of the updates for W'bal
in zone, but highlights the issues related to
W'bal being held in a different structure to
the rest of the ride data.

Need to think on how that might work better
for intervals.
2015-06-17 12:22:00 +01:00
Alejandro Martinez
ab07ad7dcb Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-06-16 11:08:13 -03:00
Mark Liversedge
4b32b681aa Logic error in FIT reader
.. introduced with multi-session update
.. need to audit and thoroughly test that code
2015-06-16 13:44:49 +01:00
Mark Liversedge
3be61454db Reconise Alexandre Prokoudine
.. for Russian translation contribution
2015-06-16 08:04:09 +01:00
Mark Liversedge
6a3cd6b6a2 Merge pull request #1405 from prokoudine/master
Updated Russian translation
2015-06-16 08:01:32 +01:00
Alexandre Prokoudine
5d589af458 Updated Russian translation 2015-06-16 02:57:21 +03:00
Alejandro Martinez
c862e42162 Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-06-15 19:46:49 -03:00
Mark Liversedge
d76cb9665c Fix SEGV in W'bal ridefilecache
.. when computing the distribution due to problems
   casting double to int for nan/inf values.
2015-06-15 22:00:01 +01:00
Alejandro Martinez
e7163cbb64 Fixed wrong caching when CPPlot is filtered by activity type 2015-06-15 16:05:14 -03:00
Mark Liversedge
1e3d7eeb56 Add W'bal Time In Zone (3b of 3c)
.. add W'bal Zoned to Histogram
   - for a ride
   - for a date range
   - for a compared ride
   - for a compared date range

.. still need to update ridesummary to show
   summary of w'bal zone distribution (3c)
2015-06-15 13:37:29 +01:00
Mark Liversedge
3047bb9d45 Add W'bal Time In Zone (3a of 3c)
.. add W'bal distribution to Histogram
   - for a ride
   - for a date range
   - for a compared ride
   - for a compared date range

.. still need to revisit to do in zones (3b)

.. still need to update ridesummary to show
   summary of w'bal zone distribution (3c)
2015-06-15 10:43:28 +01:00
Mark Liversedge
4f1ac967f1 Add W'bal Time In Zone (2 of 3)
.. add metrics and trends chart
2015-06-14 10:52:21 +01:00
Mark Liversedge
d9b81fd228 Add W'bal Time In Zone (1 of 3)
.. adding it to the CPX file
2015-06-14 09:32:01 +01:00
Mark Liversedge
62473866ab Route Intervals Colour
.. not gray !
2015-06-13 19:47:24 +01:00
Mark Liversedge
4325fea4ac Discard data with no time or distance
.. we need one or the other !
2015-06-13 17:33:04 +01:00
Mark Liversedge
8316a0b280 Merge pull request #1400 from amtriathlon/master
Set Pace Zone Shading and Pace units according to sport in CV chart
2015-06-13 07:18:53 +01:00
Alejandro Martinez
3f35f7878e Set Pace Zone Shading and Pace units according to sport in CV chart
In activities it depends on selected activity, bests are automatically filtered.
In range mode it can be set by sidebar or home filters for single sport
2015-06-12 21:38:21 -03:00
Mark Liversedge
d8eeb8090d Fix SEGV on zoom change when isolated in AllPlot
.. that code is horrible.
2015-06-12 17:12:05 +01:00
Joern
18a611dd02 Merge pull request #1399 from Joern-R/master
Update Translation DE
2015-06-12 18:03:48 +02:00
Joern
05232c90b7 Update Translation DE
... translation DE
2015-06-12 18:08:12 +02:00
Mark Liversedge
2dda2bfe9d Add Climb Rating metric
.. based upon Fiet-type formula elevation^2 / distance.
   From an idea on Dan Conelly's blog.

   Some examples:
      Mt Ventoux        - 121
      Alpe d'Huez climb - 83
      Galibier          - 81
      Glandon           - 66

.. so it's not perfect, but gives a good sense of hard
   versus easy !
2015-06-12 15:29:01 +01:00
Mark Liversedge
a5fa5fe17f Add qmake's '.qmake.stash' to .gitignore 2015-06-11 16:10:00 +01:00
Mark Liversedge
b092315a11 Recognise Alex Harsanyi 2015-06-09 19:58:32 +01:00
Mark Liversedge
479e0acfd8 Revert "RideFile::isRun() -- only use the "Run" tag to clasify a file as running" 2015-06-09 19:56:33 +01:00
Mark Liversedge
dfc8e9bae3 Merge pull request #1397 from alex-hhh/multisport-import-2
Import multisport FIT files
2015-06-09 19:54:25 +01:00
Mark Liversedge
c322623fde Tweak route drop dialog
.. titlebar and button layout.
2015-06-08 19:54:29 +01:00
Alex Harsanyi
834a11bd0f RideFile::isRun() -- only use the "Run" tag to clasify a file as running
For multi-sport files, the bike section might record vertical oscillation or
ground contact time from the HRM-RUN sensor when moving in and out of
transition.
2015-06-08 22:05:46 +08:00
Mark Liversedge
298bf545e5 Merge pull request #1396 from amtriathlon/master
Use sport specific metric for PMC in RideSummaryWindow
2015-06-08 13:09:06 +01:00
Alejandro Martinez
645f98dd34 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
28a53a5249 Add Sustained in Zone to trend layout
.. new chart to plot sustained time in zone.
2015-06-07 16:51:18 +01:00
Claus Assmann
1d5755443d Fix comment typos 2015-06-07 16:31:56 +01:00
Mark Liversedge
3ada40c7ad errant copy paste in last commit
.. setting table rowCount when it shouldn't. It was a
   harmless line of code but would confuse people later
   on when editing this code
2015-06-07 12:16:48 +01:00
Mark Liversedge
3a39b771c5 Tweak drag/drop routes compare pane
.. sort so most recent first

.. if dropping less than 10 items then add checked
   otherwise add them unchecked.
2015-06-07 12:13:04 +01:00
grauser
840c0c05ac Add Color to Segment name 2015-06-06 22:38:26 +02:00
Mark Liversedge
6e1aef249a Add Date to Segment name
.. when matching on drop into compare pane as they all
   arrive with the same name !
2015-06-05 22:04:52 +01:00
Mark Liversedge
00be914a61 Add matched segments on drop into compare pane
.. pops up a dialog to ask if you want to just add this
   segment (the default) or add all intervals on this
   segment for a season (you can select a season).
2015-06-05 20:43:20 +01:00
Mark Liversedge
d932a1a8e9 Missed SustainMetric.cpp in last commit 2015-06-04 21:04:43 +01:00
Mark Liversedge
ddf6203c37 Sustained Time in Zone Metrics
.. how much time is spent on sustained efforts
   in each zone.
2015-06-04 21:00:09 +01:00
Mark Liversedge
5966052fcc Merge pull request #1394 from Joern-R/fit
FIT File Read - Exception not catched
2015-06-04 16:50:37 +01:00
Joern
0fac48d451 FIT File Read - Exception not catched
... exception "Truncated" for the "final" read call of the FIT file
reader was not catched, causing termination of the program (problem
reported with an example file being truncated at the end)
2015-06-04 17:18:11 +02:00
grauser
cbad81b846 Remove qDebug 2015-06-03 22:40:32 +02:00
Mark Liversedge
6dee248b0d Plot Sustained on CP plot in compare mode
.. compare seasons
2015-06-03 21:37:09 +01:00
Mark Liversedge
f7ad52d0b6 Less qDebug() 2015-06-03 21:05:10 +01:00
grauser
f8ef8ef737 RideFile: Don't use 0.0 as min or max for gps lat/lon 2015-06-03 19:52:45 +02:00
Mark Liversedge
7fb4ec5649 bool not BOOL 2015-06-03 16:41:05 +01:00
Mark Liversedge
1a4e53dd29 Merge pull request #1392 from amtriathlon/master
Discover Peak Pace intervals for running and swimming
2015-06-03 16:14:19 +01:00
Alejandro Martinez
fe4222d2c6 Discover Peak Pace intervals for running and swimming 2015-06-03 12:05:54 -03:00
Mark Liversedge
ff96eb7ba9 CP rangemode plot effort logic fix
.. to now consider the ride intervals when plotting
   for a date range!
2015-06-03 15:20:27 +01:00
Mark Liversedge
807859e26a Add Sustained Efforts to CP Chart
.. overlay all sustained efforts on the curve
2015-06-03 14:59:56 +01:00
Alex Harsanyi
d2c9178aab Add support for reading multi sport FIT files.
Multisport FIT files are imported as separate activities, one for each session
in the file.

The internal storage format for multisport files was also changed form TCX to
JSON, as the TCX file would not store advanced metrics, like the left-right
balance from the Garmin Vector power meter.
2015-06-03 20:47:24 +08:00
Mark Liversedge
c04d8b9370 Fix W' Power metric
.. use all seconds not just those above CP !
2015-06-02 16:22:22 +01:00
Mark Liversedge
9a029c7f91 Add W' Power metric
.. as W' work (joules from time spent above CP) divided by duration.
   This represents the W' contribution to Average Power.
2015-06-02 15:09:32 +01:00
Mark Liversedge
b8864b8516 Fix interval painting and lazy delete
.. the lazy delete was a horrible hack and memory leak.
   So, now the paint delegate no longer dereferences the
   IntervalItem * from the QTreeWidgetItem.

   Instead we use setData for UserRole+1 to store the interval
   color when constructing the trees. The paint function can
   get this directly and we avoid any contention when the
   intervals are deleted and created.

   The lazy delete can be removed and deleted once the changes
   have been notified via intervalsUpdate().
2015-06-02 10:56:28 +01:00
grauser
4c34e4e946 Correct GPS route search optimisation 2015-06-01 23:49:24 +02:00
grauser
fa71f9a600 SlfParser: Read start date in last format 2015-06-01 23:47:06 +02:00
Mark Liversedge
21ca33f798 Lazy Delete IntervalItems in RideItem
.. since they are deleted in threads and affect the gui

.. to avoid the overhead of cross-thread mutex we just
   delete intervals lazily; each time we refresh them
   the last lot are wiped away.
2015-06-01 18:51:55 +01:00
Mark Liversedge
6df17471d9 Fix paint SEGV on RideItem::updateIntervals()
.. zaps interval items whilst they are referenced in
   the interval tree etc.
2015-06-01 13:54:50 +01:00
Mark Liversedge
9374e95732 Set default chrome on Yosemite
.. to match the new UI.
2015-06-01 10:50:11 +01:00
Mark Liversedge
d775519453 Fix NewCyclistDialog bugs
1. Zones config was being written to wrong path
2. Pmax label and Edit were orphaned, not on a layout
3. Upgrade dialog popped up on open

Fixes #1380
2015-06-01 08:53:48 +01:00
Mark Liversedge
15b0211798 EFFORTS found using metadata only
.. if no zones are configured.
2015-05-31 23:52:02 +01:00
Mark Liversedge
6025444a68 Added "Pmax" override in metadata
.. only used in interval discovery
2015-05-31 23:21:59 +01:00
Mark Liversedge
69a45d0b21 TT analysis fixups
.. SEGV on setting CP when no zones configured. Since
   RideItem::updateIntervals() dereferenced a range
   when CP is set, but none existed.

.. fixup use of Metadata field "W'" to override settings
   in Metrics tab.
2015-05-31 22:18:17 +01:00
Mark Liversedge
ceca142ca9 Mark MATCHES that are To Exhaustion
.. name and also red color.
2015-05-31 13:34:22 +01:00
Mark Liversedge
6c5f3e2dcf Autodiscover MATCHES
.. and add them to the ride EFFORTS
2015-05-31 13:05:22 +01:00
Mark Liversedge
d902bb332c Merge pull request #1387 from Joern-R/pull1
Auto-Intervals - Translation Enablement
2015-05-30 08:29:51 +01:00
Mark Liversedge
0bff270d5d Fix interval offsets
.. when adjusting sample offsets to start from zero
2015-05-29 20:44:45 +01:00
Mark Liversedge
2c13186fc6 Revert GPS route search optimisation
.. it fails to find my segments !
2015-05-29 20:22:56 +01:00
Mark Liversedge
e30509c4b9 Interval List indicate high quality
.. with a sidebar indicator

.. we may need to change when we have planned workouts
   as the intervals will need to match the plan.

.. but we can use the same concept of 'quality' when
   comparing a full activity with what was planned.
2015-05-29 19:50:47 +01:00
Joern
563d94d2ca Auto-Intervals - Translation Enablement
... enable Translation for Text is auto-determined intervals
... adjust Translation DE for the changes
2015-05-29 19:53:11 +02:00
Joern
7e887a9669 Merge pull request #1382 from Joern-R/master
Update - Translation DE
2015-05-29 18:39:25 +02:00
Mark Liversedge
3ad16e01d9 LTM no span slider in tile view
.. too much going on !
2015-05-29 14:43:41 +01:00
Mark Liversedge
f8fd7752a8 Allow user to stop tracking a segment
.. in case you add one that isn't useful.
2015-05-29 12:42:41 +01:00
Mark Liversedge
e281f94135 Power Zone metric has 1 decimal
.. to indicate how far into the zone we got, so
   3.1 is 10% into zone 3, whilst 7.9 is seriously
   high Neuromuscular power, but below Pmax

.. we use Pmax to bound the upper value when calculating
   how deep we got into the very upper zone; so it is
   possible for the metric to be 8.x when only 7 zones
   are defined (when the power value is > Pmax)
2015-05-29 10:18:09 +01:00
Mark Liversedge
3b07d8997a W'bal y-axis consistency
.. in stack mode always start from min W'bal or 0, whichever
   is smaller. This makes it easier to identify when W'bal
   is (or is not) being consumed across rides.
2015-05-29 09:54:20 +01:00
Joern
f3dbb4e0f4 Update - Translation DE
... update Translation
2015-05-28 18:56:18 +02:00
grauser
19276db443 Route: QVariant add .toDouble() 2015-05-27 21:11:39 +02:00
Mark Liversedge
eb6e580079 Change the color of an interval
.. in the IntervalEditDialog
2015-05-27 16:04:15 +01:00
Mark Liversedge
62f937e6b2 Interval Sidebar show Interval Color
.. using same kind of decoration as the ride list
   with a small bar to indicate the chosen color
   for the interval.
2015-05-27 15:37:45 +01:00
Mark Liversedge
9484b9ea6e Interval Summary EXCLUDING selected intervals
.. when looking at a ride and working with intervals it
   is sometimes useful to look at the rest of the ride
   exluding the intervals selected.

.. we now show the metrics for the intervals selected,
   followed by for each interval then lastly for the
   rest of the activity i.e. excluding the intervals
   selected.
2015-05-27 06:18:53 +01:00
grauser
12b33f47a2 Remove last wrong commit 2015-05-26 23:45:35 +02:00
grauser
a68e87636f Route Search: Add comment 2015-05-26 23:29:15 +02:00
grauser
68742ba7a6 Route Search: verify Min-Max Lat-Lon before searching 2015-05-26 23:27:25 +02:00
grauser
38c957842d SlfParser: update for last vesions 2015-05-26 23:27:25 +02:00
Mark Liversedge
774ac155f9 Fix SEGV on drag/drop ride into compare pane
.. when moved to passing RideItem* from RideFile* we
   forgot to change for dropping entire ride !
2015-05-26 21:32:40 +01:00
Mark Liversedge
8abb2e123c Fix SEGV when delete last ride
.. currentRideItem() is NULL, and IntervalSummaryWindow
   was dereferencing the pointer before checking if it
   was NULL.
2015-05-26 21:08:35 +01:00
Mark Liversedge
1e1eafbbc9 Overlapping Sustained Efforts
.. we now filter sustained efforts by zone rather than picking
   the very best non-overlapping effort.

.. this means that a L7 sprint mid way through a L4 climb within
   a L3 ride will find find 3 sustained intervals rather than just
   the sprint.
2015-05-26 16:39:14 +01:00
Mark Liversedge
142685ef70 Fox off-by-one for Zone/Level
.. they start at 0, not 1 in class Zones but users
   think in terms of Zones 1-7 !
2015-05-26 09:25:59 +01:00
Mark Liversedge
92cee86e7c Simplify EFFORTS intervals
.. just place TTE, EFFORTS and SPRINTS under
   the EFFORTS interval type.

.. this is getting ready for handling overlapping
   efforts rather than just the very best.
2015-05-25 20:16:44 +01:00
Mark Liversedge
d6e54241ad Move W'bal plot next to Power
.. in AllPlot. So you can see how power/W'bal compares

.. it would be neat to let users move them around themselves
   but thats for another day
2015-05-25 18:25:18 +01:00
Mark Liversedge
3fc8e5abec Route finding skips on when found
.. to avoid finding the same segment twice if it
   is a shortish one that finishes nr a stop point
   like traffic lights or top of a hill.
2015-05-25 17:03:48 +01:00
Mark Liversedge
26350499ca Qt::ItemNeverHasChildren is from QT 5.1.1 not 5.0
.. fix compiler failure on QT5.0.x
2015-05-25 11:40:06 +01:00
Mark Liversedge
8b507781db Fix Withings URL trailing slash ('/')
.. when the URL for the webservice is created it places
   a slash between the host info from preferences and the
   service path:

   http://wbsapi.withings.net/measure?action=getmeas ..

   By default, the withings server configuration has a
   trailing slash, which results in a URL of the form:

   http://wbsapi.withings.net//measure?action=getmeas ..

   The double slash here ----^^ used to be accepted by
   the Withings servers but more recently it is rejected
   so this patch removes any trailing slash before
   constructing the full path.
2015-05-25 09:55:12 +01:00
Mark Liversedge
aada2ca316 Revert "Only look for first occurrence of segment"
.. if you do hill repeats or loops then this commit
   isn't at all helpful to you !. This reverts the
   commit b90c5c0894.
2015-05-24 08:40:51 +01:00
Mark Liversedge
a9d8b2a194 Only look for first occurrence of segment
.. to avoid duplicate entry for a 'small and
   partial' match in route search
2015-05-23 21:25:38 +01:00
Mark Liversedge
e01fbfc6b4 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
5e005ad99e Reinstating Interval functions: MULTI-SUMMARY
.. summarising when >1 interval selected.
2015-05-23 15:52:04 +01:00
Mark Liversedge
c4b30b2d62 Route Search Refactor Part 1 of 2
.. clean code and get ready to add background
   scanning for routes

.. next update will add background scanning
2015-05-23 13:38:07 +01:00
Mark Liversedge
4779e1e982 No Zones or CP then don't search for TTE
.. pointless searching for a default value.
2015-05-23 10:37:16 +01:00
Mark Liversedge
ca6085f25e Fix AllPlotInterval SEGV on SAVE
.. it optimises out setRide when it is the same ride as currently
   being plotted, but the intervals will have changed since they
   were reloaded

.. so we always notify of intervals changed after intervalsUpdate()
   just in case other charts skip refresh when the selected ride is
   the same as the one they are already showing
2015-05-23 09:18:09 +01:00
grauser
fb511fe2a9 AnalysisSidebar: Reinstate interval SORT in list 2015-05-23 08:48:23 +02:00
grauser
e7936a29b5 AnalysisSidebar: Reinstate interval DRAG/DROP in list 3 2015-05-22 21:49:06 +02:00
Mark Liversedge
42b4f48f2a Reinstating Interval functions: ADD VIA FIND DIALOG
.. by click and drag
2015-05-22 19:17:39 +01:00
Mark Liversedge
8b0c37fd89 Refactor RideFile out of IntervalItem
.. and a few nits to get Routes to compile, but it
   needs to be aligned to the intervalsUpdate() method
   in RideItem.
2015-05-22 18:41:59 +01:00
Mark Liversedge
c9eee6ca53 Reinstating Interval functions: ADD ON GOOGLE MAP
.. by click and drag
2015-05-22 17:20:02 +01:00
Mark Liversedge
359606c3cd User Intervals Tree always at top
.. in sidebar
2015-05-22 15:13:21 +01:00
Mark Liversedge
9db6291034 Fixups Add Interval on AllPlot
.. fix by distance mode
.. remove findPeakPower from sidebar
2015-05-22 14:57:38 +01:00
Mark Liversedge
ddf3aac246 Reinstating Interval functions: ADD ON ALLPLOT
.. by click and drag
2015-05-22 14:47:43 +01:00
Mark Liversedge
60e2b6f28b Fix interval metric refresh after edit
.. when the start/stop is changed.
2015-05-22 12:15:35 +01:00
Mark Liversedge
2ae2c0c652 Reinstating Interval functions: RENAMING/RENUMBERING
.. rename a number of intervals in one go
2015-05-22 11:58:16 +01:00
Mark Liversedge
d6d41df95d Reinstating Interval functions: EDIT
.. not extending to include new members, just the old
   functionality reinstated for now.
2015-05-22 10:26:35 +01:00
Mark Liversedge
85387236ce Remove qDebug() erroneously committed 2015-05-22 08:47:19 +01:00
Mark Liversedge
15e5f54e40 Reinstating Interval functions: SELECT/DESELECT
.. from interval navigator or map marker
2015-05-22 08:41:26 +01:00
Mark Liversedge
6e18774fa7 Retain selection status when intervals updated
.. since we are called to refresh when intervals
   are updated within the RideItem
2015-05-22 07:31:24 +01:00
grauser
398f003a93 AnalysisSidebar: Reinstate interval DRAG/DROP in list 2
- Apply change to RideFile
2015-05-22 08:15:31 +02:00
Claus Assmann
5252ecf9a3 Fix QT4.8 drag/drop update compile error
.. Qt::NeverHasChildren is QT5 only
.. Calling signal instead of notifier in Context
2015-05-22 06:54:26 +01:00
grauser
8145cbd764 AnalysisSidebar: Reinstate interval DRAG/DROP in list (correction2)
Let Drag non User intervals for compare pane
2015-05-21 23:03:29 +02:00
grauser
3ef9bb5960 AnalysisSidebar: Reinstate interval DRAG/DROP in list (correction)
Last commit correction
2015-05-21 22:37:27 +02:00
grauser
4124290787 AnalysisSidebar: Reinstate interval DRAG/DROP in list 2015-05-21 22:36:05 +02:00
Mark Liversedge
5368ee6bfb Add SSL to versions list
.. so we can see if it is compiled in !
2015-05-21 14:38:13 +01:00
Mark Liversedge
9c001b66df Add Metric for Power Zone
.. so you can see what zone an interval was actually in. This is
   largely useful for sustained intervals but also for peaks.
2015-05-21 09:50:40 +01:00
Mark Liversedge
ab5a935d44 Fixup sidebar refresh after RideItem::updateIntervals()
.. by introducing a specific signal to trigger it.

.. its very specific, but its more flexible (and a lot less
   work) than adopting a model for the QTreeView that would
   be a better 'architecture'.
2015-05-20 05:55:55 +01:00
grauser
9bfa5cd06e Power Zones: Update existing HR range 2015-05-19 23:34:06 +02:00
grauser
b52197a94e Power Zones: Update existing range 2015-05-19 22:47:30 +02:00
Mark Liversedge
536866a9ce Fix IntervalSidebar SEGV on Save
Rebuilds the interval tree when a ride is saved and
refreshes intervals as a result.

There are a number of other scenarios that will also
need to call a sidebar refresh as a result of the
intervals being updated.

* edit ride data
* change metadata

There may be others lurking. This needs a review of
the code pathways leading to RideItem::updateIntervals()
and how we keep the sidebar in sync.
2015-05-19 21:17:12 +01:00
grauser
61d7aeeb7a Auto Interval Discovery : Update SPRINT detection 4 2015-05-19 21:13:00 +02:00
Mark Liversedge
d455f163ef Zone fingerprint include Pmax fixup
.. needed to change in two places in Zones.cpp !
2015-05-19 19:32:30 +01:00
grauser
ef4e908f06 Auto Interval Discovery : Update SPRINT detection 3
try with 3 components model
2015-05-19 19:01:51 +02:00
Mark Liversedge
1191e3a24f Fix syntax error in RideItem.cpp 2015-05-19 11:49:59 +01:00
Mark Liversedge
0578da8086 Fix off by on in the effort algorithm
.. subtraction in integrated series is for the period
   after the current point (i) not from the current point.
2015-05-19 11:43:28 +01:00
Mark Liversedge
2175806e30 Fix off-by-two effort/sprint discovery
.. the integrated joules and resampling to 1sec code
   was not taking into account the first sample is 0 seconds
   and was incrementing 1 sample early too.

   As a result the integrated series was 2seconds ahead of the
   recorded data, meaning the discovered efforts and sprints
   would have a start time 2 seconds ahead of where they
   should have been.
2015-05-19 10:55:56 +01:00
grauser
feb39a3942 Auto Interval Discovery : Update SPRINT detection 2 2015-05-18 23:18:27 +02:00
grauser
4fe02fe8f2 Auto Interval Discovery : SPRINT detection correction 2015-05-18 22:12:07 +02:00
grauser
8e24abced0 Auto Interval Discovery : Update SPRINT detection 2015-05-18 21:30:39 +02:00
grauser
6911c1e485 Auto Interval Discovery : SPRINT detection 2015-05-18 19:57:09 +02:00
Mark Liversedge
d92ad6fe0c Reinstating Interval functions: DELETE
.. you can now delete interval(s) via the hamburger menu
   or by right-clicking a specific interval.
2015-05-18 18:41:51 +01:00
Mark Liversedge
0fb15262f2 Establish runtime link for USER intervals
.. from IntervalItem to RideFileInterval when
   the ridefile is opened
2015-05-18 15:44:21 +01:00
Mark Liversedge
482ee11fbe Fixups For JsonRideFile.y
.. for intervals now as pointers
2015-05-18 14:21:50 +01:00
Mark Liversedge
0e11f9de11 RideFile::intervals_ now array of pointers
.. so we can keep a reference to the user interval
   in a ridefile from the rideitem and not worry about
   trying to match or handle index offsets into the array

.. this is required to fixup the relationship between
   an IntervalItem and a RideFileInterval in RideItem
   and RideFile respectively.
2015-05-18 13:57:21 +01:00
Mark Liversedge
bdeb4870a1 Reinstating Interval functions: ZOOM
.. you can now zoom out / zoom in for an interval.
.. the rest of the menus items are also shown but not active yet.
2015-05-18 12:25:32 +01:00
Mark Liversedge
f7eb53d169 Add Pmax to Zones::fingerprint()
.. and minor cosmetic on edit.
2015-05-17 21:00:53 +01:00
grauser
b439b0cd1f Power Zones: Add Pmax (with CP and W') 2015-05-17 21:14:08 +02:00
Mark Liversedge
708e118536 Computrainer Serial Protocol Docs
.. should have added this a long time ago!
2015-05-17 15:31:00 +01:00
Mark Liversedge
8cf97b96a8 WKO+ 3 File Format Documentation
.. should have added to the repo a long time ago.
2015-05-17 15:26:20 +01:00
grauser
91a1d6697f Auto Interval Discovery : Update CLIMB detection 4 2015-05-17 10:02:53 +02:00
grauser
2767de8b8b Auto Interval Discovery : Update CLIMB detection 3 2015-05-16 20:18:38 +02:00
Mark Liversedge
b2b6db0676 Add MMP % metric
.. good for intervals and shows the percentage of the
   PD model power duration you exercised at in the interval.
2015-05-16 16:33:59 +01:00
Mark Liversedge
2c5cc110bd Add Sustained Efforts
.. anything over 85% of the power for duration versus the configured
   CP and W' between 2mins and 1hr will be flagged as a sustained
   effort via the intervals for a ride.
2015-05-16 14:31:31 +01:00
Mark Liversedge
7abe0cfaed Auto interval TTE uses 'quality'
.. searches for highest interval rather than longest
.. fixed double refresh() caused by calls to ride()
2015-05-16 13:48:44 +01:00
Mark Liversedge
2410dd6dbc Search all interval names
.. not just user defined ones
2015-05-16 10:08:30 +01:00
Mark Liversedge
1a2bd09693 TTE time string not seconds
.. instead of 301s we now say 05:01
2015-05-15 23:52:19 +01:00
Mark Liversedge
d9fab25bb5 Fix SEGV on drag interval tree
.. reference IntervalItem* that is null for the
   interval type trees.
2015-05-15 13:17:33 +01:00
Mark Liversedge
617ff27bd4 Autodiscovery of TTE efforts
.. they're pretty rare, but this code will find
   any TTE efforts between 1hr and 2 minutes.

.. it will be extended to find sustained efforts
   but this is just to get the code started
2015-05-15 11:00:13 +01:00
Mark Liversedge
6066fec78a Fix SEGV in CriticalPowerWindow
.. during initial startup when myRideItem is null
2015-05-14 22:26:04 +01:00
Mark Liversedge
6eb9cbfa4f Don't use QVector::removeAt() !
.. its not available on Qt 4
2015-05-14 14:51:29 +01:00
grauser
3afd942b5d Auto Interval Discovery : Update CLIMB detection 2 2015-05-13 23:13:08 +02:00
grauser
84ee85b8ec Auto Interval Discovery : Update CLIMB detection 2015-05-12 21:41:23 +02:00
grauser
a4c11c065d Auto Interval Discovery : Add a ROUTE detection 2015-05-12 21:41:23 +02:00
grauser
bf21a80fb6 JouleDevice: Correct Joule GPS identification 2015-05-12 21:41:23 +02:00
Mark Liversedge
bc1a16fd17 Drag and Drop interval into compare pane
.. fixup mime type pack/unpack code using IntervalItem
   from QTreeWidgetItem::data().
2015-05-12 20:05:28 +01:00
Mark Liversedge
9b9cf099b5 Chart menu rename "Close" to "Remove Chart"
.. it was misleading to most users and reflected the
   code structure more than the user interaction model !
2015-05-12 06:27:29 +01:00
Mark Liversedge
599d136cb2 3D Chart use RideItem::intervalsSelected()
.. it missed out on the refactor for intervals.
2015-05-12 05:43:47 +01:00
Mark Liversedge
073a09cf3f Escape interval names in rideDB.json
.. to make sure intervals with quotes in them don't
   break the parser.
2015-05-11 21:59:25 +01:00
Mark Liversedge
0ee96ec6ce Fix color config update for Interval tree
.. it wasn't being reset when you changed the
   color config in options > appearance.
2015-05-11 21:34:53 +01:00
Mark Liversedge
2096bab2b7 Fix rideDB.json growing !
.. needed to clear metric array for intervals when
   load() at startup !

.. also don't seek power bests when power not available
2015-05-11 20:07:02 +01:00
Mark Liversedge
8873984ba7 Merge pull request #1367 from amtriathlon/master
Added Peak Pace metrics for running and swimming
2015-05-11 11:17:48 +01:00
Alejandro Martinez
90def71147 Added Peak Pace metrics for running and swimming
Durations are the same as for power except for 1 sec and 5 sec.
2015-05-10 20:15:22 -03:00
Mark Liversedge
2a00e9f634 Sidebar Interval Type Font Bold 2015-05-10 17:51:00 +01:00
Mark Liversedge
f109d10c78 Fix Scatterplot SEGV interval
.. lots of issues introduced by refactor
2015-05-10 14:32:53 +01:00
Mark Liversedge
483847875b Don't point hover on PEAK POWER
.. in allplot, its really distracting !
2015-05-10 13:33:29 +01:00
Mark Liversedge
7c2723c552 Interval Selected Fixups
.. GoogleMap wasn't working
.. CP ignored interval selection
2015-05-10 13:19:39 +01:00
Mark Liversedge
bc1b55317d Fix RideDB format error
.. wrote empty METRICS array when all metrics zero in an
   interval. Its pretty rare but breaks the parser

.. this means that metric were being refreshed on every run
2015-05-10 11:38:24 +01:00
Mark Liversedge
906e52bced Auto discover peak power
.. starting to get slow computing metrics for the
   longer duration intervals, need to think closely
   about the performance impact of this.
2015-05-10 10:52:47 +01:00
Mark Liversedge
f8821b9257 Fix SEGV allplot hover compare mode
.. tries to look at intervals for null rideitem
2015-05-10 09:47:51 +01:00
Mark Liversedge
6fce50c520 Fix startKM/stopKM in RideDB.json
.. was getting lost due to cut and paste error

NOTE: you will also need to delete RideDB.json to get
      the problem fixed. I didn't think it was worthwhile
      updating the version number since no dev releases
      are out, noone except developers will be affected.
2015-05-10 09:14:09 +01:00
Mark Liversedge
5ffdbec508 Fix SEGV in PfPv item select
.. replotting in intervalHover was broken during
   the refactor for interval discovery
2015-05-10 09:00:23 +01:00
Mark Liversedge
2bb2b4b152 Don't wipe interval summary
.. on hover when intervals are selected
2015-05-10 08:44:55 +01:00
Mark Liversedge
0f51c0d251 Auto Interval Discovery (Part 3a of 3)
In this part we have now reinstated the sidebar interval tree
but it is refactored out of athlete and into AnalysisSidebar
where it belongs.

* you can hover and select/deselect intervals in the sidebar

Left to do;

* All the interval operations like sort, drag and drop, find
  delete etc do not work at present and will require some work

* Add a color button to the tree to let the user change the color
  for USER defined intervals

* Add more types of intervals to the discovery; esp routes and
  sustained intervals
2015-05-10 08:30:13 +01:00
Mark Liversedge
f9405a0952 Auto Interval Discovery (Part 2 of 3)
In this part we have updated all the charts to reference
the RideItem::intervals() members instead of the TreeWidget
and RideFile::intervals().

The code to create/change/delete intervals is not included
so selecting and editing on charts/sidebar is disabled til
part 3 of the update, but hover should work properly.

Still left todo in future updates;

    * Updates to the interval sidebar to list intervals
      in a tree (by interval type) with a color selector

    * Code to create, edit, delete etc the intervals via
      the rideitem/intervalitem and see them reflected in
      the ridefile

    * Update to search for all the different types of
      IntervalItems including routes and sustained intervals
2015-05-09 18:56:42 +01:00
grauser
1f352f24f6 Auto Interval Discovery : Add a first (test) CLIMB detection 2015-05-04 23:05:42 +02:00
grauser
db97bd307e JouleDevice: add getJouleType method 2015-05-04 22:26:36 +02:00
grauser
24019ea1f9 JouleDevice: Add Joule GPS+ device type 2015-05-04 22:15:08 +02:00
Mark Liversedge
6932ef0229 Fix BEST Symbol clash
.. not sure why tbh, but lexer symbols clashed with
   enums.

.. so removed BEST interval type - we may just add them
   back as BESTPOWER, BESTHR etc later
2015-05-04 21:04:48 +01:00
Mark Liversedge
0202c334b9 Freetext search looks at interval names
.. now we have it available in the cache we can
   search interval names when performing a free text
   search.
2015-05-04 19:55:23 +01:00
Mark Liversedge
8e511def6d Deprecated and missed off commit 2015-05-04 18:20:05 +01:00
Mark Liversedge
daf0328498 IntervalItem::refresh()
Computes the metrics for an interval and creates a temporary
ridefile locally so you don't have to.

.. previous design should have pushed this into the
   class instead of performing it in RideItem

.. now there should be no reason to create a ridefile
   during interval discovery.
2015-05-04 18:17:33 +01:00
Mark Liversedge
a1bc30adf9 Auto Interval Discovery (Part 1 of 3)
In this part we have added Intervals to RideDB.json and
are refreshed within RideItem, including interval metrics.

At present the IntervalItems are loaded from the ride file
and we ignore peaks and entire laps in favour of creating
them in the discovery code.

Still left todo in future updates;

* Updates to the interval sidebar to list intervals
  in a tree (by interval type) with a color selector

* Update all the interval charts and dialogs to use IntervalItem
  and the updated sidebar

* Update to search for all the different types of
  IntervalItems including climbs and routes

NOTE: We will not be adding an Interval view until v4.0
2015-05-04 15:59:16 +01:00
Mark Liversedge
adf7a0bd00 Mac QT5 hide toolbar on fullscreen
.. to avoid glitch related to native widgets in toolbar and
   inability to switch back from fullscreen mode on a Mac.

.. see QTBUG https://bugreports.qt.io/browse/QTBUG-43299
   which doesn't look like it will be fixed any time soon.
2015-05-02 13:26:35 +01:00
Mark Liversedge
8419c01070 Code Spring Clean
.. compiler nits
2015-05-02 12:25:01 +01:00
Mark Liversedge
d208f27a11 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
999a6de715 Interval: Add a temporary model for Interval view 2015-04-30 18:38:43 +02:00
grauser
28f9576359 Interval: Add interval type (Device, User, Peak, Route,...) 2015-04-30 18:20:22 +02:00
Mark Liversedge
01d5370200 Fix SEGV Mac with LTM spanslider style
.. applying to buttons before they had been created.
2015-04-25 15:18:22 +01:00
Mark Liversedge
b0ce0bb19a Add SpanSlider to LTM Chart
.. so we can zoom / span on charts.

.. have not applied to stack or compare mode
2015-04-25 13:49:23 +01:00
Mark Liversedge
edd89d9eeb Add another /10 for Workbeats
.. brings it back to same scale as BikeScore
2015-04-24 10:37:21 +01:00
Mark Liversedge
0d2bea605c Workbeat Stress
.. heartbeats x joules, when unfit you may generate low watts
   but with a high hr, as opposed to the other way around.

.. an attempt to combine central and peripheral stress, can be
   used to compare with power only stress metrics
2015-04-24 10:01:47 +01:00
grauser
a29472965f Model: Some tests 2015-04-14 08:00:58 +02:00
grauser
8ab318bcd4 Update French translation 2015-04-14 08:00:58 +02:00
Mark Liversedge
a09be906f2 Fix label isolation UI nit
.. kept showing labels that should be hidden when hovering
   over an axis.
2015-04-11 10:03:56 +01:00
Mark Liversedge
aa3add45ca Typo += instead of plain =
.. has same effect since sample.km is zero until we get to
   this line, but it is misleading to read.
2015-04-10 09:11:07 +01:00
Mark Liversedge
8787ffe0a7 Racermate fix to accumulate distance
.. not averaging it !
2015-04-10 09:04:16 +01:00
Mark Liversedge
580512cac9 Scatter connect dots when not framed
.. when selecting intervals the points on a scatter plot
   are joined when they are not being framed against the
   rest of the ride

.. this is to provide some context about the order the
   data was generated in.

.. would be nice if we could have arrows (vectors)
2015-04-10 08:36:07 +01:00
Mark Liversedge
e89041669e Better comments in TxtRideFile resampling code
.. not happy about distance handling, its not right, need
   to accumulate not average.
2015-04-09 22:08:23 +01:00
Mark Liversedge
2f701d48f3 Racermate Fixed 1s Samplerate
.. racermate format for VELOtron and Computrainer use
   a variable rate recording, mostly due to PC interrupts
   and workload (e.g. 620ms, 619ms, 624ms sample rates)

.. so we resample on import to 1s samples, the 1000ms sample
   rate can be changed in the code to 500ms or whatever

.. this is needed to enable resampling and merging with other
   data files, most notably from Moxy.

Fixes #1359
2015-04-09 20:23:55 +01:00
Mark Liversedge
f4fe10270c About Dialog - libsamplerate
.. show on the version dialog

.. fix up 'delete' -> 'free()' for malloc'ed
   memory used with libsamplerate
2015-04-08 20:59:52 +01:00
Mark Liversedge
c1f889d998 Add ability to export all csv
.. for batch export
2015-04-08 17:21:24 +01:00
Mark Liversedge
a9e32d3086 RideFile::resample() use libsamplerate
.. if it is available.
2015-04-08 14:03:11 +01:00
Mark Liversedge
2d2272e9af Merge pull request #1358 from aevanforeest/master
Added virtual power for Elite Arion Mag rollers
2015-04-08 11:19:37 +01:00
aevanforeest
52845ffd2a Added virtual power for Elite Arion Mag rollers 2015-04-08 12:15:00 +02:00
aevanforeest
1a93d243d4 Added virtual power for Elite Arion Mag roller 2015-04-08 12:13:43 +02:00
Mark Liversedge
7fcac6da94 Add RideFile::arePresent()
.. to get a list of all data series that are present in the ridefile
.. used when working with libsamplerate to pack/unpack data series
2015-04-08 10:51:39 +01:00
Mark Liversedge
11eaac4b09 New optional library libsamplerate
.. this has been added to support some data handling activity
   to support a blood glucose study and is not really for general
   usage.

.. the libsamplerate library is being used in ridefile::resample()
   which is only used by merge and export.

.. we may choose to formalise this library later but for now it
   is not required for any functionality and is not used in
   release builds.
2015-04-08 10:08:15 +01:00
Mark Liversedge
941ca37003 Add DPI Scaling Factor
.. set when on a Windows platform, but not used.

.. when testing on a QT 5.4 release the font metrics appear
   to take the scaling factor into account, but adding the code
   for compatibility in the future (if we need it)
2015-04-07 17:54:51 +01:00
Mark Liversedge
1956fadca2 Add support for vpower on CycleOps Magneto Pro
Fixes #688
2015-04-07 10:59:16 +01:00
Mark Liversedge
7d107585f1 Add Support for Elite Muin 2013
.. as provided by "muinuser" on github

Fixes #1075
2015-04-07 10:40:55 +01:00
Mark Liversedge
ed8a45f3db It's named after AJ Ward-Smith
.. not Ward/Smith or Ward Smith.
2015-04-06 20:10:54 +01:00
Mark Liversedge
86e44355ff Ward/Smith Fixup
.. LOL. Mike warned me to use wPmax not Pmax and I still
   went ahead and made that mistake.

D'Oh.
2015-04-06 12:06:23 +01:00
Mark Liversedge
579a91ce18 Add WardSmith to CP History
.. and little fixup for code (cut/paste error)
2015-04-06 12:00:58 +01:00
Mark Liversedge
6c3cf8c959 Add Ward/Smith Model 2015-04-06 11:47:06 +01:00
Mark Liversedge
48e6bdb82b Merge pull request #1356 from Deadolus/qwtindlabels
Adding Indended Plot Markers for AllPlot
2015-04-05 16:57:13 +01:00
Simon Egli (Silzo)
63fe5ad62c Adding Indended Plot Markers for AllPlot
I intentionally didn't add the IndendPlotMarkers to all markings,
but only to the interval markers at the top of the plot.

NOTE: the height of the spacing is actually what Qwt tells us
is the textheight.
I think this spacing is rather big.
We might want to reduce it somehow in the future.

Signed-off-by: Simon Egli (Silzo) <smn.egli@gmail.com>
2015-04-05 17:47:15 +02:00
Mark Liversedge
71f0567c44 Reset/set warn save on exit flag
.. in options/preferences, since if you uncheck it there is
   no way of setting it back on again (!)
2015-04-05 10:44:17 +01:00
Mark Liversedge
4a53912162 Merge pull request #1349 from kamilj/master
New Virtual Power device - Minoura V270/V150/V130/LR340/LR540 Trainer and bug fixes
2015-04-04 16:19:42 +01:00
Mark Liversedge
b771fd85ee Merge pull request #1355 from Deadolus/qwtindlabels
Adding a class that enables indending QwtPlotMarkers.
2015-04-04 16:17:21 +01:00
Simon Egli (Silzo)
a974970476 Adding a class that enables indending QwtPlotMarkers.
This commit is adding a new class QwtIndPlotMarker that will enable us
to indend Labels. The usage is pretty much the same,
please look at the changes in LTMPlot.cpp to see what will
change for using the new class.
So far the functionality is implemented for horizontally written labels only.

This solves the issue of all Labels (e.g. Seasons and events in LTMPlot case)
being on one line and thus being unreadable.

Signed-off-by: Simon Egli (Silzo) <smn.egli@gmail.com>
2015-04-04 13:56:21 +02:00
shmoo
ce782061b6 Order of operations for ELITE SUPERCRONO POWER MAG Trainer 2015-03-23 18:42:29 +01:00
shmoo
cf9928a70d Order of operations for SARIS POWERBEAM PRO Trainer 2015-03-23 18:36:04 +01:00
shmoo
da6af52f5e Order for operations for Minoura V100 Trainer 2015-03-22 16:17:12 +01:00
shmoo
934e36843a A more accurate calculation, typo 2015-03-22 16:06:18 +01:00
shmoo
f58ba07ac7 A more accurate calculation 2015-03-22 16:02:49 +01:00
shmoo
d4d93f71e7 New Virtual Power device - Minoura V270/V130/LR320/LR540 Trainer 2015-03-22 15:13:15 +01:00
grauser
abda720eab Translation: lupdate + some fr translation 2015-03-20 07:30:13 +01:00
Damien
2cfe4f5899 WithingsDownload: correct new and received measures numbers
We can receive 0 value without error.
In this case we don't want to display negativ value
and we don't want to update the cache.
2015-03-16 21:55:30 +01:00
Damien
d8a836938a CvsRideFile: Update CP Plot export importation 2015-03-16 21:50:22 +01:00
Damien
4240748df6 LTMPlot: Add event on last day 2015-03-16 21:50:22 +01:00
Mark Liversedge
85ac8b5ac4 Merge pull request #1335 from amtriathlon/master
Fixed distance from LapsEditor in Manual Workouts with imperial units
2015-03-16 19:22:19 +00:00
Mark Liversedge
c9ca244165 Merge pull request #1343 from cleeland/feature/add_zwift_device
Add FIT file device ID parsing for Zwift.
2015-03-16 19:21:48 +00:00
Mark Liversedge
897bac6109 Recognise Stephan Lips
.. in contributors
2015-03-16 17:21:00 +00:00
Stephan Lips
2e21cced40 SRM Powercontrol 8 FIT support
.. the PC8 uses FIT files (yay!) and this patch ensures we set the
   device type properly.
2015-03-16 17:19:42 +00:00
Chris Cleeland
e7ca201a97 Add FIT file device ID parsing for Zwift.
There is no official proclamation that ID 260:0 is officially assigned
to Zwift; it is simply the value observed in data files downloaded from
Zwift for the author. A support request opened with Zwift requesting
confirmation has gone unanswered.
2015-03-02 08:28:10 -06:00
Joern
96a9b3cdef Merge pull request #1341 from Joern-R/t1
Update Wiki
2015-02-28 09:34:54 +01:00
Joern
679ebfff85 Update Wiki
... 3.2 Screenshots
2015-02-28 09:35:39 +01:00
Alejandro Martinez
63e4472b58 Fixed distance from LapsEditor in Manual Workouts with imperial units 2015-02-24 11:13:38 -03:00
Mark Liversedge
1460e4ca58 Merge pull request #1333 from amtriathlon/pwx
Added support for smart recording and lap swimming in pwx files
2015-02-24 06:55:04 +00:00
Alejandro Martinez
129ee0e264 Added support for smart recording and lap swimming in pwx files
Smart recording interpolation fills the gaps in pwx files present
when the original .fit or .tcx files had them.
Test files for running: 1 activity in .fit, .tcx and .pwx formats
Lap swimming expands the sample-per-length and pause to 1-sec sampling.
Test files for lap swimming: 2 activities in .pwx format,
one from Garmin 910xt other from Finis SwimSense.
2015-02-23 21:09:36 -03:00
Mark Liversedge
7121bb8084 Added heartbeats metric
.. count of heartbeats per interval
2015-02-23 16:10:43 +00:00
Mark Liversedge
9fe586eec3 Merge pull request #1331 from Joern-R/tree
TreeMap - UI nits/improvements
2015-02-23 15:14:15 +00:00
Joern
c62a50312a Merge pull request #1332 from Joern-R/de
Update Translation DE
2015-02-22 13:30:41 +01:00
Joern
b64f64f847 Update Translation DE
... new terms and corrections
2015-02-22 13:30:36 +01:00
Joern
5221e4eb2a TreeMap/LTM Popup - Variable not filled
... counter variable not filled after moving from rides to activities
2015-02-22 13:07:17 +01:00
Joern
0b3d6be461 TreeMap - UI nits/improvements
... draw Level 1 text at the end to have full contrast (not overlapped
by level 2 brush)
... dynamically choose font size for Level 2 texts from 4 options (based
on available space in rectangle) - easier readable on big screen - still
usable on small screen
2015-02-22 12:32:54 +01:00
Mark Liversedge
f2415448a9 Robot sets tHb and SmO2
.. to help with testing
2015-02-22 09:42:31 +00:00
Joern
e3b0dc0ce0 Merge pull request #1329 from Joern-R/xml2
Missed to remove old "file.open"  code line
2015-02-21 19:18:38 +01:00
Joern
d0042b4e48 Missed to remove old "file.open" code line
... need to be removed
2015-02-21 19:11:17 +01:00
Mark Liversedge
eaad1440c2 Merge pull request #1328 from Joern-R/xml2
Report- File "Open for Write" errors
2015-02-21 18:07:39 +00:00
Joern
1b921725d9 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
Mark Liversedge
29bf621fc1 Merge pull request #1327 from Joern-R/xml
Error handling - if XML file is "write-protected"
2015-02-21 11:52:22 +00:00
Joern
954cae87b3 Error handling - if XML file is "write-protected"
... report error when any of the "*-layout.xml" files cannot be written
to (e.g. due to write protection
2015-02-21 11:50:55 +01:00
Mark Liversedge
0e19472fa8 Merge pull request #1326 from Joern-R/test
Upgrade - Folder - verify upgrade demand
2015-02-20 16:39:54 +00:00
Joern
32347dc29e Upgrade - Folder - verify upgrade demand
... check if the  "folder-upgrade" has really taken place - if not
reset, Upgrade Flag to force the new folder structure upgrade
... (allows to revert to the pre-upgrade backup of a folder structure -
which during test already had be successfully upgraded and therefore
marked as being ok).
2015-02-20 17:39:44 +01:00
Mark Liversedge
4d4ccb5532 Merge pull request #1325 from amtriathlon/master
Disabled pause expansion in lap swimming .tcx files when Smart Recording...
2015-02-20 15:40:08 +00:00
Alejandro Martinez
4831ea63d6 Disabled pause expansion in lap swimming .tcx files when Smart Recording is disabled
To be consistent and allow the user to load de file without modifications if desired
2015-02-20 12:36:01 -03:00
Mark Liversedge
bc0a0e1133 Merge pull request #1324 from dresco/ANT
ANT: Opening incorrect device
2015-02-19 22:23:47 +00:00
Mark Liversedge
dfe828a628 Merge pull request #1322 from amtriathlon/tcx
Add support for pool swimming tcx files from Garmin Connect
2015-02-19 22:22:51 +00:00
Jon Escombe
d45d7efec8 ANT: Opening incorrect device
Train view can display invalid data after opening the
wrong ANT sensor.
2015-02-19 15:19:53 +00:00
Alejandro Martinez
75f505a3c3 Add support for pool swimming tcx files from Garmin Connect
When Sport="Other", there is no GPS data but there is distance information
it is assumed the file cames from lap swimming.
They have one Trackpoint per length, which are expanded to one point per second
in similar way to Smart Recording and laps without Trackpoints to signal pauses
which are expanded to one point per second up to 10x Smart Recording HWM.
Added contributed Garmin FR910xt pool swim file to test/rides folder
2015-02-19 12:01:12 -03:00
Mark Liversedge
5e614aadb4 Merge pull request #1321 from Joern-R/ramp
Manual Ride Dialog - some nits
2015-02-18 19:19:35 +00:00
Mark Liversedge
2b91fbef04 Merge pull request #1320 from amtriathlon/master
Fixed conversion errors in pace units
2015-02-18 19:18:20 +00:00
Joern
a441887b17 Manual Ride Dialog - some nits
... allow resizing of Dialog Window (if using bigger fonts/translation)
to see all texts
... allow entry of Average Speed with precision (1) - like the metric is
defined
2015-02-18 20:11:32 +01:00
Alejandro Martinez
4e49417ee5 Fixed problem with cached Pace metrics when using imperial units
Added a non-virtual value method to retrieve the value to be stored in caches,
independent of metric settings.
2015-02-18 15:55:49 -03:00
Alejandro Martinez
378038c5c1 Fixed conversion error in swim pace units 2015-02-18 15:06:08 -03:00
Alejandro Martinez
386421fccf Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-02-17 18:12:21 -03:00
Mark Liversedge
4890135e9a Improve Charting of tHb
.. more decimal places and truncate y axis to narrow range
   it falls between.

.. still gets blown by zero values, but thats a data issue
2015-02-16 16:51:38 +00:00
Mark Liversedge
6ff987be5e Merge pull request #1317 from Joern-R/t1
Estimates Plot - some fixes
2015-02-15 15:29:20 +00:00
Joern
f7ac784e7f 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
Mark Liversedge
7995106a76 Merge pull request #1316 from Joern-R/column
Dump/QVector Assert - when date range does not match data
2015-02-15 09:40:44 +00:00
Joern
34e03da7da Dump/QVector Assert - when date range does not match data
... e.g. when having a data range 2015 - where the data is only
available 2013 to mid 2014
2015-02-14 16:56:07 +01:00
Alejandro Martinez
aa68d56ef5 Adjust decimals for distance metric and max rows in LapsEditor 2015-02-13 22:31:03 -03:00
Alejandro Martinez
d6be8c4c93 Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-02-13 15:58:39 -03:00
Mark Liversedge
2e895bcb43 Fix Veloclinic model t=0 bug 2015-02-13 14:09:57 +00:00
Alejandro Martinez
4431b8015d Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-02-13 09:42:39 -03:00
Mark Liversedge
2713000f5e Add Veloclinic CP slider
.. to adjust when seeking estimate for CP
2015-02-13 11:51:33 +00:00
Alejandro Martinez
83e755c4bc Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-02-10 09:14:40 -03:00
Mark Liversedge
7be349e5f8 Merge pull request #1314 from amtriathlon/master
Enabled edition of Pace zones lows in pace units
2015-02-10 07:01:57 +00:00
Alejandro Martinez
c8c7a14ee0 Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-02-09 20:17:53 -03:00
Alejandro Martinez
741510cfaf ManualRideDialong Override time_riding to duration
For backward compatibility, but only if we don't have better information
2015-02-09 19:41:20 -03:00
Alejandro Martinez
9fa73927cf Enable edition of Pace zones lows in pace units
Display and edition in Pace units, according to sport preferrences
Pace 00:00 is used to represent 0 kph
Fixed PaceZones::read to allow non-integer limits
2015-02-09 19:30:36 -03:00
Mark Liversedge
d6257f5b58 Revert RideMetric::imperialPrecision()
.. introduced within bae36e6b
2015-02-09 22:07:29 +00:00
Mark Liversedge
c65cbe2585 Less Spacing in AllPlot settings
.. makes the dialog smaller for those running on a
   small screen.
2015-02-09 18:42:40 +00:00
Alejandro Martinez
de1e36d1fd AllPlotWindow - add average power to the end of the selection name only if not zero
It's annoying when there is no power
2015-02-09 14:30:06 -03:00
Mark Liversedge
cb92a1cc52 Column Chooser scrollable
.. it was too difficult to use as a big matrix
2015-02-09 15:03:33 +00:00
Mark Liversedge
16c6c06466 Merge pull request #1313 from amtriathlon/master
Reset metric value and count before to call compute on update
2015-02-09 14:38:26 +00:00
Alejandro Martinez
378ab8ef1d Reset metric value and count before to call compute on update
Follow up from #1310, to contemplate other metrics where compute method doesn't set them
2015-02-09 11:25:49 -03:00
Mark Liversedge
920e50c4e9 Merge pull request #1312 from amtriathlon/master
Ensured compute method call setValue for Run/Swim metrics
2015-02-09 08:48:58 +00:00
Alejandro Martinez
4f6695379a Ensured compute method call setValue for Run/Swim metrics
Fixes #1310
Also for BikeScore and prevents division by zero in XPower when recIntSecs == 0
2015-02-08 23:24:19 -03:00
Joern
4e6c4a07df Merge pull request #1311 from Joern-R/wiki2
Update Wiki
2015-02-08 18:24:48 +01:00
Joern
44183a0247 Update Wiki
... some screenshots
2015-02-08 18:24:53 +01:00
Mark Liversedge
9f8a61fddd Merge pull request #1309 from Joern-R/upgrade3
Upgrade - enforce root() clean-up
2015-02-08 14:19:18 +00:00
Joern
ef05f0f133 Upgrade - enforce root() clean-up
... problems on deleting the source files (even they have have been
successfully copied to /target) are now reported as error (which require
to be cleaned up before Upgrade is marked as "successful")

... reason is that such "orphan" files may cause problems - e.g. if the
"upgrade-successful" indicator get's lost and we want to start 3.2 with
a fully cleaned file structure.
2015-02-08 12:46:30 +01:00
Mark Liversedge
9754d3a149 Merge pull request #1307 from amtriathlon/master
Fixed lack of reset for paceZoneSelectedArray in PowerHIst
2015-02-07 23:37:04 +00:00
Alejandro Martinez
f09e0b9129 Fixed lack of reset for paceZoneSelectedArray in PowerHIst 2015-02-07 20:26:01 -03:00
Mark Liversedge
2d0d380cf1 Merge pull request #1306 from Joern-R/c
Calendar Text not shown if language <> "en"
2015-02-05 18:11:53 +00:00
Joern
139bb3ef47 Calendar Text not shown if language <> "en"
... column "Calendar Text" must not be translated in GcCalendarModel.h
(since it's also not translated in "SpecialFields" any more)
2015-02-05 19:03:06 +01:00
Mark Liversedge
5b9902860e Diary Layout for v3.2
.. more of a 'dashboard' than calendar view

.. the calendar will be updated in v4.0
2015-02-05 17:45:01 +00:00
Mark Liversedge
d14eff1ced Merge pull request #1304 from Joern-R/upgrade
Upgrade - More checks/messages
2015-02-05 16:35:49 +00:00
Joern
4d97012911 Upgrade - More checks/messages
... check for valid Activity Filename format "YY_MM_DD_HH_MM_SS" (for
non-JSON files before conversion)
... check if the  Activity filename contains a valid date/time
... report if File is not readable - not just "skip" it
2015-02-05 17:31:18 +01:00
Mark Liversedge
08fb7376e0 Add aPower versions of Skiba Metrics
.. aBikeScore, axPower etc.
2015-02-05 14:42:56 +00:00
Mark Liversedge
7dfc2a6e4f Add Coggan metrics from aPower
.. so can adjust stress for altitude, which is useful for
   those that train at altitude regularly (e.g. training camps).
2015-02-05 14:32:04 +00:00
Mark Liversedge
adc44b95ef Increment DBSchema for last commit
.. to force a recompute of the metrics
2015-02-05 13:47:39 +00:00
Mark Liversedge
e2aa42c418 Merge pull request #1303 from amtriathlon/master
Use Duration when Time Moving is zero in Session RPE and Daniels EqP
2015-02-05 13:43:31 +00:00
Alejandro Martinez
491cccb2b3 Use Duration when Time Moving is zero in Session RPE and Daniels EqP
Similar to TRIMP points, Fixes #1265
2015-02-05 10:35:53 -03:00
Mark Liversedge
85213c80c3 Merge pull request #1301 from amtriathlon/master
Simplified IntervalSummaryWindow removing Pace special cases
2015-02-05 07:31:47 +00:00
Alejandro Martinez
270f47c446 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
Alejandro Martinez
3d85ecf9cf Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-02-04 17:56:07 -03:00
Mark Liversedge
3722f95ed4 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
5d20e9c44a Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-02-04 09:32:02 -03:00
Mark Liversedge
f1523c571e Merge pull request #1299 from amtriathlon/master
Several fixes related to run and swim metrics based on errors reported by users
2015-02-04 06:59:51 +00:00
Alejandro Martinez
c3f510fce1 Simplified IntervalSummaryWindow removing Pace special cases 2015-02-03 23:35:45 -03:00
Alejandro Martinez
2be7f495bf Fixed GOVSS and SwimScore estimation when there is no speed channel but distance is overriden
Distance/Duration is a better approximation for Avg Speed than 0.0
and Duration is better than Time Moving in GOVSS/SwimScore estimation
for these cases.
2015-02-03 21:32:16 -03:00
Alejandro Martinez
d82b5f9904 Simplified RideSummaryWindow removing some Pace special cases
Using the overriden methods.
The aggregation special case remains.
2015-02-03 20:49:09 -03:00
Alejandro Martinez
b7dd06aeae Fixed Pace and Swim Pace units setting
Pace and xPace metrics use GC_PACE units setting
Pace Swim and xPace Swim metrics use Swim GC_SWIMPACE units setting
2015-02-03 20:19:08 -03:00
Alejandro Martinez
679089f67c 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
d78fb92ad2 Merge pull request #1291 from amtriathlon/LapsEditor
LapsEditor - Initial Version for swimming and running
2015-02-03 16:21:36 +00:00
Mark Liversedge
1909ec3e56 Scatter Plot Garmin PS shows TE
.. cut and paste error.
2015-02-02 22:32:05 +00:00
Mark Liversedge
ecadae4d66 Yosemite Scope Bar Button Sizes
.. made them slightly wider on Yosemite
2015-02-02 20:53:56 +00:00
Mark Liversedge
6b0650a054 Fix RideMetadata Flush and Focus SAVE bug
.. metadata only flushed when ride marked dirty, but
   ride won't be marked dirty until metadata focus/edit
   ends.

.. because opening a menu doesn't change focus we need to
   use the flush event to trigger the focus/edit end function
2015-02-02 19:28:35 +00:00
Mark Liversedge
f7b970b9e3 Merge pull request #1297 from Joern-R/rename
Combined Pull request (with different topic commits)
2015-02-02 16:40:35 +00:00
Mark Liversedge
a049db70ea Merge pull request #1295 from amtriathlon/master
Updated Spanish Translation
2015-02-02 16:39:58 +00:00
Mark Liversedge
522447f4db Merge pull request #1245 from stschake/tacxvortex-refresh-load
Periodically refresh Tacx Vortex load setpoint to avoid dropouts
2015-02-02 16:39:29 +00:00
Mark Liversedge
809be4a560 Config Changes on keywords field changes
.. if you changed the field that was being used to color
   the ride list it wouldn't spot it and refresh.
2015-02-02 16:08:27 +00:00
Mark Liversedge
bd21e21f37 Refresh RideFileCache when Weight changes
.. was not refreshed previously (!)

.. need to optimise this to only recompute w/kg stuff
   rather than the entire cache for the ride when its
   just because the athlete weight changed.
2015-02-02 13:38:52 +00:00
Joern
808141675f Update Translation DE
... corrections/completion
2015-01-31 19:26:54 +01:00
Joern
0c39be86e8 Translation Enablement
... ErgDB Download - enable Translation
... fix double count for succesful downloads
2015-01-31 19:24:52 +01:00
Joern
b406cf8727 HelpWhatsThis - Rename "Ride" by "Activity
... adjus the Wiki pathes to new names
2015-01-31 19:13:38 +01:00
Alejandro Martinez
289fc8d9c0 Updated Spanish Translation 2015-01-30 18:58:56 -03:00
Joern
5cf58d15e6 Merge pull request #1294 from Joern-R/de
Update Translation DE
2015-01-30 19:49:58 +01:00
Joern
b35bc5b244 Update Translation DE
... rename "Rides" to "Aktivity"
2015-01-30 19:49:05 +01:00
Mark Liversedge
d7f3bc8137 Time Riding renamed to Moving
.. to reflect multsport use
2015-01-30 16:51:29 +00:00
Joern
65fc51d731 Merge pull request #1293 from Joern-R/wike
Wiki: Terminology: Rename Ride->Activity
2015-01-30 17:44:50 +01:00
Joern
bca3723106 Wiki: Terminology:Ride->Activities -
... update filenames so that fit to the updated Wiki documents
2015-01-30 17:44:23 +01:00
Mark Liversedge
d9eb2aec8c Rename Ride to Activity
.. across the code, except where it clearly is a ride
   e.g. importing PowerTap or SRM
2015-01-30 10:59:56 +00:00
Mark Liversedge
2a0b477cfb Merge pull request #1292 from Joern-R/smart
Fit-File Format - Smart Recording
2015-01-30 09:35:05 +00:00
Alejandro Martinez
b5f41f650b LapsEditor - Initial Version for swimming and running
Allows to generate data points for manual activities from series of
work/rest intervas with distance/duration information and reps count.
It is enabled once sport is entered as Swim or Run and distance units
follows pace preferences for the selected sport.
Duration and Distance for the activity are calculated from laps information,
but it can be overridden by the user.
If LapsEditor is reactivated the lap information is preserved to allow corrections,
provided the sport is not changed.
Input method for duration is selected for simplicity and easy of input using
numeric pad, tab and enter.
2015-01-29 20:47:19 -03:00
Joern
836f3054ab Fit-File Format - Smart Recording
... fix .FIT format Smart Recording (similar logic like for .TCX)
... use the GC-Preferences Settings to determine if Gaps shall be filled
(and which Gap size)
2015-01-29 19:02:50 +01:00
Mark Liversedge
461ae43f3e Recognise Jan de Visser
.. in contributors on about dialog
2015-01-28 22:39:10 +00:00
Jan de Visser
f7c8024632 Use the FIT 'sport' field and it's associated enum. Populate the RideFile 'Sport' tag and switch between cycling and running cadence.
Swim files are recognized and the 'Sport' tag is properly filled, but nothing else particularly useful is read. Not even date/time.
2015-01-28 22:37:16 +00:00
Mark Liversedge
547b427106 Merge pull request #1290 from amtriathlon/master
Updated Spanish Translation
2015-01-27 14:53:54 +00:00
Alejandro Martinez
26c269ed8a Updated Spanish Translation 2015-01-27 11:49:02 -03:00
Mark Liversedge
abee301fe5 Merge pull request #1289 from amtriathlon/master
Fixed minor interval alignment issue
2015-01-27 13:32:57 +00:00
Alejandro Martinez
721c76f062 Fixed minor interval alignment issue
The problem is barely noticeable in cycling activities but
annoying for run and swim intervals.
Added synthetic .csv for testing.
2015-01-27 09:52:41 -03:00
Joern
72df7ff20b Merge pull request #1287 from Joern-R/wiki
Wiki Update
2015-01-26 18:44:56 +01:00
Joern
048a6e76cc Wiki Update
... corrected pictures
2015-01-26 18:44:22 +01:00
Mark Liversedge
276c712dee Add Sigma to FIT manufacturers
Fixes #1286
2015-01-26 09:40:57 +00:00
Damien
ea8b0ae36a ANT: use QDateTime for lastCadenceMessage 2015-01-26 08:16:41 +01:00
Damien
931df37257 Update Translation FR (1/2) 2015-01-26 08:16:41 +01:00
Mark Liversedge
75111d70e4 Merge pull request #1283 from Joern-R/workout
Workout Creator - Show Ride Time / Translation Enablement
2015-01-25 14:28:53 +00:00
Joern
717dce05d5 Workout Creator - Show Ride Time / Translation Enablement
... show summary time_riding in workout wizard
... add translation enablment tr() to Workout Wizard
2015-01-25 12:26:12 +01:00
Mark Liversedge
c1976d5b47 Merge pull request #1282 from amtriathlon/master
Added completers to Sport and Workout Code fields in ManualRideDialog
2015-01-25 09:29:03 +00:00
Alejandro Martinez
4ebd1c0464 Added completers to Sport and Workout Code fields in ManualRideDialog
So input method is the same as in RideMetadata
2015-01-24 21:55:40 -03:00
Joern
ccd7c7ef57 Merge pull request #1281 from Joern-R/de
Update Translation DE
2015-01-24 16:32:34 +01:00
Joern
0fe65ae22b Update Translation DE
... Translation DE
2015-01-24 16:32:10 +01:00
Mark Liversedge
ab1042ed72 Merge pull request #1280 from Joern-R/rename
Folder Upgrade adjust to 3.2 Version naming
2015-01-24 13:50:57 +00:00
Joern
87939821b0 Folder Upgrade adjust to 3.2 Version
... make Upgrade Marker release independent
... adjust the texts from 3.11 to 3.2 verson id

... this will just make the Upgrade procedure run ONCE again for
Athletes which have been converted by a DEV build - but just to
check/report sucess
2015-01-24 14:22:37 +01:00
Mark Liversedge
f848e56af1 Merge pull request #1279 from amtriathlon/master
Fixed GOVSS & SwimScore for manual workouts
2015-01-24 11:59:44 +00:00
Alejandro Martinez
f438817e66 Fixed GOVSS & SwimScore for manual workouts
Forgot to include relative intensity
2015-01-24 08:49:14 -03:00
Alejandro Martinez
0ab086d41b Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-01-23 20:36:05 -03:00
Mark Liversedge
8c96812a72 Merge pull request #1274 from amtriathlon/master
Fixed Pace units in IntervalSummaryWindow
2015-01-23 23:33:04 +00:00
Alejandro Martinez
a2e19afd56 Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-01-23 20:32:06 -03:00
Alejandro Martinez
9782807b13 Fixed Pace units in IntervalSummaryWindow
Run and Swim Pace/xPace follow pace unit preferences
2015-01-23 20:27:42 -03:00
Damien
be567c85db ANT: Priority for cadence from cadence or speed/cadence sensor
fixes #502
2015-01-23 23:36:40 +01:00
Alejandro Martinez
e809204a10 Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-01-23 17:09:58 -03:00
Mark Liversedge
7748704448 Merge pull request #1273 from amtriathlon/master
Fixed Speed units in manual workouts and Pace units in Ride Summary
2015-01-23 20:08:33 +00:00
Alejandro Martinez
1861fdd427 Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-01-23 17:02:10 -03:00
Alejandro Martinez
1dda134898 Fixed Pace units in RideSummary
Pace values and unit names now follow preferences, the code is ugly
it should use toString method, probably with a context parameter.
2015-01-23 16:59:18 -03:00
Mark Liversedge
42d7e02c16 Tile mode honour color config changes
.. as background didn't change on color config
2015-01-23 19:22:54 +00:00
Alejandro Martinez
a3dc0c1cdb Fixed average speed units in manual workout
It is edited according to preferences and stored in kph
2015-01-23 15:42:27 -03:00
Mark Liversedge
c085e10688 Oops. css() color logic wrong way round 2015-01-23 17:57:58 +00:00
Mark Liversedge
8a1d737adb Diary Sidebar highlight current month
.. signpost what we've selected
2015-01-23 17:46:25 +00:00
Mark Liversedge
4d8bfc857e Fix train chart refreshing
.. when config changes
2015-01-23 16:22:54 +00:00
Mark Liversedge
feef39981c Fix Apply themes for Trend background color
.. will still need to set to sensible default as
   part of the upgrade process.
2015-01-23 16:00:52 +00:00
Mark Liversedge
de83bb6504 Merge pull request #1272 from amtriathlon/master
Added GOVSS/SwimScore for manual workouts
2015-01-23 15:34:39 +00:00
Alejandro Martinez
38b2bdad9c Add Estimated SwimScore for manual workouts
Based on average speed and duration
2015-01-23 12:25:51 -03:00
Alejandro Martinez
0579892b0b Add Estimated GOVSS for manual workouts
Based on average speed and duration
2015-01-23 12:22:36 -03:00
Mark Liversedge
413f8c71fc More QSslSocket.h 2015-01-23 14:36:29 +00:00
Alejandro Martinez
61d1e4307e Calculated avg Speed in Manual workout Dialog
Useful to deverive metrics for running and swimming activities
By default is dist/time, but it can be overriden for backward compatibility.
2015-01-23 10:19:57 -03:00
Mark Liversedge
d82e933e5a Aesthetic Tweaks
.. tile mode highlights on mouse over for a more
   fluid feel, and better feedback

.. can customise the trend view charts background

.. fixed a SEGV on apply preset in chart setup

.. this is part of a set of updates to update the
   standard setup to be more complete so the user
   can pretty much run off a standard config.
2015-01-23 12:06:03 +00:00
Mark Liversedge
a2759b368e OAuthDialog compile error QSslSocket.h
.. which is not included if you don't use KQOAuth.
2015-01-23 09:39:44 +00:00
Mark Liversedge
23f47cf371 Merge pull request #1271 from amtriathlon/master
Fixed sport tag on TCX file export
2015-01-22 19:15:58 +00:00
Alejandro Martinez
1438ebbc48 Fixed sport tag on TCX file export
Enabled translation and restricted output values to
("Biking", "Running", "Other")
2015-01-22 15:04:05 -03:00
Mark Liversedge
4c28926f24 Merge pull request #1270 from amtriathlon/master
Set Sport Tag for TCX files
2015-01-22 15:19:37 +00:00
Alejandro Martinez
e82cfdd04d Set Sport Tag for TCX files
According to http://www8.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd
Sport can be ("Biking", "Running", "Other"), it is mapped to "Bike", "Run" or nothing.
2015-01-22 12:09:23 -03:00
Mark Liversedge
59bf313ce4 Fix CalDAV SSL connect() 2015-01-21 18:57:30 +00:00
Mark Liversedge
29979e6067 Merge pull request #1266 from Joern-R/dav
CalDAV - add error handling
2015-01-21 18:30:00 +00:00
Joern
fe54cd98a8 CalDAV - add error handling
... if configuration for requested feature is missing (but not in
MainWindow - initial download)
... any network errors coming back

... to simplify error analysis - since the API call may have multiple
reasons to fail (configuration, network, proxy,ssl,...)
2015-01-21 19:27:23 +01:00
Mark Liversedge
57ad62036a Reset isolation in LTM
.. it was getting out of sync when switching tabs
   or athletes and further issues when events occurred
   possibly causing a SEGV
2015-01-21 10:29:45 +00:00
Mark Liversedge
7afb0ecc1f Let user disable hovering on allplot
.. it irks some people.
2015-01-21 08:13:51 +00:00
Mark Liversedge
d829a3548b Show CP on ErgFilePlot
.. makes interpreting W'bal curve a bit easier
2015-01-20 21:32:35 +00:00
Mark Liversedge
6112b6c4a9 Fix CP SEGV tile mode create interval
.. fencepost in create interval data
2015-01-20 20:39:44 +00:00
Mark Liversedge
883b2bc043 Merge pull request #1263 from Joern-R/interv
De-activate "Route" related feature (if not selected)
2015-01-20 19:24:44 +00:00
Mark Liversedge
1886f109e1 Merge pull request #1262 from Joern-R/ssl
OAuth - check for SSL
2015-01-20 19:24:21 +00:00
Joern
826270136d Merge pull request #1264 from Joern-R/wiki1
Wiki 3.11 Update
2015-01-20 18:48:44 +01:00
Joern
1fb4ed0335 Wiki 3.11 Update
... Preferences / Athlete
2015-01-20 18:47:05 +01:00
Joern
14642ad394 De-activate "Route" related feature (if not selected)
... deactivate "create route from interval" menu entries in SideBar
2015-01-20 18:43:35 +01:00
Joern
b7258deb63 OAuth - check for SSL
... since QT does not come with SSL by default - check if SSL is
available on the system
2015-01-20 18:17:04 +01:00
Mark Liversedge
fec9e73d37 Import Workout from Wizard
.. Fixes #663
2015-01-19 20:16:56 +00:00
Mark Liversedge
d34e4eda0d Fix AllPlot Reference Line SEGV
Fixes #996
2015-01-19 19:47:04 +00:00
Damien
39ed9f5821 GoogleMap: Select interval : keep first selected point 2015-01-19 20:14:40 +01:00
Mark Liversedge
af5c8a6626 Fix Device Config and Wizard Interaction
.. when you add a device using the wizard from preferences
   it resets the model to reflect the changes made.

Fixes #785
2015-01-18 21:25:54 +00:00
Mark Liversedge
8c3eb526e6 Merge pull request #1260 from Joern-R/caldav
Calendar - Refresh and Upload - Google CalDAV
2015-01-18 18:20:47 +00:00
Joern
3115ef446e Calendar - Refresh and Upload - Google CalDAV
... adds authorization required for new Google CalDAV interface
... adds CalDAV configuration variant (Generic vs. Google)
... corrects Refresh from Google to GC (as they a using a non-complient
XML-tag prefix)

... comment unused CalDAV features - which are not enhanced for Google
CalDAV as they are not used yet
2015-01-18 16:28:06 +01:00
Mark Liversedge
6297c7fb2c Fix duplicate stress curve bug
.. LTM stress curves had the same symbol name and
   so some were not deleted when the date range changed
   leaving curves on the plot

.. we now set the best symbol for stress curves so we
   have a unique name for each curve
2015-01-18 12:17:56 +00:00
Mark Liversedge
2f27c830cd Summarise Intervals Selected First
.. show the summary of all selected intervals first
   not last in the interval summary window
2015-01-17 10:19:16 +00:00
Mark Liversedge
c1ee2b612f Best Intervals are Yellow
.. on interval navigator etc

.. so you don't get lots of labels on the plot
2015-01-17 10:05:29 +00:00
Mark Liversedge
83edac90d3 Add ToolTip to IntervalNavigator
.. just the interval name
2015-01-17 09:51:53 +00:00
Mark Liversedge
584e139892 Merge pull request #1252 from Joern-R/intervals
Add "GC_HAS_INTERVALS" for Route Window
2015-01-16 17:56:25 +00:00
Joern
0f651f7a9f Merge pull request #1253 from Joern-R/wiki
Wiki - Update 3.11
2015-01-16 18:54:10 +01:00
Joern
44a23212ce Wiki - Update 3.11
... new and updated Screenshots for 3.11
2015-01-16 18:52:05 +01:00
Joern
01dd44b109 Add "GC_HAS_INTERVALS" for Route Window
... do not allow Route Window if not demanded
2015-01-16 18:35:18 +01:00
Mark Liversedge
cc435c495d Merge pull request #1251 from Joern-R/qwt
QWT Build
2015-01-15 17:46:14 +00:00
Joern
f20c2b5389 QWT Build
... remove $$replace and use the latest src.pro code from QWT lib (which
allows in-source and out-of-source/shadow build)

($$replace - for unknown reasons - creates an empty string/fails if the
input string contains mixed Upper and Lower case characters - which it
happening in many file systems)
2015-01-15 18:03:15 +01:00
Damien
e5bcc5edee Metrics: Add Calories based on average HR
fixes #1249
2015-01-14 22:37:20 +01:00
Damien
1620b9d0ea GoogleMap: Add a searchPoint method 2015-01-14 22:37:19 +01:00
Mark Liversedge
f6b4424537 Fix SEGV in LTMPlot on negative date range
.. time should, in theory, always fly forwards, no quarks here.
2015-01-14 16:03:40 +00:00
Mark Liversedge
f6dcc1711f Revert qwt/src/src.pro
.. will break out of source builds in QT Creator

.. means everyone else's builds will still work

.. happy to apply change if it doesn't break builds for others

Fixes #1247
2015-01-14 14:11:05 +00:00
Mark Liversedge
3f7b07d27c Fix Moxy Tool for Speed/Cadence recording
.. tool to shift data from the speed and cadence data series
   into the tHB and SmO2 series respectively.
2015-01-14 10:57:39 +00:00
Mark Liversedge
809021537b Remove reference to Lucene 2015-01-14 10:32:50 +00:00
Mark Liversedge
dcb1cd8efb Improved Search Text Parsing
.. splits into words but will allow user to escape using the quote
   character (") or the backslash (\).

.. so <"hello world" \"this\" t\est> will result in three strings
   <hello world> <"this"> and <test>
2015-01-14 10:26:47 +00:00
Mark Liversedge
1f9c96f7f3 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
Stefan Schake
59ffa7b8f1 Periodically refresh Tacx Vortex load setpoint to avoid dropouts
Signed-off-by: Stefan Schake <schake@embedded.rwth-aachen.de>
2015-01-13 21:21:14 +01:00
Mark Liversedge
e8f731d453 Merge pull request #1244 from Joern-R/curves
LTM - Curves Settings - Add Resorting of Curves
2015-01-13 19:28:57 +00:00
Joern
6458d935bd LTM - Curves Settings - Add Resorting of Curves
... add "Up" - "Down" function for Curves Table Items in LTM Settings

(particular useful when add a curve in Stacked View and wanting to have
that curve shown at first position)
2015-01-13 19:17:03 +01:00
Mark Liversedge
52f0c02ad2 Merge pull request #1243 from Joern-R/test
UI Nit - Time Display - change to 24h format
2015-01-13 16:19:37 +00:00
Joern
5880240c3b UI Nit - Time Display - change to 24h format
... A/P format does not work properly in QT 5.x.x in non-UK installation
locale of OS
... so adjusted here to hh:mm format
2015-01-13 17:16:11 +01:00
Damien
3524cc4bd2 Pages: Correct index in defaults processor 2015-01-12 22:59:58 +01:00
Damien
03a902186a RideSummary: Remove unused variables 2015-01-12 22:36:59 +01:00
Damien
54026c1e9f GoogleMap: Add a first Interval Selection feature
Need to resolve how to handle when the ride is on the same position twice or more
2015-01-12 22:29:04 +01:00
Damien
a22779e024 CPPlot: Some model testing 2015-01-12 22:27:11 +01:00
Mark Liversedge
0980c05e0c Fix Lucene full refresh SEGV
.. on windows especially, there were issues with the call to
   IndexWriter::addDocument() resulting in an exception.

.. the introduction of a QMutexLocker to manage the mutex locking
   seems to have fixed things, but they only seemed to manifest
   on Windows.
2015-01-12 21:10:20 +00:00
Mark Liversedge
ead354ef83 Merge pull request #1242 from Joern-R/averages
TE/PS - Average Calculation
2015-01-12 19:06:05 +00:00
Joern
a2d1455eee TE/PS - Average Calculation
... change calcuation of Averages for TE/PS by using the delivered
samples with valid values (> 0) and the number of delivered data samples
> 0 as the basis
2015-01-12 19:46:40 +01:00
Mark Liversedge
c39a8615cb Ignore points not in zone not add to Z7
.. by returning -1 from whichZone if the value doesn't
   match any zone definition.
2015-01-12 08:23:49 +00:00
Mark Liversedge
b05b6bb486 Metadata changing recursion
.. this should fix 'hangs' when edit finished.
2015-01-12 07:52:28 +00:00
Mark Liversedge
ee3ac8b4cb Merge pull request #1241 from amtriathlon/master
Hide irrelevant interval metrics
2015-01-12 07:25:22 +00:00
Alejandro Martinez
f690f6424e Hide irrelevant interval metrics
In Ride Summary
2015-01-11 22:00:38 -03:00
Alejandro Martinez
c2c4b8e673 Make Pace not relevant only for swims
Since Pace Swim conveys the same information in units more usual for swimming
For backward compatibility it is kept relevant for any other sport
2015-01-11 21:56:59 -03:00
Mark Liversedge
ce50cabca9 Correct use of beginRemoveRows()
.. last update didn't fix the indexes.
2015-01-11 22:13:30 +00:00
Mark Liversedge
785cb5f651 Add HHb and O2Hb to Scatterplot
.. they were forgotten previously.
2015-01-11 22:08:36 +00:00
Mark Liversedge
e1de007313 Fix beginRemoveRows() SEGV
.. on delete ride
2015-01-11 22:08:08 +00:00
Mark Liversedge
ecad3177b7 Merge pull request #1239 from Joern-R/fix
Fix - .JSON not updated with man.l changes directly after Import or Download
2015-01-11 17:31:51 +00:00
Joern
eb61d18086 Fix - .JSON not updated with manual changes immediately after Import or Download
... correct the path in RideItem after updating RideCache to the final
path (since RideItem has a local buffer for the path - which is e.g.
used at "Save Ride") any manual changes after the import will create a
new .JSON in /tmpActivities and not update the original .JSON in
/activities

(Problem only occurs when using the in-memory data after an Import or
Downlaod)
2015-01-11 18:33:54 +01:00
Mark Liversedge
eac558e6d5 Recognise Yves Arrouye and Philip Willoughby 2015-01-11 16:47:35 +00:00
Mark Liversedge
57ced9a25b Merge pull request #1238 from WillerZ/master
Changes to build on OS X with spaces in path
2015-01-11 16:44:42 +00:00
Philip Graham Willoughby
7c0c3fc3d6 Revert erroneous translation deletion
This partially reverts commit dd57141184.
2015-01-11 16:42:09 +00:00
Philip Graham Willoughby
ba339b978a Changes to build on OS X with spaces in path 2015-01-11 16:25:24 +00:00
Joern
1921584f44 Merge pull request #1236 from Joern-R/master
Translation DE
2015-01-11 15:14:08 +01:00
Joern
04900bb640 Translation DE
... update/correct Translation
2015-01-11 15:17:41 +01:00
Mark Liversedge
deb0703469 Merge pull request #1235 from Joern-R/ride
Introducing /quarantine for acvitities cause RideCache to crash/dump
2015-01-11 12:47:48 +00:00
Joern
126d08c9a1 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
e8c70091e2 Color Code PMC Metrics on Summary
.. but to avoid being too 'opinionated' about the users
   training we limit to the really obvious things and
   don't offer any opinion on middling values.

.. LTS > 80 is green > 100 is blue
.. SB < 40 is red -- overtraining
.. RR < -4 or > 8 is red -- detraining or overextending

.. it borders on bollocks given each athlete is different
   and training is about managing the overreaching and recovery
   to push at those boundaries

.. might end up removing this altogether .. but might flag
   stuff up for newbies
2015-01-11 10:56:26 +00:00
Mark Liversedge
0b198dd481 Hide irrelevant interval metrics
.. in the interval sidebar
2015-01-11 09:43:14 +00:00
Mark Liversedge
b025f5b878 RR on Summary
.. after reinstating ramp rate now putting back onto summary
2015-01-11 09:32:11 +00:00
Mark Liversedge
658bb4e030 Merge pull request #1232 from amtriathlon/master
Fixed NaN in xPower when there are no samples
2015-01-10 22:57:12 +00:00
Mark Liversedge
9ef20793a3 Fix bad Skiba PMC and nan/inf metric values
.. value that result in nan/inf values need to be cleansed
   to ensure the metric array in the rideitem is clean

.. because we load values from json we clean anyway in
   PMC data since it seriously breaks the skiba PMC and
   development users will have bad data.
2015-01-10 22:54:08 +00:00
Alejandro Martinez
7fe54a9622 Fixed NaN in xPower when there are no samples
It propagates to Bike/SwimScore and plays havoc with PMC
2015-01-10 19:46:06 -03:00
Mark Liversedge
bcfd7456f2 Increment Build ID post ridecache
.. as need to reflect that before new development
   builds go out.

.. does not have any impact on processing or upgrade
2015-01-10 20:23:07 +00:00
Mark Liversedge
99dc9839ba RideMetadata QTextEdit signals
.. was updating as you typed which created a nasty lag
   but updated the metadata and metrics constantly

.. on one hand it was reassuring to see things change as
   you typed, but on the other hand it was pretty tedious

.. we now catch focus change on text edits, see if they've
   been changed and then trigger an update if that is the case
2015-01-10 19:26:27 +00:00
Mark Liversedge
0cf3ec5f03 Set metacrc on RideItem::refresh()
.. even if not using Lucene, its used to spot meta
   changes including things like CP et al.
2015-01-10 18:14:21 +00:00
Damien
28eb72002c CVSRideFile: Add import for CPPlot export 2015-01-10 19:04:25 +01:00
Mark Liversedge
abd89f6477 Scale Tooltip for W'bal 2015-01-10 14:51:40 +00:00
Mark Liversedge
aa9af315ee Increment DBSchemaVersion for TriScore et al 2015-01-10 08:37:33 +00:00
Mark Liversedge
73d5efe17a Merge pull request #1229 from amtriathlon/master
Added Swim Metrics
2015-01-10 08:09:03 +00:00
Alejandro Martinez
cbe098dcf1 Added Swim Metrics
SwimScore, xPace and Pace for Swimming
TriScore for combined PMC
2015-01-09 21:59:27 -03:00
Mark Liversedge
3296c2264e isRelevantForRide for Coggan/Skiba metrics
.. so not shown on runs and swims
2015-01-09 18:26:17 +00:00
Mark Liversedge
534e79eed5 Merge pull request #1228 from amtriathlon/master
Add isRelevantForRide to metrics in GOVSS.cpp
2015-01-09 15:00:46 +00:00
Mark Liversedge
72ed656b6d Overlay title bar nit
.. frame needed over title esp when in white.
2015-01-09 14:58:27 +00:00
Alejandro Martinez
3a2cf04f7c Add isRelevantForRide to metrics in GOVSS.cpp 2015-01-09 11:10:13 -03:00
Mark Liversedge
979315db16 Turn off tooltip on RideNavigator
.. could have sworn i did this before.
2015-01-09 10:36:39 +00:00
Mark Liversedge
9113427686 Merge pull request #1227 from amtriathlon/master
Enabled Pace Zone shading and bining for swimming in speed histogram
2015-01-09 09:30:04 +00:00
Alejandro Martinez
c37359b161 AllPlot tooltip shows speed in pace units according to sport 2015-01-08 20:41:05 -03:00
Alejandro Martinez
e39bcf1b3a Enabled Pace Zone shading and bining for swimming in speed histogram 2015-01-08 19:31:11 -03:00
Mark Liversedge
7903019e99 Merge pull request #1226 from Joern-R/links
Help - What's this
2015-01-08 19:37:19 +00:00
Joern
98f2061786 Help - What's this
... add missing links for some widgets
... correct/enhance URL's to Wiki
2015-01-08 20:40:55 +01:00
Mark Liversedge
ca8bc63760 Tooltip Padding
.. looks a tiny bit better.
2015-01-08 19:05:46 +00:00
Mark Liversedge
bb947a4d3d 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
4b9c7d7587 Fix underMouse for LTM legend curve toggle
.. underMouse() seems to be dependant upon enter/leave events
   and is unreliable as a result.
2015-01-08 14:43:32 +00:00
Mark Liversedge
6e9b10968b Improved LTM legend click to toggle curve
.. does all labels etc and integrates in with the rest
   of the LTM chart and CurveColors classes.

.. underMouse() seems weird when legend is updated, might need
   to find a better way to work out if/which legend was clicked.
2015-01-08 13:23:48 +00:00
Mark Liversedge
aea64a29e0 LTM Toggle Curves clicking on Legend
.. but need to integrate with curve isolation
2015-01-07 23:18:24 +00:00
Mark Liversedge
2b87a0d899 Fix LTM library SEGV
.. didn't set the specification when updating the
   LTMSettings when using a sidebar preset
2015-01-07 22:59:42 +00:00
Damien
858efd5866 RideMetrics: add isRelevantForRide for HR and cadence (avg and max) 2015-01-07 22:32:22 +01:00
Damien
724b282f90 RideMetrics: add isRelevant for Aerobic Decoupling and SmO2 metrics 2015-01-07 19:36:34 +01:00
Damien
981d58393f LeftRightBalance: isRelevantForRide use DataFlag 2015-01-07 19:10:35 +01:00
Mark Liversedge
8e76db307a Ratios are averages not peaks
.. for Power/HR and NP/HR ratio metric aggregation
2015-01-07 17:31:38 +00:00
Mark Liversedge
1e21759f36 Merge pull request #1225 from amtriathlon/master
Separate Swims in Trends Summary
2015-01-07 16:07:50 +00:00
Alejandro Martinez
4d1677c09b Separate Swims in Trends Summary
Update spanish translation
2015-01-07 13:01:27 -03:00
Alejandro Martinez
ba18e77a7f Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-01-07 12:59:28 -03:00
Mark Liversedge
b4ff0b5d87 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
267f3cd1cb 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
Mark Liversedge
f129d96f9c Withings download + RideCache
.. if we get measures whilst the ridecache is being refreshed
   it can cause a problem - and the refresh needs to be restarted
   anyway.

.. download now stops and restarts any refresh.
2015-01-07 15:03:45 +00:00
Alejandro Martinez
bfa271be95 Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-01-07 09:24:46 -03:00
Mark Liversedge
a7051e2bff ToolTip honour Appearances Config
.. it was hardcoded !

.. still looks fugly, we should do something about that ...
2015-01-07 11:51:10 +00:00
Mark Liversedge
836e07d287 Added isSwim
.. to RideItem and DataFilter
2015-01-07 10:14:53 +00:00
Mark Liversedge
ed6fd9a009 Merge pull request #1224 from amtriathlon/master
Time in pace zone metrics for swim activities
2015-01-07 07:29:43 +00:00
Damien
ca664c1d6e RideSummaryWindow: Only test relevant in ridesummary 2015-01-07 07:58:23 +01:00
Alejandro Martinez
10de4cb2e8 Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-01-06 22:24:54 -03:00
Alejandro Martinez
92c57ae64b Spanish translation update 2015-01-06 21:23:16 -03:00
Damien
6c4e302f3a RideSummaryWindow: Only add Left/Right Balance if relevant 2015-01-07 00:07:32 +01:00
Alejandro Martinez
f44472e953 Time in pace zone metrics for swim activities
Shown in activity summary
computed if there are swim pace zones defined and the activity isSwim
isSwim() looks just at Sport="Swim" for now
2015-01-06 19:55:40 -03:00
Damien
e12ce4c654 BasicRideMetrics: Add Power Phase length 2015-01-06 22:39:04 +01:00
Damien
3a0da792ff BasicRideMetrics: Avg for Power Phase only when we have a phase end 2015-01-06 21:45:25 +01:00
Damien
e2c6b31045 RideEditor: Change column order 2015-01-06 21:39:12 +01:00
Damien
749829ce7d RideEditor: Correct column label 2015-01-06 21:25:55 +01:00
Damien
5b1c58d362 BasicRideMetrics: Correct copy-paste error 2015-01-06 21:21:48 +01:00
Damien
fb7f6d70d5 Garmin Cycling Dynamics : Switch on Power Phase 2015-01-06 18:44:27 +01:00
Mark Liversedge
8bf7d5399c Increment DBSchemaVersion
.. for new Garmin Cycling Dynamics metric averages
2015-01-06 09:31:19 +00:00
Damien
e64aad87aa Garmin Cycling Dynamics : Switch off Power Phase 2015-01-06 00:15:08 +01:00
Damien
9f756b86cb BasicRideMetrics: Add metrics for Garmin Cycling Dynamics - part 1 (Avg) 2015-01-05 23:00:44 +01:00
Mark Liversedge
53ae8ddeaf Model Reset on addRide
.. headings are already adjusted in the ridecachemodel so
   need to look for new name for CalendarText

.. this is a bit of a hack, but then so is the CalendarText
   metadata field - it should be a first class RideItem class
   member and be maintained alongside date etc
2015-01-05 20:27:46 +00:00
Mark Liversedge
6c0ad54ced Fix SEGV when adding/deleting metadata fields
.. model header data updates need to trigger a reset
   of the views and internal state e.g. index of the
   calendar text and the headings_ string list.
2015-01-05 20:10:42 +00:00
Mark Liversedge
fd6c01160d Import TrainingPeaks Manual entries
.. hr, spd, power and work are all missing from the
   data they provide, but things like duration and TSS work
2015-01-05 17:51:36 +00:00
Joern
6188040b40 Merge pull request #1222 from Joern-R/de
Translation DE
2015-01-05 18:30:18 +01:00
Joern
0a55161567 Translation DE
... update
2015-01-05 18:34:52 +01:00
Mark Liversedge
b71aa7c2bf For PMC metrics best should highlight Peaks
.. we now highlight peak values when highlighting topN
   or bottomN values on the LTM plot
2015-01-05 14:20:12 +00:00
Mark Liversedge
48b9bdd8e6 Tiny nit, positioning of sport selector.
.. just to make it super obvious to users.
2015-01-05 13:46:34 +00:00
Mark Liversedge
b311b8ebdf Merge pull request #1221 from amtriathlon/master
Added Swim Pace Zones to Config
2015-01-05 13:34:26 +00:00
Alejandro Martinez
e64e5829d4 Added Swim Pace Zones to Config
Pace zones available for Run and Swim using Skiba's guidelines
file pace.zones was renamed to run-pace.zones and swim-pace.zones added
2015-01-05 10:08:20 -03:00
Mark Liversedge
d851651369 Merge pull request #1220 from Joern-R/train1
Train View - add TE/PS/LR Balance - Real Time Metrics
2015-01-05 12:42:20 +00:00
Joern
c8535d9706 Train View - add TE/PS/LR Balance - Real Time Metrics
... Torque Effectiveness
... Pedal Smoothness
... L/R Balance
(mainly for Vector - but implemented following standard ANT+ message
rules
2015-01-05 13:39:18 +01:00
Mark Liversedge
a8ba7843cd Climb intervals in Green
.. and also tidy up use of isPeak() etc

.. starting to wonder if we need to a) auto find intervals on import
   and then b) list them in a tree c) allow user to select a 'class'
   of intervals to show (i.e. select all climbs)
2015-01-05 12:08:37 +00:00
Mark Liversedge
38a431ef98 Interval Navigator colors config
.. update when the config changes
2015-01-05 10:49:01 +00:00
Damien
b24ee97278 FitRideFile: Add new FIT fields
Especially for Vectors new metrics
	- Left and Righ Platform Center Offset - eg: -8mm and -11mm
	- Left and Right Top dead Center  - eg: 10° and 11°
	- Left and Right Bottom dead Center  - eg: 203° and 210°
	- Left and Right Peak Power Phase Start - eg: 83° and 76°
	- Left and Right Peak Power Phase End - eg: 115° and 125°
2015-01-05 08:01:33 +01:00
Mark Liversedge
ac5c905b10 Fix TrainingPeaks.com GPS data precision
.. it wasbeing lost when uploading via PWX file format because
   the data was not being stored with enough precision.
2015-01-04 20:09:10 +00:00
Mark Liversedge
5991341e5f Add Peripedal CSV support
.. and a test ride too.
2015-01-03 11:02:23 +00:00
Alejandro Martinez
0fe87165c5 Pace Zones tidy up
Previous to support run&swim pace zones
2015-01-02 16:26:36 -03:00
Mark Liversedge
794b43c32b Reinstate Ramp Rate (RR)
.. on LTM plots

.. and rr(metric) function in datafilter
2015-01-02 12:05:41 +00:00
Mark Liversedge
a0a1b2d6e2 LTMTool nit
.. describing a stress metric as type 'metric'
   instead of 'stress' in the curves list
2015-01-02 10:49:03 +00:00
Mark Liversedge
43ef7ada91 Use ANY metric as LTS/STS/SB input
.. so now you can use the PMC for any load/stress measure.
2015-01-02 10:23:49 +00:00
Mark Liversedge
bf1e2b3f07 Merge pull request #1218 from Joern-R/flow
TCX - consider XML namespace prefix for extension fields
2015-01-02 10:05:30 +00:00
Joern
55d503d21f TCX - consider XML namespace prefix for extension fields
... consider XML namespace prefix generically
... specifically required to also support for Polar Flow TCX and others
2015-01-02 11:05:16 +01:00
Mark Liversedge
5f0405e78b Don't fill curves on FullPlot
.. even if its selected in options.
2015-01-02 08:03:49 +00:00
Mark Liversedge
22beffa12b DataFilter Dynamic Bug
.. leaf traversal returned parent dynamic not ours.
2015-01-01 20:04:27 +00:00
Mark Liversedge
a8856f94d2 Leaf::isDynamic SEGV
.. traversing null branches.
2015-01-01 19:30:34 +00:00
Mark Liversedge
0e94bb8520 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
e5f91f097e 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
9b72d8b7c3 Merge pull request #1215 from Joern-R/de
Update Translation DE
2015-01-01 16:34:36 +00:00
Mark Liversedge
6cbaed374e LTM refresh on Ride Save
.. in case the peak powers have changed in the
   ridefilecache.
2015-01-01 15:58:17 +00:00
Mark Liversedge
9a0386884c Histogram refresh on Ride Save
.. when cache needs to be refreshed.
2015-01-01 15:55:01 +00:00
Mark Liversedge
667e1d7234 CP Plot Refresh Saved Data
.. remove a missed XXXREFRESH marker to get the CP bests
   curve refreshed when a ride is saved in the period of
   the bests curve.

.. would be nice if we showed the current in-memory version
   rather than insisting on the on-disk .. need to adjust
   ridefilecache to traverse the ridecache for that !
2015-01-01 15:27:49 +00:00
Claus Assmann
8654421095 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
6a06941e25 Errant qDebug 2015-01-01 11:48:49 +00:00
Mark Liversedge
dc0cee7c59 W'bal and Derived refresh
.. during mass update, not just on data change.
2015-01-01 11:28:01 +00:00
Mark Liversedge
a5b1058145 Fix delete/add ride bugs
.. fix a few SEGV!
2015-01-01 09:58:11 +00:00
Mark Liversedge
d55d75cfcf HelpWindow Size
.. just a minor nit to make the window a more
   appropriate size given the content.
2015-01-01 09:05:35 +00:00
Mark Liversedge
60ac85f9c0 RideNavigator Clear Zero and NaN values
.. tidy up the output
2014-12-31 23:15:07 +00:00
Mark Liversedge
645ea3045e Fix double imperial/metric conversion
.. RideNavigator doesn't need to do metric converson anymore
   because the RideCacheModel handled conversion to a string!
2014-12-31 22:50:58 +00:00
Mark Liversedge
377e85d3a3 RideCache TODO Documentation
.. need to think about the remaining (existing)
   problems related to refresh and not ridecache.
2014-12-31 19:55:09 +00:00
Mark Liversedge
e8a0e4c1e0 Revert Ride cache refresh and notify
.. fixup ride revert to saved version so all the charts
   refresh properly after the metrics etc are recomputed.
2014-12-31 19:50:24 +00:00
Mark Liversedge
17ae2cdc2c Discard Cache on Exit Discard Changes
.. we don't save the currently cached metrics etc
   for rides that we discard on exit (i.e. don't save)

.. the metrics etc will then get recomputed when you
   restart GoldenCheetah.
2014-12-31 19:33:10 +00:00
Mark Liversedge
188573b3cd 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
c4e1257774 Fixup Appearances check on Mac
.. where we don't have config for scrollbars and headings.
2014-12-31 16:16:20 +00:00
Mark Liversedge
8c54a0aac4 Refresh Metrics on Metadata values changing
.. in case things like Weight, CP or W' metadata was changed
2014-12-31 15:35:02 +00:00
Mark Liversedge
378b7ec99c RideItem recompute NP etal when data changes
.. just before signalling plots to redraw
2014-12-31 15:30:06 +00:00
Mark Liversedge
b13cc61609 Refresh AllPlot when WBAL config changes
.. extracted out CONFIG_WBAL to support this
2014-12-31 15:22:55 +00:00
Damien
1bf9600668 CvsRideFile: don't use msecsSinceStartOfDay 2014-12-31 16:08:41 +01:00
Mark Liversedge
82bb264f3f Honour PMC constants
.. and refresh when they change.
2014-12-31 14:52:54 +00:00
Mark Liversedge
6faaec503a 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
f19f6696d9 Fix AllPlotInterval SEGV
.. trying to reference context->ride in constructor (!)
2014-12-31 13:58:27 +00:00
Mark Liversedge
0976369ab7 FreeBSD #include "time.h"
.. needed in Fit and Bin ridefiles for time_t, which for
   some other reason compiles cleanly on Linux.
2014-12-31 13:52:23 +00:00
Mark Liversedge
1ca31ad7c8 Merge pull request #1216 from Joern-R/auth
Adding "Help Overview" Window
2014-12-31 13:44:20 +00:00
Joern
aada4f4341 Adding "Help Overview" Window
... Help Overview Window added to MainWindow - containing
.. Info on new "Shift"+"F1" Context specific Help
.. Links to Golden Cheetah Tutorials, Science, User's Guide, FAQ
2014-12-31 14:35:15 +01:00
Mark Liversedge
575857d29e Notify config changed - NOTECOLOR, FIELDS
.. notify if the metadata configuration has been changed

.. also snuck in a change to take hysteresis out of the
   power zones fingerprint - it should not have been there
2014-12-31 13:18:34 +00:00
Mark Liversedge
2ce5718d0e Notify config changed - APPEARANCE
.. Needed to move about some of the color config
   methods and remove the unneeded object from
   mainwindow and initialise global color settings
   in main() instead.
2014-12-31 12:36:18 +00:00
Joern
08cae251a9 Update Translation DE
... update Translation DE
... correct Help Text/Links
2014-12-31 11:29:10 +01:00
Mark Liversedge
9aef569c1b 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
433d0c1df7 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
14e786cc85 Notify config changed - ZONES
.. notify if Pace, HR or Power zones were changed by
   the user during the config dialog
2014-12-31 09:07:02 +00:00
Damien
7dc284399c CvsRideFile: Add Freemotion Bike cvs
fixes #1168
2014-12-30 22:15:18 +01:00
Mark Liversedge
d0b6a8a749 Recognise Stefan Schake
.. for Tacx Vortex support in v3.11
2014-12-30 19:37:14 +00:00
Mark Liversedge
2489a130a7 Merge pull request #1214 from Joern-R/help
KML File Creation - enhancements
2014-12-30 19:04:18 +00:00
Joern
ddb10e856f KML File Creation - enhancements
... fix problem of not visible track (Windows,...)
... use "run" data series if track isRun()
... add "start" and "end" placemark
... enable translation of texts
2014-12-30 20:07:10 +01:00
Mark Liversedge
b6971891dc Merge pull request #1213 from stschake/tacxvortex
Basic support for Tacx Vortex trainers
2014-12-30 18:29:18 +00:00
Mark Liversedge
f0066a6861 Refresh Summary every 5 seconds
.. not constantly (!)
2014-12-30 15:59:45 +00:00
Mark Liversedge
9c14ddbcf8 Histogram refresh during background refresh
.. just forces a replot if in range.
2014-12-30 15:51:01 +00:00
Mark Liversedge
90d0365018 RideSummary refresh during background refresh
.. but only if plotting a date range
2014-12-30 13:40:20 +00:00
Mark Liversedge
aaa2698404 CP replot during background refresh
.. ridefilecaches return incomplete flag if data not available
   when aggregating (plotting during a refresh).

.. CP plot will refresh as the background update takes place.

.. this occurs even during a comparison.
2014-12-30 13:25:39 +00:00
Mark Liversedge
401cc8081f RideNavigator XXXREFRESH cleanse
.. no need to uplift this from the old metricDB as the model
   now spots changes at an individual ride item basis AND
   will refresh during a background refresh too.
2014-12-30 11:07:31 +00:00
Mark Liversedge
8a17db3635 RideImportWizard XXXREFRESH cleanse
.. no need to uplift the code that used to call for a metric
   refresh after rides were imported since the addRide function
   will now refresh for individual rides.
2014-12-30 11:05:32 +00:00
Mark Liversedge
a80a8e7ac4 Diary Sidebar refresh during background update
.. colors change on sidebar calendar as the rides
   are processed.
2014-12-30 10:39:59 +00:00
Mark Liversedge
e5cda3cd93 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
b959bb7d03 Histogram refresh on rideChanged()
.. just force replot using existing method.
2014-12-30 10:23:46 +00:00
Mark Liversedge
3d003fe000 Aerolab refresh on rideChanged()
.. just replot, no optimisation.

.. Aerolab needs some love .. maybe allow
   overlaying intervals and autofind them too.
2014-12-30 10:12:12 +00:00
Mark Liversedge
e295ecd0c5 HrPw refresh on rideChanged()
.. just forces a replot
2014-12-30 09:46:11 +00:00
Mark Liversedge
cf921a7e9e PfPv Plot (QA) refresh on rideChanged()
.. just forces a replot
2014-12-30 09:38:40 +00:00
Stefan Schake
0df233ad58 Integrate Tacx Vortex with ANT device logic
Signed-off-by: Stefan Schake <schake@embedded.rwth-aachen.de>
2014-12-30 03:55:53 +01:00
Stefan Schake
d198499ed4 Keep track which data page a Tacx Vortex ANTMessage refers to
This ensures we only access initialized fields in the message

Signed-off-by: Stefan Schake <schake@embedded.rwth-aachen.de>
2014-12-30 03:55:52 +01:00
Stefan Schake
bfeffaac9a Split Tacx Vortex requests from client to more closely match Tacx behavior
Signed-off-by: Stefan Schake <schake@embedded.rwth-aachen.de>
2014-12-30 03:55:52 +01:00
Stefan Schake
8c3f12a50d Add Tacx Vortex ANT message decoding/encoding
Signed-off-by: Stefan Schake <schake@embedded.rwth-aachen.de>
2014-12-30 03:55:51 +01:00
Stefan Schake
61512b95b7 Add Tacx Vortex ANT channel type
Signed-off-by: Stefan Schake <schake@embedded.rwth-aachen.de>
2014-12-30 03:55:50 +01:00
Mark Liversedge
dedd3e0274 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
Mark Liversedge
2cfdb68ada Google Map refresh on rideChanged()
.. just forces a replot
2014-12-29 22:04:25 +00:00
Mark Liversedge
3d0d747534 GcWindowResgistry compile nit 2014-12-29 21:49:09 +00:00
Mark Liversedge
385755109a Disable interval ranking
.. it is too slow. Need to think about how to implement
   this with good performance.

.. if you really want it then add
   DEFINES += GC_HAVE_RANKING
   to gcconfig.pri
2014-12-29 21:25:03 +00:00
Claus Assmann
5ef2593db6 Another configChanged() script error
.. sed s/configChanged()/configChanged(qint32)/g
   messed up calls. This is probably the last.
2014-12-29 20:06:55 +00:00
Mark Liversedge
0297d3d71c Fix ModelPlot compile error
.. configChanged(qint32) was introduced by a refactoring
   script that I was using for mass updates.
2014-12-29 19:39:20 +00:00
Claus Assmann
3c0fc7d948 Clucene is optional ! 2014-12-29 19:37:04 +00:00
Mark Liversedge
c9cd48d5c5 Interval Season Ranking
.. how does this interval rank for the season it
   belongs to ?

.. if out of season then rank for all time.
2014-12-29 19:30:30 +00:00
Mark Liversedge
e58a6efc90 Merge pull request #1211 from Joern-R/fullplot
Fullplot - Alt/Slope de-activated
2014-12-29 16:59:33 +00:00
Mark Liversedge
0672ab7e31 Merge pull request #1207 from Joern-R/help
Update "WhatsThis" - help
2014-12-29 16:59:20 +00:00
Joern
5f46aaf134 Fullplot - Alt/Slope de-activated
... correct Alt/Slope behavriour in FullPlot (default = inactive)
... handle Alt/Slope status properly when switching back/forth between
Compare Mode and normal Plot view
2014-12-29 17:54:29 +01:00
Mark Liversedge
ac7ba01cff Scatter refresh on rideChanged()
.. just forces a replot
2014-12-29 16:46:56 +00:00
Mark Liversedge
423569eaea Remove qDebug
.. can uncomment during development
2014-12-29 16:29:29 +00:00
Mark Liversedge
c87be4831c AllPlot refresh on rideChanged()
.. just needs to force a replot
2014-12-29 16:23:47 +00:00
Mark Liversedge
a2255fefb9 Default Sport values
.. of Bike, Run, Swim
2014-12-29 16:10:19 +00:00
Mark Liversedge
82ee4a5827 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
aff18fec80 Fix RideFileCache refresh bugs
.. didn't update mean max array

.. always ignored very first data point (!) which was usually
   unnoticed since first point usually lots of zeroes.
2014-12-29 15:54:52 +00:00
Mark Liversedge
255f69c1ad 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
1e7a26ee1f 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
Damien
365df56dca RideFileInterval: QMap use < to differentiate keys (2) 2014-12-28 23:42:27 +01:00
Damien
837d0f8977 IntervalPlot: Hide in Compare mode 2014-12-28 23:42:27 +01:00
Damien
18591a1216 IntervalPlot: set by distance 2014-12-28 23:42:27 +01:00
Damien
20e36784e8 IntervalPlot: Clear interval hover 2014-12-28 23:42:27 +01:00
Mark Liversedge
ff0c96c3d4 Refresh Events Documentation
.. start to document the events that wil require
   a refresh, but doesn't describe the 'refresh'
   that is needed (e.g. data, metric, cache, chart)
2014-12-28 22:09:26 +00:00
Damien
2039829321 IntervalPlot: Add Double-Click interval to Zoom 2014-12-28 18:27:08 +01:00
Mark Liversedge
f41052ba33 Selected Intervals Summary
.. in sidebar, we summarise for all the selected intervals.

.. we take into account if they overlap, so two intervals
   of 10 and 5 mins where the 5 min interval is wholly
   contained within the 10 minute interval will be summarised
   as 10 minutes not 15 minutes duration.
2014-12-28 13:34:55 +00:00
Mark Liversedge
c11b55b5be Add Double-Click interval to Zoom
.. in the interval sidebar
2014-12-28 12:18:34 +00:00
Mark Liversedge
ba4e7d8696 Fix Lucene 'Lock timeout' / thread issues
.. the lucene index writing during RideCache updates needed
   to avoid conflicts between multiple threads writing at
   the same time.

.. just added a QMutex around write operations - reading is
   still thread safe and can occur in parallel.
2014-12-28 10:42:15 +00:00
Damien
2de5d3e8ac RideFileInterval: QMap use < to differentiate keys 2014-12-28 09:48:16 +01:00
Damien
90031f82fa IntervalPlot: don't group Matches 2014-12-27 16:49:21 +01:00
Damien
a3505a375f IntervalPlot: color for Match 2014-12-27 16:12:46 +01:00
Mark Liversedge
26811f2576 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
Damien
47f8bc4ca8 IntervalPlot: thinner lines 2014-12-27 00:11:02 +01:00
Damien
8caf2cbd25 IntervalPlot: correct IntervalsChanged() 2014-12-26 23:46:05 +01:00
Damien
eafe0b873f IntervalPlot: recalc only if open 2014-12-26 22:48:59 +01:00
Mark Liversedge
029a288051 Fix Initialiser for Interval Plot
.. need to initialise in constructor.
2014-12-26 21:47:18 +00:00
Damien
4fc53a7010 IntervalPlot: recalc after interval changed 2014-12-26 22:35:40 +01:00
Damien
c4a26d6da0 IntervalPlot: change height 2014-12-26 22:25:05 +01:00
Damien
132e6b0a31 Interval: Correct multiple overlap 2014-12-26 21:37:23 +01:00
Damien
c7b230f989 AllPlotWindow: Add interval plot 2014-12-26 21:20:33 +01:00
Mark Liversedge
1601eddeeb No more WANT_RIDECACHE
.. its not optional !
2014-12-26 19:24:36 +00:00
Mark Liversedge
124f5fe5bc 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
2816e6a432 Remove obsolete filter code
.. from RideSummaryWindow as it is no longer needed since
   we moved to using a specification object to manage the
   filter sets and date ranges to filter on.
2014-12-26 10:11:56 +00:00
Mark Liversedge
7862b991c7 Fix Ride Selection Bug
.. was using the wrong index for filename when searching
   for the ride in the navigator.

.. should now highlight the current ride properly.
2014-12-26 09:51:53 +00:00
Mark Liversedge
fb5cbaa39d Support Magellan GPX extensions
.. using the GPX format they add extensions to record
   power, heartrate and cadence using element names
   power, heartrate and cadence ! (way to simple!)

.. thanks to Wenqi Zhang for the sample.
2014-12-26 09:22:52 +00:00
Mark Liversedge
dc7cc4e461 RideSummary list recent rides first
.. iterate from most recent rides first.
2014-12-26 09:11:06 +00:00
Mark Liversedge
a3c7bc41be 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
894cb6fe23 Add Lucene Index if missing
.. as well as checking the metaCRC RideItem will add the
   ride to the lucene index if it is missing.
2014-12-25 19:43:50 +00:00
Mark Liversedge
cf04968dd4 Lucene search index migrate to RideItem
.. now when we refresh a ride item it will also
   update the lucene index, but only if the texts
   have changed since we last updated it.
2014-12-25 16:37:42 +00:00
Mark Liversedge
196ea3cdb4 Fix fencepost in LTM data table
.. seems wrong but is right.
2014-12-25 14:10:12 +00:00
Mark Liversedge
cf951eabc9 RideFileCache now refreshed in RideItem
.. and fixed sort order problem
2014-12-25 13:59:38 +00:00
Mark Liversedge
a7c2a73a00 CP overlay title nit
.. xxx/yyy is bad UX
2014-12-25 10:26:07 +00:00
Mark Liversedge
b854043971 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
c7dc29fab6 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
9cf024f946 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
3c56c9c557 RideCacheModel Part 2 of 3
.. add/remove ride now works

.. fixed metric value in data()

.. need to test (especially with the diary
   window and new athlete with zero rides and
   then import, add, delete, change, sort
   merge, split etc and push update to
   fix such bugs in Part 3
2014-12-24 19:05:52 +00:00
Mark Liversedge
4cde5b44b7 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
Joern
2314a9ed7d Update "WhatsThis" - help
.. add short texts and make translatable
.. first 3.11 Wiki .jpg changes
2014-12-24 14:06:08 +01:00
Mark Liversedge
c7402703d6 KQOAuth lib in src.pro
.. use -l and let the linker decide which lib to link in
   rather than specifying.
2014-12-24 08:57:13 +00:00
Joern
cbbd160b9e Switch to kQOAuth
.. this removes the dependencies on liboauth and friends
   and replaces it with a single lib.

.. the library is available from http://github.com/kypeli/kQOAuth

.. the only current feature that requires OAuth is tweet
   your ride, but this lib will provide the services for
   future oauth services.
2014-12-23 20:25:25 +00:00
Mark Liversedge
f351c80313 Minor nits 2014-12-23 15:01:09 +00:00
Mark Liversedge
4db41a662d CTL/ATL/TSB Min, Max and Avg on Summary
.. when looking at month by month you can see where you
   are peaking, building, tapering or detraining.
2014-12-23 12:04:34 +00:00
Mark Liversedge
140c37cb9c Show CTL et al on date range summary
.. not sure about how we show range and today value but we
   can fix the cosmetics later on.
2014-12-23 09:51:39 +00:00
Mark Liversedge
b25feb0d23 Clean unneeded refs to metricDB
.. starting to sunset the code now. Need to sort the sqlModel
   for the ridecache and then it can be retired completely.
2014-12-22 22:39:36 +00:00
Mark Liversedge
de80d9d37a Default to Sync tab on TP dialog
.. its where you usually switch to.
2014-12-22 22:03:16 +00:00
Mark Liversedge
db8ad8414c TP Download Dialog use Date Range
.. was broken to ignore date ranges when migrating
   to use the RideCache.
2014-12-22 19:14:05 +00:00
Mark Liversedge
2bbc503304 Fencepost PMC data bug
.. caused 0 values to show for first day/week/month
2014-12-22 18:22:03 +00:00
Mark Liversedge
70cbe30458 Fix Filter PMC bug
.. if a filter was being applied we created a local PMC
   but also filtered on dates, this caused the PMC data
   that was generated to only represent the activities in
   the period selected !

.. thanks to Ale Martinez for pointing this out.
2014-12-22 17:54:26 +00:00
Mark Liversedge
133aa6e6de Migrate LTM DataTable to use RideCache
.. and actually uses the LTMPlot functions to aggregate
   data so should be easier to maintain and also match the
   charts.
2014-12-22 12:03:21 +00:00
Mark Liversedge
efb30d970f LTMPopup now fully migrated to RideCache
.. now when called by the LTM chart it uses the ride cache
   and not the SQL data.
2014-12-22 10:37:01 +00:00
Mark Liversedge
89eaf26a45 Less Spacing for Bests / Intervals
.. now they show PMC data too, needs more space.
2014-12-22 09:47:35 +00:00
Mark Liversedge
5bf1cf141c Erroneous qDebug() in FitRideFile
.. was working on an interval problem and left a
   qDebug() in by accident on last commit
2014-12-21 22:10:50 +00:00
Mark Liversedge
250a64edcc RideItem destructor
.. no memory leaks here !
2014-12-21 22:03:36 +00:00
Mark Liversedge
22a34a5428 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
39d5fb7a96 Fix SEGV in PMCData on Import ride
.. when refreshing summary window PMC metrics.
2014-12-21 21:15:03 +00:00
Mark Liversedge
01a6499fb0 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
b272ee63d8 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
e4acf344c6 TP Dialog Size
.. needs to be bigger, always end up resizing it !
2014-12-21 15:06:31 +00:00
Mark Liversedge
5e7e581a4d Get withings weight on same day as ride
.. should have checked for date <= not < ride date.
2014-12-20 21:00:45 +00:00
Mark Liversedge
a4966d23a4 Don't show model range for ride summary 2014-12-20 20:46:44 +00:00
Mark Liversedge
1c68cb8054 Merge pull request #1205 from Joern-R/creator
Allow "Out-Of-Source" Build (Original patch by yarrouye)
2014-12-20 20:30:30 +00:00
Joern
3b546b71d6 Allow "Out-Of-Source" Build (Original patch by yarrouye)
... separated the "out-of-source" patch from yves from original pull
request
... the patch allows to use e.g. QTCreators "Shadow-Build" feature so
that GC is build not in source, but in a different directory
.. this is useful when using QTCreator and switch between different QT
versions / 32/64 bit builds - since every build resides in a separate
directory from GC source

-- since the original commit (at least from GitHub view) is shown in a
mixed pull request with other commits - this is a seperated version of
the single commit
2014-12-20 17:38:14 +01:00
Mark Liversedge
92da82e922 Show TSB add time of athlete best
.. on ridesummary
2014-12-19 22:35:54 +00:00
Mark Liversedge
ea3dbd1026 Add PMC metrics to ride summary
.. bit of a hack, will make it configurable, but quite
   useful to see what the state of TSB was for the day
   of the ride being summarised.
2014-12-19 21:26:59 +00:00
Damien
e60edb92d3 Interval: Correct overlap of highlighted intervals 2014-12-19 21:32:05 +01:00
Mark Liversedge
26d23edd2e Remove GoldenCheetah Racing Credentials
.. its not going to happen and begs the question.
2014-12-19 19:56:02 +00:00
Mark Liversedge
e4c11c846c Migrate CRC from DBAccess to RideFile
.. and wipe a few more SummaryMetric references
2014-12-19 19:30:18 +00:00
Mark Liversedge
fdf9ad75fa Summary redraw bug
.. moved check for isVisible() in dateRangeChanged() and
   it stopped refresh on startup.
2014-12-19 17:53:18 +00:00
Mark Liversedge
1f9df00d08 RideCache update invalidate PMC
.. so it is recalculated when chart refreshes.
2014-12-19 17:26:38 +00:00
Mark Liversedge
9a403939df Fix two-a-days on PMC
.. only kept stress for first ride on two-a-days when
   calculating daily stress.

.. I think I've made this mistake a few times before !
2014-12-19 16:50:04 +00:00
Mark Liversedge
6f7145db7d Migrate PMC data to Athlete
.. so it is shared across charts when no filtering
   is applied.

.. when filtering is applied then LTMPlot manages
   the PMC data itself.

.. now we use the ridecache the PMC update is really
   fast anyway.
2014-12-19 16:35:24 +00:00
Mark Liversedge
b0c29f9696 Remove old references to SummaryMetrics
.. cleaning up from last few commits.
2014-12-18 19:10:47 +00:00
Mark Liversedge
d1a339db17 Migrate LTM Compare and Bests to use RideCache
.. still PMC fixups to remove SummaryMetrics left

.. Data Table now broken, needs fixing too.
2014-12-18 18:45:35 +00:00
Mark Liversedge
6ee2a8f59e Migrate LTM Metric/Meta curve to use RideCache
.. seems ok, now need to address bests and compare
2014-12-18 16:28:30 +00:00
Mark Liversedge
ce579a9365 Merge pull request #1202 from Joern-R/translate
Update Translation DE
2014-12-18 15:43:19 +00:00
Mark Liversedge
211263519d Migrate LTM TimeofDay Curve to use RideCache
.. picking off the LTM charts piece by piece !
2014-12-18 15:41:12 +00:00
Mark Liversedge
8a205e414b Rename SummaryBest to AthleteBest
.. and move to RideCache.h
2014-12-18 14:59:18 +00:00
Mark Liversedge
3e095af720 Retire getAggregated + getBests
.. from SummaryMetrics
2014-12-18 14:22:36 +00:00
Joern
d8039b6c53 Update Translation DE
.. update DE
2014-12-18 15:15:14 +01:00
Mark Liversedge
9851b299f3 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
a0d729e86a 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
1517da1f96 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
4a789f002e LTM refresh during update
.. just playing with the concept, not neccessarily how
   things will pan out.

.. If you delete rideDB.json and start GC then switch
   to a PMC whilst the cache is being computed and look
   at all dates you will see the chart refresh as data
   arrives.
2014-12-17 23:45:07 +00:00
Mark Liversedge
fd8a4714d6 CLucene is optional !
.. oops
2014-12-17 20:46:27 +00:00
Mark Liversedge
eebb8d2a55 Migrate RideSummary (Compare) to use RideCache
.. ride summary window is now free of metricDB

PHEW!
2014-12-17 18:36:49 +00:00
Mark Liversedge
c14cfab98f 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
9ebcb9b579 Migrate DiarySidebar to use RideCache
.. in the month/week summary.
2014-12-17 15:53:01 +00:00
Mark Liversedge
2fa498a82d Migrate LTMSidebar to use RideCache
.. just the summary widget basically.
2014-12-17 15:45:40 +00:00
Mark Liversedge
1104e97259 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
f313f7f637 Histogram no longer slow
.. so we don't need a lag betweem metric selection
   and re-plotting.

.. this was/is only relevant to plotting metrics
2014-12-17 12:05:40 +00:00
Mark Liversedge
31ddcafabf Migrate Histogram to use RideCache
.. and specification, but only when plotting a metric
   over a date range.
2014-12-17 11:58:58 +00:00
Mark Liversedge
065e337ef2 Migrate TreeMap to use RideCache
.. and therefore also using the Specification approach.
2014-12-17 11:25:35 +00:00
Mark Liversedge
f111994d60 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
d6b1489011 Migrate AutoFilter to use RideCache
.. in LTMSidebar
2014-12-17 10:13:05 +00:00
Damien
43b8ed720e MetaData: Add default values 2014-12-17 08:17:11 +01:00
Mark Liversedge
bc451469a2 FilterSet::pass() and DateRange::pass()
.. moving away from passing data when working with groups of
   rides to passing constraints instead.

.. so FilterSet allows us to pass a collection of filters
   that can then be applied to data.

.. in this way the plots can iterate over cached data selecting
   rideitems based upon constraints applied by the user.

.. these need to be embedded into LTM, TreeMap, Histogram etc
2014-12-16 20:47:17 +00:00
Mark Liversedge
d17a3b892e Migrate StressCalculator to use RideCache
.. still a bit funky with the filtering, there is probably
   some scope to simplify that, but at least now its only
   a list of pointers not objects on the stack.
2014-12-16 13:53:16 +00:00
Mark Liversedge
6f339ec6e6 Migrate RideMetadata to use RideCache
.. for distinct values -- still does NOT update the
   in memory store in rideitem when metadata changes
2014-12-16 12:39:07 +00:00
Mark Liversedge
f53a22140b Migrate TP Download Dialog to use RideCache
.. stop using the metric db
2014-12-16 11:59:55 +00:00
Mark Liversedge
8e347312d5 Migrate ManualRideDialog to use RideCache
.. for metric estimation
2014-12-16 11:37:35 +00:00
Mark Liversedge
12a69f8024 Removing unneeded MetricDB references
.. in RideFile and TwitterDialog
2014-12-16 11:15:25 +00:00
Mark Liversedge
43b7e83a28 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
3d933ebe9a Migrate listRideFiles()
.. from RideFileFactory to RideCache

.. to enforce/encourage developers to use the ridecache
   to access rides/data rather than going to disk for it.
2014-12-16 10:23:03 +00:00
Mark Liversedge
b54ce441b4 Fix Qt4 build of WhatsThis? 2014-12-15 16:47:10 +00:00
Mark Liversedge
f727c4bbaf 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
68b60088f1 Merge pull request #1200 from Joern-R/help2
Enable Context Help (Shift+F1) using "QT's - What's This"
2014-12-14 18:12:38 +00:00
Joern
dfb7b8fc36 Enable Context Help (Shift+F1) using "QT's - What's This"
... adds "What's this" to (hopefully) most of the widgets (please report
on missing ones)
... defines draft "Whats' this" texts including a
context specific WikiLink

.. Help Key for all platforms is <Shift>+<F1> + in some widgets
"RightMouse - Click"

... Tested on Win and Mac (On Mac QtMacButton seems not supporting
"What's this") - so here <Shift>+<F1> has no result.

... ToDo: Create final texts and links based on the to be updated 3.11
Wiki
2014-12-14 18:55:42 +01:00
Mark Liversedge
9a486ae9c8 Add RideFileCache to RideItem
.. so available for current ride

.. and refreshed() when notifyDataChanged() is called

.. but not many classes call it!

.. we are moving to having the filecache read from the
   RideCache rather than straight from disk so we have an
   in-memory and persisted version.
2014-12-14 15:35:53 +00:00
Damien
df5fc26ac0 ScatterPlot: ignore zero in one function 2014-12-13 16:33:30 +01:00
Damien
b9aa123674 ScatterPlot: ignore zeros in compare mode 2014-12-13 15:52:53 +01:00
Mark Liversedge
804c2ed197 Fix Navigator coloring
.. if isRun the logic was wrong when user has selected coloring
   the background not just a smaller accent to the right.
2014-12-13 09:49:16 +00:00
Mark Liversedge
8c15ff9f9e 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
dc7597d17d Fix SEGV on array overrun
.. in scatterplot smoothing.
2014-12-12 22:21:30 +00:00
Damien
18f7c02f9d ScatterPlot: Add smoothing 2014-12-12 22:09:04 +01:00
Mark Liversedge
c98d80621c Merge pull request #1199 from amtriathlon/master
GOVSS and xPace
2014-12-12 21:00:38 +00:00
Alejandro Martinez
c1435277c9 Refined Aero and KE contributions to running power
Added comments and references
2014-12-12 16:12:49 -03:00
Mark Liversedge
6c8318afe6 Progress line show()
.. called when progressUpdate() too as it may well
   miss the first signal (e.g. switch view during a
   refresh).
2014-12-12 18:13:53 +00:00
Mark Liversedge
2e5dc84188 Fix TwitterDialog
.. for getRideMetric migration

.. also simplified the code that generated the message since
   it was hideous; cut-paste lazy code.
2014-12-12 16:01:15 +00:00
Mark Liversedge
7077c3d223 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
c25e91d5d8 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
995a417554 Isolating Intervals code
.. it will almost certainly break when metricDB is retired
   so isolating it a little further, we can fix it up once
   the ridecache code is done.
2014-12-12 13:18:59 +00:00
Mark Liversedge
294ed0d4d9 More Header Nits
.. MetricAggregator declared getFirstLast() that basically
   doesn't exist (and no idea what it was for!)
2014-12-12 13:02:58 +00:00
Mark Liversedge
c87b9963ea 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
Mark Liversedge
944d612fd9 MetricAggregator header nit
.. still declared getAllMeasures()
2014-12-12 11:32:25 +00:00
Mark Liversedge
cf289b31f7 Migrate getDistinctValues(field)
.. from DBAccess to RideCache.
2014-12-12 11:28:04 +00:00
Mark Liversedge
7dbb2f8da1 Measures code cleanup
.. removing any remaining references to measures in the
   code. We now use withings only and that is handled
   in a non-generic manner.

.. measures and equipment are likely to get put into
   v3.3 once we've done planning.
2014-12-12 10:59:45 +00:00
Mark Liversedge
5ecb26e728 Migrate getAllFilenames()
.. from MetricAggregator to RideCache
2014-12-12 10:40:32 +00:00
Mark Liversedge
7f103ac59b Migrate getAllDates()
.. from DBAccess to RideCache
2014-12-12 10:24:15 +00:00
Mark Liversedge
26d7e79cd6 Migrate Export Metrics as CSV
.. from MetricDB to RideCache
2014-12-12 10:15:26 +00:00
Alejandro Martinez
6145b69b06 Minor fix in spanish translation and xPace format 2014-12-11 14:20:55 -03:00
Damien
dae0276b0a ScatterPlot: Add ignore zero special case for LR Balance 2014-12-10 23:14:02 +01:00
Damien
c663b2ec85 ScatterPlot: Add NoTemp special case 2014-12-10 22:44:47 +01:00
Damien
9837d6d0cc Device: Correct last commit 2014-12-10 21:35:59 +01:00
Mark Liversedge
8d78aeaaf9 Merge pull request #1177 from chet0xhenry/feature/translation
Androidify App
2014-12-10 20:27:23 +00:00
Damien
b282eb70f5 Device: modify wheel size configuration
fixes #986
2014-12-10 20:59:02 +01:00
Mark Liversedge
9c2e820335 RideCache::load()
.. loads the cache/rideDB.json back on startup to avoid
   any refresh of metrics etc

.. uses a lex/bison JSON parser, not because of performance
   since its only run one at startup, but because;

   * QtJSON support is only available in QT5
   * mvjson uses a DOM model that creates a memory overhead
   * the existing bison/lex parser works well and is easy to
     use as a template for this

We now have a good mechanism for metrics and metadata refresh,
cache and recovery so can look at using it in the charts and
the ride navigator next !
2014-12-10 19:34:09 +00:00
Mark Liversedge
9ae44f8a96 Stray connect() in ScatterWindow 2014-12-10 13:53:55 +00:00
Damien
77847f08ac Config: modify wheel size configuration 2014-12-10 00:10:42 +01:00
Damien
03e94f4844 ScatterPlot: Add trend line 2014-12-09 22:35:12 +01:00
Mark Liversedge
dbe44a40b5 Merge pull request #1194 from amtriathlon/master
Update Spanish Translation
2014-12-09 19:12:55 +00:00
Alejandro Martinez
1699312f10 Update Spanish Translation 2014-12-09 16:11:03 -03:00
Mark Liversedge
db40fb733f Simplify Lucene Method
.. it ignored most of the parameters so lets simplify
   and make it just look at ride() -- this may simplify
   even further to the tags in future.
2014-12-09 15:15:49 +00:00
Mark Liversedge
7d218382a7 Only save Withings on SUCCESS
.. moved the overwrite of the withings cached response
   to when we know we got something successfully.

.. previously we overwrote regardless of what we received
   which means that when we have firewall/network type issues
   the cache was overwritten with blank data !
2014-12-09 14:34:04 +00:00
Mark Liversedge
1cf988a550 RideCache refresh on addRide
.. but only refreshes the ride added rather than looking everywhere.
   So, when we are importing large numbers of activities it won't
   repeatedly run a full refresh (which was bonkers).
2014-12-09 13:59:10 +00:00
Mark Liversedge
0c0987e99b RideCache Exit gracefully
.. if we close GC during a background refresh operation
   then the refresh is cancelled and cache saved in whatever
   state it is in now .. the user clearly didn't want to wait !
2014-12-09 11:29:50 +00:00
Mark Liversedge
a94bda9403 RideCache::save() UTF-8 with a BOM
.. same as the ridefile.json
2014-12-08 22:52:26 +00:00
Mark Liversedge
e8105ce23e rideDB.json Indentation nit
.. yeah, I'm a bit OCD.
2014-12-08 22:35:08 +00:00
Mark Liversedge
170c38467a RideCache::save()
.. dumps the ridecache to cache/rideDB.json
2014-12-08 22:12:06 +00:00
Claus Assmann
93393246d7 Fixup RideCache on QT < 5
.. QtConcurrent header names changed.
2014-12-08 20:02:34 +00:00
Mark Liversedge
8f2fc62cac RideCache compute metrics
.. when refresh() is called for a rideitem it will
   now compute the metrics for the entire ride

.. when a ride is opened the cache is also updated
   at the same time.
2014-12-08 19:38:01 +00:00
Mark Liversedge
c0d63dbdf3 Temporary Fixup
.. refresh metricDB when new withings data downloaded

.. but refreshes for all dates that have data for now, this
   will be resolved shortly.
2014-12-08 17:59:59 +00:00
Mark Liversedge
79748ecb3d Remove RideCache refresh sleep!
.. added to slow things down on my developer PC as its
   to fast to notice when I'm testing.

.. also left in an erroneous line clearing RideItem::isstale
   which is also wrong as breaks separation of concerns
2014-12-08 17:24:50 +00:00
Mark Liversedge
bf78eeaec7 Ridecace Measures deprecated from SQLite
This is quite a big patch with lots of nasty interdependencies
all collected together but essentially it deprecates;

* Measures are no longer stored in SQL tables
* Zeo support has been dropped (they went bust)

To achieve this there are a large number of updates;

* Withings json is now cached in /cache and in the Athlete
  class. So can be traversed in memory rather than SQL

* All "measures" on LTM have been removed and the only metric
  left is "Athlete Weight" that cascades from withings to ride
  "Weight" metadata value to athlete settings to a 80kg default

* RideCache is now refreshed, but only for metadata. This is needed
  to cache the "Weight" metadata from rides when calculating weight.

* JsonRideFile parser is now re-entrant since it will run in parallel
  during RideCache refreshes (using the QtConcurrent::map()
  framework).

BUT NOTE

* This is about deprecating the Measures table more than anything
  else. Functionally we are in pretty much the same place; just that
  data is stored in a different place.

  e.g. metric/imperial handling of weight is not fixed yet, no
  metrics are in the cache yet, load/save of the cache is not done
  so startup is slow etc.
2014-12-08 16:48:58 +00:00
Chet Henry
32d80b524a Fix inital screen load value format bug 2014-12-07 07:24:56 -07:00
Chet Henry
36f8b36df5 Even though ridelogger doen't use fit the ant+ plugin does 2014-12-07 07:24:56 -07:00
Chet Henry
69fbec9061 Syncronize values, keys and keylables
Also don't wait for unpaired ant devices forever
2014-12-07 07:24:56 -07:00
Chet Henry
dcb78aff9e Fix but with prefence update and screen. 2014-12-07 07:24:55 -07:00
Chet Henry
d899584d4b Lighter Ant+ connections 2014-12-07 07:24:55 -07:00
Chet Henry
1acd2304cf More ant code clean up 2014-12-07 07:24:55 -07:00
Chet Henry
18159ed113 Clean up ant code 2014-12-07 07:24:55 -07:00
Chet Henry
04d0042df7 Add classes to proguard keep 2014-12-07 07:24:55 -07:00
Chet Henry
b1f72ce77a Adding Proguard 2014-12-07 07:24:55 -07:00
Chet Henry
1efecf1705 Extendable File Format
All file formats to be extended

Also fixed a bug in the display of values
2014-12-07 07:24:55 -07:00
Chet Henry
54c4cd6daa Clean up code, reduce memory and make the world a better place 2014-12-07 07:24:55 -07:00
Chet Henry
1823e202ff Fix textview overflow in display 2014-12-07 07:24:55 -07:00
Chet Henry
3764b0b7ca Update view on sensor list change 2014-12-07 07:24:55 -07:00
Chet Henry
c63104f612 Clean up currenValues view and better style of dashboard 2014-12-07 07:24:55 -07:00
Chet Henry
0acce7538f Replace default diamater with circumference and increase it to 2.096 2014-12-07 07:24:55 -07:00
Chet Henry
204135fc20 Better frount screen layout 2014-12-07 07:24:55 -07:00
Chet Henry
58694d51b6 Change gzip extention to gz for bash completion 2014-12-07 07:24:55 -07:00
Chet Henry
cc31b093f8 Fix wheel size bug 2014-12-07 07:24:55 -07:00
Chet Henry
796a1d6a4e Comment out unimplemented message 2014-12-07 07:24:55 -07:00
Chet Henry
4000453d03 Add wheel diamater configuration 2014-12-07 07:24:55 -07:00
Chet Henry
f00c2deb1f Allow user to display imperial units 2014-12-07 07:24:55 -07:00
Chet Henry
842f334ff6 Fix ant+ ui flow 2014-12-07 07:24:55 -07:00
Chet Henry
f64acd3d68 Better theme and style 2014-12-07 07:24:55 -07:00
Chet Henry
f1bf65e60d Light theme and better sample view 2014-12-07 07:24:55 -07:00
Chet Henry
04ffb9f371 Fixup Settings
Add configurable display of sensors
Add configurable text size
Disable preferences if ride is logging
2014-12-07 07:24:55 -07:00
Chet Henry
1433c6d1a4 Reduce memory footprint and improve service performance 2014-12-07 07:24:55 -07:00
Chet Henry
f37d9e8516 Fix problems and wait a bit for ant+ pairing 2014-12-07 07:24:55 -07:00
Chet Henry
3f3bbf521c better grid view of data 2014-12-07 07:24:55 -07:00
Chet Henry
8278bcb5cf Better api version support 2014-12-07 07:24:55 -07:00
Chet Henry
7d9c596ceb Make app more android like
Changed preferences to use android stype prefs
Allowed values to be passed to main screen
Start and stop ride in main menu
2014-12-07 07:24:54 -07:00
Chet Henry
7b84ea2355 Adding view of current data 2014-12-07 07:24:54 -07:00
Chet Henry
470441671f Add a lot more string to strings.xml also add reset settings wf 2014-12-07 07:24:54 -07:00
Chet Henry
eb00126c42 Allows strings to be translated
Moved all string to strings.xml
Also removed WorkoutRepeatSteps.fit because it was unneeded
2014-12-07 07:24:54 -07:00
Mark Liversedge
98a15ed4fb RideWindow copy/paste error
.. surprised it works !
2014-12-07 09:51:56 +00:00
Mark Liversedge
51f25cb1f7 Minor logic error 2014-12-07 00:20:17 +00:00
Mark Liversedge
259b739bf6 Merge pull request #1191 from amtriathlon/master
Enabled CP Models for Speed series
2014-12-07 00:15:23 +00:00
Mark Liversedge
760f1870a7 RideCache / RideItem fixups
.. fingerprint for range should not take into account the
   start/end date as its irrelevant and will change

.. RideItem now responsible for refresh and status updating
   on the rideitem

.. framework seems good now; only rides that need to be refreshed
   will get asked for a refresh -- but need to look more closely
   at how we derive 'Weight' for each rideitem now...
2014-12-07 00:11:44 +00:00
Alejandro Martinez
96ee321852 Enabled CP Models for Speed series
Results are shown in metric units for speed/distance and pace units according to user preferences
2014-12-06 20:48:31 -03:00
Mark Liversedge
a1e95d0880 RideItem separation of concerns
.. instead of making the caller keep rideitem up to date etc
   we are going to move to it looking after itself.

.. the first part of this is to make it responsible for checking
   if it is stale and computing fingerprints etc

.. the next part will be making it responsible for refreshing
   the cached values.

One big thing too:

.. the fingerprint is now based upon the zone config that applies
   for the date of the ride -- not all zone config. So if the config
   changes but not for the date of this ride (e.g. set a new CP starting
   from today) then the old data does not get marked as stale.
2014-12-06 08:48:34 +00:00
Mark Liversedge
23ebb0542c RideCache Framework Update
.. needed to clean RideItem a touch

.. needed to isolate intervals code as it has some
   problems and breaks metricaggregator for normal
   use.

.. found a bit of Context code in MainWindow.cpp (!!)
2014-12-05 23:06:28 +00:00
Mark Liversedge
b597a2dafc RideCache Background Refresh Framework
.. subtle, thin progress bar on tabview to notify
   when background updates are in progress

.. background updating code created but does not
   perform a refresh yet, just sleeps for 0.2s

.. to enable 'visibility' of the code use WANT_RIDECACHE
   to the defines in gcconfig.pri
2014-12-05 20:08:32 +00:00
Mark Liversedge
97baee2256 Merge pull request #1189 from Joern-R/fix2
Athlete Subdirs - improvements
2014-12-05 17:48:54 +00:00
Joern
076a6e86ec Athlete Subdirs - improvements
.. added /BAK subdir where all actvities .BAK files are stored
.. do not delete any original files in /imports /downloads when deleting
activity
.. copy deleted activity .JSON as .BAK into /BAK subfolder
.. adjust upgrade procedure to copy .BAK files to /BAK
2014-12-05 18:44:11 +01:00
Mark Liversedge
0b7f6e22d4 Merge pull request #1188 from mtbkeith/master
code cleanup of build warnings
2014-12-05 16:13:46 +00:00
Mark Liversedge
27df106889 Merge pull request #1187 from Joern-R/fix1
GC Upgrade 3.11 - adjustment
2014-12-05 16:09:05 +00:00
Joern
c9dabc5d00 GC Upgrade
.. do not force User to scroll down to proceed
.. change "proceed" text to be more clear
2014-12-05 17:11:09 +01:00
Reynolds
53d4834e3a Merge branch 'master' of https://github.com/mtbkeith/GoldenCheetah
# By Mark Liversedge
# Via Mark Liversedge
* 'master' of https://github.com/mtbkeith/GoldenCheetah:
  Added RideCache
  Introduce the RideCache
  Turn off interval hover on leave
2014-12-05 10:59:43 -05:00
Mark Liversedge
45550c0f28 Added RideCache
.. source files missed off last commit
2014-12-05 15:33:19 +00:00
Mark Liversedge
0b5da213da Introduce the RideCache
.. just a refactor of ridelist out of Athlete for now
   but will shortly be refreshing in background and
   loading and saving to rideDB.json
2014-12-05 15:30:54 +00:00
Mark Liversedge
9b92ad6605 Turn off interval hover on leave
.. so you get hover notifications only when
   hovering, as soon as the mouse leaves the chart
   the hover goes away.
2014-12-05 11:57:02 +00:00
Keith Reynolds
d02909660c Remove unused local method 'unquote'
Fix virtual function to proper signature for QXmlAttributes reference and prevent hiding.
2014-12-04 18:04:08 -05:00
Mark Liversedge
f70bf3080f Added RideMetric::index()
.. each metric now has an index (identifier) that can is numeric
   starting at 0 and going up.

.. it can be used to offset into an array when we add a cache for
   storing precomputed metrics.
2014-12-04 13:54:42 +00:00
Mark Liversedge
f91aa20464 Tidy up RideItem.h
.. the cache code can start now !
2014-12-03 20:38:08 +00:00
Mark Liversedge
48e437ddf5 Fixup 3D plot for RideItem zones
.. missed in last commit.
2014-12-03 20:21:30 +00:00
Mark Liversedge
973281317d Remove Zones from RideItem
.. they are in Athlete::zones() et al now

.. this refactor was missed in the 3.0 mainwindow
   refactoring and is part of the prep to use RideItem
   as an in memory cache instead of the old metricDB
2014-12-03 19:06:07 +00:00
Mark Liversedge
bfaa317d22 QVector::removeAt(int) is new
.. so use ::remove() instead for QT4 compatibility.
2014-12-03 15:30:40 +00:00
Mark Liversedge
d04fb74458 Merge pull request #1186 from amtriathlon/master
Fixed copy and paste error
2014-12-03 15:28:18 +00:00
Alejandro Martinez
45ea8ed7ce Fixed copy and paste error 2014-12-03 12:23:38 -03:00
Mark Liversedge
0447489ea4 Merge pull request #1185 from amtriathlon/master
Added xPace metric
2014-12-03 15:12:45 +00:00
Alejandro Martinez
8f06039451 Added xPace metric
Computed as the constant pace on flat surface with the same LNP
2014-12-03 10:48:13 -03:00
Mark Liversedge
2ef71f6df3 Add RideMetric::toString(bool useMetricUnits)
.. so we can now call that instead of doing the conversion
   and formatting all over the code !

NOTE: it still needs to be /called/ in the code, that change
      will need to be applied everywhere a metric is displayed
      to the user.
2014-12-03 12:36:40 +00:00
Mark Liversedge
37a496ac38 Save Command flushed Metadata first
.. to fix long standing bug with saving whilst editing
   a field. But still leaves a problem if exiting whilst
   editing a field (which is a bit weird tbh).
2014-12-03 10:57:07 +00:00
Mark Liversedge
1c7edb30b4 Finally remove Old Ride list QTreeWidget !
.. its been there since the beginning at the heart of the code
   as a registry of the rides (RideItem) and controlling the
   selection of rides.

.. in v3.0 we stopped showing it, but it was still created and
   then hidden immediately. But removing the 'spine' of the code
   was seen as a step too far.

.. this is the first part of moving from SQL to a NoSQL cache
   for ride metrics, metadata and measures -- RideItem is now
   no longer inheriting from QTreeWidgetItem with all the issues
   that brings.

.. since its right at the heart there are likely to be unforeseen
   bugs as we go, especially since it affects the ride navigator.

.. add/delete has been tested a fair amount and should be reliable.
2014-12-03 10:33:50 +00:00
Alejandro Martinez
ec11bb4005 Ignored /release to keep git quiet on windows 2014-12-02 13:52:51 -03:00
Mark Liversedge
994b4f71b8 Merge pull request #1183 from amtriathlon/master
Spanish Translation Update
2014-12-01 19:29:23 +00:00
Alejandro Martinez
5ea9957867 Spanish Translation Update 2014-12-01 14:34:01 -03:00
Damien
c11d8b0fcc ScatterWindow: Add Compare mode for 2D Plot 2014-11-30 23:21:30 +01:00
Mark Liversedge
ece98610f0 Merge Activity recalc derived series
.. e.g. so O2Hb and HHb are done for Moxy
2014-11-30 21:57:42 +00:00
Damien
790bbe8603 JouleDevice: Remove BETA label 2014-11-28 07:12:29 +01:00
Damien
deb110fca1 CsvRideFile: Parse Powertap Imperial CSV (if exists?) 2014-11-27 23:54:37 +01:00
Damien
3dbb32cb3b CsvRideFile: Parse time in generic CSV 2014-11-27 23:05:23 +01:00
Damien
6cbce57b8b CSVRideFile: Add new series 2014-11-27 21:36:32 +01:00
Mark Liversedge
fe9ea06b9f More decimals for tHb tooltip
.. on AllPlot
2014-11-27 11:50:26 +00:00
Damien
0d802af6a8 CsvRideFile: Correct GC parser 2014-11-27 08:42:15 +01:00
Mark Liversedge
19e12b813d Merge branch 'master' of github.com:GoldenCheetah/GoldenCheetah 2014-11-26 22:02:37 +00:00
Mark Liversedge
f14a276ece Add Min, Max, Average SMO2
.. and add to summary
2014-11-26 22:01:46 +00:00
Damien
8b944f37a1 TrainView: Record in GC CVS format 2014-11-26 22:22:08 +01:00
Mark Liversedge
e9bcad0a8d Remove errant qDebug() 2014-11-26 20:17:54 +00:00
Mark Liversedge
50845a3bfb Add SmO2 to Histogram
.. from Moxy
2014-11-26 19:23:47 +00:00
Mark Liversedge
0d63293e2a Merge pull request #1173 from Joern-R/import
Autoimport - do not process if no files determined
2014-11-26 18:18:16 +00:00
Joern
b5d1597fe5 Autoimport - do not process if no files determined
... do not process the popup if no files with the correct extensions
were found / the directories were empty
... (this does not address to skip files which were already imported !)
2014-11-26 19:20:16 +01:00
Mark Liversedge
7ebe5faeb6 Merge pull request #1172 from Joern-R/ugrade
Upgrade v3.11 - Folder Conversion - troubleshooting
2014-11-26 17:35:00 +00:00
Joern
8036a06882 Upgrade v3.11 - Folder Conversion - troubleshooting
... add Link to Wiki Troubleshooting guide to Upgrade Log in case errors
have occured
2014-11-26 18:36:37 +01:00
Mark Liversedge
433b46e6a9 Merge pull request #1171 from chet0xhenry/feature/enable_sdcard
Make app relocatable to sdcard and make files readable by default
2014-11-26 10:58:40 +01:00
Chet Henry
1947387537 Make app relocatable to sdcard and make files readable by default 2014-11-25 17:59:45 -07:00
Mark Liversedge
9bed3d69d3 Merge pull request #1169 from Joern-R/translation
Translation DE - Correction
2014-11-25 20:11:01 +01:00
Joern
0108980e16 Translation DE - Correction
... Text for "Upgrade" typos,...
2014-11-25 20:10:16 +01:00
Mark Liversedge
f19ac356e8 Fix Merge Wizard Saving Bug
.. RideItem() is horrible
.. but it kinda works so just work around it
2014-11-25 15:53:41 +00:00
Claus Assmann
9e4a9ffdd7 More spelling errors
.. Mark cannot spell for tofu.
2014-11-25 11:42:08 +00:00
Mark Liversedge
e4760ed6d1 MU import
.. to keep code safe, but not activated.
2014-11-24 22:21:50 +00:00
Claus Assmann
a001ffef4f Fix comment spelling errors
.. lots of them !
2014-11-24 15:37:56 +00:00
Mark Liversedge
7b22d21050 Merge pull request #1166 from amtriathlon/master
Added pace to tooltip for speed curve in AllPlot
2014-11-23 21:28:42 +01:00
Alejandro Martinez
d42b7b332d Added pace to tooltip for speed curve in AllPlot
Only when the activity is a run
2014-11-23 17:18:40 -03:00
Mark Liversedge
114809929d More Moxy delimeters
.. ignore blank lines too.
2014-11-23 19:39:34 +00:00
Mark Liversedge
02828b6b0f Merge pull request #1163 from Joern-R/upgrade1
GC Upgrade 3.11 - Log Autoscroll
2014-11-23 18:30:20 +01:00
Joern
7db0ecd358 GC Upgrade 3.11 - Log Autoscroll
... Log automatically scrolls when it's created - so no extra check if
end of log was reached required to process
2014-11-23 18:22:48 +01:00
Mark Liversedge
59eb73bb58 Merge pull request #1162 from Joern-R/upgrade
GC Upgrade 3.11 enhancements
2014-11-23 17:49:10 +01:00
Joern
f55b76683e GC Upgrade 3.11 enhancements
... make Upgrade Check Window smaller (with scrollable Text)
... only allow to proceed if Text is scrolled down to end (full read)
... in Upgrade Log, only allow to proceed to athlete if Log has been
scrolled down to the end
2014-11-23 17:24:05 +01:00
Mark Liversedge
afd2907a8b Merge pull request #1161 from Joern-R/translate
Translation DE - 3.11 - First Update
2014-11-23 15:37:46 +01:00
Joern
d19883ba09 Translation DE - 3.11 - First Update
... Update Translation for DE
... Correct text for GC Upgrade
2014-11-23 14:58:55 +01:00
Mark Liversedge
99c044ff88 Merge pull request #1159 from chet0xhenry/feature/call_home
Add Crash Detection SMS and Gzip Compression
2014-11-23 09:05:55 +01:00
Chet Henry
f9edb3c43c Increase crash magnitude to 3g 2014-11-22 20:29:52 -07:00
Chet Henry
3357ce5c3c Add better crash detection and clean up dialog message title mix up 2014-11-22 20:19:31 -07:00
Chet Henry
f37760370a Add gzip compresion and emergency contact
The ride files will now be .json.gzip
Users will also now be able to add an emergency contact phone number.
Ride logger will use that number to update the contact on the riders current
location.  It will also notify them if the acceleration is above 15 or m/s^2.
If so the emergency contact will get an sms with the current location.

TODO:  15m/s^2 is easy to trip.  I need to research a way to minimize false positives.
2014-11-22 17:16:55 -07:00
Mark Liversedge
a0ca1d169a Revert "Fix CyclingAnalytics upload"
This reverts commit ca3ee9cef6.
2014-11-22 18:07:36 +00:00
Mark Liversedge
6ef21005d6 Merge pull request #1154 from chet0xhenry/feature/crc
Feature/crc
2014-11-21 23:12:02 +01:00
Mark Liversedge
6acafac0f6 Merge pull request #1152 from chet0xhenry/feature/allow_extra_data_in_imported_json
Allow for extra data in the array of series
2014-11-21 23:03:21 +01:00
Chet Henry
8d84f5000a Add methods to help write data 2014-11-21 14:42:27 -07:00
Chet Henry
88cddb1f2f Fix null exception from clean up 2014-11-21 14:40:10 -07:00
Chet Henry
213c3a6608 A bit more clean up 2014-11-21 14:40:10 -07:00
Chet Henry
84f394f766 More comments and more cleaning 2014-11-21 14:40:10 -07:00
Chet Henry
a222df1a40 CRC
Clean up, Refactor and Comment
2014-11-21 14:40:10 -07:00
Chet Henry
baa4dfc9e9 Fix json format for GC
Change month format in ride headder
Make sure numbers are formatted correctly ie not scientific notation
Log all current values:
  Perviously it only logged values that were measured.
  However, if GC doesn't see the other values it assumes they are zero.
2014-11-21 14:40:10 -07:00
Chet Henry
eed715de59 Fix wrong date format on json ride file. 2014-11-21 14:40:10 -07:00
Mark Liversedge
c329cd403d Added Watts:RPE ratio
.. compare average power to the rpe rating.
2014-11-21 19:33:41 +00:00
Mark Liversedge
5c72cc1091 Merge pull request #1153 from amtriathlon/master
Added pace zone shading to CPPlot
2014-11-21 19:40:42 +01:00
Alejandro Martinez
c73c33872b Added pace zone shading to CPPlot
When enabled it is convenient to set a filter for running activities in the chart since this is not done automatically yet
2014-11-21 15:25:26 -03:00
Chet Henry
412e3a36f6 Remove reference_list change 2014-11-21 08:54:39 -07:00
Mark Liversedge
cbf20ce5fc Deprecate kickr command channel
.. Wahoo don't do that anymore.

.. now use the same channel as the device and just send plain old
   ANT+ messages to set slope etc (why they didn't do that in the
   first place is absolutely beyond me)

.. getting ready to implement Kickr for the THIRD time !!!
2014-11-21 14:58:14 +00:00
Chet Henry
c4b05e6de4 Allow for extra data in the array of series 2014-11-20 16:02:45 -07:00
Mark Liversedge
e619253c5b Merge pull request #1151 from amtriathlon/master
Fixed pace histogram shading when there is no Pace Zones defined
2014-11-20 22:06:16 +01:00
Alejandro Martinez
583054850c Fixed pace histogram shading when there is no Pace Zones defined 2014-11-20 17:41:09 -03:00
Mark Liversedge
9188c3d288 Fix PaceZone crash in PowerHist
.. cut and paste error
2014-11-20 20:01:53 +00:00
Mark Liversedge
e5976a17a6 Moxy sleep wait for clear to complete
.. give it a chance to clear before trying to exit
   engineering mode.
2014-11-20 14:16:35 +00:00
Mark Liversedge
1ec63ef424 More CP tooltip
.. model curve is null when not shown, so better
   check before ignoring the tooltip update
2014-11-20 13:59:16 +00:00
Mark Liversedge
c302dcd73b Ignore Moxy 'delimeters'
.. the Moxy device sends blank lines to delimit recordings
   that we try and parse; so now we just ignore them.
2014-11-20 11:37:22 +00:00
Mark Liversedge
1affe2e14a Add .qmake.stash to .gitignore
.. just to keep git status honest
2014-11-20 11:11:01 +00:00
Mark Liversedge
b903e592d9 Hide tooltip in CPPlot
.. when not hovering over a curve, this worked ok for power
   but not for anything else. Because the signal was ignored
   when not showing power in pointHover.
2014-11-20 11:09:08 +00:00
Mark Liversedge
f232b0bc21 Merge pull request #1150 from amtriathlon/master
Add pace to tooltip in CV chart
2014-11-20 07:49:58 +01:00
Alejandro Martinez
5ba1cbb97b Add pace to tooltip in CV chart
Fixed units selection in histogram tooltip, it is independent of pace units
NB: CV chart currently doesn't obey units setting for speed, it is fixed to kph
2014-11-19 21:34:29 -03:00
Mark Liversedge
698d546e5b Merge pull request #1137 from Joern-R/conversion
Fix Metric/Imperial - conversion issues
2014-11-19 16:30:30 +01:00
Mark Liversedge
cd05928126 Merge pull request #1149 from jonbev/separate-run-summary-table
Split summary table into rides and runs
2014-11-19 15:20:13 +01:00
Jon Beverley
8739a508a2 Split summary table into rides and runs
Might be nice to have a different metric set for rides and runs but a
bit beyond me at the moment.
2014-11-19 13:54:42 +00:00
Mark Liversedge
0d5579dd4d Merge pull request #1148 from jonbev/fix-pace-units-in-tooltip
Fix pace units in tool tip for non metric units
2014-11-19 13:06:41 +01:00
Jon Beverley
0c615c5d37 Fix pace units in tool tip for non metric units 2014-11-19 12:03:16 +00:00
Mark Liversedge
1b9d7a37b9 Merge pull request #1146 from amtriathlon/master
Added pace to tooltip for speed histogram
2014-11-19 08:12:21 +01:00
Alejandro Martinez
6b76f8e5d9 Added pace to tooltip for speed histogram
Except when we know the activity is not a Run
2014-11-19 00:10:10 -03:00
Mark Liversedge
47bf2f3901 Fix CyclingAnalytics upload
.. bit of a hacky fix, but practical enough.
2014-11-18 21:25:17 +00:00
Mark Liversedge
35ac05b4a7 Merge pull request #1145 from chet0xhenry/master
Synchronize Writes to JSON file in Ride Logger
2014-11-18 22:16:29 +01:00
Chet Henry
dec682346e Clean up white space 2014-11-18 14:05:25 -07:00
Chet Henry
c00ea899f2 Syncronize writes to build valid json 2014-11-18 14:05:24 -07:00
Mark Liversedge
5cefa6a238 Fix merge resampling rounding
.. I know its a lazy method but at least use the right
   numeric format. LOL. What a twit.
2014-11-18 20:54:16 +00:00
Mark Liversedge
de68f7528e Merge pull request #1142 from chet0xhenry/master
Add a Ride Logger App for Android
2014-11-18 10:50:10 +01:00
Mark Liversedge
5f03ae8eaf Merge pull request #1144 from amtriathlon/master
Added Polarized Zones to HR and Speed histograms
2014-11-18 07:50:34 +01:00
Alejandro Martinez
34b513c969 Added Polarized Zones to HR and Speed histograms 2014-11-17 21:50:57 -03:00
Chet Henry
3fad5f296a Initial commit of contrib Ride Logger for Android
Logs rides to json files in Documents/Rides
Supports Ant and most internal sensors on Android:
Power, Heart Rate, GPS, Pressure, Temp, Acceleration...
2014-11-17 16:05:29 -07:00
Mark Liversedge
d802cccd3c Merge pull request #1141 from amtriathlon/master
Fixed time in polarized pace zones should be computed only for running a...
2014-11-17 22:57:46 +01:00
Alejandro Martinez
f0eecc254f Fixed time in polarized pace zones should be computed only for running activities 2014-11-17 18:52:54 -03:00
Mark Liversedge
eefd1a1048 Merge pull request #1140 from amtriathlon/master
Added Polarized Zones distributions for hr and kph series to cache
2014-11-17 22:02:18 +01:00
Alejandro Martinez
c700b7b7ec Added Polarized Zones distributions for hr and kph series to cache 2014-11-17 17:13:08 -03:00
Damien
170bc3d99a Aerolab: Correct dVE for imperial units
fixes #1025
2014-11-16 22:53:29 +01:00
Mark Liversedge
fdd8cabf24 Merge pull request #1138 from amtriathlon/master
Fixed scaling for pace zone shading in speed histogram with imperial units
2014-11-16 22:00:33 +01:00
Damien
9db8c214d0 DBSchemaVersion: 91 after TimeInZone and HRTimeInZone fix in last commit 2014-11-16 21:58:10 +01:00
Damien
19670b9fba TimeInZone: no time is data is not present
fixes #1126
2014-11-16 21:45:48 +01:00
Alejandro Martinez
09b983e56a Fixed scaling for pace zone shading in speed histogram with imperial units 2014-11-16 17:42:24 -03:00
Alejandro Martinez
b28cd97f7e Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2014-11-16 17:05:04 -03:00
Damien
72fd123c25 CVSRideFile: Use ibike headwind even without dfpm power 2014-11-16 20:56:07 +01:00
Joern
7bca928a2a Fix Metric/Imperial - conversion issues
In LTM Plot and on Summary Windows conversion
... data already converted for the curves was converted again
... for "Best" Summary the conversion was missing

Referring to issues #1067 #1071 (see also comments on issue #1069
2014-11-16 19:20:25 +01:00
Mark Liversedge
3766dceb62 Merge pull request #1136 from Joern-R/best
Fix - Best xxTime y-Axis bug #1086
2014-11-16 16:55:20 +01:00
Joern
635703c273 Best xxTime y-Axis bug #1086
... rideCache access in getAllBestsFor did not honour series-decimals
2014-11-16 15:24:44 +01:00
Mark Liversedge
84ec76d44b Merge pull request #1135 from Joern-R/cpvamscale
VAM CP x-axis bug #1085
2014-11-16 14:16:28 +01:00
Joern
598a1943f2 VAM CP x-axis bug #1085
... fixed by
...... not considering Y-Axis values in the 0 to 4.993 minutes range
which are not shown for VAM anyway
... both in standard view and in compare view / intervals and date
ranges
... handle intervals below 4.993 minutes properly (since they are not
shown in CP VAM)
2014-11-16 12:58:39 +01:00
Damien
e3c23999e8 IntervalSidebar: Add bests navigator 2014-11-16 12:33:44 +01:00
Mark Liversedge
90f5b94a87 Recognise Keith Reynolds 2014-11-16 08:27:41 +00:00
Keith Reynolds
5542b03b37 In CriticalPowerWindow add a Percent of Best to the hover message for the current ride when not in "Percent of Best" mode. 2014-11-16 08:24:10 +00:00
Mark Liversedge
ee7f103b51 Merge pull request #1134 from rclasen/sharedialog
always include ShareDialog
2014-11-15 23:58:24 +01:00
Rainer Clasen
2f1cf28fe6 always include ShareDialog
... but limit what individual services are build/offered based on oauth
availability (Strava, CyclingAnalytics). Load's of ifdef... making me
think about alternative solutions - especially now that the common
uploader base class allows to stuff them in a List/map/vector/whatever.
2014-11-15 23:22:07 +01:00
Alejandro Martinez
62a44458bf Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2014-11-15 17:07:34 -03:00
Mark Liversedge
85da6b1743 Merge pull request #1133 from amtriathlon/master
Pace zone shading and binning for running activities in speed histogram
2014-11-15 21:05:08 +01:00
Alejandro Martinez
fd0a8176b9 Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2014-11-15 16:58:17 -03:00
Mark Liversedge
6f9a54b449 Restructure Menus
.. added Edit for all ride data processors now we
   have quite a few to select from

.. shifted a few things around to make important
   options more prominent (e.g. Share) and less important
   ones less prominent (e.g. Heat Map)
2014-11-15 19:41:15 +00:00
Alejandro Martinez
dee917ca11 Pace zone shading and binning for running activities in speed histogram 2014-11-15 15:49:38 -03:00
Mark Liversedge
ca7a951b8e Merge pull request #1132 from rclasen/sharedialog
use Sharedialog for Trainingstagebuch + VeloHero, further improvements
2014-11-15 19:04:28 +01:00
Rainer Clasen
42fc68fd99 ShareDialog optimizations
introduced a base clase for the individual uploaders to reduce code
duplication.

This made it possible to
- default to download a ride to a service if it wasn't uploaded, yet.
- grey out checkboxes for services without credentials
2014-11-15 17:04:45 +01:00
Rainer Clasen
a25cf3aaf2 use ShareDialog for VeloHero and Trainingstagebuch
adjusted velohero + Trainingstagebuch upload to use new ShareDialog
2014-11-15 17:04:37 +01:00
Rainer Clasen
a446d5c9e7 fix tab order for password settings
tab order defaults to the order widgets are created - and not the order
they're added to the grid widget.

Reordered code to bring creation + adding of Widgets in sync.
2014-11-15 17:04:29 +01:00
Mark Liversedge
2a19e4d423 Merge pull request #1131 from Joern-R/auto
Auto-Import - "no files selected" UI improved
2014-11-15 11:26:44 +01:00
Joern
924f0edf84 Auto-Import - "no files selected" UI improved
... do not show "files table" and progress bar
... only provided "Finish" button to close the window
2014-11-15 11:28:26 +01:00
Mark Liversedge
b2b9416d0d MergeAdjust give user more rope ..
.. and they will hang themselves !

.. seriously, the limits to the merge offsets
   added no real value but would annoy a user
   where the rides needed to be aligned to a
   greater proportion.

.. adjust can shift the offset for the entire
   length of the ride
2014-11-15 09:53:27 +00:00
Mark Liversedge
b375e34d0d Tweak Merge Adjust Code
.. logic error mean't the merge adjust only applied
   in one direction and also when ride got longer
   or shorter it was not reflected on the plot.
2014-11-15 09:34:15 +00:00
Mark Liversedge
2795a5d2a1 HACK: AllPlot SEGV Fix
.. line 1289 of AllPlotWindow was updated to rebuild the
   plots when the ride was dirty, but it looks like there is
   a strange interaction when rideItem doesn't change and
   rideItem->ride() does.

NOTE: rides will not be refreshed after merge wizard completes
      until this is fixed up in AllPlotWindow.
2014-11-15 09:06:34 +00:00
Mark Liversedge
3ea6deaa05 Fix AllPlot Fill setting
.. was not always set, lost when removing the reference
   to parent->paintbrush in recent update.
2014-11-14 22:10:51 +00:00
Mark Liversedge
4332f7dd49 Merge pull request #1129 from rclasen/vhero
Upload to Velo Hero
2014-11-14 21:55:27 +01:00
Mark Liversedge
231f919aac Merge Wizard Mac Tweaks
.. a few tidy ups to make it look right
   when running on Mac OSX
2014-11-14 20:44:36 +00:00
Mark Liversedge
1f9a49f82d Merge pull request #1130 from Joern-R/gear1
Fix Gear Ratio SEGV - addition to Hack Fix
2014-11-14 19:47:27 +01:00
Mark Liversedge
baeee89f2e Updated Merge Tool Part 2c (last part)
.. UX to adjust now complete.

We may need to tidy a few things up, but this
is now good for working with the Moxy at the
very least.
2014-11-14 18:45:40 +00:00
Joern
60f437cd83 Fix Gear Ratio SEGV - addition to Hack Fix
... handle Gear Ratio as part of the existing logic - just without
smoothing
... solves SEGV problem in Compare Mode (and probably other areas of
AllPlot)
2014-11-14 19:42:53 +01:00
Cyclenerd
8ae0a6bef9 Upload to Velo Hero
Upload workouts (PWX export) to Velo Hero (http://www.velohero.com).

Author: Nils Knieling
Reviewed: Rainer Clasen
2014-11-14 17:54:25 +01:00
Mark Liversedge
26af23f4a1 Updated Merge Tool Part 2b of 2abc
.. need to save away with analyse() and combine()
   now complete, and working pretty well on my data

.. now to work on the last piece, the 'adjust' page
   to shift data-series left and right manually (for
   cases where the calculated offsets are wrong or
   need to be tweaked by the user)
2014-11-14 11:26:20 +00:00
Mark Liversedge
786cb60fdf Updated Merge Tool Part 2a of 2a/b
.. page flow and join sorted

.. committing before resolving the merging code
   - analyse() to identify offsets
   - combine() to merge into a working copy
   - ux for sliding offsets on a fullplot

.. next commit will complete this update to the
   merge tool

NOTE: MERGE IS NOT CURRENTLY WORKING SO PLEASE
      DO NOT USE IT !!!!
2014-11-13 20:02:25 +00:00
Mark Liversedge
4249bdece9 Gear Ratio SEGV Hack Fix
.. need to check if this hack fixes SEGV before raising
   with Joern.
2014-11-13 19:56:15 +00:00
Mark Liversedge
255a7901a9 Make Intervals view optional till v3.2
.. we will develop over the next few months but it will
   not be ready for v3.11 so making it optional.
2014-11-13 08:05:04 +00:00
Damien
ea007f91ec IntervalNavigator: Add the interval 2014-11-12 23:39:17 +01:00
Damien
5ae5ad3405 IntervalNavigator: Remove intervals from SubRide 2014-11-12 23:33:29 +01:00
Damien
8c6d0a9a69 IntervalNavigator: Add new files 2014-11-12 23:02:56 +01:00
Damien
534ef98a01 IntervalView: Add a new intervals View 2014-11-12 22:29:40 +01:00
Damien
b05e5048f2 RouteSegment: Add a new sidebar 2014-11-12 22:29:40 +01:00
Mark Liversedge
1f21434f1f Updated Merge Tool Part 1 of 2
.. data can be sourced from file, download or list

.. next to update the mode (join or merge) and the
   merge strategy and parameters.

.. will also need to update the download dialog to
   allow you to specify which downloaded rides to
   process -- at present the merge tool assumes that
   the download dialog will only return 1 result

.. pleased with the way the download dialog is embedded
   within the wizard, will use that for other things!
2014-11-12 12:55:35 +00:00
Mark Liversedge
1e29ff0465 JSON Strings and GC Tokens
.. fix json writing so that user metadata no longer conflicts
   with the tokens used by GoldenCheetah, e.g. a user entered
   "NM" in the workout code and that conflicted with the
   token used to delimit a torque value.

.. all user strings are now saved with a space " " appended to
   the value and when read, if there is a trailing space it is
   removed.
2014-11-12 06:28:31 +00:00
Mark Liversedge
29f7583d05 Add ride resampling method
.. to convert from one recording interval to another
   when merging files.

.. this is a utility function that will be used by the
   merge rides wizard
2014-11-11 16:38:18 +00:00
Mark Liversedge
83715ead91 Qwt support QT 5.4
.. we should think about removing our local version
   of QWT since we no longer need it.
2014-11-09 15:13:26 +00:00
Mark Liversedge
3ac9e560a0 Merge pull request #1124 from Joern-R/query
Namedsearches - Escape for XML special chars
2014-11-09 15:11:13 +01:00
Joern
c0b386be04 Namedsearches - Escape for XML special chars
... in the escape &, ' and " as special XML chars where missing
....... causing that a rule for cLucene with "&&" could be stored, but
got lost on reading
2014-11-09 15:06:46 +01:00
Mark Liversedge
d5dbac86e3 Merge pull request #1123 from amtriathlon/master
Fixed stored height setting to be in meters instead of cm
2014-11-09 15:02:33 +01:00
Alejandro Martinez
2f18d4e5ff Fixed stored height setting to be in meters instead of cm 2014-11-09 10:51:11 -03:00
Mark Liversedge
165684d999 Merge pull request #1122 from Joern-R/dir2
AthleteDirectory - Folder Structure - small fixes
2014-11-09 14:08:04 +01:00
Mark Liversedge
fdd9286367 Merge pull request #1121 from Joern-R/autoimport
AutoImport - 2nd version
2014-11-09 14:07:40 +01:00
Joern
8dbca72d46 AthleteDirectory - Folder Structure - small fixes
... New Athlete -> Unnecessary "Upgrade Popup" - removed
... Typo in Upgrade Popup Text fixed
2014-11-09 11:30:21 +01:00
Joern
1098848f1d AutoImport - 2nd version
... multiple pathes per Athlete (on Athlete-Preferences - AutoImport
TAB) - option per Path if Import shall be done or not (e.g. for
temporary de-activation without removig a path)
... configuration stored in XML file in /config subdir
... no "stealth" mode any more - but full log of Rides to be imported
with option to "Abort" the import process at any time
2014-11-09 10:58:23 +01:00
Mark Liversedge
a88316c9c5 Fix Spline resampling
.. should be periodic not natural

.. should apply to sub-second samples too !
2014-11-09 09:48:59 +00:00
Mark Liversedge
108c26ef3c Merge pull request #1120 from amtriathlon/master
Add heigth to athlete's data to use in GOVSS metric
2014-11-09 09:19:33 +01:00
Alejandro Martinez
c9e7b09bc9 Add heigth to athlete's data to use in GOVSS metric
Defaults to Stillman average based on weigth, allows per ride override.
2014-11-08 21:44:07 -03:00
Mark Liversedge
8a85c331be Data flags O (Moxy) and R (Running Dynamics)
.. for filtering.
2014-11-08 19:54:40 +00:00
Mark Liversedge
39a5695b58 Fix Merge Wizard Infinite Loop
.. before working on UX and Moxy support
2014-11-08 16:38:21 +00:00
Mark Liversedge
cce437f221 Fixup Moxy Download for circular data
.. the download has data in a circular buffer - when you overrun
   the buffer it starts back at the beginning and then downloads
   that data as-is.

.. we now sort the downloaded data before extracting it into rides
   and ignoring rides < 1 minute long.
2014-11-07 19:41:48 +00:00
Mark Liversedge
2692fe310c Update DB version for GOVSS
.. for Ale Martinez recent update
2014-11-07 06:48:28 +00:00
Mark Liversedge
d130cdd34a Merge pull request #1114 from amtriathlon/master
Initial GOVSS implementation
2014-11-07 07:45:05 +01:00
Alejandro Martinez
3a220af8f5 Initial GOVSS implementation
Includes LTP, RTP, IWF and GOVSS metrics with PMC integration
2014-11-06 22:09:35 -03:00
Mark Liversedge
cbce06c011 Moxy Download CSV
.. header missing CR at eol.
2014-11-06 22:14:58 +00:00
Mark Liversedge
a95a721f5e Tidy up Moxy download logging
.. more to the point and clean.

.. also gives update as data downloading to
   ressure user something is happening.
2014-11-06 19:44:04 +00:00
Mark Liversedge
0b23404ee7 Slightly Improved Moxy Download
.. split into separate rides when gap is greater
   than 30 minutes between samples

.. discard subsequent rides that are less than a
   minute long

BUT: Does not help resolve merge challenge and really
     should let the user select which rides to import
     regardless of how much data they contain.
2014-11-05 21:03:19 +00:00
Mark Liversedge
fb9c09234d Moxy Fit tHb
.. divide by 100 not 10
2014-11-04 22:00:59 +00:00
Mark Liversedge
8880c478c4 Basic Moxy Download 2 of 2
.. works for download and clear

.. is pretty basic as the downloaded data
   is treated as a single ride

.. need to think about how we can split into rides
   and refactor the tool to create multiple rides
   with the user selecting which to download.
2014-11-04 21:59:32 +00:00
Mark Liversedge
d5d51869b4 Added Moxy file for testing 2014-11-04 20:36:11 +00:00
Mark Liversedge
5eceef6dda Moxy FIT file support
.. type 54/57 in .fit file for thb and smO2
2014-11-04 14:31:17 +00:00
Mark Liversedge
4138bde7e9 Fix Moxy header copyright and ifdef 2014-11-03 20:34:00 +00:00
Mark Liversedge
ff6b90f8aa Basic Moxy Download 1 of 2
.. device IO is working ok

.. need to add in processing and creation
   of a ridefile in part 2
2014-11-03 20:30:35 +00:00
Mark Liversedge
3fd41860b1 Merge pull request #1111 from Joern-R/files1
AthleteDirectory - Folder Structure Part 2 of 2 + Always create .JSON
2014-11-02 19:55:47 +01:00
Joern
1011271269 AthleteDirectory - Folder Structure Part 2 of 2 + Always create .JSON
... create folder structure for existing and new athletes
... upgrade existing athlete to new structure when opening / incl.
logging and error handling
... convert any "Downloaded" file to .JSON directly - store source file
in /downloads
... convert any "Imported" file to .JSON directly - store source file in
/imports
2014-11-02 19:55:01 +01:00
Mark Liversedge
2266dcbfa9 Merge pull request #1109 from rclasen/timeriding
fix "Time Riding" for rides without kph
2014-11-02 17:26:08 +01:00
Mark Liversedge
d711b3a708 Merge pull request #1108 from rclasen/ltmcurves
LTM curves: edit metric on double click
2014-11-02 17:25:08 +01:00
Rainer Clasen
df830b9938 LTM curves: edit metric on double click
more comfortable alternative to select + click edit button: allow double
clicking on a row in the metric list to edit it's settings.
2014-11-02 16:27:18 +01:00
Rainer Clasen
213e9f7083 fix "Time Riding" for rides without kph
"Time Riding" was only calculated when the ride had kph values - although
it's then also including time without kph but cadence. This caused it to
skip all time spent on the trainer (... if there's no sensor on the rear
wheel).

This patch makes it consistently calculate "Time Riding" if there's kph or
cad... might be worth to count time with pwr or similar running metrics,
too.
2014-11-02 16:26:43 +01:00
Mark Liversedge
4e131cef20 Accidentally left a debug() in CsvRideFile
.. so deleting it !
2014-11-01 18:12:53 +00:00
Mark Liversedge
e9f130c136 Fix Help URLs
.. and add link to the forum
2014-11-01 17:25:23 +00:00
Mark Liversedge
3707725d7b More Moxy TimeStamps
.. x:x:x format without zero padding (!?) causes
   the QT fromString functions to fail.
2014-11-01 15:20:07 +00:00
Mark Liversedge
b1da921856 Always show span slider on ride plot
.. the left/right scrolling is useful and takes very little
   screen estate so always enable it

.. the full plot can still be show/hidden with the chart
   controls
2014-11-01 09:42:02 +00:00
Mark Liversedge
57fe05ac6d Realtime Moxy Part 2b of 3
.. added moxy to the realtime plots.

last piece is to update the realtime file format to
include moxy data -- moving away from powertap csv
2014-11-01 09:27:07 +00:00
Mark Liversedge
bb00268770 Realtime Moxy Part 2a of 3
.. telemetry is plotted in dialwindow

.. need to do a part b which is the realtime plot
   of thb, smo2, o2hb and hhb to complete part 2
2014-10-31 22:26:02 +00:00
Mark Liversedge
3dd2f2e99b Realtime Moxy Part 1 of 3
.. added config and page decoding for Moxy

Next steps are (2) add telemetry to realtime data structure
                   and display on the realtime chart and telemetry

               (3) add SmO2 and tHb to file format which means moving
                   away from powertap csv format (!)
2014-10-31 21:15:06 +00:00
Mark Liversedge
8ff99aca3c Moxy Reader update
.. get timestamp from file not line number (to make sure
   drops in recordings are not lost as they are numerous)

.. duplicate each line to get 1s recording that makes it
   easier to merge manually (until the merge function is
   fixed to handle these kinds of issues)
2014-10-31 15:25:26 +00:00
Mark Liversedge
99895d4a43 MIO GPX file support
.. power incorrectly stored as xml element named "power"
   and not "gpxdata:power"
2014-10-30 19:17:31 +00:00
Damien
fff1933eac RouteSegment: Small changes before bigger ones 2014-10-28 23:14:45 +01:00
Mark Liversedge
684aee0899 Better Ride View Setup
.. especially when in tiled mode
2014-10-26 08:28:29 +00:00
Mark Liversedge
5b5f9791a9 Merge pull request #1103 from Joern-R/files
AthleteDirectory - Introduce Folder Structure Part 1
2014-10-25 21:38:22 +02:00
Joern
6bd11c4290 AthleteDirectory - Folder Structure Part 1
... introduce new "home" Folder structure object representing the
previous flat-folder
... adjust relevant QDir home - access to use the sub-folder method of
the new object

Note: the new structure is not yet active ! - everything is written to
the main folder still

To Do:
... add upgrade procedure for existing folder content to merge to the
new folders
2014-10-25 19:08:27 +02:00
Mark Liversedge
00cf37c078 Expand to use space in Options/Prefs
.. when it is resized instead of just adding
   or removing space between close/save buttons
   and the config widgets
2014-10-25 11:43:54 +01:00
Mark Liversedge
920d844e06 Fix Avatar selection and make menu icon
.. when opening a new athlete
2014-10-25 11:14:11 +01:00
Mark Liversedge
01a411e65b Merge branch 'master' of github.com:/GoldenCheetah/GoldenCheetah 2014-10-25 09:52:16 +01:00
Mark Liversedge
8da31441e5 Train View closer to original
.. 'felt' upside down !
2014-10-25 09:51:40 +01:00
Mark Liversedge
fe8b278e61 Merge pull request #1102 from Joern-R/master
Wiki - Correction - Help About
2014-10-24 18:32:39 +02:00
Joern
55aa00f2c4 Wiki - Correction - Help About
... New Picture "Help-About" to document the Athlete Library Path
2014-10-24 18:30:58 +02:00
Joern
3a83068178 Gear Ratio - Coloring in PvPV plot
... option to show the datapoints depending on a gear ratio intervall
... gear-ratio 0 to 1 -> Red
... gear ratio 1.01 to 2.49 -> Yellow
... gear ratio 2.5 to 3.99 -> Green
... gear ratio 4 to max (7.00) -> Blue
2014-10-24 16:37:15 +02:00
Mark Liversedge
1138831ac7 Merge pull request #1101 from Joern-R/gear2
Gear Ratio - Coloring in PvPV plot
2014-10-24 16:36:56 +02:00
Mark Liversedge
e6ebf3a78b Train View Layout Update
.. show TSS and W' bal
.. reorganise to show realtime and performance plot
2014-10-24 14:44:51 +01:00
Mark Liversedge
682b6e8a61 Add HHb and O2Hb to Allplot
.. so you can now look at oxy v deoxy as a time
   series against hr and power.
2014-10-23 21:52:31 +01:00
Mark Liversedge
a6033b7e5e O2Hb and HHb added to AllPlot Controls
.. now for the slog to add to the charts !
2014-10-23 20:36:57 +01:00
Mark Liversedge
09225d7331 Add HHb and O2Hb derived series
.. to split oxy/deoxy haemoglobin
.. need to add to ride chart too
2014-10-23 20:14:27 +01:00
Mark Liversedge
ff20fd527f Placeholder for Moxy SandC cuckoo
.. the Moxy can be configured as a SandC sensor, so in
   readiness for ANT+ support in GC just adding code to
   spot it.

.. will also need to update this for when it is paired
   as a muscle oxygen monitor

.. will need to add SmO2 and tHb realtime data telemetry

.. will also need to add code to device config to notify
   when SandC is spotted as a moxy
2014-10-23 19:02:45 +01:00
Mark Liversedge
3757241456 Add W'bal TAU Config
.. it is only used in realtime mode
2014-10-23 13:26:51 +01:00
Mark Liversedge
1c2527bea2 Plot W'bal on the fly in train mode
.. uses a fixed TAU of 300s so need to add some
   way of configuring it for on the fly calculations
2014-10-23 12:12:23 +01:00
Mark Liversedge
ca49c8948f Fix W'bal in Train Performance Plot
.. code still needs to be refactored !
2014-10-23 09:15:10 +01:00
Mark Liversedge
e8f190b274 Merge pull request #1100 from Joern-R/gear1
Add Gear Ratio related functions in multiple areas
2014-10-22 17:19:14 +02:00
Joern
ec5c02432c Add Gear Ratio related functions in multiple areas
.. RideFile - add rounding approach for gear values (different roundings
depending on value) - leading to discrete GearRatio values
.. AllPlot - exclude Gear Ratio from Smoothing (to keep the discrete
value) - and change curve type to "Steps"
.. ScatterPlot - specific handling for GearRatio since values between
0.01 and 1 are relevant for GearRatio and must not be filtered out
.. RideFileChache - add Distribution Data for Gear Ratio and fix
Distribution Cache for DataSeries with > 0 decimalsFor
.. Histogram - add GearRatio to Histograms (both Rides and Trends)
2014-10-22 17:14:18 +02:00
Mark Liversedge
f1c545f119 Put SmO2 and tHb on more appropriate axis
.. as the scales were too high when shared with things like
   power and torque and made them difficult to see

.. also now color shared axis according to what are selected;
   so if only one series selected it will get that color rather
   than e.g. yLeft,0 always being red
2014-10-22 11:48:06 +01:00
Mark Liversedge
060c0dba90 Comment for pace zones
.. just to explain how they were derived
2014-10-21 09:12:26 +01:00
Mark Liversedge
0c86d94fee Merge pull request #1098 from amtriathlon/master
Changed default pace zone scheme
2014-10-20 18:56:36 +02:00
Alejandro Martinez
80d9478455 Changed default pace zone scheme to match the guidelines in Dr Skiba's book "The triathletes Guide to Training with Power" 2014-10-20 13:39:28 -03:00
Mark Liversedge
bc58d78479 Honor Pace units prefs in Summary/Interval Summary
.. for the original "Pace" metric
2014-10-17 21:59:29 +01:00
Mark Liversedge
3f37952dfc Quadratic Trend on LTM fencepost 2014-10-17 14:29:01 +01:00
Mark Liversedge
8eca2e74b4 Limit Gear Ratio
.. to whatever the maximumFor value is as dodgy data can
   yield really high values; anything over 6 is probably
   wrong for most high gears (53x10 = 5.3)
2014-10-16 22:38:48 +01:00
Mark Liversedge
72a7fd1dc0 3d plot new series
.. but there is a fidelity issue; need to take into
   account series with decimal places
2014-10-16 21:19:30 +01:00
Mark Liversedge
bfac86aab0 Scatterplot SmO2, tHB, Running, Gear ratio
.. bit of a catch up to add those series to the 2d plot
2014-10-16 20:54:16 +01:00
Mark Liversedge
338fbe17b2 Fix SEGV on Match labels isolation
.. needed an extra saveState() after labels have been
   added to the chart to reflect they have been wiped
2014-10-16 19:16:46 +01:00
Mark Liversedge
4a0674e204 Customise Colors for New Series
.. Moxy smo2 and thb
.. Garmin Running Dynamics
.. Gear Ratio
2014-10-16 18:33:25 +01:00
Mark Liversedge
0c93d5771d Ride Plot Running Dynamics and Moxy (2 of 2)
.. added to the ride plot, but now need to think
   about customising and setting a default color
   for the six (!) data series.
2014-10-16 17:23:35 +01:00
Mark Liversedge
5f46059638 AllPlotWindow Settings
.. still too big !
2014-10-16 11:54:53 +01:00
Mark Liversedge
0a88553192 Gear Ratio Derived Data Series
.. added to code but not displayed on allplot etc

.. will add to allplot when doing running dynamics and moxy
   data series (next couple of days)
2014-10-16 11:26:01 +01:00
Mark Liversedge
fd68d3df24 Ride Plot Running Dynamics and Moxy (1 of 2)
.. plotting the new running dynamics data series;
   ground contact time, vertical oscillation and cadence

.. plotting the moxy data;
   muscle oxygen (absolute) and haemoglobin mass (relative)

.. just added to the controls (AllPlotWindow)

.. part 2 is the slog to add to the plots (ugh)
2014-10-16 10:15:43 +01:00
Mark Liversedge
d6df536589 Ride Plot Settings
.. restructure to make some space for running dynamics
   and moxy muscle oxygen and haemoglobin mass
2014-10-16 09:51:25 +01:00
Damien
05581b3980 RouteSegment: Search routes in new ride 2014-10-15 23:22:51 +02:00
Mark Liversedge
cad84b1d0b Fix SEGV on webBridgeForRoute
.. same fix as applied to GoogleMapControl
2014-10-15 21:20:33 +01:00
Damien
a383de172b RouteSegment: Search route in interval 2014-10-15 21:08:09 +02:00
Mark Liversedge
63ac580f43 Add Running Pace Zones (2 of 3)
.. metrics for time in zone
.. summary on ride summary

Still need to add to cache, histograms and allow editing
of custom zones in a sensible manner (currently edited in kph/mph)
2014-10-14 12:13:08 +01:00
Mark Liversedge
7b3db94592 Copyright messages in PaceZones
.. in truth the code is largely a copy of Zones.{cpp,h}
   written by Sean, but it seemed a bit odd to not show
   that I introduced the file and the changes.

.. recognising that it doesn't /really/ matter much at all !
2014-10-12 22:15:12 +01:00
Mark Liversedge
c1791a9fe4 Add Running Pace Zones (1 of 3)
.. in this first part we just add the pace.zones file
   and basic configuration of critical velocity history
   in the configuration pane.

.. in part 2 we need to fixup custom zones and consider
   how they might be adjusted for VDOT/Daniels etc etc

.. in part 3 we need to add pace zones to the ridefile
   cache and then histogram and summary charts.
2014-10-12 22:06:05 +01:00
Mark Liversedge
d84ce64860 Merge pull request #1094 from Joern-R/autoimport
Auto/Stealth Ride Import when opening an Athlete
2014-10-12 21:02:35 +02:00
Joern
863cab2ddc Auto/Stealth Ride Import when opening an Athlete
...  import Ride Files automatically from a defined Directory per
Athlete
...  runs silently/without "Import Rides" Widget if the files can be
imported/copied/... without error or warning
...  Preferences->Athlete- defines
... the directory - per Athlete and- if the function is active at all
(default is OFF)
... the error handling
... report back ALL errors and warnings by opening the RideImportWizard
popup
... report back Errors and Warnings - but ignore the "File exists"
warning (so that the import directory can be continously supplied with
new files, without the need to remove the already imported ones)
2014-10-12 19:28:16 +02:00
Mark Liversedge
ba0666a0ee Fast W'bal integration
Dave Waterworth has fixed my implementation of W'bal to
remove my "optimisations" and fix the math.

The W'bal is now computed in a single pass and is just
as fast as the differential form from Andy Froncioni but
has the benefit that is still uses Tau.

Many thanks to Dave, and I'll write this up shortly.
2014-10-11 12:40:05 +01:00
Mark Liversedge
70e12e9075 Add Labels on Matches in Ride Plot
.. makes it easier to scan and see where it got to without
   having to mouse over the points one by one
2014-10-11 11:28:14 +01:00
Mark Liversedge
070492e208 Merge pull request #1079 from Joern-R/pull1
AllPlotWindow - Alt/Slope - improve texts
2014-10-10 21:33:01 +02:00
Mark Liversedge
3e36ffe4e5 Merge pull request #1089 from Joern-R/pull2
AllPlot: Some Curves missing - when "Stacked View" = "X" / "By Series" = " "
2014-10-10 20:20:31 +02:00
Joern
33c897ac04 AllPlot: in Stacked View = yes / By Series = no - Curves missing
... NP, AP, XP and TE, PS curve are not shown as indicated by "Checked"

when changing between rides, "Checked" settings are ignored
2014-10-10 19:38:17 +02:00
Damien
174735c7f4 AllPlot: show balance in stack view only if checked 2014-10-10 16:42:11 +02:00
Mark Liversedge
2e3e177fcf Google Map Overlay
.. and interval hover on marker

.. need to also show interval on hover as gray path
   but find a way of doing it without duping the code
   in the webpage js.
2014-10-09 22:20:15 +01:00
Mark Liversedge
7e78a25bdd Merge pull request #1082 from Joern-R/columns
Ride Navigator - Table View - Columns resizing improved
2014-10-08 21:04:03 +02:00
Joern
aa712fb4d6 Ride Navigator - Table View - Columns resizing improved
... improved resizing by not changing other column sizes in "resizing"
... considering keeping a minimum column size of 20
... consideringkeeping all columns within the visible widget space
2014-10-08 20:03:56 +02:00
Mark Liversedge
d71b9b6669 Merge branch 'master' of github.com:/GoldenCheetah/GoldenCheetah 2014-10-03 22:09:35 +01:00
Damien
2228a401d3 Bin2RideFile: Correct invalid ride time after pause+interval 2014-10-03 22:09:14 +01:00
Mark Liversedge
747423d3b6 Slope/Alt Color Scheme
.. changed to match typical col profile color schemes
2014-10-03 22:08:22 +01:00
Damien
c55bac66ff Bin2RideFile: Correct invalid ride time after pause+interval 2014-10-03 17:55:42 +02:00
Damien
6efc3ad8f1 RouteSegment: Manage RouteSegment (alpha version) 2014-10-02 22:55:54 +02:00
Joern
f5ecbd33d9 AllPlotWindow - Alt/Slope - improve texts
... improve texts for Imperial unit setting
2014-10-02 12:53:26 +02:00
Mark Liversedge
85bcc60456 Add Garmin FR620 Device Type
.. to FitRideFile
2014-09-30 18:36:03 +01:00
Mark Liversedge
8d1945a9d7 Merge pull request #1078 from Joern-R/pull2
AllPlot - Alt/Slope - sync. setting when switching between views
2014-09-30 19:03:48 +02:00
Joern
2778fdd296 AllPlot - Alt/Slope - switching between views
... the Alt/Plot settings were not in sync between standard anc compare
view (changes in compare view had not impact on standard view - when
de-activating compare)
... Alt/Plot is now also visible in "fullPlot" as this helps to find
sections to zoom in (by checking the color coding)
2014-09-30 17:33:48 +02:00
Mark Liversedge
3743d0eb46 Code Nit Fixups
.. compile time errors and warnings for recent commits
   on slope / altitude.
2014-09-30 12:32:15 +01:00
Mark Liversedge
5ff35cefcd Merge pull request #1077 from jonbev/Move-Slope-to-Derived
Move slope to derived
2014-09-30 13:23:10 +02:00
Jon Beverley
7a4e8e6273 Move slope to derived in RideFile 2014-09-30 12:18:08 +01:00
Mark Liversedge
8b923af8de Merge pull request #1076 from Joern-R/pull_allplot
All-Plot - Add "Slope" and "Alt/Slope" curves
2014-09-30 13:12:54 +02:00
Joern
a6bb2360e2 All-Plot - Add "Slope" and "Alt/Slope" curves
... add "Slope" curve based on Slope Data in Ride Files (with separate
new color)
... add "Alt/Slope" curve based on "Altitude" data series
... sections on "Alt/Slope" have 3 options -  1min/100 m OR 5min/500 m
OR 10min/1000 m
... color / slope assignments are defined in AllPlotSlopeCurve (to look
it up)
... if a plotted section is wide enough the slope % (distance) / VAM
(time) value is shown above
2014-09-30 12:41:06 +02:00
Mark Liversedge
819ee2ed10 Fix UUID for Season
.. must be unique as used to select even when
   name is changed or translated.

.. Thanks to Claus Assmann for the fix.
2014-09-27 10:09:14 +01:00
Mark Liversedge
1e658af11d Don't summarise power zones on runs
.. will need to show pace when its ready
2014-09-26 14:45:20 +01:00
Mark Liversedge
43a9e12e15 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
6c31a8c476 Metadata Completer Wildcard
.. if you set the values list to '*' in the metadata
   configuration it will inline expand to any previously
   entered value.
2014-09-26 12:02:12 +01:00
Mark Liversedge
f2634728fc Differentiate between Runs and Rides
.. isRun() and associated logic
.. ride list darkens runs so they stand out
2014-09-26 11:09:07 +01:00
Mark Liversedge
fa8f6d5326 Fix Copy/Paste Precision
.. Copy in the ride editor lost some precision for the
   lat/lon fields which made it unusable for copying gps
   data into spreadsheets etc.

Fixes #1074
2014-09-26 09:30:47 +01:00
Mark Liversedge
b383dcc6b1 Matches tidy
.. no need for 1 dp
.. no need for unit description
2014-09-25 22:37:10 +01:00
Mark Liversedge
fc064abe3f OOps. Colors for last commit
.. used wrong version, this is more in keeping with the
   color approach and stock colors; darkGray and PLOTMARKER.
2014-09-25 19:22:48 +01:00
Mark Liversedge
7f93ed2761 Highlight best if today !
.. on the trend summary, if the best is for today then
   lets highlight it so it jumps out :)
2014-09-25 19:17:24 +01:00
Mark Liversedge
b1bc12d853 Add Garmin Running Dynamics Data
.. read from FIT/TCX
.. write to JSON
.. view in Editor

NOTE: They are not on any of the charts yet.
2014-09-25 14:31:06 +01:00
Mark Liversedge
b7be0c762f Merge pull request #1065 from Joern-R/pull1
Last Opened Athlete stored
2014-09-19 16:01:51 +02:00
Mark Liversedge
3d2b66f9d8 Initialise Record count WKO+ file reader
.. don't accept an empty wko+ file.

Fixes #1064
2014-09-19 13:40:10 +01:00
Mark Liversedge
d220606eac Fix RideNavigator No Focus text color
.. was gray on gray which didn't work well !
2014-09-19 11:04:01 +01:00
Joern
9df18020fe Last Opened Athlete stored
... last opened was not stored any more in 3.1 final build
2014-09-17 18:50:30 +02:00
Mark Liversedge
be06e4f5d2 Merge pull request #1059 from Joern-R/pull2
AllPlot - Smoothing also for "Left Border"
2014-09-14 16:43:05 +02:00
Joern
f9163a091f AllPlot - Smoothing also for "Left Border"
Problem:
... data points of "Smoothing" settings are set to Zero in result
... this cause e.g. Zero Altitude Values when Plot Smoothing is active
Solution:
... also most left values are "smoothed" now (using only the datapoint
left of them to create the average)
2014-09-14 16:05:43 +02:00
Mark Liversedge
54f23bbab4 TP.com fixups
.. title metadata

.. title of dialog
2014-09-12 13:18:38 +01:00
Jon Beverley
17a17b0c70 Ignore src/debug/ folder 2014-09-11 15:20:55 +01:00
Damien
ab7d624c18 CPPlot: Power zone shading for watts/kg 2014-09-09 22:42:52 +02:00
Damien
c0de924272 CPPlot: correct xBttom axis ticks 2014-09-09 22:29:31 +02:00
Mark Liversedge
83a5f74c3c Add HrNp Ratio
.. to echo HrPw
2014-09-09 16:11:02 +01:00
Mark Liversedge
84f373dda5 Add HrPw Metric
.. as a ratio of Average Power to Average Heartrate
   hrpw = ap / ahr
2014-09-07 22:15:12 +01:00
Mark Liversedge
51155007bd Add Last 2 Months to Seasons
.. jump from 38 days to 3 months is a bit much
2014-09-07 17:36:48 +01:00
Mark Liversedge
56be3d2fb1 Make no video the default
.. in gcconfig.pri

Fixes #1052
2014-09-06 11:46:40 +01:00
Mark Liversedge
fa1b3a73ac Merge pull request #1050 from Joern-R/pull3
New Metrics for MTB(mainly) - Bike - Time Carrying / Elevation Gain Carrying
2014-09-05 13:52:46 +02:00
Joern
b2bab736fe New Metrics for MTB - Bike Carrying Time/Elevation Gain
... 2 new metrics (estimates) mainly relevant for MTB or Race bike steep
passes
... a) Time Carrying = moving < 8kph, gaining height, no power, no
cadence
... b) Elevation Gain carring = same criteria, but adding up the
elevation gain

Since there is a certain level of error, the metrics is named as "Est".
2014-09-05 13:31:21 +02:00
Mark Liversedge
1e53d14d7b Merge pull request #1049 from Joern-R/master
JSON char > 127 codepage problem (Issue #1028)
2014-09-04 22:00:55 +02:00
Joern
77ba548d6a Revert "Revert "JSON char > 127 codepage problem""
This reverts commit 91397851a10739350339743d89467cfa5a38fc24.
2014-09-04 19:50:24 +02:00
Mark Liversedge
2dfe65a714 Merge pull request #1048 from jonbev/HeatMap
Typo correction on maxLat
2014-09-04 14:42:44 +02:00
Jonathan Beverley
85b94f7eb1 Typo correction on maxLat 2014-09-04 13:36:47 +01:00
Mark Liversedge
8733a34e50 Merge pull request #1047 from jonbev/HeatMap
Heat map
2014-09-04 13:59:40 +02:00
Jon Beverley
ad014b12ba Change Heatmap to use google maps 2014-09-04 12:50:57 +01:00
Jon Beverley
15629dc58e Add Heat Map 2014-09-04 12:50:57 +01:00
Damien
459c5d5c51 CPPlot: Correct crash after switching between Veloclinic and Power plot 2014-09-04 07:31:11 +02:00
Damien
75d801287a CPPlot: Correct time for wprime 2014-09-03 23:06:52 +02:00
Damien
5379728496 CPPlot: Add ride plot for veloclinic plot 2014-09-01 22:18:34 +02:00
Damien
9f4c225ee4 CPPlot: Place shade mode labels for veloclinic plot 2014-09-01 21:54:32 +02:00
Damien
8f88918ca6 CPPlot: Standard ScaleDraw (not time) for velocliniplot 2014-09-01 21:37:16 +02:00
Damien
4292a24290 CPPlot: Add Veloclinic plot
TODO :
  no percentage or heat in this plot
  compare mode
  cp adjustment if no model
  ...
2014-08-31 22:09:28 +02:00
Mark Liversedge
f3313e7fa1 Missing from last commit 2014-08-29 19:30:57 +01:00
Mark Liversedge
1714e2fbc8 Apply fix tools early
.. when opening a file and they are 'auto' so the results can
   be used by the derived tool (does NP etc)
2014-08-29 16:29:53 +01:00
Mark Liversedge
0730f467be Add a tool to derive Torque
.. will be useful to look id out of saddle efforts in
   conjunction with delta torque
2014-08-29 14:49:38 +01:00
Mark Liversedge
1c1fe58587 Show ride count in ride summary
.. when doing a date range, not just in compare mode
2014-08-29 13:25:32 +01:00
Mark Liversedge
9dc98ac314 W'bal calc optimise
.. use exp() not pow()
2014-08-28 22:59:23 +01:00
Mark Liversedge
872e6c4006 Fix Derive Power fixup for auto run
.. if power is already present, or alt or speed are missing
   then the fix derive power postProcess won't try and derive
   power for the ride

.. this is so you can add it as an 'auto' tool and derive power
   values for rides that don't have power but do have speed and
   altitude.
2014-08-28 22:05:07 +01:00
Mark Liversedge
12f4a8ac6e Merge pull request #1039 from jonbev/PercentagePowerAdjustTool
Add power adjustment tool
2014-08-28 17:58:55 +02:00
Jon Beverley
414589b36c Add power adjustment tool 2014-08-28 16:57:12 +01:00
Mark Liversedge
aab1b2f936 Fixup Derive Power Tool
.. don't set cadence to 85, use 85 as default if cadence absent
.. some small code nits to shutup compiler
2014-08-28 16:38:59 +01:00
Mark Liversedge
3701f65a2d Fixup src.pro
.. FixElevation listed with Qxt src files
2014-08-28 16:24:10 +01:00
Mark Liversedge
684a3f3ad2 Merge pull request #1014 from jonbev/FixElevation
Fix elevation
2014-08-28 17:22:19 +02:00
Jon Beverley
64860d9547 Merge remote-tracking branch 'origin/FixElevation' into FixElevation 2014-08-28 16:19:08 +01:00
Jon Beverley
d029f2cc26 Fix line endings in src.pro 2014-08-28 16:18:51 +01:00
Jon Beverley
490d35236e Add fix elevation
Added useFilter=true onto the mapquest call and added a bit of smoothing
2014-08-28 16:13:32 +01:00
Mark Liversedge
20d3cb9a1d Merge pull request #1038 from jonbev/DerivePowerInFixTool
Derive power in fix tool
2014-08-28 17:05:04 +02:00
Jon Beverley
86bd5338cf Merge remote-tracking branch 'origin/DerivePowerInFixTool' into DerivePowerInFixTool 2014-08-28 15:46:01 +01:00
Jon Beverley
b7039d49a6 Add acceleration adjustments
Cap power at 1000w
2014-08-28 15:45:26 +01:00
Jon Beverley
7c074da9d2 Move Derive power to own fix tool 2014-08-28 15:45:25 +01:00
Jon Beverley
9e555b0896 Add acceleration adjustments
Cap power at 1000w
2014-08-28 15:33:59 +01:00
Jon Beverley
9ca4b8d8e9 Move Derive power to own fix tool 2014-08-28 10:07:41 +01:00
Mark Liversedge
323486badc Added Motor Units to the science doc 2014-08-25 15:16:49 +01:00
Mark Liversedge
d625a58eb5 Matches metric
.. how many >2kj matches did you burn ?

.. also taken out the power/slope derived data series
   since Jon is migrating it to a fix tool
2014-08-23 20:08:46 +01:00
Mark Liversedge
008506cc67 Less qDebug on ANT+
.. it seems to be working ok

.. it provides too much output, even for debugging purposes

.. it isn't relavent for 99% of users now its in the master
   repository and being compiled up and used
2014-08-23 12:49:03 +01:00
Mark Liversedge
b5a4791923 Fix Crash on Clear during LTM compare seasons
.. initialising settings too late.
2014-08-22 19:09:41 +01:00
Mark Liversedge
25b260a078 Merge pull request #1033 from dresco/cadence_fix
Fix for cadence only sensor
2014-08-22 19:09:43 +02:00
Mark Liversedge
9150290a0d Recognise Omar Torres 2014-08-22 16:44:55 +01:00
Mark Liversedge
70b864d79f Merge pull request #1032 from amtriathlon/master
Spanish translation fixes contributed by Omar Torres
2014-08-22 17:42:27 +02:00
Alejandro Martinez
895182a0dd Spanish translation fixes contributed by Omar Torres (omar.torres@gmail.com) 2014-08-22 12:10:44 -03:00
Jon Escombe
5b3ff1aaea Fix for cadence only sensor
Was not detecting that pedalling had stopped, therefore the previous
cadence rate was displayed indefinitely.
2014-08-22 14:13:33 +01:00
Mark Liversedge
f6c7f1e06a Science Doc Updates
.. remove references to aerobic and anaerobic threshold as they
   are not really used in the literature anymore

.. remove talk of training interventions and just point out that
   power at LT2 (CP/FTP) is a good indicator of endurance performance

.. we should add a section on MU recruitment and fatigue and
   training interventions with the new features in v3.2
2014-08-22 10:03:22 +01:00
Mark Liversedge
67ec20d000 Merge pull request #1031 from amtriathlon/master
Fixes translation error found by spanish users
2014-08-21 19:21:59 +02:00
Alejandro Martinez
cb2a8a8870 Fixed spanish translation error reported by 3.1 user 2014-08-21 14:00:23 -03:00
Mark Liversedge
a5e5f77190 Merge pull request #1023 from Joern-R/pull1
Add new metric - Elevation Loss
2014-08-20 19:46:22 +02:00
Joern
8b20da0f7c Add new metric - Elevation Loss
... for rides having different start/end points (e.g. stage races) this
metric adds information
2014-08-20 19:42:47 +02:00
Mark Liversedge
9f4a2646fb Fix Constant Alt Initialisation Bug
.. now inits the bool.
2014-08-20 08:39:26 +01:00
Mark Liversedge
d6b0598b7e Set start time/km to zero
.. when opening a ride file.
2014-08-19 18:50:14 +01:00
Mark Liversedge
97bdd039a9 Charette not Charete 2014-08-18 21:51:02 +01:00
Mark Liversedge
1c11cb6841 QVector::length() is QT5 only
.. so changed to count() which does the same.
2014-08-18 17:39:58 +01:00
Mark Liversedge
80316ae81b Recognise Christian Charete
.. in the contributors
2014-08-18 16:08:28 +01:00
Christian Charete
9a58968b2f Mac compile error on no libusb 2014-08-18 16:07:06 +01:00
Jon Beverley
3e679e5c19 Fix line endings in src.pro 2014-08-18 12:27:40 +01:00
Mark Liversedge
7de5ce30cf Update build id for 3.11 development 2014-08-18 10:18:17 +01:00
Mark Liversedge
f97338d37b Default for "Title" when uploading
.. via "Chris C" on the developer list.
2014-08-18 10:08:51 +01:00
Mark Liversedge
4ab6cb1aed Merge pull request #995 from jonbev/upstream
Add Derived Data (slope & power so far)
2014-08-18 10:56:45 +02:00
Mark Liversedge
aa7152e303 KICKR ANT+ Initial Support
.. the code has been updated to support the Wahoo Kickr
   via an ANT+ USB stick.

.. this requires the Kickr to be running a beta firmware
   of version v1.3.15. This can only be loaded via the
   Wahoo utility.

.. for those that have access to the beta firmware this
   patch will work, for all others they will need to wait
   for the formal release by Wahoo.

.. the code contains *lots* of debug and does not yet support
   calibration and slope mode is largely untested.
2014-08-18 09:46:04 +01:00
Jon Beverley
00befa4703 Add fix elevation
Added useFilter=true onto the mapquest call and added a bit of smoothing
2014-08-15 10:55:35 +01:00
Jon Beverley
e7484d561e Add power estimation
Need to be able to add parameters for users to adjust their drag factors
numbers currently work out not too bad for me but needs testing with
more ride files. I have tried it with Mark's Marmotte file and it
doesn't do too bad.

Please feel free to rip it apart and tell me it is wrong - its a good
start hopefully.
2014-08-02 12:51:31 +01:00
Jon Beverley
13a88d254a Revert "Add Fenix2 to Garmin Devices"
This reverts commit c6112bd13c.
2014-08-01 08:00:14 +01:00
Jon Beverley
949cd43c19 Add Fenix2 to Garmin Devices 2014-07-30 16:52:07 +01:00
Jon Beverley
48db053704 Derive Slope Data
- If Alt data present then calculate slope
- Smooth the slope data after calculation
2014-07-30 16:42:45 +01:00
538 changed files with 170367 additions and 53444 deletions

29
.gitignore vendored
View File

@@ -1,4 +1,5 @@
Makefile
.qmake.stash
# old skool
.svn
@@ -14,15 +15,19 @@ lib/
bin/
plugins/
resources/
qwt/src/debug/
qwt/src/release/
src/Makefile.Debug
src/Makefile.Release
src/object_script.GoldenCheetah.Debug
src/object_script.GoldenCheetah.Release
qwt/src/object_script.libqwt.Release
qwt/src/object_script.libqwtd.Debug
qwt/src/Makefile.Release
qwt/src/Makefile.Debug
build.pro.user
src/debug/
src/release/
qwt/src/debug/
qwt/src/release/
src/Makefile.Debug
src/Makefile.Release
src/object_script.GoldenCheetah.Debug
src/object_script.GoldenCheetah.Release
qwt/src/object_script.libqwt.Release
qwt/src/object_script.libqwtd.Debug
qwt/src/Makefile.Release
qwt/src/Makefile.Debug
qwt/textengines/mathml/debug/
qwt/textengines/mathml/release/
build.pro.user

View File

@@ -5,8 +5,8 @@
Mark Liversedge
John Ehrlinger
May 2011
Version 1.1
Jan 2015
Version 1.2
A walkthrough of building GoldenCheetah from scratch on Ubuntu linux. This walkthrough
should be largely the same for any Linux distro.
@@ -30,8 +30,6 @@ CONTENTS
- bison
- libical - Diary window and CalDAV support (google/mobileme calendar integration)
- libvlc - Video playback in training mode
- clucene - Indexing/Searching ride files
1. BASIC INSTALLATION WITH MANDATORY DEPENDENCIES
=================================================
@@ -373,30 +371,3 @@ VLC_INSTALL = /usr/include/vlc/
$ make clean
$ qmake
$ make
CLUCENE - Indexing and Searching ride files (search box)
--------------------------------------------------------
You will need clucene runtime and core libraries, we developed against 0.9.21b-2 but
any 0.9 branch should work fine, let us know if you experience any issues. You may find
that the libclucene0ldbl runtime is already installed, this is fine and typical since
clucene is a very popular search library.
$ sudo apt-get install libclucene-dev
$ sudo apt-get install libclucene0ldbl
By default, and this is deliberate, the clucene install places the config headers into
a platform specific location. For my install I just copy the platform (linux) specific
header config into the normal /usr/include/CLucene directory with the following:
$ sudo cp /usr/lib/CLucene/clucene-config.h /usr/include/CLucene
Next we need to comment out the two CLUCENE lines in gcconfig.pri and they should read:
CLUCENE_INCLUDE = /usr/include/CLucene
CLUCENE_LIBS = -lclucene
$ make clean
$ qmake
$ make

View File

@@ -4,8 +4,8 @@
Mark Liversedge
Nov 2011
Version 1.1
Jan 2015
Version 1.2
A walkthrough of building GoldenCheetah from scratch on Mac OSX. This was performed
on Mac OSX Lion (10.7) but the instructions are largely the same for all versions of
@@ -25,7 +25,6 @@ CONTENTS
- libkml
- libusb
- libical
- libclucene
1. BASIC INSTALLATION WITH MANDATORY DEPENDENCIES
@@ -297,15 +296,3 @@ libical (0.46)
first run autogen.sh
then
./configure CFLAGS="-isysroot /Developer/SDKs/MacOSX10.7.sdk -arch x86_64" --disable-dependency-tracking
2.7 clucene
-----------
DO NOT USE THE MACPORTS VERSION (0.9.23) IT DOES NOT WORK.
git clone git://clucene.git.sourceforge.net/gitroot/clucene/clucene
cmake -G "Unix Makefiles"
make
sudo make install
will install clucene into /usr/local/include/clucene and /usr/local/lib

View File

@@ -0,0 +1,316 @@
From 7be04e65a53b22ce382d640a6c409b5d3bfe5645 Mon Sep 17 00:00:00 2001
From: Joern <joern.rm@gmail.com>
Date: Sat, 20 Dec 2014 12:42:37 +0100
Subject: [PATCH] Patch-Windows-MingGW-subset for GC
... reduce the libs in Make to what GoldenCheetah needs
... add two functions missing in MingGW standard libs
---
Makefile.am | 2 +-
configure.ac | 44 -------------------
src/Makefile.am | 2 +-
src/kml/base/file_posix.cc | 102 ++++++++++++++++++++++++++++++++++++++++++++
src/kml/base/string_util.cc | 17 ++++++++
third_party/Makefile.am | 42 +++---------------
6 files changed, 126 insertions(+), 83 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 2be0803..e29201e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
ACLOCAL_AMFLAGS = -I m4
# Order is important:
-SUBDIRS = third_party src testdata examples msvc xcode
+SUBDIRS = third_party src
EXTRA_DIST = \
AUTHORS \
diff --git a/configure.ac b/configure.ac
index d5fa75f..033128b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -203,23 +203,6 @@ AC_CHECK_LIB(pthread, pthread_create,,
AC_CONFIG_FILES([
Makefile
- examples/Makefile
- examples/domviewer/Makefile
- examples/engine/Makefile
- examples/gpx/Makefile
- examples/gx/Makefile
- examples/hellonet/Makefile
- examples/helloworld/Makefile
- examples/java/Makefile
- examples/kml/Makefile
- examples/python/Makefile
- examples/regionator/Makefile
- examples/wxregionator/Makefile
- examples/wxviewer/Makefile
- examples/xsd/Makefile
- msvc/Makefile
- msvc/examples/Makefile
- msvc/tests/Makefile
src/Makefile
src/kml/Makefile
src/kml/convenience/Makefile
@@ -228,34 +211,7 @@ AC_CONFIG_FILES([
src/kml/regionator/Makefile
src/kml/base/Makefile
src/kml/xsd/Makefile
- src/swig/Makefile
- src/swig/java/Makefile
- src/swig/python/Makefile
- testdata/Makefile
- testdata/atom/Makefile
- testdata/balloon/Makefile
- testdata/csv/Makefile
- testdata/deprecated/Makefile
- testdata/gdata/Makefile
- testdata/gmaps/Makefile
- testdata/gpx/Makefile
- testdata/gx/Makefile
- testdata/kml/Makefile
- testdata/kmz/Makefile
- testdata/kmz/files/Makefile
- testdata/kmz/kmzfiles/Makefile
- testdata/kmz/rumsey/Makefile
- testdata/kmz/rumsey/kml/Makefile
- testdata/kmz/rumsey/imagery/Makefile
- testdata/links/Makefile
- testdata/style/Makefile
- testdata/style/weather/Makefile
- testdata/update/Makefile
- testdata/xal/Makefile
- testdata/xsd/Makefile
third_party/Makefile
- xcode/Makefile
- xcode/LibKML/Makefile
])
AC_OUTPUT
diff --git a/src/Makefile.am b/src/Makefile.am
index 0bf15ac..721209e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = kml swig
+SUBDIRS = kml
# TODO: use the phc files in msvc.
EXTRA_DIST = \
diff --git a/src/kml/base/file_posix.cc b/src/kml/base/file_posix.cc
index b9461c0..920a996 100644
--- a/src/kml/base/file_posix.cc
+++ b/src/kml/base/file_posix.cc
@@ -33,8 +33,110 @@
#include <sys/stat.h>
#include <unistd.h> // For unlink, close.
+// START PATCH
+#include <fcntl.h>
+#include <sys/time.h>
+#include <sys/stat.h>
+// END PATCH
+
namespace kmlbase {
+// START PATCH
+// Implementation of missing functions
+
+/* mkstemp extracted from libc/sysdeps/posix/tempname.c. Copyright
+ (C) 1991-1999, 2000, 2001, 2006 Free Software Foundation, Inc.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version. */
+
+static const char letters[] =
+"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
+
+/* Generate a temporary file name based on TMPL. TMPL must match the
+ rules for mk[s]temp (i.e. end in "XXXXXX"). The name constructed
+ does not exist at the time of the call to mkstemp. TMPL is
+ overwritten with the result. */
+int
+mkstemp (char *tmpl)
+{
+ int len;
+ char *XXXXXX;
+ static unsigned long value;
+ unsigned long random_time_bits;
+ unsigned int count;
+ int fd = -1;
+ int save_errno = errno;
+
+ /* A lower bound on the number of temporary files to attempt to
+ generate. The maximum total number of temporary file names that
+ can exist for a given template is 62**6. It should never be
+ necessary to try all these combinations. Instead if a reasonable
+ number of names is tried (we define reasonable as 62**3) fail to
+ give the system administrator the chance to remove the problems. */
+#define ATTEMPTS_MIN (62 * 62 * 62)
+
+ /* The number of times to attempt to generate a temporary file. To
+ conform to POSIX, this must be no smaller than TMP_MAX. */
+#if ATTEMPTS_MIN < TMP_MAX
+ unsigned int attempts = TMP_MAX;
+#else
+ unsigned int attempts = ATTEMPTS_MIN;
+#endif
+
+ len = strlen (tmpl);
+ if (len < 6 || strcmp (&tmpl[len - 6], "XXXXXX"))
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+/* This is where the Xs start. */
+ XXXXXX = &tmpl[len - 6];
+
+ /* Get some more or less random data. */
+ {
+ struct timeval tv;
+ gettimeofday (&tv, NULL);
+ random_time_bits = ((uint64_t) tv.tv_usec << 16) ^ tv.tv_sec;
+ }
+ value += random_time_bits ^ getpid ();
+
+ for (count = 0; count < attempts; value += 7777, ++count)
+ {
+ unsigned long v = value;
+
+ /* Fill in the random bits. */
+ XXXXXX[0] = letters[v % 62];
+ v /= 62;
+ XXXXXX[1] = letters[v % 62];
+ v /= 62;
+ XXXXXX[2] = letters[v % 62];
+ v /= 62;
+ XXXXXX[3] = letters[v % 62];
+ v /= 62;
+ XXXXXX[4] = letters[v % 62];
+ v /= 62;
+ XXXXXX[5] = letters[v % 62];
+
+ fd = open (tmpl, O_RDWR | O_CREAT | O_EXCL, _S_IREAD | _S_IWRITE);
+ if (fd >= 0)
+ {
+ errno = save_errno;
+ return fd;
+ }
+ else if (errno != EEXIST)
+ return -1;
+ }
+
+ /* We got out of the loop because we ran out of combinations to try. */
+ errno = EEXIST;
+ return -1;
+}
+// END PATCH
+
// Internal to the POSIX File class.
static bool StatFile(const char* path, struct stat* stat_data) {
struct stat tmp;
diff --git a/src/kml/base/string_util.cc b/src/kml/base/string_util.cc
index b3a9654..3fdba2b 100644
--- a/src/kml/base/string_util.cc
+++ b/src/kml/base/string_util.cc
@@ -31,6 +31,23 @@
namespace kmlbase {
+// START PATCH
+int strncasecmp(const char *s1, const char *s2, size_t n) {
+ while (*s1 != 0 && tolower(*s1) == tolower(*s2)) {
+ ++s1;
+ ++s2;
+ }
+
+ return
+ (*s2 == 0)
+ ? (*s1 != 0)
+ : (*s1 == 0)
+ ? -1
+ : (tolower(*s1) - tolower(*s2));
+}
+
+// ENDPATCH
+
void b2a_hex(uint32_t i, char* out) {
char map[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'a', 'b', 'c', 'd', 'e', 'f'};
diff --git a/third_party/Makefile.am b/third_party/Makefile.am
index b73dec3..fe34dea 100644
--- a/third_party/Makefile.am
+++ b/third_party/Makefile.am
@@ -12,7 +12,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/third_party/zlib-1.2.3/contrib \
-I$(top_srcdir)/third_party/gtest-1.7.0/include
lib_LTLIBRARIES = libminizip.la liburiparser.la
-noinst_LTLIBRARIES = libgtest.la libgtest_main.la
+#noinst_LTLIBRARIES = libgtest.la libgtest_main.la
libminizip_la_SOURCES = \
zlib-1.2.3/contrib/minizip/unzip.c \
@@ -83,11 +83,11 @@ libboostconfigplatforminclude_HEADERS = \
$(boost)/config/platform/linux.hpp \
$(boost)/config/platform/macos.hpp
-libgtest_la_SOURCES = \
- gtest-1.7.0/src/gtest-all.cc
+#libgtest_la_SOURCES = \
+# gtest-1.7.0/src/gtest-all.cc
-libgtest_main_la_SOURCES = gtest-1.7.0/src/gtest_main.cc
-libgtest_main_la_LIBADD = libgtest.la
+#libgtest_main_la_SOURCES = gtest-1.7.0/src/gtest_main.cc
+#libgtest_main_la_LIBADD = libgtest.la
# TODO: add the new gtest libs for windows.
# gtest-1.7.0.win32/debug/gtest.lib \
@@ -149,38 +149,6 @@ EXTRA_DIST = \
$(boost)/config/stdlib/sgi.hpp \
$(boost)/config/stdlib/stlport.hpp \
$(boost)/config/stdlib/vacpp.hpp \
- gtest-1.7.0/include/gtest/gtest-death-test.h \
- gtest-1.7.0/include/gtest/gtest-message.h \
- gtest-1.7.0/include/gtest/gtest-param-test.h \
- gtest-1.7.0/include/gtest/gtest-param-test.h.pump \
- gtest-1.7.0/include/gtest/gtest-printers.h \
- gtest-1.7.0/include/gtest/gtest-spi.h \
- gtest-1.7.0/include/gtest/gtest-test-part.h \
- gtest-1.7.0/include/gtest/gtest-typed-test.h \
- gtest-1.7.0/include/gtest/gtest.h \
- gtest-1.7.0/include/gtest/gtest_pred_impl.h \
- gtest-1.7.0/include/gtest/gtest_prod.h \
- gtest-1.7.0/include/gtest/internal/gtest-death-test-internal.h \
- gtest-1.7.0/include/gtest/internal/gtest-filepath.h \
- gtest-1.7.0/include/gtest/internal/gtest-internal.h \
- gtest-1.7.0/include/gtest/internal/gtest-linked_ptr.h \
- gtest-1.7.0/include/gtest/internal/gtest-param-util-generated.h \
- gtest-1.7.0/include/gtest/internal/gtest-param-util-generated.h.pump \
- gtest-1.7.0/include/gtest/internal/gtest-param-util.h \
- gtest-1.7.0/include/gtest/internal/gtest-port.h \
- gtest-1.7.0/include/gtest/internal/gtest-string.h \
- gtest-1.7.0/include/gtest/internal/gtest-tuple.h \
- gtest-1.7.0/include/gtest/internal/gtest-tuple.h.pump \
- gtest-1.7.0/include/gtest/internal/gtest-type-util.h \
- gtest-1.7.0/include/gtest/internal/gtest-type-util.h.pump \
- gtest-1.7.0/src/gtest-death-test.cc \
- gtest-1.7.0/src/gtest-filepath.cc \
- gtest-1.7.0/src/gtest-internal-inl.h \
- gtest-1.7.0/src/gtest-port.cc \
- gtest-1.7.0/src/gtest-printers.cc \
- gtest-1.7.0/src/gtest-test-part.cc \
- gtest-1.7.0/src/gtest-typed-test.cc \
- gtest-1.7.0/src/gtest.cc \
uriparser-0.7.5/COPYING \
uriparser-0.7.5.win32/debug/uriparser.lib \
uriparser-0.7.5.win32/release/uriparser.lib \
--
1.9.5.github.0

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>

12
contrib/RideLogger/.gitignore vendored Normal file
View File

@@ -0,0 +1,12 @@
# Ignores for Eclipse
/.settings/
# Ignores for Android Projects
/bin/
/gen/
/publish/
/local.properties
/secure.properties
# Ignores for Mac machines
.DS_Store

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE AndroidXML>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="auto"
package="com.ridelogger"
android:versionCode="040000"
android:versionName="4.0.0"
android:icon="@drawable/ic_launcher" >
<uses-sdk android:minSdkVersion="14"
android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.SEND_SMS"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.DeviceDefault.Light" >
<service
android:name="com.ridelogger.RideService"
android:icon="@drawable/ic_launcher"
android:label="@string/service_name" >
</service>
<activity
android:name="com.ridelogger.StartActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.ridelogger.SettingsActivity"
android:label="@string/setting_title" >
</activity>
</application>
</manifest>

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<lint>
</lint>

View File

@@ -0,0 +1,68 @@
# This is a configuration file for ProGuard.
# http://proguard.sourceforge.net/index.html#manual/usage.html
# Optimizations: If you don't want to optimize, use the
# proguard-android.txt configuration file instead of this one, which
# turns off the optimization flags. Adding optimization introduces
# certain risks, since for example not all optimizations performed by
# ProGuard works on all versions of Dalvik. The following flags turn
# off various optimizations known to have issues, but the list may not
# be complete or up to date. (The "arithmetic" optimization can be
# used if you are only targeting Android 2.0 or later.) Make sure you
# test thoroughly if you go this route.
-optimizations code/simplification/arithmetic,code/simplification/cast,field/*,class/merging/*
-optimizationpasses 24
-allowaccessmodification
-dontpreverify
# The remainder of this file is identical to the non-optimized version
# of the Proguard configuration file (except that the other file has
# flags to turn off optimization).
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-verbose
-keepattributes *Annotation*
-keep public class com.google.vending.licensing.ILicensingService
-keep public class com.android.vending.licensing.ILicensingService
# For native methods, see http://proguard.sourceforge.net/manual/examples.html#native
-keepclasseswithmembernames class * {
native <methods>;
}
# keep setters in Views so that animations can still work.
# see http://proguard.sourceforge.net/manual/examples.html#beans
-keepclassmembers public class * extends android.view.View {
void set*(***);
*** get*();
}
# We want to keep methods in Activity that could be used in the XML attribute onClick
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
# For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
-keepclassmembers class **.R$* {
public static <fields>;
}
# The support library contains references to newer platform versions.
# Don't warn about those in case this app is linking against an older
# platform version. We know about them, and they are safe.
-dontwarn android.support.**
-keep public class com.ridelogger.SettingsActivity$GeneralFragment
-keep public class com.ridelogger.SettingsActivity$AntFragment
-keep public class com.ridelogger.SettingsActivity$SensorsFragment

View File

@@ -0,0 +1,15 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
proguard.config=proguard-android-optimize.txt
# Project target.
target=android-21
min=android-14

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE AndroidXML>
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/LayoutData"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:numColumns="auto_fit"
android:stretchMode="columnWidth"
android:gravity="right"
/>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<preference-headers
xmlns:android="http://schemas.android.com/apk/res/android">
<header android:fragment="com.ridelogger.SettingsActivity$GeneralFragment"
android:title="@string/setting_general_title"
android:summary="@string/setting_general_note" />
<header android:fragment="com.ridelogger.SettingsActivity$AntFragment"
android:title="@string/setting_ant_title"
android:summary="@string/setting_ant_note" />
<header android:fragment="com.ridelogger.SettingsActivity$SensorsFragment"
android:title="@string/setting_sensors_title"
android:summary="@string/setting_sensors_note" />
</preference-headers>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:id="@+id/Start"
android:title="@string/start" />
<item android:id="@+id/Stop"
android:title="@string/stop" />
<item android:id="@+id/Settings"
android:title="@string/edit_settings"
android:showAsAction="never" />
</menu>

View File

@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE AndroidXML>
<resources>
<string name="app_name">Ride Logger</string>
<string name="service_name">Logging Ride</string>
<string name="emergency_contact_dialog_title">Emergency Contact</string>
<string name="emergency_contact_dialog_note">Should a text messesage be sent on ride start and periodically to let your emergency contact know you are alright?</string>
<string name="sms_period_dialog_title">Emergency Contact SMS Period</string>
<string name="sms_period_dialog_note">Period in Minutes:</string>
<string name="crash_detection_dialog_title">Crash Detection</string>
<string name="crash_detection_dialog_note">Should a text messesage be sent on crash detction to your emergency contact?</string>
<string name="emergency_contact_number_dialog_title">Emergency Contact Number</string>
<string name="emergency_contact_number_dialog_note">Emergency phone number to update position on crash detection</string>
<string name="ant_setup_title">Set Ant+</string>
<string name="ant_setup_note">Pair your Ant+ devices now?</string>
<string name="ant_pair_dialog_title">Select Ant Devices</string>
<string name="ant_pair_dialog_button_note">Pair</string>
<string name="gc_rider_name_dialog_title">Enter Rider Name</string>
<string name="gc_rider_name_dialog_note">What is your Golder Cheata Rider Name?</string>
<string name="save_setting_button">Next</string>
<string name="skip_setting_button">Skip</string>
<string name="boolean_dialog_yes">Yes</string>
<string name="boolean_dialog_no">No</string>
<string name="starting_ride">Starting Ride!</string>
<string name="stopping_ride">Stoping Ride!</string>
<string name="ride_on">Ride On</string>
<string name="building_ride">Building ride: </string>
<string name="click_to_stop"> Click to stop ride.</string>
<string name="ride_start_title">Start Ride</string>
<string name="ride_start_note">Make sure locations is turned on. Internet connection is NOT required.</string>
<string name="start">Start Logging</string>
<string name="edit_settings">Settings</string>
<string name="ride_stop_title">Ride in Progress</string>
<string name="ride_stop_note">Would you like to stop the ride or view current values.</string>
<string name="stop">Stop Logging</string>
<string name="view">View</string>
<string name="crash_warning">WARNING CRASH!</string>
<string name="crash_confirm">CRASH CONFIRMED!</string>
<string name="crash_unknow_location">Unknow location.</string>
<string name="crash_magnitude">Mag</string>
<string name="ride_start_sms">I\'m starting my ride.</string>
<string name="ride_stop_sms">I have finished my ride.</string>
<string name="riding_ok_sms">I\'m ok.</string>
<string name="setting_title">Settings</string>
<string name="setting_general_title">General</string>
<string name="setting_general_note">Settings</string>
<string name="setting_ant_title">Ant+</string>
<string name="setting_ant_note">Setup your Ant+ Devices</string>
<string name="searching_for_ants">Searching for Ant+ Devices...</string>
<string name="found_ants">Found Ant+ Devices, Press to Pair.</string>
<string name="no_found_ants">Nothing found to pair.</string>
<string name="setting_sensors_title">Display Sensors</string>
<string name="setting_sensors_note">List of Sensors Display</string>
<string name="setting_wheel_size">Wheel Circumference in Meters</string>
<string name="imperial_units_title">Imperial Units</string>
<string name="imperial_units_note">Show Measurements in Imperial Units</string>
<string name="setting_size_title">Display Text Size</string>
<string name="PREFS_NAME">RideLogger</string>
<string name="PREF_RIDER_NAME">RiderName</string>
<string name="PREF_EMERGENCY_NUMBER">EmergencyNumbuer</string>
<string name="PREF_DETECT_CRASH">DetectCrash</string>
<string name="PREF_PHONE_HOME">PhoneHome</string>
<string name="PREF_PAIRED_ANTS">PairedAnts</string>
<string name="PREF_PHONE_HOME_PERIOD">PhoneHomePeriod</string>
<string name="PREF_TRACKING_SENSORS">TrackingSensors</string>
<string name="PREF_TRACKING_SIZE">TrackingSize</string>
<string name="PREF_TRACKING_IMPERIAL_UNITS">TrackingImperialUnits</string>
<string name="PREF_WHEEL_SIZE">WheelSize</string>
</resources>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<PreferenceCategory
android:title="@string/PREFS_NAME">
<MultiSelectListPreference
android:key="@string/PREF_PAIRED_ANTS"
android:title="@string/ant_pair_dialog_title"
android:summary="@string/ant_pair_dialog_button_note"
/>
<EditTextPreference
android:key="@string/PREF_WHEEL_SIZE"
android:title="@string/setting_wheel_size"
android:defaultValue="2.096"
/>
</PreferenceCategory>
</PreferenceScreen>

View File

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<PreferenceCategory
android:title="@string/PREFS_NAME"
android:persistent="true">
<EditTextPreference
android:key="@string/PREF_RIDER_NAME"
android:title="@string/gc_rider_name_dialog_title"
android:summary="@string/gc_rider_name_dialog_note" />
<EditTextPreference
android:key="@string/PREF_EMERGENCY_NUMBER"
android:title="@string/emergency_contact_number_dialog_title"
android:summary="@string/emergency_contact_number_dialog_note" />
<CheckBoxPreference
android:layout="?android:attr/preferenceLayoutChild"
android:dependency="@string/PREF_EMERGENCY_NUMBER"
android:key="@string/PREF_DETECT_CRASH"
android:title="@string/crash_detection_dialog_title"
android:summary="@string/crash_detection_dialog_note" />
<!-- The visual style of a child is defined by this styled theme attribute. -->
<CheckBoxPreference
android:layout="?android:attr/preferenceLayoutChild"
android:dependency="@string/PREF_EMERGENCY_NUMBER"
android:key="@string/PREF_PHONE_HOME"
android:title="@string/emergency_contact_dialog_title"
android:summary="@string/emergency_contact_dialog_note" />
<EditTextPreference
android:layout="?android:attr/preferenceLayoutChild"
android:dependency="@string/PREF_PHONE_HOME"
android:key="@string/PREF_PHONE_HOME_PERIOD"
android:title="@string/sms_period_dialog_title"
android:summary="@string/sms_period_dialog_note"
android:defaultValue="20" />
</PreferenceCategory>
</PreferenceScreen>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<PreferenceCategory
android:title="@string/PREFS_NAME">
<MultiSelectListPreference
android:key="@string/PREF_TRACKING_SENSORS"
android:title="@string/setting_sensors_title"
android:summary="@string/setting_sensors_note"
/>
<CheckBoxPreference
android:key="@string/PREF_TRACKING_IMPERIAL_UNITS"
android:title="@string/imperial_units_title"
android:summary="@string/imperial_units_note"
/>
<EditTextPreference
android:key="@string/PREF_TRACKING_SIZE"
android:title="@string/setting_size_title"
android:defaultValue="20"
/>
</PreferenceCategory>
</PreferenceScreen>

View File

@@ -0,0 +1,281 @@
package com.ridelogger;
import java.util.Set;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.graphics.Rect;
import android.graphics.Typeface;
import android.preference.PreferenceManager;
import android.util.TypedValue;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.GridView;
import android.widget.RelativeLayout;
import android.widget.TextView;
public class CurrentValuesAdapter extends BaseAdapter {
private StartActivity context;
private int[] keys;
private String[] values;
private String[] keyLabels;
private int size = 20;
private boolean imperial = false;
private SharedPreferences settings = null;
private GridView layout;
public CurrentValuesAdapter(StartActivity c, GridView pLayout) {
context = c;
layout = pLayout;
layout.setBackgroundColor(Color.BLACK);
layout.setVerticalSpacing(4);
layout.setHorizontalSpacing(4);
settings = PreferenceManager.getDefaultSharedPreferences(context);
Set<String> sensors = settings.getStringSet(context.getString(R.string.PREF_TRACKING_SENSORS), null);
size = Integer.valueOf(settings.getString(context.getString(R.string.PREF_TRACKING_SIZE), "20"));
imperial = settings.getBoolean(context.getString(R.string.PREF_TRACKING_IMPERIAL_UNITS), false);
initKeys(sensors);
initKeyLables();
initValues();
settings.registerOnSharedPreferenceChangeListener(
new SharedPreferences.OnSharedPreferenceChangeListener() {
@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String pkey) {
if(pkey == context.getString(R.string.PREF_TRACKING_SIZE)) {
size = Integer.valueOf(sharedPreferences.getString(context.getString(R.string.PREF_TRACKING_SIZE), "20"));
setupWidth();
notifyDataSetChanged();
} else if (pkey == context.getString(R.string.PREF_TRACKING_SENSORS)) {
Set<String> sensors = sharedPreferences.getStringSet(context.getString(R.string.PREF_TRACKING_SENSORS), null);
initKeys(sensors);
initKeyLables();
initValues();
layout.setAdapter(CurrentValuesAdapter.this);
notifyDataSetChanged();
} else if (pkey == context.getString(R.string.PREF_TRACKING_IMPERIAL_UNITS)) {
imperial = sharedPreferences.getBoolean(pkey, false);
initKeyLables();
initValues();
notifyDataSetChanged();
}
}
}
);
}
private void initKeys(Set<String> sensors) {
if(sensors != null && sensors.size() > 0) {
keys = new int[sensors.size()];
int i = 0;
for(String sensor : sensors) {
keys[i] = Integer.parseInt(sensor);
i++;
}
} else {
keys = new int[RideService.KEYS.length];
for (int i = 0; i < RideService.KEYS.length; i++) {
keys[i] = i;
}
}
}
private void initKeyLables() {
keyLabels = new String[keys.length];
if(!imperial) {
for(int key : keys) {
keyLabels[key] = RideService.KEYS[key].toString().toLowerCase();
}
} else {
for(int key : keys) {
switch (key) {
case RideService.ALTITUDE:
keyLabels[key] = "ft";
break;
case RideService.KPH:
keyLabels[key] = "mph";
break;
case RideService.KM:
keyLabels[key] = "m";
break;
default:
keyLabels[key] = RideService.KEYS[key].toString().toLowerCase();
break;
}
}
}
}
private void initValues() {
values = new String[keys.length];
for (int key : keys) {
if(key == RideService.SECS) {
values[key] = "00:00:00";
} else {
values[key] = "0.0";
}
}
}
private RelativeLayout newRelativeLayout(int key) {
RelativeLayout view = new RelativeLayout(context);
view.setBackgroundColor(Color.WHITE);
TextView valueView = newValueTv(key);
TextView keyView = newKeyTv(key);
RelativeLayout.LayoutParams valueLayoutParams = new RelativeLayout.LayoutParams(
RelativeLayout.LayoutParams.WRAP_CONTENT,
RelativeLayout.LayoutParams.WRAP_CONTENT
);
valueLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_TOP);
valueLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
view.addView(valueView, valueLayoutParams);
RelativeLayout.LayoutParams keyLayoutParams = new RelativeLayout.LayoutParams(
RelativeLayout.LayoutParams.WRAP_CONTENT,
RelativeLayout.LayoutParams.WRAP_CONTENT
);
keyLayoutParams.addRule(RelativeLayout.BELOW, valueView.getId());
keyLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
keyLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
view.addView(keyView, keyLayoutParams);
return view;
}
private TextView newValueTv(int key){
TextView tv = new TextView(context);
tv.setTextAppearance(context, android.R.attr.textAppearanceLarge);
tv.setTypeface(Typeface.MONOSPACE, Typeface.BOLD);
tv.setTextSize(TypedValue.COMPLEX_UNIT_SP, size);
tv.setText(values[key]);
tv.setId(key + 1);
return tv;
}
private TextView newKeyTv(int key){
TextView tv = new TextView(context);
tv.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);
tv.setBackgroundColor(Color.LTGRAY);
tv.setTypeface(Typeface.MONOSPACE, Typeface.BOLD);
tv.setPadding(4, 1, 4, 1);
tv.setText(keyLabels[key]);
return tv;
}
@Override
public int getCount() {
return keys.length;
}
@Override
public Object getItem(int position) {
return null;
}
@Override
public long getItemId(int position) {
return 0;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if (convertView == null) {
return newRelativeLayout(keys[position]);
} else {
RelativeLayout view = (RelativeLayout) convertView;
TextView valueView = (TextView) (view.getChildAt(0));
TextView valueKey = (TextView) (view.getChildAt(1));
if(valueView.getText() != values[keys[position]])
valueView.setText(values[keys[position]]);
valueView.setTextSize(TypedValue.COMPLEX_UNIT_SP, size);
if(valueKey.getText() != keyLabels[keys[position]])
valueKey.setText(keyLabels[keys[position]]);
return convertView;
}
}
public void update(float[] current_float_values) {
for (int key: keys) {
if(key == RideService.SECS) {
int hr = (int) (current_float_values[key]/3600);
int rem = (int) (current_float_values[key]%3600);
int mn = rem/60;
int sec = rem%60;
values[key] = (hr<10 ? "0" : "") + hr + ":" + (mn<10 ? "0" : "") + mn + ":" + (sec<10 ? "0" : "")+sec;
} else if(!imperial) {
values[key] = String.format("%.1f", current_float_values[key]);
} else {
switch (key) {
case RideService.ALTITUDE:
values[key] = String.format("%.1f", current_float_values[key] * 3.28084);
break;
case RideService.KPH:
values[key] = String.format("%.1f", current_float_values[key] * 0.621371);
break;
case RideService.KM:
values[key] = String.format("%.1f", current_float_values[key] * 0.621371);
break;
default:
values[key] = String.format("%.1f", current_float_values[key]);
break;
}
}
}
notifyDataSetChanged();
}
/**
* returns the size of the cell basted on 8 chars wide and the configured size param
* @return int
*/
private void setupWidth() {
TextView tv = new TextView(context);
tv.setTextAppearance(context, android.R.attr.textAppearanceLarge);
tv.setTypeface(Typeface.MONOSPACE, Typeface.BOLD);
tv.setTextSize(TypedValue.COMPLEX_UNIT_SP, size);
tv.setText(String.format("%.1f", 1111.11));
Rect bounds = new Rect();
tv.getPaint().getTextBounds("00:00:00", 0, "00:00:00".length(), bounds);
layout.setColumnWidth(bounds.width() + 16);
}
}

View File

@@ -0,0 +1,28 @@
package com.ridelogger;
import java.io.IOException;
import java.io.OutputStream;
import java.util.zip.GZIPOutputStream;
public class GzipWriter extends GZIPOutputStream {
public GzipWriter(OutputStream os) throws IOException {
super(os);
}
public void write(String data) throws IOException {
super.write(data.getBytes());
}
public void write(float data) throws IOException {
super.write(Float.floatToIntBits(data));
}
public void write(CharSequence data) throws IOException {
byte[] barr = new byte[data.length()];
for (int i = 0; i < barr.length; i++) {
barr[i] = (byte) data.charAt(i);
}
super.write(barr);
}
}

View File

@@ -0,0 +1,417 @@
package com.ridelogger;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Set;
import java.util.TimeZone;
import java.util.Timer;
import java.util.TimerTask;
import com.dsi.ant.plugins.antplus.pcc.defines.DeviceType;
import com.dsi.ant.plugins.utility.log.LogAnt;
import com.ridelogger.formats.BaseFormat;
import com.ridelogger.formats.JsonFormat;
import com.ridelogger.listners.Base;
import com.ridelogger.listners.Gps;
import com.ridelogger.listners.HeartRate;
import com.ridelogger.listners.Power;
import com.ridelogger.listners.Sensors;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.app.TaskStackBuilder;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
import android.os.Messenger;
import android.os.RemoteException;
import android.preference.PreferenceManager;
import android.support.v4.app.NotificationCompat;
import android.telephony.PhoneNumberUtils;
import android.telephony.SmsManager;
/**
* RideService
* @author Chet Henry
* Performs ride logging from sensors as an android service
*/
public class RideService extends Service
{
public static final int notifyID = 1; //Id of the notification in the top android bar that this class creates and alters
public static final int SECS = 0;
public static final int KPH = 1;
public static final int ALTITUDE = 2;
public static final int bearing = 3;
public static final int gpsa = 4;
public static final int LAT = 5;
public static final int LON = 6;
public static final int HR = 7;
public static final int WATTS = 8;
public static final int NM = 9;
public static final int CAD = 10;
public static final int KM = 11;
public static final int LTE = 12;
public static final int RTE = 13;
public static final int SNPLC = 14;
public static final int SNPR = 15;
public static final int ms2x = 16;
public static final int ms2y = 17;
public static final int ms2z = 18;
public static final int temp = 19;
public static final int uTx = 20;
public static final int uTy = 21;
public static final int uTz = 22;
public static final int press = 23;
public static final int lux = 24;
public static CharSequence[] KEYS = {
"SECS",
"KPH",
"ALTITUDE",
"bearing",
"gpsa",
"LAT",
"LON",
"HR",
"WATTS",
"NM",
"CAD",
"KM",
"LTE",
"RTE",
"SNPLC",
"SNPR",
"ms2x",
"ms2y",
"ms2z",
"temp",
"uTx",
"uTy",
"uTz",
"press",
"lux"
};
public GzipWriter buf; //writes to log file buffered
public long startTime; //start time of the ride
public float[] currentValues = new float[RideService.KEYS.length]; //float array of current values
private Messenger mMessenger = null; //class to send back current values if needed
private boolean rideStarted = false; //have we started logging the ride
private int sensor_index = 0; //current index of sensors
private String emergencyNumbuer; //the number to send the messages to
private Timer timer; //timer class to control the periodic messages
private Timer timerUI; //timer class to control the periodic messages
private Base<?>[] sensors; //list of sensors tracking
public BaseFormat<?> fileFormat;
/**
* starts the ride on service start
*/
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
startRide();
return Service.START_NOT_STICKY;
}
/**
* returns the messenger to talk to the app with
*/
@Override
public IBinder onBind(Intent arg0) {
mMessenger = new Messenger(new Handler() { // Handler of incoming messages from clients.
Messenger replyTo;
@Override
public void handleMessage(Message msg) {
if(timerUI != null) {
timerUI.cancel();
timerUI = null;
}
timerUI = new Timer();
if(msg.replyTo != null) {
replyTo = msg.replyTo;
timerUI.scheduleAtFixedRate(
new TimerTask() {
@Override
public void run() {
Message msg = Message.obtain(null, 2, 0, 0);
Bundle bundle = new Bundle();
bundle.putSerializable("currentValues", currentValues);
msg.setData(bundle);
try {
replyTo.send(msg);
} catch (RemoteException e) {}
}
},
1000,
1000
); //every second update the screen
}
}
}); // Target we publish for clients to send messages to IncomingHandler.
return mMessenger.getBinder();
}
/**
* releases the timer that sends messages to the app
*/
@Override
public boolean onUnbind (Intent intent) {
if(timerUI != null) {
timerUI.cancel();
timerUI = null;
}
mMessenger = null;
return true;
}
/**
* stop the ride on service stop
*/
@Override
public void onDestroy() {
stopRide();
super.onDestroy();
}
/**
* start a ride if there is not one started yet
*/
protected void startRide() {
if(rideStarted) return;
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);
emergencyNumbuer = settings.getString(getString(R.string.PREF_EMERGENCY_NUMBER), "");
currentValues[SECS] = (float) 0.0;
startTime = System.currentTimeMillis();
Date startDate = new Date(startTime);
SimpleDateFormat startTimef = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
SimpleDateFormat filef = new SimpleDateFormat("yyyy_MM_dd_HH_mm_ss");
SimpleDateFormat month = new SimpleDateFormat("MMMMM");
SimpleDateFormat year = new SimpleDateFormat("yyyy");
SimpleDateFormat day = new SimpleDateFormat("EEEEE");
startTimef.setTimeZone(TimeZone.getTimeZone("UTC"));
filef.setTimeZone(TimeZone.getTimeZone("UTC"));
month.setTimeZone(TimeZone.getTimeZone("UTC"));
year.setTimeZone(TimeZone.getTimeZone("UTC"));
day.setTimeZone(TimeZone.getTimeZone("UTC"));
final String fileName = filef.format(startDate) + ".json.gz";
if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {
fileFormat = new JsonFormat(this);
fileFormat.createFile();
fileFormat.writeHeader();
LogAnt.setDebugLevel(LogAnt.DebugLevel.NONE, this);
final Set<String> pairedAnts = settings.getStringSet(getString(R.string.PREF_PAIRED_ANTS), null);
if(pairedAnts != null && !pairedAnts.isEmpty()){
sensors = new Base<?>[pairedAnts.size() + 2];
for(String deviceNumber: pairedAnts) {
DeviceType deviceType = DeviceType.getValueFromInt(settings.getInt(deviceNumber, 0));
switch (deviceType) {
case BIKE_CADENCE:
break;
case BIKE_POWER:
sensors[sensor_index++] = new Power(Integer.valueOf(deviceNumber), this);
break;
case BIKE_SPD:
break;
case BIKE_SPDCAD:
break;
case BLOOD_PRESSURE:
break;
case ENVIRONMENT:
break;
case WEIGHT_SCALE:
break;
case HEARTRATE:
sensors[sensor_index++] = new HeartRate(Integer.valueOf(deviceNumber), this);
break;
case STRIDE_SDM:
break;
case FITNESS_EQUIPMENT:
break;
case GEOCACHE:
case CONTROLLABLE_DEVICE:
break;
case UNKNOWN:
break;
default:
break;
}
}
} else {
sensors = new Base<?>[4];
sensors[sensor_index++] = new HeartRate(0, this);
sensors[sensor_index++] = new Power(0, this);
}
sensors[sensor_index++] = new Gps(this);
sensors[sensor_index++] = new Sensors(this);
}
rideStarted = true;
if(settings.getBoolean(getString(R.string.PREF_PHONE_HOME), false)) {
timer = new Timer();
int period = Integer.parseInt(settings.getString(getString(R.string.PREF_PHONE_HOME_PERIOD), "10"));
timer.scheduleAtFixedRate(
new TimerTask() {
@Override
public void run() {
phoneHome();
}
},
60000 * period,
60000 * period
); //every ten min let them know where you are at
phoneStart();
}
//build the notification in the top android drawer
NotificationCompat.Builder mBuilder = new NotificationCompat
.Builder(this)
.setSmallIcon(R.drawable.ic_launcher)
.setContentTitle(getString(R.string.ride_on))
.setContentText(getString(R.string.building_ride) + " " + fileName + " " + getString(R.string.click_to_stop))
.setProgress(0, 0, true)
.setContentIntent(
TaskStackBuilder
.create(this)
.addParentStack(StartActivity.class)
.addNextIntent(new Intent(this, StartActivity.class))
.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT)
);
startForeground(notifyID, mBuilder.build());
}
/**
* let a love one know where you are at about every 10 min
*/
public void phoneCrash(double mag) {
smsHome(
getString(R.string.crash_warning) + "\n" + getLocationLink()
+ "\n " + getString(R.string.crash_magnitude) + ": " + String.valueOf(mag)
);
}
/**
* confirm the crash if we are not moving
*/
public void phoneCrashConfirm() {
smsHome(getString(R.string.crash_confirm) + "!\n" + getLocationLink());
}
/**
* let them know we are starting
*/
public void phoneStart() {
smsWithLocation(getString(R.string.ride_start_sms));
}
/**
* let them know we are stopping
*/
public void phoneStop() {
smsWithLocation(getString(R.string.ride_stop_sms));
}
/**
* send an sms with location
*/
public void smsWithLocation(String body) {
smsHome(body + "\n " + getLocationLink());
}
/**
* let a love one know where you are at about every 10 min
*/
public void phoneHome() {
smsWithLocation(getString(R.string.riding_ok_sms));
}
/**
* send a sms message
*/
public void smsHome(String body) {
SmsManager smsManager = SmsManager.getDefault();
if(emergencyNumbuer != null && PhoneNumberUtils.isWellFormedSmsAddress(emergencyNumbuer)) {
smsManager.sendTextMessage(emergencyNumbuer, null, body, null, null);
}
}
public String getLocationLink() {
if(currentValues[LAT] != 0.0 || currentValues[LON] != 0.0) {
return "https://www.google.com/maps/place/" + currentValues[LAT] + "," + currentValues[LON];
}
return getString(R.string.crash_unknow_location);
}
//stop the ride and clean up resources
protected void stopRide() {
if(!rideStarted) return;
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);
if(settings.getBoolean(getString(R.string.PREF_PHONE_HOME), false)) {
phoneStop();
}
for(Base<?> sensor: sensors) {
if(sensor != null) {
sensor.onDestroy();
}
}
//stop the phoneHome timer if we need to.
if(timer != null) {
timer.cancel();
timer = null;
}
if(timerUI != null) {
timerUI.cancel();
timerUI = null;
}
fileFormat.writeFooter();
rideStarted = false;
NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.cancel(notifyID);
}
}

View File

@@ -0,0 +1,274 @@
package com.ridelogger;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;
import java.util.Set;
import java.util.Timer;
import java.util.TimerTask;
import com.dsi.ant.plugins.antplus.pcc.defines.DeviceType;
import com.dsi.ant.plugins.antplus.pcc.defines.RequestAccessResult;
import com.dsi.ant.plugins.antplus.pccbase.MultiDeviceSearch;
import com.dsi.ant.plugins.antplus.pccbase.MultiDeviceSearch.MultiDeviceSearchResult;
import com.dsi.ant.plugins.utility.log.LogAnt;
import android.app.ActivityManager;
import android.app.ActivityManager.RunningServiceInfo;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.content.res.Configuration;
import android.os.Bundle;
import android.os.Handler;
import android.preference.MultiSelectListPreference;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceFragment;
import android.preference.PreferenceManager;
public class SettingsActivity extends PreferenceActivity {
static ArrayList<MultiDeviceSearchResult> foundDevices = new ArrayList<MultiDeviceSearchResult>();
/**
* This fragment contains a second-level set of preference that you
* can get to by tapping an item in the first preferences fragment.
*/
public static class GeneralFragment extends PreferenceFragment {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Load the preferences from an XML resource
addPreferencesFromResource(R.xml.general_settings);
}
@Override
public void onResume() {
// TODO Auto-generated method stub
super.onResume();
if(((SettingsActivity) getActivity()).getServiceRunning(RideService.class) != null) {
Preference pref = findPreference(getString(R.string.PREF_RIDER_NAME));
pref.setEnabled(false);
pref = findPreference(getString(R.string.PREF_EMERGENCY_NUMBER));
pref.setEnabled(false);
}
}
}
/**
* This fragment contains a second-level set of preference that you
* can get to by tapping an item in the first preferences fragment.
*/
public static class SensorsFragment extends PreferenceFragment {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.sensors_settings);
MultiSelectListPreference mMultiSelectListPreference = (MultiSelectListPreference) findPreference(getString(R.string.PREF_TRACKING_SENSORS));
mMultiSelectListPreference.setEntries( RideService.KEYS );
CharSequence[] keys = new CharSequence[RideService.KEYS.length];
for (int i = 0; i < RideService.KEYS.length; i++) {
keys[i] = String.valueOf(i);
}
mMultiSelectListPreference.setEntryValues(keys);
}
}
@Override
public boolean isValidFragment(String fragment) {
return true;
}
/**
* This fragment contains a second-level set of preference that you
* can get to by tapping an item in the first preferences fragment.
*/
public static class AntFragment extends PreferenceFragment {
private MultiDeviceSearch mSearch;
private MultiSelectListPreference mMultiSelectListPreference;
@Override
public void onConfigurationChanged(Configuration newConfig) {
// TODO Auto-generated method stub
super.onConfigurationChanged(newConfig);
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.ant_settings);
mMultiSelectListPreference = (MultiSelectListPreference) findPreference(getString(R.string.PREF_PAIRED_ANTS));
}
@Override
public void onResume() {
// TODO Auto-generated method stub
super.onResume();
initAntSearch();
}
/**
* search for ant+ if we are not recording
*/
public void initAntSearch() {
mMultiSelectListPreference.setEnabled(false);
if(((SettingsActivity) getActivity()).getServiceRunning(RideService.class) == null) {
mMultiSelectListPreference.setSummary(R.string.searching_for_ants);
setupAnt();
Timer timer = new Timer();
final Handler handler = new Handler();
timer.schedule(
new TimerTask() {
@Override
public void run() {
if(mMultiSelectListPreference.getEntryValues().length > 0) {
handler.post(new Runnable() {
public void run() {
mMultiSelectListPreference.setEnabled(true);
mMultiSelectListPreference.setSummary(R.string.found_ants);
}
});
} else {
handler.post(new Runnable() {
public void run() {
mMultiSelectListPreference.setEnabled(true);
mMultiSelectListPreference.setSummary(R.string.no_found_ants);
}
});
}
}
},
5000
);
}
}
/**
* try to pair some ant+ devices
*/
protected void setupAnt() {
MultiDeviceSearch.SearchCallbacks mCallback;
MultiDeviceSearch.RssiCallback mRssiCallback;
updateList(foundDevices);
LogAnt.setDebugLevel(LogAnt.DebugLevel.NONE, this.getActivity());
mCallback = new MultiDeviceSearch.SearchCallbacks(){
public void onDeviceFound(final MultiDeviceSearchResult deviceFound)
{
if(!foundDevices.contains(deviceFound)) {
foundDevices.add(deviceFound);
updateList(foundDevices);
}
}
@Override
public void onSearchStopped(RequestAccessResult arg0) {}
};
mRssiCallback = new MultiDeviceSearch.RssiCallback() {
@Override
public void onRssiUpdate(final int resultId, final int rssi){}
};
// start the multi-device search
mSearch = new MultiDeviceSearch(this.getActivity(), EnumSet.allOf(DeviceType.class), mCallback, mRssiCallback);
}
/**
* dialog of soon to be paired ant devices
* @param foundDevices
*/
protected void updateList(final ArrayList<MultiDeviceSearchResult> foundDevices) {
ArrayList<CharSequence> foundDevicesString = new ArrayList<CharSequence>();
ArrayList<CharSequence> foundDevicesValues = new ArrayList<CharSequence>();
for(MultiDeviceSearchResult device : foundDevices) {
foundDevicesString.add(device.getAntDeviceType() + ": " + String.valueOf(device.getAntDeviceNumber()));
}
for(MultiDeviceSearchResult device : foundDevices) {
foundDevicesValues.add(String.valueOf(device.getAntDeviceNumber()));
}
if(mMultiSelectListPreference != null) {
mMultiSelectListPreference.setEntries(
foundDevicesString.toArray(new CharSequence[foundDevicesString.size()])
);
mMultiSelectListPreference.setEntryValues(
foundDevicesValues.toArray(new CharSequence[foundDevicesValues.size()])
);
}
}
@Override
public void onDestroy() {
if(mSearch != null) mSearch.close();
super.onDestroy();
}
}
/**
* Populate the activity with the top-level headers.
*/
@Override
public void onBuildHeaders(List<Header> target) {
loadHeadersFromResource(R.layout.settings, target);
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);
settings.registerOnSharedPreferenceChangeListener(
new SharedPreferences.OnSharedPreferenceChangeListener() {
@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String pkey) {
if (pkey == getString(R.string.PREF_PAIRED_ANTS)) {
Set<String> sensors = sharedPreferences.getStringSet(pkey, null);
if(sensors != null && sensors.size() > 0) {
Editor editor = sharedPreferences.edit();
for(MultiDeviceSearchResult result : foundDevices) {
sensors.contains(String.valueOf(result.getAntDeviceNumber()));
editor.putInt(String.valueOf(result.getAntDeviceNumber()), result.getAntDeviceType().getIntValue());
}
editor.commit();
}
}
}
}
);
}
/**
* is a service running or not
* @param serviceClass
* @return
*/
public RunningServiceInfo getServiceRunning(Class<?> serviceClass) {
ActivityManager manager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
for (RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {
if (serviceClass.getName().equals(service.service.getClassName())) {
return service;
}
}
return null;
}
}

View File

@@ -0,0 +1,215 @@
package com.ridelogger;
import android.app.ActivityManager;
import android.app.ActivityManager.RunningServiceInfo;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
import android.os.Messenger;
import android.os.RemoteException;
import android.support.v4.app.FragmentActivity;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.widget.GridView;
import android.widget.Toast;
public class StartActivity extends FragmentActivity
{
private MenuItem startMenu;
private MenuItem stopMenu;
private ServiceConnection mConnection;
static CurrentValuesAdapter currentValuesAdapter;
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu items for use in the action bar
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.start_activity, menu);
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle presses on the action bar items
if(item.getItemId() == R.id.Settings) {
setupSettings();
} else if(item.getItemId() == R.id.Start) {
startRide();
} else {
stopRide();
}
return true;
}
/**
* start up our class
*/
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_dashboard);
GridView layout = (GridView) findViewById(R.id.LayoutData);
currentValuesAdapter = new CurrentValuesAdapter(this, layout);
layout.setAdapter(currentValuesAdapter);
}
@Override
protected void onResume() {
super.onResume();
bindToService();
}
@Override
protected void onPause() {
super.onPause();
unBindToService();
}
@Override
protected void onStop() {
super.onStop();
unBindToService();
}
/**
* setup the settings for the user
*/
private void setupSettings() {
Intent intent = new Intent(this, SettingsActivity.class);
startActivity(intent);
}
/**
* stop ride and clean up references
*/
private void stopRide() {
Toast toast = Toast.makeText(getApplicationContext(), getString(R.string.stopping_ride), Toast.LENGTH_LONG);
toast.show();
Intent rsi = new Intent(this, RideService.class);
this.stopService(rsi);
finish();
}
static final Handler mHandler = new Handler(){
@Override
public void handleMessage(Message msg_internal) {
updateValues(msg_internal.getData());
}
};
/**
* tell the service to start sending us messages with current values
*/
private void bindToService() {
RunningServiceInfo service = getServiceRunning(RideService.class);
if(service != null) {
mConnection = new ServiceConnection() {
public void onServiceConnected(ComponentName className, IBinder service) {
Messenger mService = new Messenger(service);
try {
Message msg = Message.obtain();
msg.replyTo = new Messenger(mHandler);
mService.send(msg);
} catch (RemoteException e) {
// In this case the service has crashed before we could even do anything with it
}
}
public void onServiceDisconnected(ComponentName className) {}
};
bindService(new Intent(StartActivity.this, RideService.class), mConnection, Context.BIND_AUTO_CREATE);
}
}
/**
* tell the service to stop sending us messages with current values
*/
private void unBindToService() {
if (mConnection != null) {
// Detach our existing connection.
unbindService(mConnection);
mConnection = null;
}
}
/**
* update the text fields with current values
* @param bundle
*/
private static void updateValues(Bundle bundle) {
currentValuesAdapter.update((float[]) bundle.getSerializable("currentValues"));
}
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
super.onPrepareOptionsMenu(menu);
RunningServiceInfo service = getServiceRunning(RideService.class);
startMenu = menu.findItem(R.id.Start);
stopMenu = menu.findItem(R.id.Stop);
if(service == null) {
startMenu.setVisible(true);
stopMenu.setVisible(false);
} else {
startMenu.setVisible(false);
stopMenu.setVisible(true);
}
return true;
}
/**
* start the ride and notify the user of success
*/
private void startRide() {
Intent rsi = new Intent(this, RideService.class);
this.startService(rsi);
startMenu.setVisible(false);
stopMenu.setVisible(true);
bindToService();
Toast toast = Toast.makeText(getApplicationContext(), getString(R.string.starting_ride), Toast.LENGTH_LONG);
toast.show();
}
/**
* is a service running or not
* @param serviceClass
* @return
*/
private RunningServiceInfo getServiceRunning(Class<?> serviceClass) {
ActivityManager manager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
for (RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {
if (serviceClass.getName().equals(service.service.getClassName())) {
return service;
}
}
return null;
}
}

View File

@@ -0,0 +1,71 @@
package com.ridelogger.formats;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import android.os.Environment;
import com.ridelogger.GzipWriter;
import com.ridelogger.RideService;
public class BaseFormat<T> {
protected GzipWriter buf;
protected RideService context;
protected String subExt = "";
public BaseFormat(RideService rideService) {
context = rideService;
}
public void createFile() {
File dir = new File(
Environment.getExternalStorageDirectory(),
"Rides"
);
dir.mkdirs();
Date startDate = new Date(context.startTime);
SimpleDateFormat filef = new SimpleDateFormat("yyyy_MM_dd_HH_mm_ss");
String fileName = filef.format(startDate) + subExt + ".gz";
try {
buf = new GzipWriter(new BufferedOutputStream(new FileOutputStream(new File(dir, fileName))));
} catch (Exception e) {}
}
public void writeHeader(){
try {
synchronized (buf) {
for(CharSequence key : RideService.KEYS) {
buf.write(key);
buf.write(",");
}
}
} catch (Exception e) {}
}
public void writeValues() {
try {
synchronized (buf) {
for(float value : context.currentValues) {
buf.write(value);
}
}
} catch (Exception e) {}
}
public void writeFooter() {
try {
buf.close();
} catch (Exception e) {}
}
}

View File

@@ -0,0 +1,93 @@
package com.ridelogger.formats;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;
import com.ridelogger.R;
import com.ridelogger.RideService;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
public class JsonFormat extends BaseFormat<Object> {
public JsonFormat(RideService rideService) {
super(rideService);
subExt = ".json";
}
public void writeHeader() {
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(context);
Date startDate = new Date(context.startTime);
SimpleDateFormat startTimef = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
SimpleDateFormat filef = new SimpleDateFormat("yyyy_MM_dd_HH_mm_ss");
SimpleDateFormat month = new SimpleDateFormat("MMMMM");
SimpleDateFormat year = new SimpleDateFormat("yyyy");
SimpleDateFormat day = new SimpleDateFormat("EEEEE");
startTimef.setTimeZone(TimeZone.getTimeZone("UTC"));
filef.setTimeZone(TimeZone.getTimeZone("UTC"));
month.setTimeZone(TimeZone.getTimeZone("UTC"));
year.setTimeZone(TimeZone.getTimeZone("UTC"));
day.setTimeZone(TimeZone.getTimeZone("UTC"));
try {
buf.write("{" +
"\"RIDE\":{" +
"\"STARTTIME\":\"" + startTimef.format(startDate) + " UTC\"," +
"\"RECINTSECS\":1," +
"\"DEVICETYPE\":\"Android\"," +
"\"IDENTIFIER\":\"\"," +
"\"TAGS\":{" +
"\"Athlete\":\"" + settings.getString(context.getString(R.string.PREF_RIDER_NAME), "") + "\"," +
"\"Calendar Text\":\"Auto Recored Android Ride\"," +
"\"Change History\":\"\"," +
"\"Data\":\"\"," +
"\"Device\":\"\"," +
"\"Device Info\":\"\"," +
"\"File Format\":\"\"," +
"\"Filename\":\"\"," +
"\"Month\":\"" + month.format(startDate) +"\"," +
"\"Notes\":\"\"," +
"\"Objective\":\"\"," +
"\"Sport\":\"Bike\"," +
"\"Weekday\":\"" + day.format(startDate) + "\"," +
"\"Workout Code\":\"\"," +
"\"Year\":\"" + year.format(startDate) + "\"" +
"}," +
"\"SAMPLES\":[{\"SECS\":0}");
} catch (Exception e) {}
}
public void writeValues() {
try {
synchronized (buf) {
buf.write(",{");
buf.write("\"");
buf.write(RideService.KEYS[0]);
buf.write("\":");
buf.write(String.format("%f", context.currentValues[0]));
for (int i = 1; i < context.currentValues.length; i++) {
buf.write(",\"");
buf.write(RideService.KEYS[i]);
buf.write("\":");
buf.write(String.format("%f", context.currentValues[i]));
}
buf.write("}");
}
} catch (Exception e) {}
}
public void writeFooter() {
try {
buf.write("]}}");
} catch (Exception e) {}
super.writeFooter();
}
}

View File

@@ -0,0 +1,54 @@
package com.ridelogger.listners;
import com.dsi.ant.plugins.antplus.pcc.defines.DeviceState;
import com.dsi.ant.plugins.antplus.pccbase.PccReleaseHandle;
import com.dsi.ant.plugins.antplus.pccbase.AntPluginPcc.IDeviceStateChangeReceiver;
import com.dsi.ant.plugins.antplus.pccbase.AntPluginPcc.IPluginAccessResultReceiver;
import com.ridelogger.RideService;
/**
* Ant
* @author Chet Henry
* Listen to and log Ant+ events base class
*/
public abstract class Ant extends Base<Object>
{
protected PccReleaseHandle<?> releaseHandle; //Handle class
public IPluginAccessResultReceiver<?> mResultReceiver; //Receiver class
protected int deviceNumber = 0;
//setup listeners and logging
public Ant(int pDeviceNumber, RideService mContext)
{
super(mContext);
deviceNumber = pDeviceNumber;
}
public IDeviceStateChangeReceiver mDeviceStateChangeReceiver = new IDeviceStateChangeReceiver()
{
@Override
public void onDeviceStateChange(final DeviceState newDeviceState){
//if we lose a device zero out its values
if(newDeviceState.equals(DeviceState.DEAD)) {
zeroReadings();
}
}
};
abstract protected void requestAccess();
@Override
public void onDestroy()
{
if(releaseHandle != null) {
releaseHandle.close();
}
}
}

View File

@@ -0,0 +1,58 @@
package com.ridelogger.listners;
import com.ridelogger.RideService;
/**
* Base
* @author Chet Henry
* Base sensor class that has methods to time stamp are write to buffer
*/
public class Base<T>
{
public RideService context;
public Base(RideService mContext) {
context = mContext;
}
public void alterCurrentData(int key, float value)
{
synchronized (context.currentValues) {
context.currentValues[RideService.SECS] = getTs();
context.currentValues[key] = value;
context.fileFormat.writeValues();
}
}
public void alterCurrentData(int[] keys, float[] values)
{
synchronized (context.currentValues) {
context.currentValues[RideService.SECS] = getTs();
int i = 0;
for (int key : keys) {
context.currentValues[key] = values[i];
i++;
}
context.fileFormat.writeValues();
}
}
//get current time stamp
public float getTs() {
return (float) ((System.currentTimeMillis() - context.startTime) / 1000.0);
}
//Clean up my listeners here
public void onDestroy() {}
//zero any of my values
public void zeroReadings() {}
}

View File

@@ -0,0 +1,61 @@
package com.ridelogger.listners;
import com.ridelogger.RideService;
import android.content.Context;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
/**
* Gps
* @author henry
* Listen and log gps events
*/
public class Gps extends Base<Gps>
{
public Gps(RideService mContext)
{
super(mContext);
LocationManager locationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);
//listen to gps events and log them
LocationListener locationListener = new LocationListener() {
public void onLocationChanged(Location location) {
int[] keys = {
RideService.ALTITUDE,
RideService.KPH,
RideService.bearing,
RideService.gpsa,
RideService.LAT,
RideService.LON
};
float[] values = {
(float) location.getAltitude(),
location.getSpeed(),
location.getBearing(),
location.getAccuracy(),
(float) location.getLatitude(),
(float) location.getLongitude()
};
alterCurrentData(keys, values);
}
@Override
public void onStatusChanged(String provider, int status, Bundle extras) {}
@Override
public void onProviderEnabled(String provider) {}
@Override
public void onProviderDisabled(String provider) {}
};
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locationListener);
}
}

View File

@@ -0,0 +1,69 @@
package com.ridelogger.listners;
import com.dsi.ant.plugins.antplus.pcc.AntPlusHeartRatePcc;
import com.dsi.ant.plugins.antplus.pcc.AntPlusHeartRatePcc.DataState;
import com.dsi.ant.plugins.antplus.pcc.AntPlusHeartRatePcc.IHeartRateDataReceiver;
import com.dsi.ant.plugins.antplus.pcc.defines.DeviceState;
import com.dsi.ant.plugins.antplus.pcc.defines.EventFlag;
import com.dsi.ant.plugins.antplus.pcc.defines.RequestAccessResult;
import com.dsi.ant.plugins.antplus.pccbase.AntPluginPcc.IPluginAccessResultReceiver;
import com.ridelogger.RideService;
import java.math.BigDecimal;
import java.util.EnumSet;
/**
* HeartRate
* @author Chet Henry
* Listen to and log Ant+ HearRate events
*/
public class HeartRate extends Ant
{
public IPluginAccessResultReceiver<AntPlusHeartRatePcc> mResultReceiver;
public HeartRate(int pDeviceNumber, RideService mContext) {
super(pDeviceNumber, mContext);
mResultReceiver = new IPluginAccessResultReceiver<AntPlusHeartRatePcc>() {
//Handle the result, connecting to events on success or reporting failure to user.
@Override
public void onResultReceived(AntPlusHeartRatePcc result, RequestAccessResult resultCode, DeviceState initialDeviceState)
{
if(resultCode == com.dsi.ant.plugins.antplus.pcc.defines.RequestAccessResult.SUCCESS) {
deviceNumber = result.getAntDeviceNumber();
result.subscribeHeartRateDataEvent(
new IHeartRateDataReceiver() {
@Override
public void onNewHeartRateData(final long estTimestamp, EnumSet<EventFlag> eventFlags, final int computedHeartRate, final long heartBeatCount, final BigDecimal heartBeatEventTime, final DataState dataState) {
alterCurrentData(RideService.HR, (float) computedHeartRate);
}
}
);
} else if(resultCode == com.dsi.ant.plugins.antplus.pcc.defines.RequestAccessResult.SEARCH_TIMEOUT) {
if(deviceNumber != 0) {
requestAccess();
}
}
}
};
requestAccess();
}
@Override
protected void requestAccess() {
releaseHandle = AntPlusHeartRatePcc.requestAccess(context, deviceNumber, 0, mResultReceiver, mDeviceStateChangeReceiver);
}
@Override
public void zeroReadings()
{
alterCurrentData(RideService.HR, (float) 0.0);
}
}

View File

@@ -0,0 +1,223 @@
package com.ridelogger.listners;
import android.preference.PreferenceManager;
import com.dsi.ant.plugins.antplus.pcc.AntPlusBikePowerPcc;
import com.dsi.ant.plugins.antplus.pcc.AntPlusBikePowerPcc.CalculatedWheelDistanceReceiver;
import com.dsi.ant.plugins.antplus.pcc.AntPlusBikePowerPcc.CalculatedWheelSpeedReceiver;
import com.dsi.ant.plugins.antplus.pcc.AntPlusBikePowerPcc.DataSource;
import com.dsi.ant.plugins.antplus.pcc.AntPlusBikePowerPcc.ICalculatedCrankCadenceReceiver;
import com.dsi.ant.plugins.antplus.pcc.AntPlusBikePowerPcc.ICalculatedPowerReceiver;
import com.dsi.ant.plugins.antplus.pcc.AntPlusBikePowerPcc.ICalculatedTorqueReceiver;
import com.dsi.ant.plugins.antplus.pcc.AntPlusBikePowerPcc.IInstantaneousCadenceReceiver;
import com.dsi.ant.plugins.antplus.pcc.AntPlusBikePowerPcc.IRawPowerOnlyDataReceiver;
import com.dsi.ant.plugins.antplus.pcc.defines.DeviceState;
import com.dsi.ant.plugins.antplus.pcc.defines.EventFlag;
import com.dsi.ant.plugins.antplus.pcc.defines.RequestAccessResult;
import com.dsi.ant.plugins.antplus.pccbase.AntPluginPcc.IPluginAccessResultReceiver;
import com.ridelogger.R;
import com.ridelogger.RideService;
import java.math.BigDecimal;
import java.util.EnumSet;
/**
* Power
* @author Chet Henry
* Listen to and log Ant+ Power events
*/
public class Power extends Ant
{
public BigDecimal wheelCircumferenceInMeters; //size of wheel to calculate speed
public IPluginAccessResultReceiver<AntPlusBikePowerPcc> mResultReceiver;
//setup listeners and logging
public Power(int pDeviceNumber, RideService mContext) {
super(pDeviceNumber, mContext);
wheelCircumferenceInMeters = new BigDecimal(
PreferenceManager.getDefaultSharedPreferences(context).getString(context.getString(R.string.PREF_WHEEL_SIZE), "2.096")
);
//Handle messages
mResultReceiver = new IPluginAccessResultReceiver<AntPlusBikePowerPcc>() {
//Handle the result, connecting to events on success or reporting failure to user.
@Override
public void onResultReceived(AntPlusBikePowerPcc result, RequestAccessResult resultCode, DeviceState initialDeviceState) {
if(resultCode == com.dsi.ant.plugins.antplus.pcc.defines.RequestAccessResult.SUCCESS) {
deviceNumber = result.getAntDeviceNumber();
result.subscribeCalculatedPowerEvent(new ICalculatedPowerReceiver() {
@Override
public void onNewCalculatedPower(final long estTimestamp, final EnumSet<EventFlag> eventFlags, final DataSource dataSource, final BigDecimal calculatedPower) {
alterCurrentData(RideService.WATTS, calculatedPower.floatValue());
}
}
);
result.subscribeCalculatedTorqueEvent(
new ICalculatedTorqueReceiver() {
@Override
public void onNewCalculatedTorque(final long estTimestamp, final EnumSet<EventFlag> eventFlags, final DataSource dataSource, final BigDecimal calculatedTorque) {
alterCurrentData(RideService.NM, calculatedTorque.floatValue());
}
}
);
result.subscribeCalculatedCrankCadenceEvent(
new ICalculatedCrankCadenceReceiver() {
@Override
public void onNewCalculatedCrankCadence(final long estTimestamp, final EnumSet<EventFlag> eventFlags, final DataSource dataSource, final BigDecimal calculatedCrankCadence) {
alterCurrentData(RideService.CAD, calculatedCrankCadence.floatValue());
}
}
);
result.subscribeCalculatedWheelSpeedEvent(
new CalculatedWheelSpeedReceiver(wheelCircumferenceInMeters) {
@Override
public void onNewCalculatedWheelSpeed(final long estTimestamp, final EnumSet<EventFlag> eventFlags, final DataSource dataSource, final BigDecimal calculatedWheelSpeed)
{
alterCurrentData(RideService.KPH, calculatedWheelSpeed.floatValue());
}
}
);
result.subscribeCalculatedWheelDistanceEvent(
new CalculatedWheelDistanceReceiver(wheelCircumferenceInMeters) {
@Override
public void onNewCalculatedWheelDistance(final long estTimestamp, final EnumSet<EventFlag> eventFlags, final DataSource dataSource, final BigDecimal calculatedWheelDistance)
{
alterCurrentData(RideService.KM, calculatedWheelDistance.floatValue());
}
}
);
result.subscribeInstantaneousCadenceEvent(
new IInstantaneousCadenceReceiver() {
@Override
public void onNewInstantaneousCadence(final long estTimestamp, final EnumSet<EventFlag> eventFlags, final DataSource dataSource, final int instantaneousCadence)
{
alterCurrentData(RideService.CAD, (float) instantaneousCadence);
}
}
);
result.subscribeRawPowerOnlyDataEvent(
new IRawPowerOnlyDataReceiver() {
@Override
public void onNewRawPowerOnlyData(final long estTimestamp, final EnumSet<EventFlag> eventFlags, final long powerOnlyUpdateEventCount, final int instantaneousPower, final long accumulatedPower)
{
alterCurrentData(RideService.WATTS, (float) instantaneousPower);
}
}
);
/*result.subscribePedalPowerBalanceEvent(
new IPedalPowerBalanceReceiver() {
@Override
public void onNewPedalPowerBalance(final long estTimestamp, final EnumSet<EventFlag> eventFlags, final boolean rightPedalIndicator, final int pedalPowerPercentage)
{
alterCurrentData(RideService.LTE, pedalPowerPercentage);
}
}
);
result.subscribeRawWheelTorqueDataEvent(
new IRawWheelTorqueDataReceiver() {
@Override
public void onNewRawWheelTorqueData(final long estTimestamp, final EnumSet<EventFlag> eventFlags, final long wheelTorqueUpdateEventCount, final long accumulatedWheelTicks, final BigDecimal accumulatedWheelPeriod, final BigDecimal accumulatedWheelTorque)
{
alterCurrentData(RideService.NM, accumulatedWheelTorque);
}
}
);
result.subscribeRawCrankTorqueDataEvent(
new IRawCrankTorqueDataReceiver() {
@Override
public void onNewRawCrankTorqueData(final long estTimestamp, final EnumSet<EventFlag> eventFlags, final long crankTorqueUpdateEventCount, final long accumulatedCrankTicks, final BigDecimal accumulatedCrankPeriod, final BigDecimal accumulatedCrankTorque)
{
alterCurrentData(RideService.NM, accumulatedCrankTorque);
}
}
);
result.subscribeTorqueEffectivenessEvent(
new ITorqueEffectivenessReceiver() {
@Override
public void onNewTorqueEffectiveness(final long estTimestamp, final EnumSet<EventFlag> eventFlags, final long powerOnlyUpdateEventCount, final BigDecimal leftTorqueEffectiveness, final BigDecimal rightTorqueEffectiveness)
{
int[] keys = {
RideService.LTE,
RideService.RTE
};
float[] values = {
leftTorqueEffectiveness,
rightTorqueEffectiveness
}
alterCurrentData(keys, values);
}
}
);
result.subscribePedalSmoothnessEvent(new IPedalSmoothnessReceiver() {
@Override
public void onNewPedalSmoothness(final long estTimestamp, final EnumSet<EventFlag> eventFlags, final long powerOnlyUpdateEventCount, final boolean separatePedalSmoothnessSupport, final BigDecimal leftOrCombinedPedalSmoothness, final BigDecimal rightPedalSmoothness)
{
int[] keys = {
RideService.SNPLC,
RideService.SNPR
};
float[] values = {
leftOrCombinedPedalSmoothness,
rightPedalSmoothness
}
alterCurrentData(map);
}
}
);*/
} else if(resultCode == com.dsi.ant.plugins.antplus.pcc.defines.RequestAccessResult.SEARCH_TIMEOUT) {
if(deviceNumber != 0) {
requestAccess();
}
}
}
};
requestAccess();
}
protected void requestAccess() {
releaseHandle = AntPlusBikePowerPcc.requestAccess(context, deviceNumber, 0, mResultReceiver, mDeviceStateChangeReceiver);
}
@Override
public void zeroReadings()
{
int[] keys = {
RideService.WATTS,
RideService.NM,
RideService.CAD,
RideService.KPH,
RideService.KM
};
float[] values = {
(float) 0.0,
(float) 0.0,
(float) 0.0,
(float) 0.0,
(float) 0.0
};
alterCurrentData(keys, values);
}
}

View File

@@ -0,0 +1,222 @@
package com.ridelogger.listners;
import java.util.Timer;
import java.util.TimerTask;
import com.ridelogger.R;
import com.ridelogger.RideService;
import android.content.Context;
import android.content.SharedPreferences;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.preference.PreferenceManager;
/**
* Sensors
* @author Chet Henry
* Listen to android sensor events and log them
*/
public class Sensors extends Base<Object>
{
public static final double CRASHMAGNITUDE = 30.0;
private SensorEventListener luxListner;
private SensorEventListener accelListner;
private SensorEventListener pressListner;
private SensorEventListener tempListner;
private SensorEventListener fieldListner;
public Sensors(RideService mContext)
{
super(mContext);
SensorManager mSensorManager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE);
Sensor mLight = mSensorManager.getDefaultSensor(Sensor.TYPE_LIGHT);
Sensor mAccel = mSensorManager.getDefaultSensor(Sensor.TYPE_LINEAR_ACCELERATION);
Sensor mPress = mSensorManager.getDefaultSensor(Sensor.TYPE_PRESSURE);
Sensor mTemp = mSensorManager.getDefaultSensor(Sensor.TYPE_AMBIENT_TEMPERATURE);
Sensor mField = mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD);
if(mLight != null) {
luxListner = new SensorEventListener() {
@Override
public final void onAccuracyChanged(Sensor sensor, int accuracy) {}
@Override
public final void onSensorChanged(SensorEvent event) {
// The light sensor returns a single value.
// Many sensors return 3 values, one for each axis.
alterCurrentData(RideService.lux, event.values[0]);
}
};
mSensorManager.registerListener(luxListner, mLight, 3000000);
}
if(mAccel != null) {
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(context);
if(settings.getBoolean(context.getString(R.string.PREF_DETECT_CRASH), false)) {
accelListner = new SensorEventListener() {
private boolean crashed = false;
private Timer timer = new Timer();
private double[] St = new double[3];
@Override
public final void onAccuracyChanged(Sensor sensor, int accuracy) {}
@Override
public final void onSensorChanged(SensorEvent event) {
int[] keys = {
RideService.ms2x,
RideService.ms2y,
RideService.ms2z
};
alterCurrentData(keys, event.values);
if(St.length == 0) {
St[0] = event.values[0];
St[1] = event.values[1];
St[2] = event.values[2];
}
St[0] = 0.6 * event.values[0] + 0.4 * St[0];
St[1] = 0.6 * event.values[1] + 0.4 * St[1];
St[2] = 0.6 * event.values[2] + 0.4 * St[2];
double amag = Math.sqrt(St[0]*St[0] + St[1]*St[1] + St[2]*St[2]);
if(amag > CRASHMAGNITUDE && !crashed) {
crashed = true;
context.phoneCrash(amag);
if(!Float.isNaN(context.currentValues[RideService.KPH])) {
timer.schedule(
new TimerTask() {
@Override
public void run() {
//if we are traveling less then 1km/h at 5 seconds after crash detection
// confirm the crash
if(1.0 > context.currentValues[RideService.KPH]) {
context.phoneCrashConfirm();
} else {
crashed = false;
context.phoneHome();
}
}
},
5000
); //in five sec reset
} else {
timer.schedule(
new TimerTask() {
@Override
public void run() {
crashed = false;
}
},
180000
); //in three min reset
}
}
}
};
} else {
accelListner = new SensorEventListener() {
@Override
public final void onAccuracyChanged(Sensor sensor, int accuracy) {}
@Override
public final void onSensorChanged(SensorEvent event) {
int[] keys = {
RideService.ms2x,
RideService.ms2y,
RideService.ms2z
};
alterCurrentData(keys, event.values);
}
};
}
mSensorManager.registerListener(accelListner, mAccel, SensorManager.SENSOR_DELAY_NORMAL);
}
if(mPress != null) {
pressListner = new SensorEventListener() {
@Override
public final void onAccuracyChanged(Sensor sensor, int accuracy) {}
@Override
public final void onSensorChanged(SensorEvent event) {
// The light sensor returns a single value.
// Many sensors return 3 values, one for each axis.
alterCurrentData(RideService.press, event.values[0]);
}
};
mSensorManager.registerListener(pressListner, mPress, 3000000);
}
if(mTemp != null) {
tempListner = new SensorEventListener() {
@Override
public final void onAccuracyChanged(Sensor sensor, int accuracy) {}
@Override
public final void onSensorChanged(SensorEvent event) {
// The light sensor returns a single value.
// Many sensors return 3 values, one for each axis.
alterCurrentData(RideService.temp, event.values[0]);
}
};
mSensorManager.registerListener(tempListner, mTemp, 3000000);
}
if(mField != null) {
fieldListner = new SensorEventListener() {
@Override
public final void onAccuracyChanged(Sensor sensor, int accuracy) {}
@Override
public final void onSensorChanged(SensorEvent event) {
int[] keys = {
RideService.uTx,
RideService.uTy,
RideService.uTz
};
alterCurrentData(keys, event.values);
}
};
mSensorManager.registerListener(fieldListner, mField, SensorManager.SENSOR_DELAY_NORMAL);
}
}
@Override
public void onDestroy()
{
SensorManager mSensorManager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE);
if(luxListner != null) {
mSensorManager.unregisterListener(luxListner);
}
if(accelListner != null) {
mSensorManager.unregisterListener(accelListner);
}
if(pressListner != null) {
mSensorManager.unregisterListener(pressListner);
}
if(tempListner != null) {
mSensorManager.unregisterListener(tempListner);
}
if(fieldListner != null) {
mSensorManager.unregisterListener(fieldListner);
}
}
}

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 431 KiB

View File

Before

Width:  |  Height:  |  Size: 578 KiB

After

Width:  |  Height:  |  Size: 578 KiB

View File

Before

Width:  |  Height:  |  Size: 2.7 MiB

After

Width:  |  Height:  |  Size: 2.7 MiB

View File

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 87 KiB

View File

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 82 KiB

View File

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 88 KiB

View File

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View File

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

View File

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 127 KiB

View File

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 110 KiB

View File

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

Before

Width:  |  Height:  |  Size: 344 KiB

After

Width:  |  Height:  |  Size: 344 KiB

View File

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 124 KiB

View File

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

Before

Width:  |  Height:  |  Size: 3.9 MiB

After

Width:  |  Height:  |  Size: 3.9 MiB

View File

Before

Width:  |  Height:  |  Size: 154 KiB

After

Width:  |  Height:  |  Size: 154 KiB

View File

Before

Width:  |  Height:  |  Size: 165 KiB

After

Width:  |  Height:  |  Size: 165 KiB

View File

Before

Width:  |  Height:  |  Size: 155 KiB

After

Width:  |  Height:  |  Size: 155 KiB

View File

Before

Width:  |  Height:  |  Size: 181 KiB

After

Width:  |  Height:  |  Size: 181 KiB

View File

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

After

Width:  |  Height:  |  Size: 323 KiB

BIN
doc/wiki/Help_About.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 129 KiB

BIN
doc/wiki/MenuBar_Edit.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

After

Width:  |  Height:  |  Size: 388 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

After

Width:  |  Height:  |  Size: 304 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 KiB

After

Width:  |  Height:  |  Size: 447 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 KiB

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 KiB

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 KiB

After

Width:  |  Height:  |  Size: 359 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

After

Width:  |  Height:  |  Size: 299 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

After

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 162 KiB

BIN
doc/wiki/Share_Activity.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

View File

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 64 KiB

View File

Before

Width:  |  Height:  |  Size: 180 KiB

After

Width:  |  Height:  |  Size: 180 KiB

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 96 KiB

Some files were not shown because too many files have changed in this diff Show More