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.
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.
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
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
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.
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.
* 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.
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.
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...
* 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
* 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
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.
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.
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.