Compare commits

...

1208 Commits

Author SHA1 Message Date
Mark Liversedge
90a0f4701b V3.2 Release Candidate 2
.. updated build number
2015-06-28 15:19:41 +01:00
Mark Liversedge
6a228901d8 Fix Mac QT4.8 showhideToolbar compile error 2015-06-28 14:55:07 +01:00
Mark Liversedge
c3ac435942 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
4d03b52f87 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
00badb6cb1 Fix tHb units
.. its grams per decilitre
2015-06-27 17:40:37 +01:00
Mark Liversedge
32ae899861 Add Moxy tHb metrics
.. to match the smO2 ones.
2015-06-27 17:22:31 +01:00
Mark Liversedge
6d1dd8b9e2 TrainingPeaks download nits
.. window is too small by default
.. reinstate ^L shortcut
2015-06-27 16:48:12 +01:00
Mark Liversedge
934374e6d2 Fix SEGV on save config during refresh
.. by cancelling refresh before saving
2015-06-27 16:15:58 +01:00
Mark Liversedge
3757e43ce7 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
30fc76979c Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-06-27 11:03:56 -03:00
Alejandro Martinez
a8c332bd16 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
78e966c4d8 Merge pull request #1422 from dresco/temptest
Small fix for C -> F temperature conversion
2015-06-27 13:00:17 +01:00
Jon Escombe
270dbfba04 Small fix for C -> F temperature conversion 2015-06-27 12:50:09 +01:00
Mark Liversedge
0d025afd8e 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
8a09fe0ca2 Enable user to configure autodiscovery
.. select which kind of intervals we want

.. makes it faster and also reduces the size of
   the rideDB.json file quite dramatically which
   may be useful for some users.
2015-06-27 12:30:27 +01:00
Mark Liversedge
22dbfaee7d 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
32e03921a6 "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
c7d2981d92 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
2b8f9cfc52 Merge pull request #1421 from amtriathlon/master
Fixed interval alignment
2015-06-25 20:12:44 +01:00
Alejandro Martinez
05bffb0def 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
b03420b7bb 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
2f7cb429ad 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
2222d1decd Fix Core Temp SEGV
.. importing ride < 60s long

Fixes #1411
2015-06-21 12:57:11 +01:00
Mark Liversedge
d46801f4a0 V3.2 RC1X
.. Release Candidate after some late commits
   before RC1 was issued.
2015-06-19 15:07:51 +01:00
Mark Liversedge
8dde97bca2 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
884ba768b5 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
84c911c2e2 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
148064ed81 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
42f449a7ae 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
816a1a520b 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
7cc8e302de 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
a6d7e565b3 Enable Efficiency Factor and Aerobic Decoupling metrics for Running
Fixes #1407
2015-06-17 11:28:58 -03:00
Mark Liversedge
4c83f55c3e 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
916e8ee7a1 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
a5d4754cdc Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-06-16 11:08:13 -03:00
Mark Liversedge
42ef6ba55e 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
c6ad4d3ee9 Reconise Alexandre Prokoudine
.. for Russian translation contribution
2015-06-16 08:04:09 +01:00
Mark Liversedge
7ff3af85b2 Merge pull request #1405 from prokoudine/master
Updated Russian translation
2015-06-16 08:01:32 +01:00
Alexandre Prokoudine
fc1d44ef06 Updated Russian translation 2015-06-16 02:57:21 +03:00
Alejandro Martinez
8bf4454230 Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-06-15 19:46:49 -03:00
Mark Liversedge
eff23d9bfb 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
9c14f78c54 Fixed wrong caching when CPPlot is filtered by activity type 2015-06-15 16:05:14 -03:00
Mark Liversedge
997616546c 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
d8063d4980 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
6306967a54 Add W'bal Time In Zone (2 of 3)
.. add metrics and trends chart
2015-06-14 10:52:21 +01:00
Mark Liversedge
d6690cd5ae 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
5b6a652f0a Route Intervals Colour
.. not gray !
2015-06-13 19:47:24 +01:00
Mark Liversedge
f9591812ce Discard data with no time or distance
.. we need one or the other !
2015-06-13 17:33:04 +01:00
Mark Liversedge
2b8bccb04e 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
8496e66dd4 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
344bcc23a9 Fix SEGV on zoom change when isolated in AllPlot
.. that code is horrible.
2015-06-12 17:12:05 +01:00
Joern
2fda2bf37f Merge pull request #1399 from Joern-R/master
Update Translation DE
2015-06-12 18:03:48 +02:00
Joern
94aa07e101 Update Translation DE
... translation DE
2015-06-12 18:08:12 +02:00
Mark Liversedge
6835e8188c 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
e469bc333f Add qmake's '.qmake.stash' to .gitignore 2015-06-11 16:10:00 +01:00
Mark Liversedge
5eeaf0810d Recognise Alex Harsanyi 2015-06-09 19:58:32 +01:00
Mark Liversedge
12615590e3 Revert "RideFile::isRun() -- only use the "Run" tag to clasify a file as running" 2015-06-09 19:56:33 +01:00
Mark Liversedge
573adb1ef2 Merge pull request #1397 from alex-hhh/multisport-import-2
Import multisport FIT files
2015-06-09 19:54:25 +01:00
Mark Liversedge
88ca6f9f39 Tweak route drop dialog
.. titlebar and button layout.
2015-06-08 19:54:29 +01:00
Alex Harsanyi
f73686b4ff 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
65fc5f84a2 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
0275d4b52f Use sport specific metric for PMC in RideSummaryWindow
For single ride use sport specific base metric
For date range use sport specific base metric if filtered activity
list is homogeneous or combined otherwise.
2015-06-07 22:52:33 -03:00
Mark Liversedge
c49e16f375 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
9c057191b5 Fix comment typos 2015-06-07 16:31:56 +01:00
Mark Liversedge
4a2513c1c7 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
203b03686b 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
761d82b509 Add Color to Segment name 2015-06-06 22:38:26 +02:00
Mark Liversedge
7da90c4c0e 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
7fb8eb66d1 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
1f93856f31 Missed SustainMetric.cpp in last commit 2015-06-04 21:04:43 +01:00
Mark Liversedge
df997a5e0e 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
5a3ad8887e Merge pull request #1394 from Joern-R/fit
FIT File Read - Exception not catched
2015-06-04 16:50:37 +01:00
Joern
51242da94d 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
b9438037b8 Remove qDebug 2015-06-03 22:40:32 +02:00
Mark Liversedge
cc7bbbec48 Plot Sustained on CP plot in compare mode
.. compare seasons
2015-06-03 21:37:09 +01:00
Mark Liversedge
768e6f835c Less qDebug() 2015-06-03 21:05:10 +01:00
grauser
55fb4d68c6 RideFile: Don't use 0.0 as min or max for gps lat/lon 2015-06-03 19:52:45 +02:00
Mark Liversedge
b02a869674 bool not BOOL 2015-06-03 16:41:05 +01:00
Mark Liversedge
36f57ac240 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
038e6f5098 Discover Peak Pace intervals for running and swimming 2015-06-03 12:05:54 -03:00
Mark Liversedge
d2a2b4b9e0 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
1a7ea91efd Add Sustained Efforts to CP Chart
.. overlay all sustained efforts on the curve
2015-06-03 14:59:56 +01:00
Alex Harsanyi
7fdedf0bfe 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
f5dd509c9e Fix W' Power metric
.. use all seconds not just those above CP !
2015-06-02 16:22:22 +01:00
Mark Liversedge
2e1b347851 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
5fc448c6ab 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
03bd38f497 Correct GPS route search optimisation 2015-06-01 23:49:24 +02:00
grauser
391ca0d29c SlfParser: Read start date in last format 2015-06-01 23:47:06 +02:00
Mark Liversedge
7ae35dbcf8 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
eb413b7c3f 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
16f13542f2 Set default chrome on Yosemite
.. to match the new UI.
2015-06-01 10:50:11 +01:00
Mark Liversedge
c10cd99360 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
48ac3aebbe EFFORTS found using metadata only
.. if no zones are configured.
2015-05-31 23:52:02 +01:00
Mark Liversedge
05f4997fca Added "Pmax" override in metadata
.. only used in interval discovery
2015-05-31 23:21:59 +01:00
Mark Liversedge
c69b2b2e96 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
ea980149ca Mark MATCHES that are To Exhaustion
.. name and also red color.
2015-05-31 13:34:22 +01:00
Mark Liversedge
dfc058cd04 Autodiscover MATCHES
.. and add them to the ride EFFORTS
2015-05-31 13:05:22 +01:00
Mark Liversedge
2e818e9428 Merge pull request #1387 from Joern-R/pull1
Auto-Intervals - Translation Enablement
2015-05-30 08:29:51 +01:00
Mark Liversedge
33a711b03a Fix interval offsets
.. when adjusting sample offsets to start from zero
2015-05-29 20:44:45 +01:00
Mark Liversedge
6c8e32180a Revert GPS route search optimisation
.. it fails to find my segments !
2015-05-29 20:22:56 +01:00
Mark Liversedge
509a123989 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
675efe966e 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
c00eefe89a Merge pull request #1382 from Joern-R/master
Update - Translation DE
2015-05-29 18:39:25 +02:00
Mark Liversedge
aaa03aa34a LTM no span slider in tile view
.. too much going on !
2015-05-29 14:43:41 +01:00
Mark Liversedge
082ee3b4c0 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
41890c852a 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
3dca5ab996 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
995920eb8b Update - Translation DE
... update Translation
2015-05-28 18:56:18 +02:00
grauser
785e1cb231 Route: QVariant add .toDouble() 2015-05-27 21:11:39 +02:00
Mark Liversedge
b8c21ca895 Change the color of an interval
.. in the IntervalEditDialog
2015-05-27 16:04:15 +01:00
Mark Liversedge
471afd21a0 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
aea510ec68 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
d742775ec4 Remove last wrong commit 2015-05-26 23:45:35 +02:00
grauser
76a79df78e Route Search: Add comment 2015-05-26 23:29:15 +02:00
grauser
8223a20b77 Route Search: verify Min-Max Lat-Lon before searching 2015-05-26 23:27:25 +02:00
grauser
d503003e17 SlfParser: update for last vesions 2015-05-26 23:27:25 +02:00
Mark Liversedge
aaf6b486b8 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
0e34307d2d 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
2f43e564d8 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
4979ac585a 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
4b52dda7c4 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
bc24f52f35 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
f2c423be5d 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
3d6f079147 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
3b8bcca4b6 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
cf8c3d3fee 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
b90c5c0894 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
51077668e5 Route Search Refactor Part 2 of 2
.. Route segments are found during interval refresh

.. Config/routes.xml only holds config now

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

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

NOTE: RouteWindow, and now, RouteItem will need to
      be reworked and fixed up for v4.0
