Commit Graph

32 Commits

Author SHA1 Message Date
Sean Rhea
195937f186 ignore intervals that start after the end of the ride
fixes #17
2010-01-17 21:02:12 -08:00
Sean Rhea
e5affbbc64 introduce "metric overrides"
This commit allows every ride file to specify a set of "metric overrides":
values to use in place of those for RideMetrics we would otherwise compute.

The most gratifying immediate result of this change is that we can associate a
"skiba_bike_score" metric override with each Manual CSV file, thereby
eliminating the need for a bogus "bs" parameter in RideFilePoint.

In the future, though, we can also save these overrides to a GcRideFile using
a syntax something like this:

  <override>
    <metric name="skiba_bike_score" value="100"/>
    <metric name="average_speed" secs="3600" km="30"/>
  </override>

(Note that average_speed needs to store time and distance in order to
aggregate properly.)

Then we can add a dialog that allows the user to override the computed value
of a metric for any given ride.  For example, if my HRM was on the fritz
during a ride, I could estimate my average HR and override that metric.
(We might want to show these overrided metrics in a different color, so that
it was clear they weren't the computed values.)

Finally, I think we could actually use this feature to eliminate the Manual
CSV format altogether, and just use GcRideFiles without any samples or
intervals, but with metric overrides for all the available metrics.
2009-12-20 12:29:33 -05:00
Mark Liversedge
45d7d3c610 GPS support in RideFile
RideFile data points now include lon and lat members for the longitude
degrees and latitute degrees from the source ride files. As a result
most of the RideFile readers now set longitude and latitude to zero for
each data point, except for:

* Gc Format Files - now support read/write
* Wko Format Files - now support read
* Tcx Format Files - now support read (smoothed if smart recording)

Although there are no features within GC at this point in time that use
positioning data this may change over time. Critically, as users save
files to the new GC file format whilst adding interval data it is
important that this positioning data is not discarded before new
features arrive.
2009-12-14 19:13:45 -05:00
Mark Liversedge
a649f64655 Use Standard Library Binary Search
Replace handcoded binary search in RideFiletimeToDistance() method
in RideFile with lower_bounds, since it is more efficient. The
distanceToTime() method has been removed since it is not used.
2009-12-13 17:22:49 -05:00
Sean Rhea
c940517690 use more const 2009-12-12 22:07:53 -05:00
Mark Liversedge
29a9e41444 Interval features and new GC file format 2009-12-12 11:41:35 -05:00
Sean Rhea
ea2b1909ae don't add interval 0 if it's the only one 2009-12-01 06:22:48 -05:00
Sean Rhea
5c3896b6cc fix intervals for ergomo csv 2009-11-21 14:02:37 -05:00
Sean Rhea
c964e274aa only fill in intervals if the RideFile hasn't already 2009-11-01 17:19:11 -05:00
Sean Rhea
c848726f0c let the factory call fillInIntervals 2009-11-01 12:45:43 -05:00
Sean Rhea
1dc513e7a9 add RideFileInterval
Eventually, I'm going to remove interval as a member of RideFilePoint, and
only use RideFileIntervals.  But I have to rework a bunch of other code first,
so for now the two will coexist.
2009-11-01 12:01:42 -05:00
Sean Rhea
522824bb40 switch RideFile::dataPoints to QVector
...so that we can binary search within them.  Also, switch a lot of
QListIterators to Qt foreach.
2009-11-01 11:51:26 -05:00
Sean Rhea
68832ff6c0 fix tabs and eol spaces -- no functional change 2009-11-01 10:58:12 -05:00
Sean Rhea
868e3d4b6b remove XmlRideFile and "Export to XML"
These were part of an earlier attempt at a GC-specific ride file
format.  They aren't in use now, and they'll be replaced by the new
one when it's done.
2009-10-31 15:12:48 -04:00
Sean Rhea
5dc82a6c93 add descriptions to RideFile types
...and use these to get rid of the explicit list of ride file type
descriptions in the import wizard.
2009-10-31 15:00:37 -04:00
Sean Rhea
c66bf0b1c9 add RideFileFactory::suffixes() and use it
...to eliminate the problem of enumerating all possible file suffixes
all over the code.
2009-10-30 19:13:37 -04:00
Sean Rhea
318c9debd4 put all our unit conversions in one header file 2009-10-10 12:27:42 -04:00
Berend De Schouwer
e9d1a86353 SplitRide altitude matches CSV2 2009-09-12 11:54:33 -04:00
Greg Lonnon
243a28bb87 the settings code was leaking and it was copy/pasted in a few files.
created a method to find QSettings (settings.h) and stopped it from leaking.

The leak looked like this...

==7800==    at 0x4C2726C: operator new(unsigned long) (vg_replace_malloc.c:230)
==7800==    by 0x64FD232: (within /usr/lib/libQtCore.so.4.5.0)
==7800==    by 0x64FDB62: QSettings::QSettings(QString const&, QString const&, Q
Object*) (in /usr/lib/libQtCore.so.4.5.0)
==7800==    by 0x4738E5: PfPvPlot::setData(RideItem*) (PfPvPlot.cpp:361)
2009-09-11 08:49:20 -04:00
Thomas Weichmann
5c0bdd8969 Changes to add altitude data to allplot & elevation gained to ride metrics 2009-08-25 06:18:20 -04:00
Justin Knotzke
5a453fb210 Misc fixes by Julian Simioni.. Thanks. 2009-08-21 20:22:59 -04:00
Justin F. Knotzke
622516b63d This code should now allow GC to be run off a USB stick.. or the Qollector. If GC finds a Library/GoldenCheetah next to the executable, it will use that location to store all of its settings and Libraries. Otherwise, it reverts to how GC handled settings previously. 2009-08-11 06:07:36 -04:00
Justin Knotzke
eb06e3e6d7 Manual patch entry by Eric Murray. Users can now enter in a manual entry
based on distance or time.
2009-08-07 21:31:06 -04:00
Justin F. Knotzke
f11d7e1bd9 Dan Connelly's MEGA patch.
It includes both powerzones and weekly summary plots.

  Thanks Dan.
2009-06-22 02:24:10 +00:00
Robert Carlsen
12db84372f Fixing a case-sensitivity bug with csv files. 2009-06-17 13:56:53 +00:00
Sean C. Rhea
37fdc5eefd document encoding string can't contain spaces 2009-05-03 01:22:33 +00:00
Sean C. Rhea
9dc3c00023 export to XML functionality 2009-05-02 22:58:57 +00:00
Justin F. Knotzke
21d5576393 Split Ride.
It offers to split at any time gap over 30 seconds and also at any interval.  
If the time gap is over 5 minutes it defaults to checked, otherwise it 
defaults to unchecked.

Anywhere you check, it will split the ride at that point overwriting the or
original ride with a shorter one and creating new rides after the split points
 The original would get renamed with a .bak so it could be recovered.
2009-04-06 01:01:17 +00:00
Robert Carlsen
8d2edd4c48 Added a user preference to change the Ride List sorting. Default should be ascending by date, as it has been. Disabling the "Sort ride list ascending" preference will sort the ride list descending by date.
Also, added margins to the widgets in the main window.
2009-01-05 01:47:37 +00:00
Sean C. Rhea
ec38e8ca1d add device types 2008-05-27 03:53:22 +00:00
Sean C. Rhea
5a3c3c8eb7 playing around with export to XML,
may eventually become the "native" GC file format
2008-05-27 02:56:07 +00:00
Sean C. Rhea
6e5487ca39 everything in one directory 2008-05-12 03:28:53 +00:00