Commit Graph

170 Commits

Author SHA1 Message Date
Mark Liversedge
7a63d1f5dc More NULL ride bug fixes
The controls for the RideEditor (find) and AllPlotWindow
still try and do their thing when the current ride item
is NULL. This was either because it wasn't checked (or
expected) or the widgets in question were not notified. This
patch fixes this.

When I get a chance the whole codebase needs to be refactored
to gracefully handle NULL rideItems -- each plot/window should
clear state when it is notified that NO ride is selected.
2011-04-17 21:39:16 +01:00
Mark Liversedge
97053386d8 Fix RideEditor crash on last delete
If you delete the last ride and scroll down in the ride editor
GC will crash. This patch ensures the model is invalidated when
a ride is deleted.
2011-04-17 19:47:36 +01:00
Mark Liversedge
6af6b347bf Version 3 - No Ridefiles Bugs Bonanza
When no ridefiles are available (new cyclist) or the last ridefile
is deleted the current ride will be null. In addition the ride
importer deletes the memory for a ride imported to ensure VM is not
exhausted on large imports.

This patch fixes a whole host of null errors across the codebase. They
were identified by creating a new cyclist, executing every menu option
and tab/chart and then importing a file choosing everything and then
deleting the file and choosing every option again.

This negative testing should be performed before every stable release since
it has identified at least 6 bugs which are almost certainly present in the
current V2 code.
2011-04-09 11:24:40 +01:00
Eric Brandt
dd4f5ff85c Added 'interval summary' window below the interval tree
When an interval (or intervals) are selected in the
interval tree, the new window below the tree now shows
summary information for the selected interval(s). This
is beneficial for example when the Ride Plot tab is shown
and the user also wishes to see summary info about the
intervals. This fixes #77.

I think there is still room for improvement on the fields
displayed and the formatting of the summary window. For now
the fields are the same as those displayed in the Ride Summary
page.
2011-02-27 13:21:58 +00:00
Mark Liversedge
8af6973c24 Merge branch 'release_3.0.0dev' of github.com:/srhea/GoldenCheetah into release_3.0.0dev 2011-02-05 12:53:59 +00:00
Mark Liversedge
519f5fcc5e Improved Season Support
This fixes issues with date range editing in the Metrics controls
and provides support for Season load planning (under development).

Creating and selecting seasons is largely managed within the
Metrics tool. This has not been changed with this patch. Athlete
seasons are now managed as a member of the MainWindow class (although
this will move to an Athlete/Cyclist class when MainWindow is
refactored).

A Season identifier (UUID) has been introduced to enable Seasons to
be referenced independently of their name or date ranges. The LTM
tool now keeps track of changes to Seasons (when new seasons are
created, changed, deleted). Additionally, the Season XML file now
supports storage of a Season Load Plan.
2011-02-05 12:46:54 +00:00
Greg Lonnon
42508c7f88 Computrainer Workout Wizard
A wizard to create workouts based on absolute wattage and time
relative wattage and time (to CP60) slope and distance and import
an existing ride, and provide some smoothing to the ride data.

Also fixes NP calculation SEGV when recIntSecs is negative.

Fixes #249
2011-01-30 14:24:29 +00:00
Mark Liversedge
1fdf45d26d Improved Calendar Support
Fixes previous CalDAV support, as MobileMe based calendars
now work ok. Additionally, a new 'id' field has been created
to provide a persistent and immutable identifier for a ride
file (regardless of changes to date/filename).

The URL provided in the Calendar config pane can now include
'@' symbols (they are translated to %40).

The CalDAV URL should be provided for a calendar collection and
not for a principal. Examples being (trailing slash is significant):

Google  : https://www.google.com/calendar/dav/xxxx@gmail.com/events/
MobileMe: https://cal.me.com:8443/calendars/users/x.xxxxxxxxxx/home/
2011-01-22 18:54:05 +00:00
Mark Liversedge
c7b1c77fb7 Cosmetic tidy on DiaryWindow, tidy CalDAV code. 2011-01-16 20:09:29 +00:00
Mark Liversedge
696a9273dd Upload Ride to calDAV based calendars
A new menu option and associated config to integrate the
diary window (and ridefile history) with a calendar server
that supports CalDAV (iCal, Google, MobileMe).

This patch introduces an upload to calendar function and is the
first step towards adding calendar based planning functions.