2015-05-23 18:40:10 +01:00
Mark Liversedge
a3cee46676 Reinstating Interval functions: MULTI-SUMMARY
.. summarising when >1 interval selected.
2015-05-23 15:52:04 +01:00
Mark Liversedge
47afd82d9e 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
f7f4578241 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
947190a683 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
6f7546b6ba AnalysisSidebar: Reinstate interval SORT in list 2015-05-23 08:48:23 +02:00
grauser
d8b3e500ac AnalysisSidebar: Reinstate interval DRAG/DROP in list 3 2015-05-22 21:49:06 +02:00
Mark Liversedge
e2a56fd8a4 Reinstating Interval functions: ADD VIA FIND DIALOG
.. by click and drag
2015-05-22 19:17:39 +01:00
Mark Liversedge
25c5b7f8b8 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
63dbaa25d9 Reinstating Interval functions: ADD ON GOOGLE MAP
.. by click and drag
2015-05-22 17:20:02 +01:00
Mark Liversedge
ba748461d7 User Intervals Tree always at top
.. in sidebar
2015-05-22 15:13:21 +01:00
Mark Liversedge
f1775c800b Fixups Add Interval on AllPlot
.. fix by distance mode
.. remove findPeakPower from sidebar
2015-05-22 14:57:38 +01:00
Mark Liversedge
5f4357a232 Reinstating Interval functions: ADD ON ALLPLOT
.. by click and drag
2015-05-22 14:47:43 +01:00
Mark Liversedge
88b668f604 Fix interval metric refresh after edit
.. when the start/stop is changed.
2015-05-22 12:15:35 +01:00
Mark Liversedge
597dccff9c Reinstating Interval functions: RENAMING/RENUMBERING
.. rename a number of intervals in one go
2015-05-22 11:58:16 +01:00
Mark Liversedge
70d6fd192b 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
645d392a08 Remove qDebug() erroneously committed 2015-05-22 08:47:19 +01:00
Mark Liversedge
5c745e60d4 Reinstating Interval functions: SELECT/DESELECT
.. from interval navigator or map marker
2015-05-22 08:41:26 +01:00
Mark Liversedge
f8a0900ee1 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
53bf19ebc6 AnalysisSidebar: Reinstate interval DRAG/DROP in list 2
- Apply change to RideFile
2015-05-22 08:15:31 +02:00
Claus Assmann
9679c48cae 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
fc320c30c3 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
0c76544c34 AnalysisSidebar: Reinstate interval DRAG/DROP in list (correction)
Last commit correction
2015-05-21 22:37:27 +02:00
grauser
c1f642d520 AnalysisSidebar: Reinstate interval DRAG/DROP in list 2015-05-21 22:36:05 +02:00
Mark Liversedge
bff5de5a85 Add SSL to versions list
.. so we can see if it is compiled in !
2015-05-21 14:38:13 +01:00
Mark Liversedge
e4daf3b770 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
2f96e475ec 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
7643c2cb00 Power Zones: Update existing HR range 2015-05-19 23:34:06 +02:00
grauser
b1946b50bc Power Zones: Update existing range 2015-05-19 22:47:30 +02:00
Mark Liversedge
1e3f7227e2 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
3b3c98187f Auto Interval Discovery : Update SPRINT detection 4 2015-05-19 21:13:00 +02:00
Mark Liversedge
2dda61bee3 Zone fingerprint include Pmax fixup
.. needed to change in two places in Zones.cpp !
2015-05-19 19:32:30 +01:00
grauser
d5238b7cf1 Auto Interval Discovery : Update SPRINT detection 3
try with 3 components model
2015-05-19 19:01:51 +02:00
Mark Liversedge
2ae96d3d8e Fix syntax error in RideItem.cpp 2015-05-19 11:49:59 +01:00
Mark Liversedge
fabd6bffc9 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
353527af13 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
81a3d487e6 Auto Interval Discovery : Update SPRINT detection 2 2015-05-18 23:18:27 +02:00
grauser
4690f0e605 Auto Interval Discovery : SPRINT detection correction 2015-05-18 22:12:07 +02:00
grauser
d285ec8d97 Auto Interval Discovery : Update SPRINT detection 2015-05-18 21:30:39 +02:00
grauser
d12d18c701 Auto Interval Discovery : SPRINT detection 2015-05-18 19:57:09 +02:00
Mark Liversedge
9027e1db02 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
758e9256a1 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
c1739199b2 Fixups For JsonRideFile.y
.. for intervals now as pointers
2015-05-18 14:21:50 +01:00
Mark Liversedge
d5ae1bf685 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
2912982132 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
ffce828c77 Add Pmax to Zones::fingerprint()
.. and minor cosmetic on edit.
2015-05-17 21:00:53 +01:00
grauser
66afa908b1 Power Zones: Add Pmax (with CP and W') 2015-05-17 21:14:08 +02:00
Mark Liversedge
3054541d3b Computrainer Serial Protocol Docs
.. should have added this a long time ago!
2015-05-17 15:31:00 +01:00
Mark Liversedge
f9c496f150 WKO+ 3 File Format Documentation
.. should have added to the repo a long time ago.
2015-05-17 15:26:20 +01:00
grauser
dec099fd21 Auto Interval Discovery : Update CLIMB detection 4 2015-05-17 10:02:53 +02:00
grauser
f292e523e2 Auto Interval Discovery : Update CLIMB detection 3 2015-05-16 20:18:38 +02:00
Mark Liversedge
ac77ff53d7 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
b100ebbde4 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
39b92ac29c 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
50d4e9bde1 Search all interval names
.. not just user defined ones
2015-05-16 10:08:30 +01:00
Mark Liversedge
12b0ab68ac TTE time string not seconds
.. instead of 301s we now say 05:01
2015-05-15 23:52:19 +01:00
Mark Liversedge
54db2720e6 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
4b32ed544c 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
ac947f6a32 Fix SEGV in CriticalPowerWindow
.. during initial startup when myRideItem is null
2015-05-14 22:26:04 +01:00
Mark Liversedge
3b90f147e4 Don't use QVector::removeAt() !
.. its not available on Qt 4
2015-05-14 14:51:29 +01:00
grauser
7312122cb0 Auto Interval Discovery : Update CLIMB detection 2 2015-05-13 23:13:08 +02:00
grauser
08c7eb4959 Auto Interval Discovery : Update CLIMB detection 2015-05-12 21:41:23 +02:00
grauser
644a8f069e Auto Interval Discovery : Add a ROUTE detection 2015-05-12 21:41:23 +02:00
grauser
edf9b826ff JouleDevice: Correct Joule GPS identification 2015-05-12 21:41:23 +02:00
Mark Liversedge
461501fe21 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
502e671bc7 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
80ab042b25 3D Chart use RideItem::intervalsSelected()
.. it missed out on the refactor for intervals.
2015-05-12 05:43:47 +01:00
Mark Liversedge
166c8c6132 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
ca4de3b676 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
a78214944f 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
8f03f38981 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
db2f25fc0b 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
377310c24f Sidebar Interval Type Font Bold 2015-05-10 17:51:00 +01:00
Mark Liversedge
05b19bc5b6 Fix Scatterplot SEGV interval
.. lots of issues introduced by refactor
2015-05-10 14:32:53 +01:00
Mark Liversedge
5ee6ae15b7 Don't point hover on PEAK POWER
.. in allplot, its really distracting !
2015-05-10 13:33:29 +01:00
Mark Liversedge
6cff666215 Interval Selected Fixups
.. GoogleMap wasn't working
.. CP ignored interval selection
2015-05-10 13:19:39 +01:00
Mark Liversedge
02d8add9b3 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
70c9587428 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
9a9424f924 Fix SEGV allplot hover compare mode
.. tries to look at intervals for null rideitem
2015-05-10 09:47:51 +01:00
Mark Liversedge
3332b0228c 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
67db9d59c8 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
9e63c6ee7d Don't wipe interval summary
.. on hover when intervals are selected
2015-05-10 08:44:55 +01:00
Mark Liversedge
6b2a2dbb65 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
100c0be881 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
b0c4b7786f Auto Interval Discovery : Add a first (test) CLIMB detection 2015-05-04 23:05:42 +02:00
grauser
4500899d0e JouleDevice: add getJouleType method 2015-05-04 22:26:36 +02:00
grauser
9751a85bf7 JouleDevice: Add Joule GPS+ device type 2015-05-04 22:15:08 +02:00
Mark Liversedge
1710c37f92 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
9e59e5d60c 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
e9b9bb6c04 Deprecated and missed off commit 2015-05-04 18:20:05 +01:00
Mark Liversedge
8a3e35b880 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
90c053f09f 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
4b81b6ddc5 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
feba99481c Code Spring Clean
.. compiler nits
2015-05-02 12:25:01 +01:00
Mark Liversedge
bf4ca0af64 Remove old Intervals View
.. we are taking a different approach for v3.2

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

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

.. new interval views will be developed in v4.0
2015-05-01 14:03:40 +01:00
grauser
0daae7f020 Interval: Add a temporary model for Interval view 2015-04-30 18:38:43 +02:00
grauser
49e964f585 Interval: Add interval type (Device, User, Peak, Route,...) 2015-04-30 18:20:22 +02:00
Mark Liversedge
de1262b010 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
bc87b16acf 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
008e217ec0 Add another /10 for Workbeats
.. brings it back to same scale as BikeScore
2015-04-24 10:37:21 +01:00
Mark Liversedge
cdc8857536 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
58c8c0bf2a Model: Some tests 2015-04-14 08:00:58 +02:00
grauser
59bc0c3307 Update French translation 2015-04-14 08:00:58 +02:00
Mark Liversedge
b100fc23de 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
dbfee3db52 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
f5bfcb112b Racermate fix to accumulate distance
.. not averaging it !
2015-04-10 09:04:16 +01:00
Mark Liversedge
a9150d8a4e 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
bdf346a2e8 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
f4434892dd 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
926a08f1b6 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
9d0e3e241e Add ability to export all csv
.. for batch export
2015-04-08 17:21:24 +01:00
Mark Liversedge
3f1b9fe5d1 RideFile::resample() use libsamplerate
.. if it is available.
2015-04-08 14:03:11 +01:00
Mark Liversedge
7a5d937336 Merge pull request #1358 from aevanforeest/master
Added virtual power for Elite Arion Mag rollers
2015-04-08 11:19:37 +01:00
aevanforeest
474148670b Added virtual power for Elite Arion Mag rollers 2015-04-08 12:15:00 +02:00
aevanforeest
37edf945d8 Added virtual power for Elite Arion Mag roller 2015-04-08 12:13:43 +02:00
Mark Liversedge
878776e051 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
e96fcd170c 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
1ef8910db8 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
3e2cf20255 Add support for vpower on CycleOps Magneto Pro
Fixes #688
2015-04-07 10:59:16 +01:00
Mark Liversedge
ad9398208f Add Support for Elite Muin 2013
.. as provided by "muinuser" on github

Fixes #1075
2015-04-07 10:40:55 +01:00
Mark Liversedge
a5fb9846f1 It's named after AJ Ward-Smith
.. not Ward/Smith or Ward Smith.
2015-04-06 20:10:54 +01:00
Mark Liversedge
99e455a1c4 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
50ddbe62ab Add WardSmith to CP History
.. and little fixup for code (cut/paste error)
2015-04-06 12:00:58 +01:00
Mark Liversedge
ae29908a3d Add Ward/Smith Model 2015-04-06 11:47:06 +01:00
Mark Liversedge
9a41e4a897 Merge pull request #1356 from Deadolus/qwtindlabels
Adding Indended Plot Markers for AllPlot
2015-04-05 16:57:13 +01:00
Simon Egli (Silzo)
787932f183 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
e9b834f553 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
3eb3698d6f 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
a37c91e004 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)
602d108b82 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
57314d0f56 Order of operations for ELITE SUPERCRONO POWER MAG Trainer 2015-03-23 18:42:29 +01:00
shmoo
42c3ac51e2 Order of operations for SARIS POWERBEAM PRO Trainer 2015-03-23 18:36:04 +01:00
shmoo
296c59f0e4 Order for operations for Minoura V100 Trainer 2015-03-22 16:17:12 +01:00
shmoo
ba3487b112 A more accurate calculation, typo 2015-03-22 16:06:18 +01:00
shmoo
3cc415f208 A more accurate calculation 2015-03-22 16:02:49 +01:00
shmoo
dce1add51b New Virtual Power device - Minoura V270/V130/LR320/LR540 Trainer 2015-03-22 15:13:15 +01:00
grauser
10003e4806 Translation: lupdate + some fr translation 2015-03-20 07:30:13 +01:00
Damien
805ff21cb9 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
aca583ee0b CvsRideFile: Update CP Plot export importation 2015-03-16 21:50:22 +01:00
Damien
33158f9ba9 LTMPlot: Add event on last day 2015-03-16 21:50:22 +01:00
Mark Liversedge
485004f030 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
511eb77df6 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
bd9775bb9f Recognise Stephan Lips
.. in contributors
2015-03-16 17:21:00 +00:00
Stephan Lips
9fea4f8ad3 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
d0fc5627b5 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
3bf39f4f3f Merge pull request #1341 from Joern-R/t1
Update Wiki
2015-02-28 09:34:54 +01:00
Joern
ca02ed4454 Update Wiki
... 3.2 Screenshots
2015-02-28 09:35:39 +01:00
Alejandro Martinez
7c3219a6c2 Fixed distance from LapsEditor in Manual Workouts with imperial units 2015-02-24 11:13:38 -03:00
Mark Liversedge
0f2fc731a2 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
fc026ec219 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
c4a819db67 Added heartbeats metric
.. count of heartbeats per interval
2015-02-23 16:10:43 +00:00
Mark Liversedge
39fb140b82 Merge pull request #1331 from Joern-R/tree
TreeMap - UI nits/improvements
2015-02-23 15:14:15 +00:00
Joern
3151b1fee3 Merge pull request #1332 from Joern-R/de
Update Translation DE
2015-02-22 13:30:41 +01:00
Joern
750fac2606 Update Translation DE
... new terms and corrections
2015-02-22 13:30:36 +01:00
Joern
f3d015b2bb 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
528221170c 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
e21540f469 Robot sets tHb and SmO2
.. to help with testing
2015-02-22 09:42:31 +00:00
Joern
6fde93afe0 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
59da5f83b2 Missed to remove old "file.open" code line
... need to be removed
2015-02-21 19:11:17 +01:00
Mark Liversedge
ad160cbf05 Merge pull request #1328 from Joern-R/xml2
Report- File "Open for Write" errors
2015-02-21 18:07:39 +00:00
Joern
5df7503904 Report- File "Open for Write" errors
... for all config files, which need to be written, show error Popup, if
file cannot be openend in "Write" mode
2015-02-21 19:03:23 +01:00
Mark Liversedge
9e3b33638f 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
1d11a6b7ca 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
ddef4ec356 Merge pull request #1326 from Joern-R/test
Upgrade - Folder - verify upgrade demand
2015-02-20 16:39:54 +00:00
Joern
3c409241b7 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
b60c93e343 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
18d8d131ab 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
0b5af0d7b6 Merge pull request #1324 from dresco/ANT
ANT: Opening incorrect device
2015-02-19 22:23:47 +00:00
Mark Liversedge
9e510ca08b 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
d43ee7b6a4 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
ea37db2167 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
e0688da2d7 Merge pull request #1321 from Joern-R/ramp
Manual Ride Dialog - some nits
2015-02-18 19:19:35 +00:00
Mark Liversedge
4856e58dac Merge pull request #1320 from amtriathlon/master
Fixed conversion errors in pace units
2015-02-18 19:18:20 +00:00
Joern
e3e00f2761 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
92145eac34 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
c5a536e10f Fixed conversion error in swim pace units 2015-02-18 15:06:08 -03:00
Alejandro Martinez
ad822a9472 Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-02-17 18:12:21 -03:00
Mark Liversedge
2cbca0a812 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
744ddc4a31 Merge pull request #1317 from Joern-R/t1
Estimates Plot - some fixes
2015-02-15 15:29:20 +00:00
Joern
fe93793e5b Estimates Plot - some fixes
... shift plot if start date is earlier than any Power Estimates exist
... enhance grouping (calculation of averages for month/years/all
grouping)
... adjust estimates calculation
... to calculate non-overlapping weeks data
... to not create any "infinite" data for weeks before the first Power
based actitivity exists
2015-02-15 16:11:58 +01:00
Mark Liversedge
d254e0b9ae 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
c42b003715 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
1cfc023473 Adjust decimals for distance metric and max rows in LapsEditor 2015-02-13 22:31:03 -03:00
Alejandro Martinez
9e2b6079f4 Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-02-13 15:58:39 -03:00
Mark Liversedge
5ea16e9b1e Fix Veloclinic model t=0 bug 2015-02-13 14:09:57 +00:00
Alejandro Martinez
a6484a3430 Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-02-13 09:42:39 -03:00
Mark Liversedge
a78dce2cb9 Add Veloclinic CP slider
.. to adjust when seeking estimate for CP
2015-02-13 11:51:33 +00:00
Alejandro Martinez
a9a31edb3a Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-02-10 09:14:40 -03:00
Mark Liversedge
4b953a214c 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
d63fdb6126 Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-02-09 20:17:53 -03:00
Alejandro Martinez
ecc02d22b7 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
0a44e4c7ab 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
87f0729d43 Revert RideMetric::imperialPrecision()
.. introduced within bae36e6b
2015-02-09 22:07:29 +00:00
Mark Liversedge
c84cfae01d 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
5fd2873df2 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
5b1e035517 Column Chooser scrollable
.. it was too difficult to use as a big matrix
2015-02-09 15:03:33 +00:00
Mark Liversedge
2b0de63b32 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
1be93193fe 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
dd339a0a2e 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
1577af489b 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
226e2c928d Merge pull request #1311 from Joern-R/wiki2
Update Wiki
2015-02-08 18:24:48 +01:00
Joern
4531765d1b Update Wiki
... some screenshots
2015-02-08 18:24:53 +01:00
Mark Liversedge
613f6f6a89 Merge pull request #1309 from Joern-R/upgrade3
Upgrade - enforce root() clean-up
2015-02-08 14:19:18 +00:00
Joern
e7d2faa381 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
bc301d091f 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
7b5c0b0eb2 Fixed lack of reset for paceZoneSelectedArray in PowerHIst 2015-02-07 20:26:01 -03:00
Mark Liversedge
3d630442c9 Merge pull request #1306 from Joern-R/c
Calendar Text not shown if language <> "en"
2015-02-05 18:11:53 +00:00
Joern
f5afd6c112 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
8b609d2da2 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
f70a01ca48 Merge pull request #1304 from Joern-R/upgrade
Upgrade - More checks/messages
2015-02-05 16:35:49 +00:00
Joern
97854bdd8c 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
17bb16708d Add aPower versions of Skiba Metrics
.. aBikeScore, axPower etc.
2015-02-05 14:42:56 +00:00
Mark Liversedge
ff8aba4ec2 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
226e81608e Increment DBSchema for last commit
.. to force a recompute of the metrics
2015-02-05 13:47:39 +00:00
Mark Liversedge
46c02ea4e6 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
36991ae45e 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
b6b2472419 Merge pull request #1301 from amtriathlon/master
Simplified IntervalSummaryWindow removing Pace special cases
2015-02-05 07:31:47 +00:00
Alejandro Martinez
9348dcf52d Removed special case for Pace in RideSummary
Used RideItem::getStringForSymbol
Modified RideCache::getAggregate to use RideMetric::toString
2015-02-04 21:30:47 -03:00
Alejandro Martinez
5703cfa116 Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-02-04 17:56:07 -03:00
Mark Liversedge
efe7a5d0dd Fix RideNavigator::cursorRide()
.. new ridecache model and proxy interaction needed
   fixing up -- cursorRide() was not working at all !

