Commit Graph

17 Commits

Author SHA1 Message Date
Mark Liversedge
a2a962120c A lot less assert
There still some assert left in the code, but removed
a fair number of the examples where, its just as easy
to handle the condition gracefully, without crashing.

By 3.1 we will have eradicated assert from the code.
2013-08-04 11:06:07 +01:00
Andy Bryson
53391f76fc Remove Boost Dependency - The Easy Bits
Replace boost stuff with QT or C++ equivalents
2012-12-27 17:04:36 +00:00
Damien
9425a4b5c2 Add FileType to RideFile
modified:   src/Bin2RideFile.cpp
	modified:   src/BinRideFile.cpp
	modified:   src/Computrainer3dpFile.cpp
	modified:   src/CsvRideFile.cpp
	modified:   src/FitRideFile.cpp
	modified:   src/FitlogParser.cpp
	modified:   src/FitlogRideFile.cpp
	modified:   src/GcRideFile.cpp
	modified:   src/GpxRideFile.cpp
	modified:   src/ManualRideFile.cpp
	modified:   src/PolarRideFile.cpp
	modified:   src/PolarRideFile.cpp
	modified:   src/PwxRideFile.cpp
	modified:   src/QuarqRideFile.cpp
	modified:   src/RawRideFile.cpp
	modified:   src/SlfRideFile.cpp
	modified:   src/SmfRideFile.cpp
	modified:   src/SplitActivityWizard.cpp
	modified:   src/SplitRideDialog.cpp
	modified:   src/SrdRideFile.cpp
	modified:   src/SrmRideFile.cpp
	modified:   src/SyncRideFile.cpp
	modified:   src/TacxCafRideFile.cpp
	modified:   src/TcxParser.cpp
	modified:   src/TcxRideFile.cpp
	modified:   src/TxtRideFile.cpp
	modified:   src/WkoRideFile.cpp
2012-11-14 00:37:24 +01:00
Damien
d51cb951ce Add Left/Right Power Support
Add Left/Right Power Balance for FIT and Polar HRM parsers
 Add Left/Right Balance metric
 Add Left/Right series to Ride Chart

Fixes #711.
2012-08-19 13:57:24 +01:00
Damien Grauser
55cb396196 Add temperature to AllPlot
Fixes #536.
2011-12-07 21:55:35 +00:00
Damien Grauser
70c8f0223c Add Temperature and Slope Data Series
This patch adds support for temperature and slope
across the ridefile readers.

For the most part their is no functional change
although it is now possible to view and edit these
data series in the editor.

File formats that can provide temp or slope include;
.bin, .fit, .srm, .sync, .wko

Further updates will be required to display the data
in the ride plot and histograms.
2011-12-03 23:17:11 +00:00
Mark Liversedge
03b0dea597 Support Garmin Training Center Export Files
GTC will export all rides as a single TCX file so they
can be imported en-masse into another application.

We did not support >1 rides in a single ride file. This
patch adds support for reading multiple rides (if the ride
file reader supports it).

The ride import wizard will now extract and parse files from
a GTC export.  Many thanks to Damien for writing the TCX file writer.

Fixes #371.
2011-08-05 20:53:13 +01:00
Mark Liversedge
a48f7c00d1 Clean compile time nits
Lots of nitty fixups, largely for uninitialised temporary
variables.

I have left the use of boost::function and boost::bind in the
DownloadRideDialog alone, so it will vomit when compiled
with boost 1.46 and gcc 4.5 or higher. Will look into this
more carefully at a later stage.

I am working up to resolving issues identified from -pedantic next.
2011-05-12 22:12:36 +01:00
Andy Froncioni
a02bfaf810 Added headwind to Aerolab calculation for iAero
Added a headwind data field, which is available when using
an iAero head unit, to dramatically improve the calculation
of Chung analysis for users of more recent iAero devices.