It is important to note that no local calendar is maintained, we
are simply integrating with an existing calendar service.

It has been tested with Google Calendar, further testing and
enhancements are ongoing for users of Apple's MobileMe.
2011-01-16 15:04:40 +00:00
Mark Liversedge
54b8e8f571 Export Metrics to CSV
A new menu option to export the ride metric data
as a CSV format file for manipulation in tools like
Excel.

It exports all rides (no date range) and outputs the
date in US format month/day/year, with time in 24hr format.

Additionally, a 'hack' to export all rides in GC format has
been removed since it was erroneously included in the initial
v3 branch.
2011-01-11 19:28:35 +00:00
Damien Grauser
6ac75fda3a SRMWIN Style HrPw Plot
Added a plot of heartrate to power showing
histograms of power on y-axis, heartrate on
the x-axis and overlaid hr/power scatter.
2011-01-07 22:07:23 +00:00
Mark Liversedge
0ef63a51a4 Make libical optional
If ICAL_INSTALL is not defined in gcconfig.pri
then diary/calendar functions are not compiled. This makes
libical an optional dependency, like libkml, libqwtplot3d et al.
2011-01-03 11:30:56 +00:00
Mark Liversedge
1db39c5536 Fix homewindow bugs
Fixes;
- drag and drop ride works again
- segv on an empty measures curve in metric plot
- remembers all LTMsettings
- further cosmetic/visual tweaks
2011-01-02 13:14:34 +00:00
Mark Liversedge
4e1cde69bc Julian Candy 2011-01-02 13:14:30 +00:00
Mark Liversedge
3aba7dd788 Inital V3 Branch 2010-12-30 17:35:23 +00:00
Mark Liversedge
532fe0d26c Disable Ride Editor for manual or null rides. 2010-11-27 22:00:23 +00:00
Damien GRAUSER
830e4efd3d HR Zones and TRIMP Metrics
This patch introduces new functionality for working with
Heartrate based data.

* HR Zones can be defined, from Resting, Maximum and Lactate HR
* TRIMP metrics are calculated; TRIMP, TRIMP100 and Zonal TRIMP
* TRIMP metrics can be used to drive the PMC
* Time In Zone metrics for HR have been added
* Histogram window will now work with Power/HR zones
* User Settings have been added to record gender, weight and others
* RideFile has a new tag "Athlete" which is set to the athlete name

Fixes #140
2010-10-31 18:08:48 +00:00
Justin Knotzke
899e6eb362 Support for OAuth for the Twitter feature. Metric adjectives by Robert Carlsen. 2010-08-26 14:06:25 -04:00
Mark Liversedge
f6eb97ec0f Add support for Google Earth (KML)
This patch adds an 'Export to KML' option to the ride
menu. It will create a .kml file including power, hr,
torque etc. These can be viewed alongside the map view
in Google Earth 5.2.

Please note this requires libkml. The features of libkml
that are required were introduced in revision 852 which
means that as of Aug 2010 you will need to checkout from
the SVN source repo and build;

svn checkout http://libkml.googlecode.com/svn/trunk/ libkml-read-only

and the ./configure mantra that worked successfully for
me on Mac OS X was;

./configure CC="gcc -arch i386" CXX="g++ -arch i386" --disable-swig

Building on WIN32 is currently fraught with issues, unless
you build via MSVC 2010. Linux is straight forward but you will
need to install / apt-get libcurl.

Fixes #133.
2010-08-26 10:47:49 +01:00
Mark Liversedge
fef237f138 PWX Ride file support
Support for Training peaks new .pwx file format. This
is an XML format (and is particularly verbose). Support
has been added to enable interoperability with WKO+ v3,
TrainingPeaks.com and Device Agent.
2010-08-06 19:48:51 +01:00
Justin Knotzke
e1d69f71e1 Tweet your ride. You can now tweet your ride from GC 2010-07-18 15:15:26 -04:00
Mark Liversedge
cd3bbc4e64 Ride editor and tools
A new tab 'Editor' for manually editing ride file data points and
associated menu options under 'Tools' for fixing spikes, gaps, GPS
errors and adjusting torque values. A revert to saved ride option
is also included to 'undo' all changes.

The ride editor supports undo/redo as well as cut and paste and
"paste special" (to append points or swap columns/overwrite
selected data series). The editor also supports search and will
automatically highlight anomalous data.