Fixes #1300
2015-02-04 20:34:54 +00:00
Alejandro Martinez
34e7bb6d08 Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-02-04 09:32:02 -03:00
Mark Liversedge
fd07763891 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
234481a541 Simplified IntervalSummaryWindow removing Pace special cases 2015-02-03 23:35:45 -03:00
Alejandro Martinez
ea5599b76e 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
7517b359e3 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
821542c7fe 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
436128f340 Fixed lower-is-best for Pace metrics
Also removed isTime since time formatting assumes seconds and they are in minutes,
it remains pending to change formating to mm:ss.
2015-02-03 15:06:10 -03:00
Mark Liversedge
816ff5f3a1 Merge pull request #1291 from amtriathlon/LapsEditor
LapsEditor - Initial Version for swimming and running
2015-02-03 16:21:36 +00:00
Mark Liversedge
23503aa25f Scatter Plot Garmin PS shows TE
.. cut and paste error.
2015-02-02 22:32:05 +00:00
Mark Liversedge
d7c5e705cf Yosemite Scope Bar Button Sizes
.. made them slightly wider on Yosemite
2015-02-02 20:53:56 +00:00
Mark Liversedge
7035c09d37 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
ad65688ece 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
ac8174ea4d Merge pull request #1295 from amtriathlon/master
Updated Spanish Translation
2015-02-02 16:39:58 +00:00
Mark Liversedge
0f9bd25847 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
528aa2400f 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
907ba634c2 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
aea39b8ec8 Update Translation DE
... corrections/completion
2015-01-31 19:26:54 +01:00
Joern
d18c6346d4 Translation Enablement
... ErgDB Download - enable Translation
... fix double count for succesful downloads
2015-01-31 19:24:52 +01:00
Joern
7e1b7729dd HelpWhatsThis - Rename "Ride" by "Activity
... adjus the Wiki pathes to new names
2015-01-31 19:13:38 +01:00
Alejandro Martinez
26f6a36cba Updated Spanish Translation 2015-01-30 18:58:56 -03:00
Joern
d4065d3c99 Merge pull request #1294 from Joern-R/de
Update Translation DE
2015-01-30 19:49:58 +01:00
Joern
f14b785dbc Update Translation DE
... rename "Rides" to "Aktivity"
2015-01-30 19:49:05 +01:00
Mark Liversedge
54707abcd8 Time Riding renamed to Moving
.. to reflect multsport use
2015-01-30 16:51:29 +00:00
Joern
d9ff54c2ad Merge pull request #1293 from Joern-R/wike
Wiki: Terminology: Rename Ride->Activity
2015-01-30 17:44:50 +01:00
Joern
5454c45fbd Wiki: Terminology:Ride->Activities -
... update filenames so that fit to the updated Wiki documents
2015-01-30 17:44:23 +01:00
Mark Liversedge
fb994fa5e7 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
728c9a6537 Merge pull request #1292 from Joern-R/smart
Fit-File Format - Smart Recording
2015-01-30 09:35:05 +00:00
Alejandro Martinez
2286f670df 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
f1a37ea895 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
8a4295996d Recognise Jan de Visser
.. in contributors on about dialog
2015-01-28 22:39:10 +00:00
Jan de Visser
6632226e00 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
ae7d4f511a Merge pull request #1290 from amtriathlon/master
Updated Spanish Translation
2015-01-27 14:53:54 +00:00
Alejandro Martinez
c146c04aef Updated Spanish Translation 2015-01-27 11:49:02 -03:00
Mark Liversedge
0feefc4a26 Merge pull request #1289 from amtriathlon/master
Fixed minor interval alignment issue
2015-01-27 13:32:57 +00:00
Alejandro Martinez
7015011adb 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
c643ad2e0a Merge pull request #1287 from Joern-R/wiki
Wiki Update
2015-01-26 18:44:56 +01:00
Joern
86cade882d Wiki Update
... corrected pictures
2015-01-26 18:44:22 +01:00
Mark Liversedge
48d10ea033 Add Sigma to FIT manufacturers
Fixes #1286
2015-01-26 09:40:57 +00:00
Damien
7b07a380fc ANT: use QDateTime for lastCadenceMessage 2015-01-26 08:16:41 +01:00
Damien
8518cdb643 Update Translation FR (1/2) 2015-01-26 08:16:41 +01:00
Mark Liversedge
a9e0ef14b6 Merge pull request #1283 from Joern-R/workout
Workout Creator - Show Ride Time / Translation Enablement
2015-01-25 14:28:53 +00:00
Joern
411ea4e77a 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
a7f4585d70 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
1cf7b14bee 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
98065ede18 Merge pull request #1281 from Joern-R/de
Update Translation DE
2015-01-24 16:32:34 +01:00
Joern
09718b708b Update Translation DE
... Translation DE
2015-01-24 16:32:10 +01:00
Mark Liversedge
85f4351ffa 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
fa5642c95f 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
a888f6a77b Merge pull request #1279 from amtriathlon/master
Fixed GOVSS & SwimScore for manual workouts
2015-01-24 11:59:44 +00:00
Alejandro Martinez
bbc978b77a Fixed GOVSS & SwimScore for manual workouts
Forgot to include relative intensity
2015-01-24 08:49:14 -03:00
Alejandro Martinez
f394e68b67 Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-01-23 20:36:05 -03:00
Mark Liversedge
1afcc52cbe Merge pull request #1274 from amtriathlon/master
Fixed Pace units in IntervalSummaryWindow
2015-01-23 23:33:04 +00:00
Alejandro Martinez
22885a7dbc Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-01-23 20:32:06 -03:00
Alejandro Martinez
5cc97fe0dc Fixed Pace units in IntervalSummaryWindow
Run and Swim Pace/xPace follow pace unit preferences
2015-01-23 20:27:42 -03:00
Damien
e4d6a5e22c ANT: Priority for cadence from cadence or speed/cadence sensor
fixes #502
2015-01-23 23:36:40 +01:00
Alejandro Martinez
beca209de4 Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-01-23 17:09:58 -03:00
Mark Liversedge
d3f0ab5449 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
74f9206c0d Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-01-23 17:02:10 -03:00
Alejandro Martinez
c4d99dd2b7 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
8f4d318199 Tile mode honour color config changes
.. as background didn't change on color config
2015-01-23 19:22:54 +00:00
Alejandro Martinez
0bcc78613a 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
c5cd8cc140 Oops. css() color logic wrong way round 2015-01-23 17:57:58 +00:00
Mark Liversedge
4b271749a0 Diary Sidebar highlight current month
.. signpost what we've selected
2015-01-23 17:46:25 +00:00
Mark Liversedge
6e414a4774 Fix train chart refreshing
.. when config changes
2015-01-23 16:22:54 +00:00
Mark Liversedge
07a6af5904 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
1d230f04f2 Merge pull request #1272 from amtriathlon/master
Added GOVSS/SwimScore for manual workouts
2015-01-23 15:34:39 +00:00
Alejandro Martinez
7df3ab909a Add Estimated SwimScore for manual workouts
Based on average speed and duration
2015-01-23 12:25:51 -03:00
Alejandro Martinez
ca323c9f66 Add Estimated GOVSS for manual workouts
Based on average speed and duration
2015-01-23 12:22:36 -03:00
Mark Liversedge
d03fbcd975 More QSslSocket.h 2015-01-23 14:36:29 +00:00
Alejandro Martinez
efd3859d2e 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
c934e8b4d0 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
4fcb015976 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
6b521b0be1 Merge pull request #1271 from amtriathlon/master
Fixed sport tag on TCX file export
2015-01-22 19:15:58 +00:00
Alejandro Martinez
2a5ab3f228 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
1897156616 Merge pull request #1270 from amtriathlon/master
Set Sport Tag for TCX files
2015-01-22 15:19:37 +00:00
Alejandro Martinez
685699729a 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
16573ffe98 Fix CalDAV SSL connect() 2015-01-21 18:57:30 +00:00
Mark Liversedge
a45ab6d56b Merge pull request #1266 from Joern-R/dav
CalDAV - add error handling
2015-01-21 18:30:00 +00:00
Joern
49b1210031 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
ee0592a246 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
35bb937dc5 Let user disable hovering on allplot
.. it irks some people.
2015-01-21 08:13:51 +00:00
Mark Liversedge
ca34011082 Show CP on ErgFilePlot
.. makes interpreting W'bal curve a bit easier
2015-01-20 21:32:35 +00:00
Mark Liversedge
f8544eb4af Fix CP SEGV tile mode create interval
.. fencepost in create interval data
2015-01-20 20:39:44 +00:00
Mark Liversedge
a6737eb84c 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
049f527d09 Merge pull request #1262 from Joern-R/ssl
OAuth - check for SSL
2015-01-20 19:24:21 +00:00
Joern
e73fbc5902 Merge pull request #1264 from Joern-R/wiki1
Wiki 3.11 Update
2015-01-20 18:48:44 +01:00
Joern
ae964ae5b6 Wiki 3.11 Update
... Preferences / Athlete
2015-01-20 18:47:05 +01:00
Joern
6c9de3597b 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
d7212f1d69 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
bd126a0620 Import Workout from Wizard
.. Fixes #663
2015-01-19 20:16:56 +00:00
Mark Liversedge
f742c143dc Fix AllPlot Reference Line SEGV
Fixes #996
2015-01-19 19:47:04 +00:00
Damien
5514d3d2bb GoogleMap: Select interval : keep first selected point 2015-01-19 20:14:40 +01:00
Mark Liversedge
43d572edde 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
c98cc0e3ea Merge pull request #1260 from Joern-R/caldav
Calendar - Refresh and Upload - Google CalDAV
2015-01-18 18:20:47 +00:00
Joern
338e265969 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
45ef3fbf10 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
c09bc0bae4 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
9092f19f2c 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
b555c0cc86 Add ToolTip to IntervalNavigator
.. just the interval name
2015-01-17 09:51:53 +00:00
Mark Liversedge
04cabf1c44 Merge pull request #1252 from Joern-R/intervals
Add "GC_HAS_INTERVALS" for Route Window
2015-01-16 17:56:25 +00:00
Joern
979cc891fe Merge pull request #1253 from Joern-R/wiki
Wiki - Update 3.11
2015-01-16 18:54:10 +01:00
Joern
e492a58b92 Wiki - Update 3.11
... new and updated Screenshots for 3.11
2015-01-16 18:52:05 +01:00
Joern
35bd254a70 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
b1e2ea3a8f Merge pull request #1251 from Joern-R/qwt
QWT Build
2015-01-15 17:46:14 +00:00
Joern
43fc25dd3c 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
930a335855 Metrics: Add Calories based on average HR
fixes #1249
2015-01-14 22:37:20 +01:00
Damien
6ba4bebe57 GoogleMap: Add a searchPoint method 2015-01-14 22:37:19 +01:00
Mark Liversedge
14413fcb94 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
b888e58ac4 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
758ef4086d 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
f85fd89af7 Remove reference to Lucene 2015-01-14 10:32:50 +00:00
Mark Liversedge
b32c01464f 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
df94e42e58 Deprecate Lucene
.. use a simple free text search against the ridecache now we
   have all the texts available and in memory

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

.. the free text search is very simple, will need to bolster it
   over time e.g. it matches text not words