All other data files than the iAero have the headwind term set to
zero when they append a point.
2010-03-06 13:11:36 -05:00
Greg Lonnon
cef5cca454 returned error for encrypted files
Also fix compiler warning.
2010-02-24 08:47:38 -08:00
Steve Gribble
d58d7dedaf Fix float parsing bug that manifests on Qt4.6 and later.
This file relies on Qt's QDataStream to handle the parsing
of primitive C types from Computrainer .3dp files, including
floats.  In Qt4.5 and earlier, Qt defaulted to 32 bit
floats.  In Qt4.6 and later, Qt started using 64 bit
floats by default.  As a side-effect, parsing broke on
Qt4.6, leading to a crash when importing or using .3dp files.

This patch fixes the issue by using QDataStream's
"setVersion()" method to tell Qt to use the Qt4.0 serialization
format for the QDataStream used in this file.  This
patch does not affect any other files.  This patch
should make the formatting assumptions both backwards
and forwards compatible.
2010-01-05 22:56:59 -05:00
Sean Rhea
0dae2b88cc don't explicitly specify bs
It's going away soon.
2009-12-20 12:29:25 -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
Steve Gribble
ec696a14e9 Another bug fix to handle rides that start in the middle of a course.
Computrainer 3D software lets you start your ride partway into
a course.  But, if you do this, the first distance recorded
in the log file is the distance you started at, rather than zero.
GC expects the first data point to be at distance zero, however,
and therefore this causes total distance to be reported incorrectly.

This patch fixes the bug by remembering the distance of the
first data point, and subtracting that from all distances
reported to GC, so that distances are zero-based (i.e.,
so that the first data point is always at distance zero.)
2009-12-08 08:51:55 -08:00
Steve Gribble
ac2a2d4f82 fix bugs and add features to Computrainer3dpFile
Specifically:

1.  The previous code assumed the wrong units while extracting
    speed and distance from a .3dp file.  Computrainer stores
    speed in (miles per hour / 160), and distance in kilometers.
    This patch converts .3dp speed/distance data points into
    kph and km correctly.  As a side-effect, speed and distance
    are displayed correctly in GC windows and calculations.

2.  This patch adds code to extract altitude data from a .3dp
    file and include it in a ride.

3.  .3dp files do not have a consistent inter-datapoint time
    interval.  Since GC expects one, the earlier version of this
    code averaged 1000 data points from the middle of the ride to
    estimate this interval.  Unfortunately, this approach caused
    a bunch of problems for various calculations that GC does,
    such as calculating the riding time (vs. workout time),
    average speed, xPower, critical power plot and FTP, and so
    on.  [GC assumes that # data points * inter-datapoint-interval
    = workout time, but this isn't true when you used an estimated
    interval.]

    To fix this, this patch adds averaging and interpolation code
    to covert the data point sequence in the .3dp file to an
    averaged sequence with a data point every 250ms.  Since the
    inter-data-point interval is now fixed, these calculation bugs
    went away, and correct values are now calculated and displayed
    by GC.

4.  Fix (3.) has another useful side-effect:  the number of data
    points per ride given to GC goes down by 10x.  (Raw .3dp files
    have a data point every 30-50ms.  This averaging/smoothing
    code emits a data point every 250ms.)  Since the critical
    power calculation is an O(n^2) calculation, the time for
    this calculation is reduced by 100x.  Instead of an hour
    to do the calculation for a typical 2hr ride, it now takes
    less than a minute.

5.  The code was cleaned up in several regards:  comments
    were added to help document the .3dp format and explain
    the averaging/smoothing code, and types from boost/cstdint.hpp
    were used instead of native C types when using a variable
    of a specific size  (e.g., the code now uses uint16_t instead
    of unsigned short, etc.).

This patch was built by Steve Gribble and Daniel Stark.
2009-12-03 20:25:33 -08: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
Greg Lonnon
5a25dcb56a Computrainer 3dp file support 2009-10-29 09:47:45 -04:00