When a file is saved, the changes are recorded in a new metadata
special field called "Change History" which can be added as a
Textbox in the metadata config.

The data processors can be run manually or automatically when a
ride is opened - these are configured on the ride data tab in
the config pane.

Significant changes have been introduced in the codebase, the most
significant of which are; a RideFileCommand class for modifying
ride data has been introduced (as a member of RideFile) and the
RideItem class is now a QObject as well as QTreeWidgetItem to
enable signalling. The Ride Editor uses a RideFileTableModel that
can be re-used in other parts of the code. LTMoutliers class has been
introduced in support of anomaly detection in the editor (which
highlights anomalies with a wiggly red line).

Fixes #103.
2010-07-17 14:33:39 +01:00
Mark Liversedge
06e44b8d47 Fix drag slider from Maps tab
When viewing the maps tab it is possible to drag and drop
the slider causing a file import dialog to pop-up and fail.
This patch rejects any drop events where the url is http.

Fixes #97.
2010-06-06 18:43:22 -07:00
Mark Liversedge
c4f82e19b6 Better Zones Configuration Page
The zone ranges configuration page caused a SEGV when deleting the
last zone. On inspection the zone configuration needed to be
revised since the UI was confusing and didn't allow fine grained
user editing (relying upon manual editing of the power.zones file).

The UI has been redesigned and fine grained editing of ranges, zones
and default zones is now supported.

The Zones class has been slightly modified to support the new UI and
existing members are better commented. In addition, the read/write
functions have been updated to always include the DEFAULTS section and
to set defaults according to manual zone setups when it is not present
(legacy support).

There are now 10 TimeInZone metrics to match the maximum of 10 zones
the user can define.

Fixes #78.

Fixes #34.
2010-06-06 18:36:50 -07:00
Mark Liversedge
9ae79db4cb fix SEGV in AllPlot on manual/null rides
fixes #71
2010-05-01 10:19:46 -07:00
Mark Liversedge
38df7c28bd User Configurable Colors
A new config pane for defining color preferences for chart
curves, shading, background and grid lines et al. Default values
echo the current hard-coded values.
2010-04-01 10:29:13 -04:00
Mark Liversedge
778d651f00 User Configurable Metadata
User configurable data entry for recording information about
each workout.

FEATURES:
* Config UI for defining tabs and fields to maintain
* Config UI for defining keywords and colors
* Data maintenance UI on RideSummaryWindow
* "Special" Metadata fields are related to current variables
* Read/Write new fields/metric overrides via GcRideFile
* Metadata extraction in WKO files
* Calendar uses keyword and color config
* Numeric metadata is plottable on the Metric charts
*Metric refresh has been optimised
2010-04-01 10:29:13 -04:00
Mark Liversedge
d64fc6ea85 NULL/Empty ride checks
RideItem or RideFile or dataPoints() may be null or empty. This
is especially true of manual ridefiles. This patch adds some
checks for this situation and acts accordingly. Additionally, the
disable/enable of tabs depending upon ridefile type has been
adjusted to also include files with not dataPoints.
2010-03-25 09:16:29 -07:00
Mark Liversedge
4e7e6cfb3a Honour RideFile::startTime
When saving the value of startTime should be checked to see
if the filename/notes need to be renamed. In addition, RideItem
now allows the startTime to be modified and reflected in the
ride list. When importing .gc ridefiles the file is serialized
with the correct startTime if the user edited it during import.
2010-03-25 09:16:28 -07:00
Sean Rhea
cd4fe5fe2e combine setActive and rideSelected
And pay attention to MainWindow::activeTab, such that only the active
tab redraws itself when changing rides.  This change really increases
GC's responsiveness when scrolling through the ride list.
2010-03-21 22:03:12 -07:00
Sean Rhea
f523fd5d3c allow the user to hide tabs
...and remember their tab hiding preferences across restarts.
2010-03-09 20:59:34 -05:00
Sean Rhea
378b6f3537 fix up tabs 2010-03-03 09:32:43 -05:00
Greg Lonnon
c2f3476569 added googlemaps, took a couple of suggestions from Julian on map defaults. 2010-03-03 09:32:43 -05:00
Mark Liversedge
7bb9cf5462 Long Term Metrics
A user configurable chart for showing ride metrics and
other calculated values over time.