2015-01-13 20:52:01 +00:00
Stefan Schake
b5f45d20e6 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
b68487fbbe Merge pull request #1244 from Joern-R/curves
LTM - Curves Settings - Add Resorting of Curves
2015-01-13 19:28:57 +00:00
Joern
86d4528991 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
ba29c2d3f9 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
d33f800f73 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
418d45b253 Pages: Correct index in defaults processor 2015-01-12 22:59:58 +01:00
Damien
c58cdca7d1 RideSummary: Remove unused variables 2015-01-12 22:36:59 +01:00
Damien
6163ed4083 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
45f033f8a3 CPPlot: Some model testing 2015-01-12 22:27:11 +01:00
Mark Liversedge
493f0a6274 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
13909a8495 Merge pull request #1242 from Joern-R/averages
TE/PS - Average Calculation
2015-01-12 19:06:05 +00:00
Joern
7b2f8f0e9b 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
92a065fc5d 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
ebbd954734 Metadata changing recursion
.. this should fix 'hangs' when edit finished.
2015-01-12 07:52:28 +00:00
Mark Liversedge
15da5e929d Merge pull request #1241 from amtriathlon/master
Hide irrelevant interval metrics
2015-01-12 07:25:22 +00:00
Alejandro Martinez
19a0359957 Hide irrelevant interval metrics
In Ride Summary
2015-01-11 22:00:38 -03:00
Alejandro Martinez
0c9a02e743 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
52edebd096 Correct use of beginRemoveRows()
.. last update didn't fix the indexes.
2015-01-11 22:13:30 +00:00
Mark Liversedge
2e522c6728 Add HHb and O2Hb to Scatterplot
.. they were forgotten previously.
2015-01-11 22:08:36 +00:00
Mark Liversedge
b41326d39f Fix beginRemoveRows() SEGV
.. on delete ride
2015-01-11 22:08:08 +00:00
Mark Liversedge
c0616fa5af 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
5f6cfe278a 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
1330b003a7 Recognise Yves Arrouye and Philip Willoughby 2015-01-11 16:47:35 +00:00
Mark Liversedge
06ec7d61ad 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
fbffd1b467 Revert erroneous translation deletion
This partially reverts commit dd57141184.
2015-01-11 16:42:09 +00:00
Philip Graham Willoughby
dd57141184 Changes to build on OS X with spaces in path 2015-01-11 16:25:24 +00:00
Joern
01f8013b37 Merge pull request #1236 from Joern-R/master
Translation DE
2015-01-11 15:14:08 +01:00
Joern
8d98c5901c Translation DE
... update/correct Translation
2015-01-11 15:17:41 +01:00
Mark Liversedge
3be79d45f1 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
f655dbdde8 Introducing /quarantine for acvitities cause RideCache to crash/dump
... for RideImport and RideDownload the created .JSON files are firstly
stored in /tempActivities and only moved to /activities after
successfull updating RideCache (with this files with "bad data" cause
RideCache calculations to crash can be identified when starting GC again

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

... small addition - the existence of the new directory structure is
verified when opening an Athlete - missing directories are added to
ensure a consistent structure being in place at all times
2015-01-11 13:22:47 +01:00
Mark Liversedge
220b0f2842 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
32b18da693 Hide irrelevant interval metrics
.. in the interval sidebar
2015-01-11 09:43:14 +00:00
Mark Liversedge
44eb69c4a7 RR on Summary
.. after reinstating ramp rate now putting back onto summary
2015-01-11 09:32:11 +00:00
Mark Liversedge
7d33f3c754 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
72ce3cc4b1 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
fb2f9932a5 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
c18ea6eb44 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
32985d5d4d 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
e6f7817b6d 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
5f6c595472 CVSRideFile: Add import for CPPlot export 2015-01-10 19:04:25 +01:00
Mark Liversedge
6c412fc27c Scale Tooltip for W'bal 2015-01-10 14:51:40 +00:00
Mark Liversedge
bb7c6a304a Increment DBSchemaVersion for TriScore et al 2015-01-10 08:37:33 +00:00
Mark Liversedge
93f78a8f32 Merge pull request #1229 from amtriathlon/master
Added Swim Metrics
2015-01-10 08:09:03 +00:00
Alejandro Martinez
cb9d9239a4 Added Swim Metrics
SwimScore, xPace and Pace for Swimming
TriScore for combined PMC
2015-01-09 21:59:27 -03:00
Mark Liversedge
b7c8a49e7d isRelevantForRide for Coggan/Skiba metrics
.. so not shown on runs and swims
2015-01-09 18:26:17 +00:00
Mark Liversedge
670d3e5fca Merge pull request #1228 from amtriathlon/master
Add isRelevantForRide to metrics in GOVSS.cpp
2015-01-09 15:00:46 +00:00
Mark Liversedge
cae4b8b47b Overlay title bar nit
.. frame needed over title esp when in white.
2015-01-09 14:58:27 +00:00
Alejandro Martinez
599205813b Add isRelevantForRide to metrics in GOVSS.cpp 2015-01-09 11:10:13 -03:00
Mark Liversedge
728186a51e Turn off tooltip on RideNavigator
.. could have sworn i did this before.
2015-01-09 10:36:39 +00:00
Mark Liversedge
585801aa1a 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
0369508910 AllPlot tooltip shows speed in pace units according to sport 2015-01-08 20:41:05 -03:00
Alejandro Martinez
e556b398b2 Enabled Pace Zone shading and bining for swimming in speed histogram 2015-01-08 19:31:11 -03:00
Mark Liversedge
7cce1cf0ce Merge pull request #1226 from Joern-R/links
Help - What's this
2015-01-08 19:37:19 +00:00
Joern
2845a3efc9 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
22580fdf70 Tooltip Padding
.. looks a tiny bit better.
2015-01-08 19:05:46 +00:00
Mark Liversedge
0af1bf78a5 Fix CP Estimates
.. we filtered out the CP2 and CP3 estimates by checking
   for non-zero values for PMax and FTP that neither of
   these models provide estimates for !
2015-01-08 15:39:55 +00:00
Mark Liversedge
e2ea640cbe 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
2e914c281e 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
6a95e206b0 LTM Toggle Curves clicking on Legend
.. but need to integrate with curve isolation
2015-01-07 23:18:24 +00:00
Mark Liversedge
80e53dcf2f 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
39d044576f RideMetrics: add isRelevantForRide for HR and cadence (avg and max) 2015-01-07 22:32:22 +01:00
Damien
3dba2c58f5 RideMetrics: add isRelevant for Aerobic Decoupling and SmO2 metrics 2015-01-07 19:36:34 +01:00
Damien
d8cf1e3d08 LeftRightBalance: isRelevantForRide use DataFlag 2015-01-07 19:10:35 +01:00
Mark Liversedge
5c54b50722 Ratios are averages not peaks
.. for Power/HR and NP/HR ratio metric aggregation
2015-01-07 17:31:38 +00:00
Mark Liversedge
74e4d9e440 Merge pull request #1225 from amtriathlon/master
Separate Swims in Trends Summary
2015-01-07 16:07:50 +00:00
Alejandro Martinez
3d9f8eea70 Separate Swims in Trends Summary
Update spanish translation
2015-01-07 13:01:27 -03:00
Alejandro Martinez
a8d310262b Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-01-07 12:59:28 -03:00
Mark Liversedge
dc8cb24f43 Delete Rides during refresh
.. place on a delete list and clear them once
   the ridecache refresh completes.
2015-01-07 15:32:05 +00:00
Mark Liversedge
f5ba4743da Restart RideCache refresh on Config changes
.. need to restart any in-progress refresh if you change
   config that affects it whilst it is running !
2015-01-07 15:08:41 +00:00
Mark Liversedge
404d8c84fe 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
4b51aa2f27 Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-01-07 09:24:46 -03:00
Mark Liversedge
d4e0653500 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
b18d1a1b46 Added isSwim
.. to RideItem and DataFilter
2015-01-07 10:14:53 +00:00
Mark Liversedge
c1a5c46e8b Merge pull request #1224 from amtriathlon/master
Time in pace zone metrics for swim activities
2015-01-07 07:29:43 +00:00
Damien
a734430afa RideSummaryWindow: Only test relevant in ridesummary 2015-01-07 07:58:23 +01:00
Alejandro Martinez
6b0cc37f83 Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2015-01-06 22:24:54 -03:00
Alejandro Martinez
c633a4c29f Spanish translation update 2015-01-06 21:23:16 -03:00
Damien
6f7c6af50d RideSummaryWindow: Only add Left/Right Balance if relevant 2015-01-07 00:07:32 +01:00
Alejandro Martinez
8759580c39 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
168a3abc69 BasicRideMetrics: Add Power Phase length 2015-01-06 22:39:04 +01:00
Damien
5ac2aa1d6a BasicRideMetrics: Avg for Power Phase only when we have a phase end 2015-01-06 21:45:25 +01:00
Damien
aa3d8e0d76 RideEditor: Change column order 2015-01-06 21:39:12 +01:00
Damien
4cfd7386a2 RideEditor: Correct column label 2015-01-06 21:25:55 +01:00
Damien
80790d72d6 BasicRideMetrics: Correct copy-paste error 2015-01-06 21:21:48 +01:00
Damien
7ce398a251 Garmin Cycling Dynamics : Switch on Power Phase 2015-01-06 18:44:27 +01:00
Mark Liversedge
13a0a998ea Increment DBSchemaVersion
.. for new Garmin Cycling Dynamics metric averages
2015-01-06 09:31:19 +00:00
Damien
db4a4a0809 Garmin Cycling Dynamics : Switch off Power Phase 2015-01-06 00:15:08 +01:00
Damien
bae36e6b2a BasicRideMetrics: Add metrics for Garmin Cycling Dynamics - part 1 (Avg) 2015-01-05 23:00:44 +01:00
Mark Liversedge
d81db266f3 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
86a599bfb8 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
011ad14e6f 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
09605fbc3e Merge pull request #1222 from Joern-R/de
Translation DE
2015-01-05 18:30:18 +01:00
Joern
51cc29906c Translation DE
... update
2015-01-05 18:34:52 +01:00
Mark Liversedge
ad556808c5 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
313feeab63 Tiny nit, positioning of sport selector.
.. just to make it super obvious to users.
2015-01-05 13:46:34 +00:00
Mark Liversedge
503a1b4de0 Merge pull request #1221 from amtriathlon/master
Added Swim Pace Zones to Config
2015-01-05 13:34:26 +00:00
Alejandro Martinez
5345a69cdf 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
38ddf01adc 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
b12e853a36 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
825372bca8 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
03d6a8b11a Interval Navigator colors config
.. update when the config changes
2015-01-05 10:49:01 +00:00
Damien
5284447498 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
26d232c171 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
73144ae7a1 Add Peripedal CSV support
.. and a test ride too.
2015-01-03 11:02:23 +00:00
Alejandro Martinez
bbd4063781 Pace Zones tidy up
Previous to support run&swim pace zones
2015-01-02 16:26:36 -03:00
Mark Liversedge
17fecc41c7 Reinstate Ramp Rate (RR)
.. on LTM plots

.. and rr(metric) function in datafilter
2015-01-02 12:05:41 +00:00
Mark Liversedge
17597e052d 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
c7e71646c0 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
5529bcff66 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
99ea36cad5 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
d255ae5f92 Don't fill curves on FullPlot
.. even if its selected in options.
2015-01-02 08:03:49 +00:00
Mark Liversedge
d80a326d66 DataFilter Dynamic Bug
.. leaf traversal returned parent dynamic not ours.
2015-01-01 20:04:27 +00:00
Mark Liversedge
b3dbeb2517 Leaf::isDynamic SEGV
.. traversing null branches.
2015-01-01 19:30:34 +00:00
Mark Liversedge
4d381b877c Dynamic DataFilter Query
.. will rerun as ride selection changes.

.. but will never stop until cleared so use at your
   own risk, as will run EVERY time you select a
   different ride.
2015-01-01 17:57:36 +00:00
Mark Liversedge
fb5c6a2bcf Datafilter date 'current' to complement 'today'
.. but need to think how we can refresh when current ride changes.
2015-01-01 16:40:40 +00:00
Mark Liversedge
9c9dc93567 Merge pull request #1215 from Joern-R/de
Update Translation DE
2015-01-01 16:34:36 +00:00
Mark Liversedge
13b093ff23 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
580a5a780a Histogram refresh on Ride Save
.. when cache needs to be refreshed.
2015-01-01 15:55:01 +00:00
Mark Liversedge
7b2423afac 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
b71aa39d3a Backup Rename error message
.. the "bak" directory was added during the development cycle
   and will not be present for users that worked with an early
   development build

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

.. the error message has been changed to provide the details of the
   directory where the failure is occurring to help signpost users
   to the problem
2015-01-01 13:13:32 +00:00
Mark Liversedge
36c0f0365c Errant qDebug 2015-01-01 11:48:49 +00:00
Mark Liversedge
0a5cb2b4a3 W'bal and Derived refresh
.. during mass update, not just on data change.
2015-01-01 11:28:01 +00:00
Mark Liversedge
6c5f726bf5 Fix delete/add ride bugs
.. fix a few SEGV!
2015-01-01 09:58:11 +00:00
Mark Liversedge
5102b7e75c 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
04c3d8cee7 RideNavigator Clear Zero and NaN values
.. tidy up the output
2014-12-31 23:15:07 +00:00
Mark Liversedge
2fb17922d3 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
2566ca38f5 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
f4dc2cae81 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
99023f0756 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
3f6b6d2577 Refresh done, remove qDebug
.. refresh is complete pending a couple of tricky
   scenarios to resolve in the next week or so.
2014-12-31 17:48:10 +00:00
Mark Liversedge
50f8582570 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
94d733b75b 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
f39214cbe8 RideItem recompute NP etal when data changes
.. just before signalling plots to redraw
2014-12-31 15:30:06 +00:00
Mark Liversedge
b28d7a5a40 Refresh AllPlot when WBAL config changes
.. extracted out CONFIG_WBAL to support this
2014-12-31 15:22:55 +00:00
Damien
7c776ddcff CvsRideFile: don't use msecsSinceStartOfDay 2014-12-31 16:08:41 +01:00
Mark Liversedge
f2d17652ea Honour PMC constants
.. and refresh when they change.
2014-12-31 14:52:54 +00:00
Mark Liversedge
56b5114af7 Update Note coloring during RideItem::checkStale()
.. it takes as long to check if its out of date
   as it does to just change it !

.. would be pointless to kick of a refresh just for this.
2014-12-31 14:06:21 +00:00
Mark Liversedge
16ab91985a Fix AllPlotInterval SEGV
.. trying to reference context->ride in constructor (!)
2014-12-31 13:58:27 +00:00
Mark Liversedge
3ccd49acea 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
c5afdf0022 Merge pull request #1216 from Joern-R/auth
Adding "Help Overview" Window
2014-12-31 13:44:20 +00:00
Joern
a9543c050a 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
9a17258f44 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
8cfd02f8b5 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
bccdf10335 Update Translation DE
... update Translation DE
... correct Help Text/Links
2014-12-31 11:29:10 +01:00
Mark Liversedge
ec217367c3 Notify config changed - UNITS, GENERAL, PMC
.. Weight changes when units change which is a bit
   crappy, should fix that somehow.
2014-12-31 10:26:28 +00:00
Mark Liversedge
d78c0bf402 Notify config changed - ATHLETE
.. notify if Athlete weight or height were changed by
   the user during the config dialog

.. no longer included in zones fingerprint

.. ridecache now picks up on specific config changes
2014-12-31 09:32:47 +00:00
Mark Liversedge
59a17cc7db 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
3567d2d7bf CvsRideFile: Add Freemotion Bike cvs
fixes #1168
2014-12-30 22:15:18 +01:00
Mark Liversedge
02d83a982c Recognise Stefan Schake
.. for Tacx Vortex support in v3.11
2014-12-30 19:37:14 +00:00
Mark Liversedge
16336ca1d3 Merge pull request #1214 from Joern-R/help
KML File Creation - enhancements
2014-12-30 19:04:18 +00:00
Joern
9d3f48869a 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
327c1b2102 Merge pull request #1213 from stschake/tacxvortex
Basic support for Tacx Vortex trainers
2014-12-30 18:29:18 +00:00
Mark Liversedge
5bb5dc3d9e Refresh Summary every 5 seconds
.. not constantly (!)
2014-12-30 15:59:45 +00:00
Mark Liversedge
377cde71c3 Histogram refresh during background refresh
.. just forces a replot if in range.
2014-12-30 15:51:01 +00:00
Mark Liversedge
6cbf83928c RideSummary refresh during background refresh
.. but only if plotting a date range
2014-12-30 13:40:20 +00:00
Mark Liversedge
19ec794fb2 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
365778fb0c 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
55928938ef 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
24500c3700 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
3b4e2b4372 Developer slow refresh
.. add DEFINES += SLOW_REFRESH to slow down the
   background refresh on hosts with good performance
   when testing refresh code !
2014-12-30 10:39:07 +00:00
Mark Liversedge
15df8e51cf Histogram refresh on rideChanged()
.. just force replot using existing method.
2014-12-30 10:23:46 +00:00
Mark Liversedge
39e691b4b4 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
0d0c3dacbe HrPw refresh on rideChanged()
.. just forces a replot
2014-12-30 09:46:11 +00:00
Mark Liversedge
25604491d7 PfPv Plot (QA) refresh on rideChanged()
.. just forces a replot
2014-12-30 09:38:40 +00:00
Stefan Schake
01bec9218e 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
fb8179d298 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
e1a1f6ab4f 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
315d4fe1f3 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
e5f178a453 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
30cfaf853a Withings, Summary + Cache refresh update
.. when downloading withings data the cache is refreshed

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

.. ridesummary has been updated to process rideChanged() signals.
2014-12-29 22:41:08 +00:00
Mark Liversedge
17b4477a8c Google Map refresh on rideChanged()
.. just forces a replot
2014-12-29 22:04:25 +00:00
Mark Liversedge
e814d98797 GcWindowResgistry compile nit 2014-12-29 21:49:09 +00:00
Mark Liversedge
178dc6dbed 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
db28f52368 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
2927cae26e 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
47801c2b52 Clucene is optional ! 2014-12-29 19:37:04 +00:00
Mark Liversedge
3c3b8e91e4 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
9e8905a7f1 Merge pull request #1211 from Joern-R/fullplot
Fullplot - Alt/Slope de-activated
2014-12-29 16:59:33 +00:00
Mark Liversedge
0d6a75342a Merge pull request #1207 from Joern-R/help
Update "WhatsThis" - help
2014-12-29 16:59:20 +00:00
Joern
1a3941ac38 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
f1c9bbfa06 Scatter refresh on rideChanged()
.. just forces a replot
2014-12-29 16:46:56 +00:00
Mark Liversedge
07bc4249e3 Remove qDebug
.. can uncomment during development
2014-12-29 16:29:29 +00:00
Mark Liversedge
282d35db32 AllPlot refresh on rideChanged()
.. just needs to force a replot
2014-12-29 16:23:47 +00:00
Mark Liversedge
a4237e158e Default Sport values
.. of Bike, Run, Swim
2014-12-29 16:10:19 +00:00
Mark Liversedge
254f463760 Introduce Context::rideChanged() signal
.. to let charts etc know that the *current* ride has
   changed and will need to be replotted

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

.. there is a qDebug() in RideCache in lieu of updating
   all the charts to refresh on this signal.
2014-12-29 16:03:02 +00:00
Mark Liversedge
c40630c1ca 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
5692d362d0 ConfigChanged Part 1 of 3
.. introduce concept of configChanged(what) to
   pass details of what config has been changed

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

.. next parts need to spot changes (part 2) and
   then action appropriately (part 3)
2014-12-29 13:41:50 +00:00
Mark Liversedge
e7399ba4f2 Lucene empty index optimisation
.. rather than check if lucene index contains every ride
   upon startup just force a rebuild of the index is missing.

.. if the index gets out of sync its because people are copying
   data and so they should delete the index when they do so
   to make sure it stays in sync
2014-12-29 10:24:10 +00:00
Damien
8be9f8a7b9 RideFileInterval: QMap use < to differentiate keys (2) 2014-12-28 23:42:27 +01:00
Damien
ce88839674 IntervalPlot: Hide in Compare mode 2014-12-28 23:42:27 +01:00
Damien
627e9fd71e IntervalPlot: set by distance 2014-12-28 23:42:27 +01:00
Damien
379db8b6c1 IntervalPlot: Clear interval hover 2014-12-28 23:42:27 +01:00
Mark Liversedge
6ae209c21b 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
a214c96278 IntervalPlot: Add Double-Click interval to Zoom 2014-12-28 18:27:08 +01:00
Mark Liversedge
486c4d536c 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
936d3fe77d Add Double-Click interval to Zoom
.. in the interval sidebar
2014-12-28 12:18:34 +00:00
Mark Liversedge
cea492019c 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
b4a54e5de1 RideFileInterval: QMap use < to differentiate keys 2014-12-28 09:48:16 +01:00
Damien
15e7589f70 IntervalPlot: don't group Matches 2014-12-27 16:49:21 +01:00
Damien
6ff7a0e5d6 IntervalPlot: color for Match 2014-12-27 16:12:46 +01:00
Mark Liversedge
78e2b63596 RideDB ::save() after ::refresh()
.. rather than waiting for close, since if there is a
   crash etc after the refresh it needs to run again.
2014-12-27 14:20:55 +00:00
Damien
c9334343cc IntervalPlot: thinner lines 2014-12-27 00:11:02 +01:00
Damien
d6e8f08521 IntervalPlot: correct IntervalsChanged() 2014-12-26 23:46:05 +01:00
Damien
6a459b89e4 IntervalPlot: recalc only if open 2014-12-26 22:48:59 +01:00
Mark Liversedge
80acabbc96 Fix Initialiser for Interval Plot
.. need to initialise in constructor.
2014-12-26 21:47:18 +00:00
Damien
1db138138b IntervalPlot: recalc after interval changed 2014-12-26 22:35:40 +01:00
Damien
a04894bc2a IntervalPlot: change height 2014-12-26 22:25:05 +01:00
Damien
a703c69d2e Interval: Correct multiple overlap 2014-12-26 21:37:23 +01:00
Damien
7878c33f0b AllPlotWindow: Add interval plot 2014-12-26 21:20:33 +01:00
Mark Liversedge
78a058880a No more WANT_RIDECACHE
.. its not optional !
2014-12-26 19:24:36 +00:00
Mark Liversedge
4cb47c7abd Fix Meta Autocomplete ranking
.. when using '*' for values we autocomplete based upon
   previously entered values for the field, but we didn't
   take into account ranking.

.. now the autocomplete list is ranked to most popular values
   complete first.
2014-12-26 10:56:33 +00:00
Mark Liversedge
6a2e9b9c67 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
83a5c7d84e 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
9fe930dca5 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
33be087c2f RideSummary list recent rides first
.. iterate from most recent rides first.
2014-12-26 09:11:06 +00:00
Mark Liversedge
98720f099e Use C++ <cmath> not C <math.h>
.. it clashes, and also its deprecated for C++ sources
2014-12-25 20:38:18 +00:00
Mark Liversedge
9c1f110d3a 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
995d5fb4f1 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
e08955d599 Fix fencepost in LTM data table
.. seems wrong but is right.
2014-12-25 14:10:12 +00:00
Mark Liversedge
7ad2bda418 RideFileCache now refreshed in RideItem
.. and fixed sort order problem
2014-12-25 13:59:38 +00:00
Mark Liversedge
3561188711 CP overlay title nit
.. xxx/yyy is bad UX
2014-12-25 10:26:07 +00:00
Mark Liversedge
f88a85b244 Add Date strings to datafilter
.. to enable queries such as;

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

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

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

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

.. will add date strings next.
2014-12-25 09:12:34 +00:00
Mark Liversedge
44aea09d97 Deprecate SQL metricDB
.. removes across the code base

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

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

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

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

.. then fix up nits/bugs with diary view etc
2014-12-24 17:36:46 +00:00
Joern
2a5187c478 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
db967076dd 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
bc1e3c2713 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
a2c13f4cbd Minor nits 2014-12-23 15:01:09 +00:00
Mark Liversedge
ea56e65b88 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
9a11cf5452 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
1bb4c3264b 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
c1307da442 Default to Sync tab on TP dialog
.. its where you usually switch to.
2014-12-22 22:03:16 +00:00
Mark Liversedge
4483b734d1 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
c3c64c9912 Fencepost PMC data bug
.. caused 0 values to show for first day/week/month
2014-12-22 18:22:03 +00:00
Mark Liversedge
8e9232f2d1 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
5f39c9e226 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
bedf369a02 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
bc2391f089 Less Spacing for Bests / Intervals
.. now they show PMC data too, needs more space.
2014-12-22 09:47:35 +00:00
Mark Liversedge
ed778d8b1c 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
c9278b9fef RideItem destructor
.. no memory leaks here !
2014-12-21 22:03:36 +00:00
Mark Liversedge
a399c73de8 Fix SEGV on delete ride in AllPlot hover
.. tries to traverse the ride data after its been deleted.
2014-12-21 21:53:30 +00:00
Mark Liversedge
e37d0da017 Fix SEGV in PMCData on Import ride
.. when refreshing summary window PMC metrics.
2014-12-21 21:15:03 +00:00
Mark Liversedge
b11c750ae8 Add ATL, CTL, TSB aliases to DataFilter
.. for sts(TSS), lts(TSS) and sb(TSS)
2014-12-21 19:01:02 +00:00
Mark Liversedge
118a5fc4e4 Add PMC data filter functions
lts(metric), sts(metric), sb(metric) all return the PMC
value for the metric in question for the date of the ride
and therefore allow you to select rides based upon PMC data.

e.g. sb(TSS) > -5

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

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

could be a way of looking for rides at peak form (if 100 is
a peak CTL for you).
2014-12-21 17:34:21 +00:00
Mark Liversedge
2c4b2568fd TP Dialog Size
.. needs to be bigger, always end up resizing it !
2014-12-21 15:06:31 +00:00
Mark Liversedge
6ca48b3621 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
16fa4017d3 Don't show model range for ride summary 2014-12-20 20:46:44 +00:00
Mark Liversedge
0a91cf9ef6 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
70ff5f91e5 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
a33dff05e5 Show TSB add time of athlete best
.. on ridesummary
2014-12-19 22:35:54 +00:00
Mark Liversedge
d10ac1eb84 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
075db59373 Interval: Correct overlap of highlighted intervals 2014-12-19 21:32:05 +01:00
Mark Liversedge
9a6879f033 Remove GoldenCheetah Racing Credentials
.. its not going to happen and begs the question.
2014-12-19 19:56:02 +00:00
Mark Liversedge
fdf3760dee Migrate CRC from DBAccess to RideFile
.. and wipe a few more SummaryMetric references
2014-12-19 19:30:18 +00:00
Mark Liversedge
b8402088d7 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
5cb9696b09 RideCache update invalidate PMC
.. so it is recalculated when chart refreshes.
2014-12-19 17:26:38 +00:00
Mark Liversedge
c2db6a66a2 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
8f8e2a63ad 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
eb3b245dab Remove old references to SummaryMetrics
.. cleaning up from last few commits.
2014-12-18 19:10:47 +00:00
Mark Liversedge
d1d1d885de 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
973a497355 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
bf4522b639 Merge pull request #1202 from Joern-R/translate
Update Translation DE
2014-12-18 15:43:19 +00:00
Mark Liversedge
279ec56d13 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
40b9be717f Rename SummaryBest to AthleteBest
.. and move to RideCache.h
2014-12-18 14:59:18 +00:00
Mark Liversedge
e7ef34a122 Retire getAggregated + getBests
.. from SummaryMetrics
2014-12-18 14:22:36 +00:00
Joern
39762171fe Update Translation DE
.. update DE
2014-12-18 15:15:14 +01:00
Mark Liversedge
8f034fa5b2 RideCache::refreshUpdate(QDate)
.. updated to now pass the date at which the update has
   got to. So charts on need to refresh if the data they
   need is prior.
2014-12-18 13:57:06 +00:00
Mark Liversedge
7a5ca6f36a Fix reverse sorting of RideItem*
.. qSort needed a greaterThan function that worked
   with pointers not objects, so now we really do
   refresh in reverse.
2014-12-18 12:27:15 +00:00
Mark Liversedge
9f35459b55 RideCache refresh in reverse
.. also uses a copy to avoid delete/insert issues when adding
   and deleting rides during a refresh

.. but still need to consider the delete operation and marking
   items as in process or something
2014-12-18 11:35:18 +00:00
Mark Liversedge
40db32a56d 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
e201b62064 CLucene is optional !
.. oops
2014-12-17 20:46:27 +00:00
Mark Liversedge
8a462b43fe 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
698a598927 Migrate RideSummary (DateRange) to use RideCache
.. but compare mode still uses metricDB

.. and the code is still in need of tidy up
2014-12-17 17:03:45 +00:00
Mark Liversedge
31c9f6151e Migrate DiarySidebar to use RideCache
.. in the month/week summary.
2014-12-17 15:53:01 +00:00
Mark Liversedge
f9cc3cc83a Migrate LTMSidebar to use RideCache
.. just the summary widget basically.
2014-12-17 15:45:40 +00:00
Mark Liversedge
bf7c80b73d Migrate TreeMap LTMPopup to use RideCache
.. the other half, LTMWindow using LTMPopup is now commented
   out and will need to be fixed when LTMWindow migrates to RideCache
2014-12-17 14:36:21 +00:00
Mark Liversedge
0697af7e9a 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
72fadc23ac 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
01ac756ef1 Migrate TreeMap to use RideCache
.. and therefore also using the Specification approach.
2014-12-17 11:25:35 +00:00
Mark Liversedge
b737dcbebd Introduce Specification class
.. used to create a 'specification' against which we match
   a rideitem when plotting etc.

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

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

.. this should reduce memory usage and increase performance.
2014-12-17 10:57:57 +00:00
Mark Liversedge
56fd645277 Migrate AutoFilter to use RideCache
.. in LTMSidebar
2014-12-17 10:13:05 +00:00
Damien
a2f44e718f MetaData: Add default values 2014-12-17 08:17:11 +01:00
Mark Liversedge
3782f31952 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
67903db188 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
2e3ee9c07a 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
90db8a87be Migrate TP Download Dialog to use RideCache
.. stop using the metric db
2014-12-16 11:59:55 +00:00
Mark Liversedge
f8b18278c8 Migrate ManualRideDialog to use RideCache
.. for metric estimation
2014-12-16 11:37:35 +00:00
Mark Liversedge
0fe2d1b6f6 Removing unneeded MetricDB references
.. in RideFile and TwitterDialog
2014-12-16 11:15:25 +00:00
Mark Liversedge
ead01c69e9 Migrate DataFilter to use RideCache
.. no longer uses metricDB but traverses in memory cache
   and should be a lot faster.

NOTE: the line endings for DataFilter.{cpp,h} have been
     changed from dos to unix format which has resulted in
     the entire file being changed, apologies but needed to
     clean that up anyway.
2014-12-16 10:57:22 +00:00
Mark Liversedge
1025aa95f7 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
43a966e4a5 Fix Qt4 build of WhatsThis? 2014-12-15 16:47:10 +00:00
Mark Liversedge
e88ac85f29 PD Estimates use 12 week rolling window
.. the clunky old way of using a 2 month rolling window has
   been reworked to use a 12 week rolling window making the
   code less susceptible to jumping around esp. on 1st of the month!
2014-12-15 15:05:18 +00:00
Mark Liversedge
e9a7442103 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
0610575a7c 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
b105204b66 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
901933e58d ScatterPlot: ignore zero in one function 2014-12-13 16:33:30 +01:00
Damien
3de714a629 ScatterPlot: ignore zeros in compare mode 2014-12-13 15:52:53 +01:00
Mark Liversedge
ca90b79a34 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
96d2bea2d8 Refresh cache when version changes
.. so ONLY change version number of a refresh is going
   to be needed !!!

.. I updated rideDB version to 1.1 to ensure present gets
   refreshed as it is used by the PD model estimate code
2014-12-13 09:26:59 +00:00
Mark Liversedge
62e9ae6b96 Fix SEGV on array overrun
.. in scatterplot smoothing.
2014-12-12 22:21:30 +00:00
Damien
4fb31ee2ea ScatterPlot: Add smoothing 2014-12-12 22:09:04 +01:00
Mark Liversedge
6bd1ef1cc2 Merge pull request #1199 from amtriathlon/master
GOVSS and xPace
2014-12-12 21:00:38 +00:00
Alejandro Martinez
ee0faf430c Refined Aero and KE contributions to running power
Added comments and references
2014-12-12 16:12:49 -03:00
Mark Liversedge
2492108d35 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
7b8d1c4054 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
3a1c7309f3 Migrate refreshPDEstimates
.. from MetricAggregator to RideCache

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

.. and also SummaryMetrics::getForSymbol() now available in
   RideItem to access the precomputed metrics for a single
   ride.
2014-12-12 12:53:40 +00:00
Mark Liversedge
c2b23a060c MetricAggregator header nit
.. still declared getAllMeasures()
2014-12-12 11:32:25 +00:00
Mark Liversedge
ae1ea97728 Migrate getDistinctValues(field)
.. from DBAccess to RideCache.
2014-12-12 11:28:04 +00:00
Mark Liversedge
656e8f9363 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
b95ff295cd Migrate getAllFilenames()
.. from MetricAggregator to RideCache
2014-12-12 10:40:32 +00:00
Mark Liversedge
9b5065dc34 Migrate getAllDates()
.. from DBAccess to RideCache
2014-12-12 10:24:15 +00:00
Mark Liversedge
0840980ad6 Migrate Export Metrics as CSV
.. from MetricDB to RideCache
2014-12-12 10:15:26 +00:00
Alejandro Martinez
7adb64fe27 Minor fix in spanish translation and xPace format 2014-12-11 14:20:55 -03:00
Damien
de5538dbe9 ScatterPlot: Add ignore zero special case for LR Balance 2014-12-10 23:14:02 +01:00
Damien
4d482e7b6d ScatterPlot: Add NoTemp special case 2014-12-10 22:44:47 +01:00
Damien
d1863e6641 Device: Correct last commit 2014-12-10 21:35:59 +01:00
Mark Liversedge
8d378bde5e Merge pull request #1177 from chet0xhenry/feature/translation
Androidify App
2014-12-10 20:27:23 +00:00
Damien
1a4765016c Device: modify wheel size configuration
fixes #986
2014-12-10 20:59:02 +01:00
Mark Liversedge
5d13307f96 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
293d389baf Stray connect() in ScatterWindow 2014-12-10 13:53:55 +00:00
Damien
57b6b9fc8f Config: modify wheel size configuration 2014-12-10 00:10:42 +01:00
Damien
c106d17c4c ScatterPlot: Add trend line 2014-12-09 22:35:12 +01:00
Mark Liversedge
848b90c804 Merge pull request #1194 from amtriathlon/master
Update Spanish Translation
2014-12-09 19:12:55 +00:00
Alejandro Martinez
d3a49a633a Update Spanish Translation 2014-12-09 16:11:03 -03:00
Mark Liversedge
96ecd617db 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
e19b78dada 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
2cc47da374 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
98dc3448cf 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
3cf5b2fe56 RideCache::save() UTF-8 with a BOM
.. same as the ridefile.json
2014-12-08 22:52:26 +00:00
Mark Liversedge
6c31fe82e1 rideDB.json Indentation nit
.. yeah, I'm a bit OCD.
2014-12-08 22:35:08 +00:00
Mark Liversedge
111577088a RideCache::save()
.. dumps the ridecache to cache/rideDB.json
2014-12-08 22:12:06 +00:00
Claus Assmann
3277b96897 Fixup RideCache on QT < 5
.. QtConcurrent header names changed.
2014-12-08 20:02:34 +00:00
Mark Liversedge
e5ca8ae880 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
dddaf19531 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
713d97c120 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
22584288ca 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
75fdd97998 Fix inital screen load value format bug 2014-12-07 07:24:56 -07:00
Chet Henry
89bd88189d Even though ridelogger doen't use fit the ant+ plugin does 2014-12-07 07:24:56 -07:00
Chet Henry
57d485e117 Syncronize values, keys and keylables
Also don't wait for unpaired ant devices forever
2014-12-07 07:24:56 -07:00
Chet Henry
f3fbc3b026 Fix but with prefence update and screen. 2014-12-07 07:24:55 -07:00
Chet Henry
0d7fbb7b8d Lighter Ant+ connections 2014-12-07 07:24:55 -07:00
Chet Henry
fe03e9264e More ant code clean up 2014-12-07 07:24:55 -07:00
Chet Henry
c5cc16ab00 Clean up ant code 2014-12-07 07:24:55 -07:00
Chet Henry
278cec18ba Add classes to proguard keep 2014-12-07 07:24:55 -07:00
Chet Henry
3570faa3e1 Adding Proguard 2014-12-07 07:24:55 -07:00
Chet Henry
ac54877334 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
0d4120db6f Clean up code, reduce memory and make the world a better place 2014-12-07 07:24:55 -07:00
Chet Henry
07c2ff444e Fix textview overflow in display 2014-12-07 07:24:55 -07:00
Chet Henry
ac925c6c43 Update view on sensor list change 2014-12-07 07:24:55 -07:00
Chet Henry
1e94b2baf1 Clean up currenValues view and better style of dashboard 2014-12-07 07:24:55 -07:00
Chet Henry
ac6627f353 Replace default diamater with circumference and increase it to 2.096 2014-12-07 07:24:55 -07:00
Chet Henry
92560d81eb Better frount screen layout 2014-12-07 07:24:55 -07:00
Chet Henry
aa4b2ca552 Change gzip extention to gz for bash completion 2014-12-07 07:24:55 -07:00
Chet Henry
ee65b435c9 Fix wheel size bug 2014-12-07 07:24:55 -07:00
Chet Henry
ecafc4b8e4 Comment out unimplemented message 2014-12-07 07:24:55 -07:00
Chet Henry
62b7cdc1be Add wheel diamater configuration 2014-12-07 07:24:55 -07:00
Chet Henry
82d79085f4 Allow user to display imperial units 2014-12-07 07:24:55 -07:00
Chet Henry
d14e078c38 Fix ant+ ui flow 2014-12-07 07:24:55 -07:00
Chet Henry
7ab124f522 Better theme and style 2014-12-07 07:24:55 -07:00
Chet Henry
9725f62eda Light theme and better sample view 2014-12-07 07:24:55 -07:00
Chet Henry
f7a276d93e 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
62772295fd Reduce memory footprint and improve service performance 2014-12-07 07:24:55 -07:00
Chet Henry
9d5ade417c Fix problems and wait a bit for ant+ pairing 2014-12-07 07:24:55 -07:00
Chet Henry
632d637f00 better grid view of data 2014-12-07 07:24:55 -07:00
Chet Henry
2d2d3dac2f Better api version support 2014-12-07 07:24:55 -07:00
Chet Henry
f5a61672f3 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
f5b9b60502 Adding view of current data 2014-12-07 07:24:54 -07:00
Chet Henry
b7fa8e4ba8 Add a lot more string to strings.xml also add reset settings wf 2014-12-07 07:24:54 -07:00
Chet Henry
ad57cd0826 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
b84d4f1ad7 RideWindow copy/paste error
.. surprised it works !
2014-12-07 09:51:56 +00:00
Mark Liversedge
c4849d78f2 Minor logic error 2014-12-07 00:20:17 +00:00
Mark Liversedge
03c73d9af7 Merge pull request #1191 from amtriathlon/master
Enabled CP Models for Speed series
2014-12-07 00:15:23 +00:00
Mark Liversedge
dc5beca607 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
aeb3eed27e 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
aba0e5b933 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
5c9da4de37 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
282ecdef63 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
0a00fd88bf Merge pull request #1189 from Joern-R/fix2
Athlete Subdirs - improvements
2014-12-05 17:48:54 +00:00
Joern
1683ae9e2e 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
89569e1331 Merge pull request #1188 from mtbkeith/master
code cleanup of build warnings
2014-12-05 16:13:46 +00:00
Mark Liversedge
6680a71499 Merge pull request #1187 from Joern-R/fix1
GC Upgrade 3.11 - adjustment
2014-12-05 16:09:05 +00:00
Joern
27c0d100f5 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
e9a2acdbc6 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
f87adaa89a Added RideCache
.. source files missed off last commit
2014-12-05 15:33:19 +00:00
Mark Liversedge
a61c1e3217 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
4c3c1a7582 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
6a4a3eb02a 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
1ae3fb8811 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
13ea19c159 Tidy up RideItem.h
.. the cache code can start now !
2014-12-03 20:38:08 +00:00
Mark Liversedge
85d4b59295 Fixup 3D plot for RideItem zones
.. missed in last commit.
2014-12-03 20:21:30 +00:00
Mark Liversedge
aea550c267 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
ee02071461 QVector::removeAt(int) is new
.. so use ::remove() instead for QT4 compatibility.
2014-12-03 15:30:40 +00:00
Mark Liversedge
00ea1bfc86 Merge pull request #1186 from amtriathlon/master
Fixed copy and paste error
2014-12-03 15:28:18 +00:00
Alejandro Martinez
d6bbbfe112 Fixed copy and paste error 2014-12-03 12:23:38 -03:00
Mark Liversedge
f07ba8c8f7 Merge pull request #1185 from amtriathlon/master
Added xPace metric
2014-12-03 15:12:45 +00:00
Alejandro Martinez
acac8d307a 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
5515467dd9 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
106c98255e 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
f148481ada 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
f15ef1e223 Ignored /release to keep git quiet on windows 2014-12-02 13:52:51 -03:00
Mark Liversedge
43afccd81b Merge pull request #1183 from amtriathlon/master
Spanish Translation Update
2014-12-01 19:29:23 +00:00
Alejandro Martinez
a7397e7ae7 Spanish Translation Update 2014-12-01 14:34:01 -03:00
Damien
7318c79237 ScatterWindow: Add Compare mode for 2D Plot 2014-11-30 23:21:30 +01:00
Mark Liversedge
7d68e103ca Merge Activity recalc derived series
.. e.g. so O2Hb and HHb are done for Moxy
2014-11-30 21:57:42 +00:00
Damien
a7526242b0 JouleDevice: Remove BETA label 2014-11-28 07:12:29 +01:00
Damien
bfd606218b CsvRideFile: Parse Powertap Imperial CSV (if exists?) 2014-11-27 23:54:37 +01:00
Damien
6308a34717 CsvRideFile: Parse time in generic CSV 2014-11-27 23:05:23 +01:00
Damien
ae765755c4 CSVRideFile: Add new series 2014-11-27 21:36:32 +01:00
Mark Liversedge
ac2fad1305 More decimals for tHb tooltip
.. on AllPlot
2014-11-27 11:50:26 +00:00
Damien
b0bac869f7 CsvRideFile: Correct GC parser 2014-11-27 08:42:15 +01:00
Mark Liversedge
ed4176709d Merge branch 'master' of github.com:GoldenCheetah/GoldenCheetah 2014-11-26 22:02:37 +00:00
Mark Liversedge
553500596c Add Min, Max, Average SMO2
.. and add to summary
2014-11-26 22:01:46 +00:00
Damien
13d5db0bd1 TrainView: Record in GC CVS format 2014-11-26 22:22:08 +01:00
Mark Liversedge
d835ed5861 Remove errant qDebug() 2014-11-26 20:17:54 +00:00
Mark Liversedge
f8a73d2f4d Add SmO2 to Histogram
.. from Moxy
2014-11-26 19:23:47 +00:00
Mark Liversedge
c1ecc6826a 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
87cfa6d1dc 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
2a6ad65dc1 Merge pull request #1172 from Joern-R/ugrade
Upgrade v3.11 - Folder Conversion - troubleshooting
2014-11-26 17:35:00 +00:00
Joern
3868096745 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
56a07f8106 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
8925bc20e5 Make app relocatable to sdcard and make files readable by default 2014-11-25 17:59:45 -07:00
Mark Liversedge
e8bee5c56c Merge pull request #1169 from Joern-R/translation
Translation DE - Correction
2014-11-25 20:11:01 +01:00
Joern
16f1bba797 Translation DE - Correction
... Text for "Upgrade" typos,...
2014-11-25 20:10:16 +01:00
Mark Liversedge
b12d966aef 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
52408ad1b5 More spelling errors
.. Mark cannot spell for tofu.
2014-11-25 11:42:08 +00:00
Mark Liversedge
0db864a4d9 MU import
.. to keep code safe, but not activated.
2014-11-24 22:21:50 +00:00
Claus Assmann
35eb416bd2 Fix comment spelling errors
.. lots of them !
2014-11-24 15:37:56 +00:00
Mark Liversedge
1cd85fa415 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
edc094e9fa 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
24deab0feb More Moxy delimeters
.. ignore blank lines too.
2014-11-23 19:39:34 +00:00
Mark Liversedge
23a7f40b30 Merge pull request #1163 from Joern-R/upgrade1
GC Upgrade 3.11 - Log Autoscroll
2014-11-23 18:30:20 +01:00
Joern
957bd3ea1f 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
7707f757b0 Merge pull request #1162 from Joern-R/upgrade
GC Upgrade 3.11 enhancements
2014-11-23 17:49:10 +01:00
Joern
251f5c862e 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
4ffed24c4d Merge pull request #1161 from Joern-R/translate
Translation DE - 3.11 - First Update
2014-11-23 15:37:46 +01:00
Joern
8f923813ac 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
9b6ddc7aa7 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
7d23b9ef0f Increase crash magnitude to 3g 2014-11-22 20:29:52 -07:00
Chet Henry
1853f0d8f1 Add better crash detection and clean up dialog message title mix up 2014-11-22 20:19:31 -07:00
Chet Henry
7a627f6322 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
5afcbed029 Revert "Fix CyclingAnalytics upload"
This reverts commit ca3ee9cef6.
2014-11-22 18:07:36 +00:00
Mark Liversedge
7e84981736 Merge pull request #1154 from chet0xhenry/feature/crc
Feature/crc
2014-11-21 23:12:02 +01:00
Mark Liversedge
424498010a 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
d0bc460039 Add methods to help write data 2014-11-21 14:42:27 -07:00
Chet Henry
7d6cb2bdf4 Fix null exception from clean up 2014-11-21 14:40:10 -07:00
Chet Henry
5cc118ca5d A bit more clean up 2014-11-21 14:40:10 -07:00
Chet Henry
ce3607b699 More comments and more cleaning 2014-11-21 14:40:10 -07:00
Chet Henry
641a21af89 CRC
Clean up, Refactor and Comment
2014-11-21 14:40:10 -07:00
Chet Henry
ee5f032588 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
bd7082f877 Fix wrong date format on json ride file. 2014-11-21 14:40:10 -07:00
Mark Liversedge
2a53f30141 Added Watts:RPE ratio
.. compare average power to the rpe rating.
2014-11-21 19:33:41 +00:00
Mark Liversedge
e0c7c932ba Merge pull request #1153 from amtriathlon/master
Added pace zone shading to CPPlot
2014-11-21 19:40:42 +01:00
Alejandro Martinez
1554865415 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
c6246b11ae Remove reference_list change 2014-11-21 08:54:39 -07:00
Mark Liversedge
a9a4b924a1 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
cf422d6830 Allow for extra data in the array of series 2014-11-20 16:02:45 -07:00
Mark Liversedge
5052554422 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
35b8f05380 Fixed pace histogram shading when there is no Pace Zones defined 2014-11-20 17:41:09 -03:00
Mark Liversedge
a745dfdcc3 Fix PaceZone crash in PowerHist
.. cut and paste error
2014-11-20 20:01:53 +00:00
Mark Liversedge
757bf50807 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
bf2b7d0605 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
db34e57a65 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
e326fb8704 Add .qmake.stash to .gitignore
.. just to keep git status honest
2014-11-20 11:11:01 +00:00
Mark Liversedge
26e6639ae5 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
62adda849f Merge pull request #1150 from amtriathlon/master
Add pace to tooltip in CV chart
2014-11-20 07:49:58 +01:00
Alejandro Martinez
36da18b78f 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
d618f0d8cd Merge pull request #1137 from Joern-R/conversion
Fix Metric/Imperial - conversion issues
2014-11-19 16:30:30 +01:00
Mark Liversedge
5cbba9efcd 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
7c5a86aa96 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
2439781748 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
0ba6757d3e Fix pace units in tool tip for non metric units 2014-11-19 12:03:16 +00:00
Mark Liversedge
df62267090 Merge pull request #1146 from amtriathlon/master
Added pace to tooltip for speed histogram
2014-11-19 08:12:21 +01:00
Alejandro Martinez
2745900954 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
ca3ee9cef6 Fix CyclingAnalytics upload
.. bit of a hacky fix, but practical enough.
2014-11-18 21:25:17 +00:00
Mark Liversedge
4b213a085a 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
f82b22da5a Clean up white space 2014-11-18 14:05:25 -07:00
Chet Henry
50e7228ea6 Syncronize writes to build valid json 2014-11-18 14:05:24 -07:00
Mark Liversedge
137349a907 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
09c997dc4b Merge pull request #1142 from chet0xhenry/master
Add a Ride Logger App for Android
2014-11-18 10:50:10 +01:00
Mark Liversedge
f42b8c109b 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
0e4525da11 Added Polarized Zones to HR and Speed histograms 2014-11-17 21:50:57 -03:00
Chet Henry
a1cefcb1ff 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
7486aec760 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
9846815f4a Fixed time in polarized pace zones should be computed only for running activities 2014-11-17 18:52:54 -03:00
Mark Liversedge
af545cc541 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
7266ad7817 Added Polarized Zones distributions for hr and kph series to cache 2014-11-17 17:13:08 -03:00
Damien
ea3160bbe5 Aerolab: Correct dVE for imperial units
fixes #1025
2014-11-16 22:53:29 +01:00
Mark Liversedge
d98212e624 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
9dc4398ae3 DBSchemaVersion: 91 after TimeInZone and HRTimeInZone fix in last commit 2014-11-16 21:58:10 +01:00
Damien
50b4ae41ca TimeInZone: no time is data is not present
fixes #1126
2014-11-16 21:45:48 +01:00
Alejandro Martinez
a681bb8196 Fixed scaling for pace zone shading in speed histogram with imperial units 2014-11-16 17:42:24 -03:00
Alejandro Martinez
03ba468d8f Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2014-11-16 17:05:04 -03:00
Damien
8eccd0b682 CVSRideFile: Use ibike headwind even without dfpm power 2014-11-16 20:56:07 +01:00
Joern
3fc8bee85f 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
334a7bfc40 Merge pull request #1136 from Joern-R/best
Fix - Best xxTime y-Axis bug #1086
2014-11-16 16:55:20 +01:00
Joern
ec7d2ee647 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
2cbe27ced4 Merge pull request #1135 from Joern-R/cpvamscale
VAM CP x-axis bug #1085
2014-11-16 14:16:28 +01:00
Joern
a91e53a02b 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
6444df2178 IntervalSidebar: Add bests navigator 2014-11-16 12:33:44 +01:00
Mark Liversedge
1f5fe35b83 Recognise Keith Reynolds 2014-11-16 08:27:41 +00:00
Keith Reynolds
bcc19c94ef 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
064b32db90 Merge pull request #1134 from rclasen/sharedialog
always include ShareDialog
2014-11-15 23:58:24 +01:00
Rainer Clasen
a0531d293a 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
3d2c8660ba Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2014-11-15 17:07:34 -03:00
Mark Liversedge
34a6f5d6d2 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
c6dee10f8d Merge branch 'master' of https://github.com/GoldenCheetah/GoldenCheetah 2014-11-15 16:58:17 -03:00
Mark Liversedge
d4b3cbacf2 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
2adcabf239 Pace zone shading and binning for running activities in speed histogram 2014-11-15 15:49:38 -03:00
Mark Liversedge
4406981b78 Merge pull request #1132 from rclasen/sharedialog
use Sharedialog for Trainingstagebuch + VeloHero, further improvements
2014-11-15 19:04:28 +01:00
Rainer Clasen
783d9869c5 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
aa4770ca05 use ShareDialog for VeloHero and Trainingstagebuch
adjusted velohero + Trainingstagebuch upload to use new ShareDialog
2014-11-15 17:04:37 +01:00
Rainer Clasen
f1d9e6de4c 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
ded3c0c14c Merge pull request #1131 from Joern-R/auto
Auto-Import - "no files selected" UI improved
2014-11-15 11:26:44 +01:00
Joern
dcb2dcf59a 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
500ca79693 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
7bfe92df2d 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
39ce98a959 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
7d1b59d0a4 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
e3f67b7830 Merge pull request #1129 from rclasen/vhero
Upload to Velo Hero
2014-11-14 21:55:27 +01:00
Mark Liversedge
e8886aec4b 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
5bb19fd630 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
d56bd21156 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
48058676ec 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
b0ed28ba97 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
75886a70af 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
f80427d98e 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
4f2a4179bb 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
d1334d8dff 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
9b982731cd IntervalNavigator: Add the interval 2014-11-12 23:39:17 +01:00
Damien
6b992b963a IntervalNavigator: Remove intervals from SubRide 2014-11-12 23:33:29 +01:00
Damien
87432d611d IntervalNavigator: Add new files 2014-11-12 23:02:56 +01:00
Damien
08987d693a IntervalView: Add a new intervals View 2014-11-12 22:29:40 +01:00
Damien
11c026cf29 RouteSegment: Add a new sidebar 2014-11-12 22:29:40 +01:00
Mark Liversedge
25ee643094 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
04423b1385 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
8c2c7c9286 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
68904300e3 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
fae700e3c3 Merge pull request #1124 from Joern-R/query
Namedsearches - Escape for XML special chars
2014-11-09 15:11:13 +01:00
Joern
92cfbbd02f 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
d09f896950 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
f0f428090a Fixed stored height setting to be in meters instead of cm 2014-11-09 10:51:11 -03:00
Mark Liversedge
b77ab9c5ab Merge pull request #1122 from Joern-R/dir2
AthleteDirectory - Folder Structure - small fixes
2014-11-09 14:08:04 +01:00
Mark Liversedge
e39493ceef Merge pull request #1121 from Joern-R/autoimport
AutoImport - 2nd version
2014-11-09 14:07:40 +01:00
Joern
3f45e8541b 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
a73d5df95c 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
da73b072ed 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
693da5fadd 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
0322d5f25b 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
31cce4a67b Data flags O (Moxy) and R (Running Dynamics)
.. for filtering.
2014-11-08 19:54:40 +00:00
Mark Liversedge
96b1467b39 Fix Merge Wizard Infinite Loop
.. before working on UX and Moxy support
2014-11-08 16:38:21 +00:00
Mark Liversedge
6c62ee1819 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
c9aa0052ad Update DB version for GOVSS
.. for Ale Martinez recent update
2014-11-07 06:48:28 +00:00
Mark Liversedge
cb9967bf28 Merge pull request #1114 from amtriathlon/master
Initial GOVSS implementation
2014-11-07 07:45:05 +01:00
Alejandro Martinez
b535d2676e Initial GOVSS implementation
Includes LTP, RTP, IWF and GOVSS metrics with PMC integration
2014-11-06 22:09:35 -03:00
Mark Liversedge
02a585c6e0 Moxy Download CSV
.. header missing CR at eol.
2014-11-06 22:14:58 +00:00
Mark Liversedge
ae03d72708 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
ae5a27f9c6 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
45496f2f92 Moxy Fit tHb
.. divide by 100 not 10
2014-11-04 22:00:59 +00:00
Mark Liversedge
0906dcba4a 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
22e5fb5a25 Added Moxy file for testing 2014-11-04 20:36:11 +00:00
Mark Liversedge
6a0714c645 Moxy FIT file support
.. type 54/57 in .fit file for thb and smO2
2014-11-04 14:31:17 +00:00
Mark Liversedge
80f97951b0 Fix Moxy header copyright and ifdef 2014-11-03 20:34:00 +00:00
Mark Liversedge
66570337b3 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
00d2e989d4 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
230f028037 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
0bf8a8ab89 Merge pull request #1109 from rclasen/timeriding
fix "Time Riding" for rides without kph
2014-11-02 17:26:08 +01:00
Mark Liversedge
51af6ba76d Merge pull request #1108 from rclasen/ltmcurves
LTM curves: edit metric on double click
2014-11-02 17:25:08 +01:00
Rainer Clasen
f27462a4f5 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
656fb90590 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
e3850a6146 Accidentally left a debug() in CsvRideFile
.. so deleting it !
2014-11-01 18:12:53 +00:00
Mark Liversedge
8b21c0994f Fix Help URLs
.. and add link to the forum
2014-11-01 17:25:23 +00:00
Mark Liversedge
b0aca1f42c 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
7e2542b915 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
c7cdffe68c 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
8cd29d5555 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
bdc00585ca 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
e6c2152171 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
4d9ce4c5ed 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
92834fbc86 RouteSegment: Small changes before bigger ones 2014-10-28 23:14:45 +01:00
Mark Liversedge
a95ef5b8d3 Better Ride View Setup
.. especially when in tiled mode
2014-10-26 08:28:29 +00:00
Mark Liversedge
245eba65e6 Merge pull request #1103 from Joern-R/files
AthleteDirectory - Introduce Folder Structure Part 1
2014-10-25 21:38:22 +02:00
Joern
f1447d2664 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
db3e580aa8 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
cda1266960 Fix Avatar selection and make menu icon
.. when opening a new athlete
2014-10-25 11:14:11 +01:00
Mark Liversedge
bca7cba11e Merge branch 'master' of github.com:/GoldenCheetah/GoldenCheetah 2014-10-25 09:52:16 +01:00
Mark Liversedge
bfd052973d Train View closer to original
.. 'felt' upside down !
2014-10-25 09:51:40 +01:00
Mark Liversedge
abedd19b7c Merge pull request #1102 from Joern-R/master
Wiki - Correction - Help About
2014-10-24 18:32:39 +02:00
Joern
6de25f3d01 Wiki - Correction - Help About
... New Picture "Help-About" to document the Athlete Library Path
2014-10-24 18:30:58 +02:00
Joern
9799e8774f 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
8ac171d06e Merge pull request #1101 from Joern-R/gear2
Gear Ratio - Coloring in PvPV plot
2014-10-24 16:36:56 +02:00
Mark Liversedge
1607bda7f4 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
1d398be89e 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
f583de0801 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
17f23f8b28 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
93d0799bc2 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
30484e1af7 Add W'bal TAU Config
.. it is only used in realtime mode
2014-10-23 13:26:51 +01:00
Mark Liversedge
1230a9eb40 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
99defb5885 Fix W'bal in Train Performance Plot
.. code still needs to be refactored !
2014-10-23 09:15:10 +01:00
Mark Liversedge
c65553d063 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
eb5a6a9497 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
189ab96a48 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
13bc58e18f Comment for pace zones
.. just to explain how they were derived
2014-10-21 09:12:26 +01:00
Mark Liversedge
3202181142 Merge pull request #1098 from amtriathlon/master
Changed default pace zone scheme
2014-10-20 18:56:36 +02:00
Alejandro Martinez
8004deecd1 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
fb641681bf Honor Pace units prefs in Summary/Interval Summary
.. for the original "Pace" metric
2014-10-17 21:59:29 +01:00
Mark Liversedge
8fc1fac7ed Quadratic Trend on LTM fencepost 2014-10-17 14:29:01 +01:00
Mark Liversedge
4f498436b1 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
db1a1cbcb6 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
516118847c 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
0555b9b05f 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
223ee29b89 Customise Colors for New Series
.. Moxy smo2 and thb
.. Garmin Running Dynamics
.. Gear Ratio
2014-10-16 18:33:25 +01:00
Mark Liversedge
243923c135 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
e62259f5ca AllPlotWindow Settings
.. still too big !
2014-10-16 11:54:53 +01:00
Mark Liversedge
3d00475450 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
10b5d4a589 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
0eeb434bef 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
a9e17ffa65 RouteSegment: Search routes in new ride 2014-10-15 23:22:51 +02:00
Mark Liversedge
3942c0a594 Fix SEGV on webBridgeForRoute
.. same fix as applied to GoogleMapControl
2014-10-15 21:20:33 +01:00
Damien
c094aa92b0 RouteSegment: Search route in interval 2014-10-15 21:08:09 +02:00
Mark Liversedge
96f9076c9b 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
070082b1c0 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
ca7ef59573 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
2102a0f7bb 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
809696d9b3 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
40556883e6 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
15183e16be 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
71a7323a40 Merge pull request #1079 from Joern-R/pull1
AllPlotWindow - Alt/Slope - improve texts
2014-10-10 21:33:01 +02:00
Mark Liversedge
b92c4d67a4 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
8ba99d9907 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
dc56efd4bd AllPlot: show balance in stack view only if checked 2014-10-10 16:42:11 +02:00
Mark Liversedge
4906783478 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
9703161743 Merge pull request #1082 from Joern-R/columns
Ride Navigator - Table View - Columns resizing improved
2014-10-08 21:04:03 +02:00
Joern
20819fedc3 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
379989ed1c Merge branch 'master' of github.com:/GoldenCheetah/GoldenCheetah 2014-10-03 22:09:35 +01:00
Damien
1777ce0854 Bin2RideFile: Correct invalid ride time after pause+interval 2014-10-03 22:09:14 +01:00
Mark Liversedge
0b9962f614 Slope/Alt Color Scheme
.. changed to match typical col profile color schemes
2014-10-03 22:08:22 +01:00
Damien
489c9e5988 Bin2RideFile: Correct invalid ride time after pause+interval 2014-10-03 17:55:42 +02:00
Damien
3fabc6810a RouteSegment: Manage RouteSegment (alpha version) 2014-10-02 22:55:54 +02:00
Joern
e09e2a3ba9 AllPlotWindow - Alt/Slope - improve texts
... improve texts for Imperial unit setting
2014-10-02 12:53:26 +02:00
Mark Liversedge
635b425bf6 Add Garmin FR620 Device Type
.. to FitRideFile
2014-09-30 18:36:03 +01:00
Mark Liversedge
98967f3574 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
4b1a62d68f 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
502ceb5ffb Code Nit Fixups
.. compile time errors and warnings for recent commits
   on slope / altitude.
2014-09-30 12:32:15 +01:00
Mark Liversedge
0c91318f38 Merge pull request #1077 from jonbev/Move-Slope-to-Derived
Move slope to derived
2014-09-30 13:23:10 +02:00
Jon Beverley
4fa35a72c0 Move slope to derived in RideFile 2014-09-30 12:18:08 +01:00
Mark Liversedge
8bd8ffd27b 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
b6d4f3fa2b 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
bceb7c6664 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
454e8c2cc5 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
27f23fe4f9 Allow isRun in Filter
.. isRun is a bool, so isRun = 0 or isRun = 1
   will filter for runs.

.. note isRun does more than just look at sport
   it also checks if there are running data series
   in the file and may extend to more over time
2014-09-26 14:33:26 +01:00
Mark Liversedge
0a90063bd9 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
7831550668 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
9efcc7ba3a 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
b92564d719 Matches tidy
.. no need for 1 dp
.. no need for unit description
2014-09-25 22:37:10 +01:00
Mark Liversedge
4b1a31891c 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
6da909a7c7 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
f4d902dcbb 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
36e7fb7caf Merge pull request #1065 from Joern-R/pull1
Last Opened Athlete stored
2014-09-19 16:01:51 +02:00
Mark Liversedge
95b3b5aa92 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
d7662133ce Fix RideNavigator No Focus text color
.. was gray on gray which didn't work well !
2014-09-19 11:04:01 +01:00
Joern
c4f8e12237 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
c4a48590be Merge pull request #1059 from Joern-R/pull2
AllPlot - Smoothing also for "Left Border"
2014-09-14 16:43:05 +02:00
Joern
5b84ceb1dc 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
4a4459b6f7 TP.com fixups
.. title metadata

.. title of dialog
2014-09-12 13:18:38 +01:00
Jon Beverley
122b352ee0 Ignore src/debug/ folder 2014-09-11 15:20:55 +01:00
Damien
092c84090a CPPlot: Power zone shading for watts/kg 2014-09-09 22:42:52 +02:00
Damien
df81fdcc92 CPPlot: correct xBttom axis ticks 2014-09-09 22:29:31 +02:00
Mark Liversedge
47fb5068df Add HrNp Ratio
.. to echo HrPw
2014-09-09 16:11:02 +01:00
Mark Liversedge
3578c9caca 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
a0d6d6d865 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
3d91e0d392 Make no video the default
.. in gcconfig.pri

Fixes #1052
2014-09-06 11:46:40 +01:00
Mark Liversedge
6caf97ddb9 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
89d03987c9 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
10788a4cc8 Merge pull request #1049 from Joern-R/master
JSON char > 127 codepage problem (Issue #1028)
2014-09-04 22:00:55 +02:00
Joern
31ea0f86f6 Revert "Revert "JSON char > 127 codepage problem""
This reverts commit 91397851a10739350339743d89467cfa5a38fc24.
2014-09-04 19:50:24 +02:00
Mark Liversedge
32a49f4c2a Merge pull request #1048 from jonbev/HeatMap
Typo correction on maxLat
2014-09-04 14:42:44 +02:00
Jonathan Beverley
27782ffb9a Typo correction on maxLat 2014-09-04 13:36:47 +01:00
Mark Liversedge
93e5f724cf Merge pull request #1047 from jonbev/HeatMap
Heat map
2014-09-04 13:59:40 +02:00
Jon Beverley
2795f7e073 Change Heatmap to use google maps 2014-09-04 12:50:57 +01:00
Jon Beverley
8ee12aa8ca Add Heat Map 2014-09-04 12:50:57 +01:00
Damien
b440a2af9e CPPlot: Correct crash after switching between Veloclinic and Power plot 2014-09-04 07:31:11 +02:00
Damien
7d72213dfa CPPlot: Correct time for wprime 2014-09-03 23:06:52 +02:00
Damien
44d0a6c11d CPPlot: Add ride plot for veloclinic plot 2014-09-01 22:18:34 +02:00
Damien
75480a60ab CPPlot: Place shade mode labels for veloclinic plot 2014-09-01 21:54:32 +02:00
Damien
d862ff6acb CPPlot: Standard ScaleDraw (not time) for velocliniplot 2014-09-01 21:37:16 +02:00
Damien
87a886100b 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
6b1fabff55 Missing from last commit 2014-08-29 19:30:57 +01:00
Mark Liversedge
392d4f2ed3 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
71d62bffed 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
381faed61b 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
b54552d496 W'bal calc optimise
.. use exp() not pow()
2014-08-28 22:59:23 +01:00
Mark Liversedge
a7b2e3f226 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
ba5be12bb7 Merge pull request #1039 from jonbev/PercentagePowerAdjustTool
Add power adjustment tool
2014-08-28 17:58:55 +02:00
Jon Beverley
a0156aab27 Add power adjustment tool 2014-08-28 16:57:12 +01:00
Mark Liversedge
6dafc611d9 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
85f6912619 Fixup src.pro
.. FixElevation listed with Qxt src files
2014-08-28 16:24:10 +01:00
Mark Liversedge
50241e91eb Merge pull request #1014 from jonbev/FixElevation
Fix elevation
2014-08-28 17:22:19 +02:00
Jon Beverley
5fe2058bae Merge remote-tracking branch 'origin/FixElevation' into FixElevation 2014-08-28 16:19:08 +01:00
Jon Beverley
2b690f2d31 Fix line endings in src.pro 2014-08-28 16:18:51 +01:00
Jon Beverley
0e980dbc31 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
a79074834a Merge pull request #1038 from jonbev/DerivePowerInFixTool
Derive power in fix tool
2014-08-28 17:05:04 +02:00
Jon Beverley
2ec1fe4beb Merge remote-tracking branch 'origin/DerivePowerInFixTool' into DerivePowerInFixTool 2014-08-28 15:46:01 +01:00
Jon Beverley
b2b6db2a8f Add acceleration adjustments
Cap power at 1000w
2014-08-28 15:45:26 +01:00
Jon Beverley
bf2f830f52 Move Derive power to own fix tool 2014-08-28 15:45:25 +01:00
Jon Beverley
1579c68f9b Add acceleration adjustments
Cap power at 1000w
2014-08-28 15:33:59 +01:00
Jon Beverley
640d3b7721 Move Derive power to own fix tool 2014-08-28 10:07:41 +01:00
Mark Liversedge
981d97c2ed Added Motor Units to the science doc 2014-08-25 15:16:49 +01:00
Mark Liversedge
68992c129d 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
85fc57de37 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
3c0506bef7 Fix Crash on Clear during LTM compare seasons
.. initialising settings too late.
2014-08-22 19:09:41 +01:00
Mark Liversedge
04a95545ec Merge pull request #1033 from dresco/cadence_fix
Fix for cadence only sensor
2014-08-22 19:09:43 +02:00
Mark Liversedge
42d7661ca0 Recognise Omar Torres 2014-08-22 16:44:55 +01:00
Mark Liversedge
9d469f771d Merge pull request #1032 from amtriathlon/master
Spanish translation fixes contributed by Omar Torres
2014-08-22 17:42:27 +02:00
Alejandro Martinez
72124addef Spanish translation fixes contributed by Omar Torres (omar.torres@gmail.com) 2014-08-22 12:10:44 -03:00
Jon Escombe
d94f9f7130 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
964676e94f 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
b65be86f1d Merge pull request #1031 from amtriathlon/master
Fixes translation error found by spanish users
2014-08-21 19:21:59 +02:00
Alejandro Martinez
83eb4a2ec7 Fixed spanish translation error reported by 3.1 user 2014-08-21 14:00:23 -03:00
Mark Liversedge
de268dabf1 Merge pull request #1023 from Joern-R/pull1
Add new metric - Elevation Loss
2014-08-20 19:46:22 +02:00
Joern
ce5a8d8e9a 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
06fc40a6b4 Fix Constant Alt Initialisation Bug
.. now inits the bool.
2014-08-20 08:39:26 +01:00
Mark Liversedge
a0e55fee9d Set start time/km to zero
.. when opening a ride file.
2014-08-19 18:50:14 +01:00
Mark Liversedge
10640ae3f0 Charette not Charete 2014-08-18 21:51:02 +01:00
Mark Liversedge
9051ff3baf QVector::length() is QT5 only
.. so changed to count() which does the same.
2014-08-18 17:39:58 +01:00
Mark Liversedge
09e73f05c3 Recognise Christian Charete
.. in the contributors
2014-08-18 16:08:28 +01:00
Christian Charete
183608d797 Mac compile error on no libusb 2014-08-18 16:07:06 +01:00
Jon Beverley
94c4492db2 Fix line endings in src.pro 2014-08-18 12:27:40 +01:00
Mark Liversedge
85d1fbe822 Update build id for 3.11 development 2014-08-18 10:18:17 +01:00
Mark Liversedge
37c4152ed2 Default for "Title" when uploading
.. via "Chris C" on the developer list.
2014-08-18 10:08:51 +01:00
Mark Liversedge
99d10960d9 Merge pull request #995 from jonbev/upstream
Add Derived Data (slope & power so far)
2014-08-18 10:56:45 +02:00
Mark Liversedge
347783211f 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
Mark Liversedge
0789fdea98 Template announcement
.. for posts to the usual websites

   * bikeradar
   * weight weenies
   * wattage google group
   * timetriallingforum.co.uk
   * golden cheetah announce, users, developers

Will require formatting into the markup each site requires
but will take the effort out of formulating text
2014-08-18 08:58:42 +01:00
Mark Liversedge
41f5cd19d6 Merge pull request #1019 from jonbev/WikiConvertor
Fix links in FAQ index page
2014-08-18 09:19:27 +02:00
Jon Beverley
3c0db9efa3 Fix links in FAQ index page 2014-08-18 08:18:26 +01:00
Mark Liversedge
66c525e2aa Merge pull request #1018 from jonbev/WikiConvertor
Wiki convertor
2014-08-17 22:55:03 +02:00
Jon Beverley
56afa3c938 Add Wiki Convertor
Will run on linux with mono installed. Haven't tried Mac's.
2014-08-17 21:48:17 +01:00
Jon Beverley
feb579ac70 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
ef4d1bc8b4 Ignore 2014-08-15 09:04:14 +01:00
Jon Beverley
03fd402b64 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
0721816b01 Revert "Add Fenix2 to Garmin Devices"
This reverts commit c6112bd13c.
2014-08-01 08:00:14 +01:00
Jon Beverley
c6112bd13c Add Fenix2 to Garmin Devices 2014-07-30 16:52:07 +01:00
Jon Beverley
528d880a90 Derive Slope Data
- If Alt data present then calculate slope
- Smooth the slope data after calculation
2014-07-30 16:42:45 +01:00
531 changed files with 152892 additions and 49078 deletions

17
.gitignore vendored
View File

@@ -1,4 +1,5 @@
Makefile
.qmake.stash
# old skool
.svn
@@ -14,3 +15,19 @@ lib/
bin/
plugins/
resources/
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,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.

View File

@@ -0,0 +1,46 @@
We are proud to announce that GoldenCheetah v3.1 was released today.
It can be downloaded from our new website[http://www.goldencheetah.org/index.html#section-download]
We have recorded a video[https://vimeo.com/99817526] to explain the main changes, and the user guide[https://github.com/GoldenCheetah/GoldenCheetah/wiki/Main-Page_Users-Guide] has been overhauled to cover all the main features along with an updated FAQ[https://github.com/GoldenCheetah/GoldenCheetah/wiki/FAQ].
We have also added a section on the science of GoldenCheetah[http://www.goldencheetah.org/index.html#section-science] to help users new to power training and analysis.
MAJOR NEW FEATURES
1. Compare Mode
* Across Summary, Ride, QA, CP, Histogram, Metric charts
* Compare Athletes, Seasons, Rides, Intervals
* Easy and intuitive user interface
2. Additional Power Duration Models
* Multiple PD models now available
* Track changes in model estimates for W', CP, P-Max, FTP over time
* Track changes in model estimates for any duration over time
2. Merge data from multiple rides into a single ride
3. Share Dialog to upload to multiple services in one click
OTHER SELECTED HIGHLIGHTS
* Open Athletes in Tabs
* Redesign Tabbed mode with a ChartBar
* Themes and better support for color customisation
* Improved Interactivity (axes, interval hover)
Device enhancements
* Fixed up Tacx Fortius Support
* Pedal Smoothness / Torque Effectiveness support
Metrics and new science
* Plot best x power
* Plot estimated W', CP, FTP et al
* W'bal implemented with metrics
Charts
* Improved UX for chart configuration and setup
* Export data for MMP curves, trends data
* Over 50 new charting options (heat, stack, labels etc etc)
Work on 3.11 starts today, focusing on indoor training.

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

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