.. full for scatter, in selection rect for line. Seems a compromise
between providing useful context on a scatter and avoiding lots of
noise on a line chart.
.. mostly complete, following the Python charts lead on the
API and basic UX.
.. some nits left in there; pie/bar chart categories and labels
and an open question on whether/how we let users set the axis
color / leave it alone.
When name="" returns a list of XData series names present
When name is an XData series present return a dataframe with vectors for:
time, distance and each valuename
with a row for each XData sample.
Implements #2847
.. since the R interpreter doesn't support multithreading* and this
is needed for metric computation
* we could get around this with IPC/signals but decide it was not
worth the coding effort and maintenance overhead.
.. renaming the 3 metrics they trademarked in 2013:
TSS => BikeStress
IF => BikeIntensity
NP => IsoPower
.. this will break data filters, user formula and
R and Python charts.
.. in the next commit will add user metrics to ensure
backward compatibility.
.. similarly to embedding python when computing metrics
.. exactly the same semantics, although R isn't fussy
about whitespace.
.. and example metric might be:
{
value { %%R GC.result(19) %%; }
}
.. the interpreter is protected with a mutex which means
R programs will never run in multiple threads. This has
a performance penalty, but then using R for metrics is
likely to be rather specialised anyway.
Part 5 of #2588
- BodyMeasures code in Athlete was moved to BodyMeasures class in Core
- HrvMeasures code in Athlete was moved to HrvMeasures class in Core
- Both implement the Abstract Base Class MeasuresGroup which provides uniform
access to measures
- Class Measures consolidate access to Body/Hrv Measures
- Body/Hrv measures file is accessed for only one place
- Names/Symbols for Body/Hrv measures are defined only once
measures(all=FALSE, group="Body"), returns a data frame with the fields
of the specified measures group (currently "Body" and "Hrv" are supported)
and a row for each day on the current selected date range if all=FALSE or
the whole range of available data if all=TRUE.
Part 3 of #2588
.. the call methods structure changed at v3.4.0 of R
which means when you register routines you should
pass the correct structure.
.. this can only be determined at runtime when the R
dynamic library is loaded.
.. the C runtime declarations changed in R-base which broke
the RTool.cpp build.
.. fixed up to support 3.4.0 onwards with new structure whilst
still working for earlier versions.
... incomplete class initialization
... duplicate if statements
... typos in objects names (copy&paste) (AllPlot)
... missing else (CPPlot)
... missing DELETEs for objects (only if obvious that object is not used somewhere else)
... copy&paste errors (e.g. ModelPlot)
... small floats instead of integer evaluating to 0
... potential SEGV since pointer is not checked for NULL
... misleading code formatting (hard to read) in *zones.cpp
.. the type parameter was being ignored (it wasn't
implemented at all.
.. now you can do:
hills <- GC.season.intervals(type="CLIMBING")
peakpower <- GC.season.intervals(type="PEAK POWER")
all <- GC.season.intervals()
.. you can query the window size with GC.size(), it will return a vector
if 2 integers for width and height.
.. the default page size is no longer 500x500 instead it defaults to the
size of the chart
.. if you do choose a size it is scaled to the window size, but keeps
the original aspect ratio -- so setting the chart size can be
useful to ensure the chart has a particular aspect ratio.
.. you can now fetch activities as a list and split them
based upon gaps in recording (recording anomalies).
.. this is to support trackeR; data should already be cleaned
by the user, but thats not always the case (!)
.. completes the updates to RTool.cpp
.. as predicted by forming the pmc data.frame via an S3
list instead of a pair list the merge() function works
properly and column names are retained.
.. we should use a list not an old pair list when constructing
lists and data.frames.
.. to ensure better compatibility with coercion functions in R
and also possibly to resolve known issues with merge()
.. this is part 1 of 2, breaking up the mass changes to the many
data wrangling functions in RTool.cpp
.. it also contains an update to RLibrary to resolve the functions
used when working with lists (SET_VECTOR_ELT).
.. the ability to apply a datafilter to the data retrieved
is extended to the season.metrics, season.meanmax and
season.peaks methods
.. this helps to let GC filter out e.g. power data is present
before we do anything in R since GC is faster and it also
reduces the data being passed back etc.
.. clean it up, rather than resolve source (there is still a
problem in there somewhere).
.. at least now interval plots and model fits aren't skewed
by a trailing zero value
.. You can now specify which activity to retrieve by passing
a POSIXct date time representing the start time of the ride
.. this is mostly useful when used in conjunction with
GC.activities(filter=...) to select ride dates.
.. allow user to pass a data filter to evaluate when getting
a list of activities.
.. e.g. GC.activities('Workout_Code = "1L2")
will get a list of activity start times where the workout
code is 1L2.
.. when returning values we honour whatever filter is active
at the time from home sidebar or the search box
.. it is applied regardless of which view the chart is on.
.. get runtime version loaded and show on crash dialog and console
since the runtime may be different from compile time as it is
now dynamically loaded.