* Uses SQLITE database to store metrics
* Supports any metric available from the metric factory
* Adds new MaxHr, VI, Peak Power and Time In Zone metric
* Also includes LTS/STS/SB for PM charting
* Aggregates in days, weeks, months or years
* Reads and Updates seasons.xml
* Adds cycles and adhoc date ranges in seasons.xml
* Date ranges can be selected on the plot with shift-left click
* Allows users to customise preferences for color, symbols et al
* Allows user to customise metric names and unit names
* Supports smooth curves and topN highlighting
* Has a linear regress trend line function
* Allows users to save charts to charts.xml
* A default charts.xml is built-in
* A chart manager to import/export/rename/delete charts etc
* Provides a tooltip to provide basic datapoint information
* Performance Manager adjusted to use the MetricDB
* User configurable setting for SB calculation (today/tomorrow)
2010-02-25 08:01:43 -08:00
Andy Froncioni
885629a2f5 Adds Aerolab tab
This patch adds Aerolab, a virtual elevation module.  A
new tab is added in which the user can perform virtual
elevation analysis.  This version is a manual Aerolab,
where user can use the following sliders to elevation-match
to a known elevation profile:
Crr  -coefficient of rolling resistance
CdA  -aero coefficient of drag * frontal area
Eta  -drivetrain efficiency (to be used when using a crank-
      or bottom-brack-based power meter)
Mass -total mass of bike + rider
Rho  -density of air
E_offset -an elevation offset to align elevations
2010-02-12 05:19:59 -08:00
Sean Rhea
4f9850bd9d shorten tab titles
Making room for the long-term metrics tab.
2010-02-07 09:26:44 -08:00
Sean Rhea
d9e9fe1d22 fix fencepost errors in Ride->Find Power Peaks
Also removes nasty cut-and-paste from BestIntervalsDialog.

Tested successfully on test/rides/2010_01_13_*.gc.
2010-01-18 11:56:35 -08:00
Mark Liversedge
4d1783276c fix 3d plot performance issues
Scrolling up and down the ride files is painfully slow when
3d is compiled in. This patch uses a setActive mechanism in
the same fashion as the pfpv and performance manager tabs.

Additionally, a recent patch to support user preferences for
units added a settings lookup that was called for every point.
This is also fixed.

fixes #16
2010-01-17 21:18:53 -08:00
Sean Rhea
e76247a25b remove ride map from RideCalendar
I think the previous implementation could have referenced already-deleted
RideItem objects during calls to Split Ride.

This commit removes the calendar's own map of RideItems, and instead
uses the list of rides in MainWindow::allRideItems.  Because I use
binary search on that list, this implementation should be just as fast
as the old one.  But because I don't hang on to any RideItem pointers
beyond a single call to RideCalendar::paintCell, it shouldn't be
vulnerable to referencing already-deleted RideItem objects.
2010-01-04 09:00:43 -05:00
Sean Rhea
f42a093d4d use ExtendedSelection in intervalWidget 2010-01-02 19:00:02 -05:00
Sean Rhea
23b2ff416c add Daniels Points to manual ride entry
And estimate them based on time/distance just like we do with BikeScore.
2010-01-02 13:17:31 -05:00
Sean Rhea
9b6b50c92d float --> double 2010-01-02 12:59:35 -05:00
Sean Rhea
8c65bf88a8 ignore manual rides when estimating BikeScore 2010-01-02 12:55:33 -05:00
Sean Rhea
46db59eec1 ignore rides that don't load properly
Need to call item->ride() in order to load the ride, and should ignore those
for which the result is NULL.  Do this after checking the date, though, so
that we don't load older rides into memory.
2010-01-02 12:52:58 -05:00
Sean Rhea
400fd23692 bug fix: segfault on manual ride entry if no rides 2010-01-02 12:47:50 -05:00
Sean Rhea
10ec613843 remove tabs and eol spaces, no functional change 2010-01-02 12:45:31 -05:00
Berend De Schouwer
d4ee3fe8cd Calendar move defaults to constructor 2009-12-31 10:08:44 -05:00
Berend De Schouwer
4f4973ab18 Multiple rides per day in the calendar 2009-12-30 18:41:37 -05:00
Sean Rhea
b89ff9f1d6 about dialog nits: add line breaks, remove italics 2009-12-30 10:17:55 -05:00