Commit Graph

9685 Commits

Author SHA1 Message Date
Ale Martinez
5f68d2dce0 VideoWindow - Don't show LiveMap when there is no video
Fixes #3621
2020-12-02 18:39:15 -03:00
Christian Taedcke
3c639d3377 Daum: Adapt code for 8008 TRS pro (#3691)
For this a 50 msec delay is introduced before sending each serial
command. This is tested on hardware ond also used be jergotrainer.

Also during initialization there is a delay between each command, so
even slow devices can keep up. As soon as the cockpit type is known,
the delay is set according to the cockpit type.
2020-12-02 18:38:46 -03:00
Christian Taedcke
ec11d90160 Daum: Fix signed byte issues (#3690)
Because of QByteArray, the member bytes a signed char,
so a raw byte of 0x80 is interpreted as -128 and not as
128 as expected by the code.
2020-12-02 18:07:59 -03:00
ericchristoffersen
c49fa4f4d5 Minor ErgFilePlot cleanups. (#3688)
Complement of #3686
2020-12-01 19:26:02 -03:00
Ale Martinez
8c01d6291e Make intervals from JSON files segments in ErgFiles
Since they can overlap
Complement of #3686
2020-12-01 15:51:44 -03:00
ericchristoffersen
34526f2fe9 Readable Segments in ErgFileOverview (#3686)
Model and Display Segments - Fixes #3685
2020-12-01 15:49:59 -03:00
ericchristoffersen
487ec866f5 Fix 3680: Text, Chim and Lap Issues (#3681)
Fixes #3680
2020-12-01 09:44:49 -03:00
Ale Martinez
36df458406 Add reveal control for data series to CP chart
Similar to Scatter chart, to avoid the need to have several instances
for different data series sparing tabbar space.
Related to #2039
2020-11-29 23:00:57 -03:00
Ale Martinez
1b61f076ca Add reveal control for data series to Histogram chart
Similar to Scatter chart, to avoid the need to have several instances
for different data series sparing tabbar space.
Fixes #2039
2020-11-29 16:09:32 -03:00
Ale Martinez
cb37db2281 Export to CSV with UTF8 and ISO date format
For broader support of translations and date formats
Fixes #3613
2020-11-28 17:56:06 -03:00
Ale Martinez
1957404d03 Fix table mode in Metric Trends charts when there is only 1 group 2020-11-28 17:08:52 -03:00
Ale Martinez
90acbedabb Enable Group by TOD in table mode Metric Trends chart 2020-11-28 11:55:48 -03:00
Ale Martinez
56532be1ea Fix #3613 - BikeScore document location
[skip ci]
2020-11-27 10:50:42 -03:00
Ale Martinez
bed5f1e820 Parse Vertical Speed extra native series from FIT files 2020-11-25 20:16:41 -03:00
Daniele Santini
a42ca208b6 Trim TCX files before importing (#3470)
Allows to import TCX files with leading whitespaces, such as those generated by Strava

Fixes #3149
2020-11-25 18:21:54 -03:00
ericchristoffersen
9ff48f067a Fix Lap Bugs (#3678)
Create ergfile finalize for every parser to call.

Consolidate lap init into ergfile finalize.

Consolidate lap distance updates into a single method.

Laps now sorted by location.

Workout with no lap is given bracketing laps.

Fix handling of final lap (falls back on route distance).

FFwd lap on final lap no longer jumps to route start.

AddLap button now actually creates a new lap in lap list,
making it reachable using nextLap and prevLap.

Remove the displayLap field as it serves no purpose.
2020-11-25 13:27:37 -03:00
Ale Martinez
70fa7c0a45 Add Core Temperature series name and use consistently
Fixes #2214
2020-11-25 13:21:44 -03:00
Ale Martinez
e874714f60 Round to the second when importing erg files to Workout Editor
Fixes #2322
2020-11-24 18:03:46 -03:00
ericchristoffersen
71f34634e3 Rotational Inertial for Custom Virtual Power (#3653)
Improve Virtual Power in Presence of Acceleration

Part 1: Rotational Inertial for Custom Virtual Power

This change is only enabled when device is defined with non-zero
Inertial Moment. When Inertial Moment is not defined or is
zero then this change has no effect.

Change adds field to device to hold trainer's inertial moment
in (KG M^2).

This allows power calculation to track energy that passes in
and out of trainer's flywheel so that acceleration and
deceleration power can be reported immediately.

Whenever device sets a new rpm sample a time is
recorded alongside which allows the common controller
to compute change in rpm over time, which allows
calculation of kinetic energy that has entered or
left the trainers flywheels during the duration.

It is a bit of math to determine a correct I for a trainer's
flywheels, especially if the flywheels have different rpms,
hopefully we can add the I values for the current built-in
virtual power trainers.

Part 2: Use average power instead of point power.

Moved numerical integration into its own header, its now used by
bicyclesim and by virtual power. Changed default integrator to
Kahan-Li since in my testing it is stable and converges fastest.

Virtual Power now computes average power since previous sample,
which has the effect of reducing reported power during acceleration
and deceleration.

New advanced virtual power is on with this commit. It seems to work
very well in my testing.

Fixes #3650
2020-11-24 12:19:01 -03:00
ericchristoffersen
afd6552b3b Fix #3669 - Don't copy dual mode files twice. (#3670) 2020-11-23 11:46:48 -03:00
Ale Martinez
8e5a2b42d0 Truncate non integer watts when importing workout files
Fractional watts are not supported by Workout Editor and they
are trucanted for most import formats, this fixes remaining
cases reported by users.
Fixes #3675
2020-11-22 14:00:25 -03:00
Ale Martinez
bf02c868ea Add back to previous lap button to Train bottom bar
Uses RewindLap implemented as part of #3442
[publish binaries]
2020-11-20 20:20:49 -03:00
Eric Christoffersen
25bb4beaa5 Support stateless ergfile location query (#3442)
Remove query state from ergfile and videosyncfile.
Stateful ergfile queries are now made through an adapter.
Implement RewindLap.
Fixes #3416
2020-11-20 20:20:30 -03:00
ericchristoffersen
c187dbe686 Fix3672 - Read out of range when tts has 0 points (#3673) 2020-11-19 06:50:01 -03:00
Ward Muylaert
44fd1885a1 Add ~Mercator projection to overviewitem route (#3665)
Current route tile looks off compared to the map one is more used to,
because it is lacking mercator projection. This commit adds the
spherical pseudo-mercator projection as described on
https://wiki.openstreetmap.org/wiki/Mercator. As mentioned there, the
true elliptical projection is avoided for being more computation
intensive. This is also the case in OpenStreetMap and thus in the full
map view in GoldenCheetah. With this commit, those views match up again.
2020-11-18 19:56:12 -03:00
Ale Martinez
197d320bf8 Add jump to next lap marker button to Train bottom bar
This is an experimental feature, the primitive was available
but currently unused, it seems to have been available from
Computrainer HDC in former versions.
When used with videosync it does a naive extension of the FFwd
implementation, but it seems less precise than without videosync,
some tuning may be required.
2020-11-18 18:45:25 -03:00
Ale Martinez
d17bba8ce1 Add intervals as lap markers in json workouts 2020-11-18 18:41:55 -03:00
ericchristoffersen
fe4301a7e2 Teach ttsreader to process routes and segments (#3668)
* Teach ttsreader to process routes and segments

TTS reader previously ignored routes, segments and strings.
With this change the route name, route description, segments,
segment descriptions are now all parsed into ttsreader object.
With this change the route name and description are assigned to
the ergfile, so route name now appears while riding a tts file.
With this change there is still no place to put segments in ergfile.
With this change none of the new information is assigned into the
activity file.
The segments and segment descriptions are used by tacx software
so user can select a named region of a long ride. Example ride
was >200km long and contained 12 named segments, each with a nice
description. Would be nice to bubble that info up to train mode.

* Translate tts segments into ergfile laps.
Also fix old issues with how laps work in slope mode, especially
with ffwd and rwnd.
Also lap markers are double.
As far as I can tell laps work ok now.
2020-11-18 12:30:05 -03:00
Ale Martinez
aaf6f282b0 Add DistanceRemaining to RealtimeData based on RouteDistance
Fixes #3648
[publish binaries]
2020-11-15 16:54:52 -03:00
riccioclista
f30dd0a9c5 Workout: Save LAP markers in mrc files (#3114)
When saving an mrc file in the workout editor, lap markers are ignored. This fixes it.
2020-11-14 18:11:18 -03:00
ericchristoffersen
d4aebbb441 Fix 3596: Fix display of route elevation. (#3664)
Simplified the meterwidget elevation display loop, bug was that it
was skipping the final route point.

Add minY to ergfile so range of y can be obtained without computing
each time, so can remove search loop from meterwidget.
2020-11-13 09:05:28 -03:00
ericchristoffersen
f47c3003a7 Fix 3498 - truncate distances for display (#3663)
For distance display, better to truncate than to round up.
2020-11-12 21:49:32 -03:00
ericchristoffersen
a7b08c4abf Fix issues 3580, 3582 (#3662)
Fixes for power adjustment:
Fully populate new point from old before rewriting fields.
Prevent power from reducing to zero since after it is zero you
cannot increase it again...
2020-11-12 21:48:43 -03:00
Ale Martinez
a107a0203c Defaults are duplicates when both field and value match
Fixes #3610
2020-11-12 14:44:33 -03:00
qheath
aaa7889172 make the date range of relative seasons (e.g. in Trends) update as time passes (#3546)
* remove unused CompareDateRange::days
* remove unused Season::days
* ensure Season limits are only accessed via accessors
* remove unused Seasons::seasonFor
* add SeasonLength to create relative seasons that end today
* save Season::_length and use it instead of Season::prior
* add SeasonOffset for the start of relative seasons that don't end today
only functional difference: "All Dates" is now aligned on the beginning
of a year instead of starting on the same day and month as today
* use _offset+_length instead of _start+_end for relative season
functional differences:
- in CriticalPowerWindow, relative seasons that don't end today ("All
  Dates", "Last Week", etc) were previously computed with respect to
  QDate.today(); they are now computed with respect to
  myRideItem->dateTime.date(), as other relative seasons ("Last 7 days",
  etc); this is technically a bug fix, but there probably was no one
  using these relative seasons for CriticalPowerWindow anyway
- every call to Season::getStart and Season::getEnd computes a fresh
  value (based on the offset and length specified for the season), so
  relative date ranges refresh when the display refreshes, e.g. when GC
  is open for multiple days (fixes #1751)
* add comments for SeasonOffset/SeasonLength
* Use Season accessors in AthletePages
2020-11-12 11:06:04 -03:00
qheath
9e5980f82c fix LTM Chart to show all events from the date range (#3540)
* when looking for events, consider all seasons that intersect the date range
seasons starting before and ending after were not considered
Fixes #2620
* center event labels on the event mark
if the labels are to the right of the mark, the label of an event at the
end of a date range will not be shown
* code cleaning
loop only once over seasons, instead of twice
2020-11-11 18:17:06 -03:00
Ale Martinez
45345679a6 Fix #3608 2020-11-11 17:56:14 -03:00
Ward Muylaert
c187d4325b Sort routes when they are added to an activity (#3661)
Before this change, when looking at an activity, the routes seemed to
appear in order of creation in the interval section. This patch instead
sorts them by their start time in the activity instead (or by their end
time if the start times are the same).
Note that the routes are also known as segments.
Fixes #2132.
2020-11-11 13:38:41 -03:00
Ale Martinez
7d32bb4446 Recognize Ward Mylaert and Scott Conover 2020-11-10 20:57:22 -03:00
Scott Conover
bbc7a03178 Fix issue #3571: segment matching (#3573)
Fixes the problem happening when a ride crosses the start point of a segment but diverges for some reason then at some point later in the ride the segment is ridden for real. It introduces boolean "resetroute" and sets it to true in two places where where the code needs to reset the segment point and break out of the ride point loop in the case where diverge is found. Then check for this condition at the bottom. Reset the segment index to -1.
2020-11-10 14:27:58 -03:00
Ale Martinez
cec7c4dd52 Don't refresh R and Python charts on intervalsChanged
To avoid the script running twice on ride selection and
interval edition/deletion.
Caveat is when intervals are created via find intervals
the script is not notified until interval or ride selection changes.
2020-11-09 21:07:39 -03:00
Ale Martinez
4273480bf4 Re-enable run script on interval selection in a Python chart
This feature was availabe in v3.5, it is enabled for R charts
and both have selected field on activity interval APIs to exploit this.
Fixes #3660
2020-11-09 17:40:48 -03:00
Ale Martinez
a5252334ef Merge pull request #3657 from ward:manage-filters-up-down 2020-11-08 19:39:15 -03:00
Ward Muylaert
e05cf52446 Add up and down button to NamedSearch dialog
Also know as the Manage Filters dialog. Reordering was not possible in
the interface yet, you were forced to edit the xml file to do any
reordering.
2020-11-08 18:35:32 -03:00
Ale Martinez
1345779cfc Fix typo in MeterWidget
It makes slope text to disappear in the second half of the ride
2020-11-07 18:23:39 -03:00
Ale Martinez
cfd456c798 Reorder musclekg and boneskg when Body Measures are created
They are interchanged by mistake
Fix #3655
2020-11-04 16:17:52 -03:00
Ale Martinez
4af953ee00 Fix ProgressBar percentage in Overview KPI tile when istime
Pending from previous commit
2020-11-03 20:36:56 -03:00
Ale Martinez
617ebc3d82 Fix count in Athlete_Weight metric
It has to be 1 so each activity has equal weight when averaging,
instead of being weighted by duration.
[publish binaries]
2020-11-03 13:27:52 -03:00
Ale Martinez
3e846a3d20 Fix ProgressBar in Overview KPI tile when istime
Pending from previous commit
2020-11-03 13:23:52 -03:00
Ale Martinez
da8341f619 Add istime option to KPI tile in Overview chart
To enable display in sexagesimal format (hh:mm:ss),
similar to istime in User Metrics.
[publish binaries]
2020-11-02 19:20:18 -03:00