Git Product home page Git Product logo

activitylog2's People

Contributors

alex-hhh avatar idealist1508 avatar pmatos avatar russelldb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

activitylog2's Issues

Save directory of last imported activity

File -> Import activity... does not save the last directory from which an activity was imported. Each time the dialog is reset to selecting from a list of recent files, which is useless. On Linux at least all fit files from the watch get downloaded to a single large directory, so I have to navigate to this directory for every activity over and over again.


I suspect on Windows each download creates a new directory, seeing also that "Import from directory..." has a dedicated shortcut. I'd similarly add a shortcut for "Import activity...", this is what I did for Ctrl+Shift+I:

diff --git a/rkt/toplevel.rkt b/rkt/toplevel.rkt
index 2594555..77bb653 100644
--- a/rkt/toplevel.rkt
+++ b/rkt/toplevel.rkt
@@ -172,6 +172,8 @@

   (new menu-item%
        [parent file-menu] [label  "Import &activity..."]
+       [shortcut #\I]
+       [shortcut-prefix '(ctl shift)]
        [callback (lambda (m e) (send toplevel on-import-activity))])

Finally, I'd propose a small feature for the roadmap that would reduce activity import friction to almost zero: "Import most recent files". It would work as follows:

  • Determine last directory from which an activity was imported (does nothing and shows a warning if there's no such dir saved)
  • Scans directory for fit files which have not yet been imported into ActivityLog2
  • Automatically imports matching files

Failed to import activity

i just build from source with no problems...When i try to import a new activity from a FIT file directly downloaded from garmin connect i get an error:

Failed to import 3321552521.fit: #(struct:exn:fail query-exec: cannot convert given value to SQL type
given: '#(267 1661746798 1931485408 1256318200 692797698)
type: parameter
dialect: SQLite #)

i have no clue about that one.
someone can point me out?
thanks
Aaron

Add W'Bal plot for swimming activities

Now that CP and D' parameters can be set for swimming activities, it would be nice to add a W'Bal plot, like the running and biking one.

This requires some thought, as lap swimming activities don't have 1 second samples (or close) like the run and bike activities have, instead they have one data point for each length. The W'Bal plot would look nicer if it was sampled at 1 second interval.

Can't create trend chart

Following my pursuits to using ActivityLog2 to determine my CP, W', etc I tried creating a trend chart of best avg as mentioned in critical-power.md. However I am getting:

instantiate: no argument for required init variable
  init variable name: trend-chart-class
  instantiated class name: trend-chart-pane%
  context...:
   /home/pmatos/installs/racket-6.12/collects/racket/private/class-internal.rkt:4610:0: obj-error35
   /home/pmatos/installs/ActivityLog2-rel-1.5.0/rkt/view-trends.rkt:186:2
   /home/pmatos/installs/racket-6.12/collects/racket/private/class-internal.rkt:3553:0: continue-make-object
   /home/pmatos/installs/racket-6.12/collects/racket/private/class-internal.rkt:3507:0: do-make-object
   /home/pmatos/installs/ActivityLog2-rel-1.5.0/rkt/view-trends.rkt:340:4: on-new-chart
   /home/pmatos/installs/racket-6.12/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:428:6
   /home/pmatos/installs/racket-6.12/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:479:32
   /home/pmatos/installs/racket-6.12/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:627:3

Failed to import

Hey, when trying to import a .fit file I get this error :

Failed to import C:\Users\Wanted\Downloads\50_minutes.fit: #(struct:exn:fail:contract hash-ref: no value found for key
key: 143 #)

Thank you.

Implement Grade Adjusted Pace

ActivityLog2 implements W'Bal depletion and reconstruction modeling for running activities based on pace and the Critical Velocity parameters. This works nicely if the runs are done on relatively flat ground, but on hilly terrain the model breaks because it does not account for the higher effort of running uphill or lesser effort of running downhill.

A "Grade Adjusted Pace" series could be added to the data frame and the W'Bal series computed off this series. There are several available implementation for the Grade Adjusted Pace, see the link below for a starting point.

https://github.com/gerhardol/trails/wiki/Features#grade-adjusted-pace

https://medium.com/strava-engineering/an-improved-gap-model-8b07ae8886c3

Tiles loaded far away from course

Now on HEAD, I just noticed that the tiles in the map are not being loaded properly. It felt initially that the tiles were not being loaded at all, but then I looked around and it seems tiles are being loaded (slowly) but quite far from the course itself, which is strange.

Where's the logic in the code to choose the tiles to load? And is there anyway to enable logging of the tile loading? So I understand if this is loading tiles at all or just idle?

Application hangs when multiple activities are dragged in the calendar view

To reproduce:

  • select the calendar view
  • select multiple activities (e.g. by drag select)
  • move them

Dragging items in the calendar currently does nothing (the snips move back to their position). I suspect the snip management logic in the calendar view is faulty -- this view was the first time I used a pasteboard%, the code could do with a review...

Add a "Model Parameters" inspector page

Sport Zones and Critical Power parameters are defined for a time period, and each activity will use the time zone and CP parameters that were "effective" when that activity was done. However, nowhere in the GUI is it obvious that this is the case, or what the actual zone values are for a particular activity.

It would be nice to have a "Model Parameters" inspector page for a session which would show this information. It should be a "rich text" read-only page like the about page and could use the graphical zone pictures used by the "Export FIT Settings..." page. It could also show CP model estimates for different distances / times (similar to what the trend plot badge shows). Maybe add links to open the edit cp, edit sport zones pages.

Allow overriding parameters for a session only? Will would not work too well with the model...

HiDPI support?

This might actually be a racket issue. It seems like some components scale correctly, and others don't

2019-01-18-180150_1199x595_scrot

Support keyboard shortcuts on Linux for copy/paste

In the text fields, e.g. when editing an activity, copy/paste/cut with Ctrl-C/Ctrl-V/Ctrl-X are not working on Linux.

I tried to figure out how to enable them, but the most I managed to do is add support for paste from Primary selection buffer with middle mouse button click (usually the wheel nowadays).

diff --git a/rkt/al-widgets.rkt b/rkt/al-widgets.rkt
index 00e8e1d..a5e53ce 100644
--- a/rkt/al-widgets.rkt
+++ b/rkt/al-widgets.rkt
@@ -31,6 +31,8 @@
          "utilities.rkt"
          "widgets/main.rkt")

+(editor-set-x-selection-mode #t)
+
 (provide sport-selector%)

segfault when choosing File -> Import

I'm on NixOS

$ racket --version
Welcome to Racket v7.1.
$ git clone ...
$ racket build.rkt # Couldn't find glib, and didn't want to mess with nix-shell
$ racket run.rkt # Chose File -> Import
SIGSEGV MAPERR si_code 1 fault on addr (nil)
[1]    18806 abort      racket run.rkt

Cannot define new athlete metrics

I am trying to define a new athlete weight setting for today, but the dialog fails to appear and instead I get this stack trace:

/: contract violation
  expected: number?
  given: #<sql-null>
  argument position: 1st
  other arguments...:
   3600.0
  context...:
   /home/nickb/src/ActivityLog2/rkt/widgets/widget-utilities.rkt:63:0: w-duration->string
   /home/nickb/src/ActivityLog2/rkt/widgets/duration-input-field.rkt:50:4: set-duration-value method in duration-input-field%
   /home/nickb/src/ActivityLog2/rkt/dialogs/edit-athlete-metrics.rkt:143:4: setup-new-metrics
   /home/nickb/src/ActivityLog2/rkt/view-athlete-metrics.rkt:105:4: on-new
   /usr/share/racket/pkgs/gui-lib/mred/private/mrmenu.rkt:250:14: command method in basic-selectable-menu-item%
   /usr/share/racket/pkgs/gui-lib/mred/private/mrpopup.rkt:49:38: go
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/common/queue.rkt:435:6
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/common/queue.rkt:486:32
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/common/queue.rkt:634:3

To re-produce:

  1. select Athlete view
  2. right click, choose New Athlete Metrics

Build is from current master.

Import Heart Rate data from swim activities

Garmin HRM-Tri and HRM-Swim Heart Rate monitors can record HR data for swimming activities. These devices store the data on the monitor itself while submerged and it is sent to the main device at the end of the activity. The resulting FIT files record the HR data as additional FIT files appended to the main one. These are called chained FIT files in the documentation.

The main issue is that normal FIT lap swim activities only record pool lengths and no data during the crossing of that pool length. We only store one pseudo track point for each lentgth which is needed as only track points can record distance. The lap swim data is in the length entry and data frames for swim activities hold lenghts and not track points.

This will have to play nice w/ the swim lap editor. In HR data will be time based and we will have to correlate it somehow with the rest of the activity which is lap/length based.


Update (27 Aug 2021) Pull request #75 added support HR data in lap swim activities, the following are remaining tasks:

  • import HR data from lap swim activities where a HR chest strap is used -- these FIT files are using "chunks", that is multiple FIT files concatenated together
  • update scatter the session inspector to allow selecting HR related data series in scatter plots and best-avg plots
  • update the trend charts to allow selecting HR related data series for trend charts when lap-swimming activities are selected (histogram, scatter, best-avg)
  • update the sport zone editor to allow adding HR zones for lap swimming and update the model parameters page to show the zones.
  • fix the lap swim editor to handle HR data (currently HR data is lost when lengths are split or merged), see #79

Implement heat maps as a trends plot

Heat maps are maps which display GPS routes from a selected list of activities. The routes that are more frequently traversed are shown at a higher intensity than the rest. This provides nice map visualizations (although it has questionable value for training).

There is already some functionality for this in ActivityLog2: you can use the "File/Generate Heat Map..." menu which outputs a HTML file with the heat map using Google Maps and their heat map API. This was written before "Trends" were implemented.

It would be nice to have this option as a Trend Chart.

At this time all trend charts are plot snips, so we could change this by implementing the map widget as a snip% and inserting it into the plot.

Find replacement weather data API

TLDR

The weather API provider used by ActivityLog2 will discontinue their public weather API and we need to find another way to retrieve weather information for imported activities.

Also, this happened before: #33

Update (April 2022)

Weather records stored in FIT files can be imported and displayed by the GUI, reducing the need for a web service for those who have devices that record this data (I could not find how to get my FR945 to record it though...). The implementation has the following limitations:

  • The FIT reader can read "current", "forecast" and "warning" weather records, but only "current" ones are stored in the database.
  • Multiple weather records can be present in a FIT file and they are all stored in the database associated with the session, but only the first one is displayed in the GUI.
  • When weather records are present in the FIT file, the application will no longer request weather data from the web service and also editing this data is not possible using the "Activity/Edit Weather..." menu.
  • FIT weather records don't have Dew Point, so Humidex cannot be calculated.

Previous Situation (September 2021)

DarkSky will continue to support existing API keys until the end of 2022, so the current binary release will continue to have weather data until than.

Several other weather services have appeared aiming to replace DarkSky (seemed to be a popular service). Some of these are linked in comments to this issue, to be investigated once I start working on it.

Previous situation (April 2020)

At this time, DS stopped providing new API keys, but existing ones will work until the end of 2021 -- this is a vague date, but their blog post does not have more details.

The current binary release is shipped with an API key and this will continue to work, perhaps for another 12 months or so, but anyone who wants to build their own package won't be able to get weather data.

What next?

  • Find a new Weather API Unfortunately a quick web search did not find a suitable one (see Weather API requirements below).
  • DONE -- Manual Weather Data Entry ActivityLog2 allows entering weather data manually and services such as Weather Underground still allow retrieving the historical weather information using their Web interface. This is not ideal as it involves a lot of manual work.
  • DONE -- Weather Records in FIT Files some Garmin devices record and store weather data in the activity files (presumably by querying the current weather at the time). AL2 currently discards this information, but it could be imported as well. Only a small set of Garmin devices collect this data, so this is is a partial solution at best.
  • Portable Weather Stations. These devices seem to exist on the market and perhaps some of them could be used to automatically retrieve data from them
  • Investigate writing our own weather station this is a "pie in the sky" project, but after all ActivityLog2 is a hobby and might be interesting to experiment with this. There are plenty of Arduino weather station projects on the web.

Weather API Requirements

To make use of a Weather API by activity log, the API needs to provide the following features:

  • Lookup weather based on GPS location. ActivityLog2 retrieves weather data for activities automatically and this is done by looking at the GPS location for an activity and querying the Weather API
  • Provide Historical Data. Activities are usually imported a few hours to a few days after they were recorded, and weather data is retrieved at the time of import. This means the Weather API must provide the ability to query the weather at some time in the recent past. As a bonus, it would be nice to be able to retrieve weather several years in the past for people who import their data for the first time.
  • Provide a Free (no cost) Access Tier ActivityLog2 is a hobby project, and I don't make any money off it. I cannot justify paying a monthly subscription for this service. Plus, accessing historical data can cost a lot more. For example, OpenWeatherMap provides a free tier, but this only includes access to current and forecast weather and the cheapest plan which provides historical weather data starts at $150/month.
  • Allow storing weather data locally The Terms of Service (TOS) for the service must allow storing weather data locally along with the session data, so ActivityLog2 does not have to fetch weather info each time the user looks at an old activity
  • Allow displaying additional weather info The Terms of Service (TOS) for the service must allow showing additional weather information along with the rest of the weather data. ActivityLog2 shows temperature recorded by the device if this is available in the FIT file as well as a computed "Humidex" value.

Wunderground stopped providing free API keys

building.md mentions one should get a Wunderground API key for weather, however as of May 15, 2018, Wunderground stopped providing free keys.

Complete announcement is here: https://www.wunderground.com/weather/api/

To improve our services and enhance our relationship with our users, we will no longer provide free
weather API keys as part of our program. If you have been directed to download our Weather
Underground free API key by a third party provider, please contact your vendor for resolution.

This is very annoying, I wonder if there's an alternative service one can use.

Font size too small on 4k monitor on Linux

Screenshot to illustrate the issue:

Screenshot_20201104_111441

I had the font sizes in the Summary boxes increased in the code, but have somehow managed to lose it with the latest git pull.

For the tab selector I increased it in the code with

diff --git a/rkt/widgets/tab-selector.rkt b/rkt/widgets/tab-selector.rkt
index 980853f..fbf0960 100644
--- a/rkt/widgets/tab-selector.rkt
+++ b/rkt/widgets/tab-selector.rkt
@@ -50,7 +50,7 @@
     (super-new)

     ;; Font used to draw the labels
-    (define font (send the-font-list find-or-create-font 9 'default 'normal 'normal
+    (define font (send the-font-list find-or-create-font 14 'default 'normal 'normal
                        #f 'smoothed))

The axis labels and legends in the graphs are similarly a bit small.

I think font size could be made dependent on screen resolution, but I'm not sure how difficult it would be. Clearly some parts of the application already adapt well automatically, could be a widget issue.

FTHR analysis tool for setting heart rate, pace and power zones

Joe Friel describes a method for determining the heart rate, pace and power zones for an athlete. [1]. This involves doing a test workout and analyzing this workout to determine the Functional Threshold Heart Rate and Power.

There is already some Racket code [2] to do the analysis for running activities to determine Heart Rate and Pace zones, but this has to be run manually in a Racket REPL, so it is not very user friendly.

  • Add some GUI interface to allow the user to look at this data interactively and set new zones with a mouse click.
  • A task could also be run on each import, to analyze new activities and prompt the user when the code detects that some zones have changed.

[1] https://www.trainingpeaks.com/blog/joe-friel-s-quick-guide-to-setting-zones/
[2] https://github.com/alex-hhh/ActivityLog2/blob/master/etc/fthr-analysis.rkt

Missing run power from Styrd power meter

I usually run with a Stryd so today I decided to import one of my runs...

ActivityLog2 detected my power meter in equipment. Hurray!
2018-06-29-124418_308x93_scrot

But unfortunately none of the stats/charts/scatter allow power to be selected. I am happy to add this feature to ActivityLog2 if you provide some background on where this data is kept how the charts are generated. Thanks.

METRIC/IMPERIAL trouble series: ALT, CALT, VOSC and PCO

The following series are always kept in metric mode: "alt", "calt", "vosc", "pco" (maybe others?) so all the plots use metric values. See [1] for the meaning of these series.

Summary values (e.g lap average) are displayed as imperial when that system is selected.

Trouble is that summary data when detecting various intervals (intervals.rkt) is expecting them to be always in metric (as the summary values are actually converted for imperial for display). We need to do something similar to the way we handle distance and speed ("dst" -- always metric, "distance" -- metric or imperial; "spd" -- always metric, "speed" -- metric or imperial)

[1] https://github.com/alex-hhh/ActivityLog2/blob/master/doc/session-df.md

Forcing import of activity causes other activities to disappear

I tried importing a large activity, which for some reason didn't seem to import. It was not shown in the activities tab. I then tried again but it said that it was already imported so I forced reimport.

After forcing the reimport the activity shows up in the activities tab, but older ones do not. Not sure what else I can add here to help with debugging, please let me know.

Session Effort HR Zone calculation method stacktrace

I experience the following stack trace when using the Session Effort dialog. This happens if I select the calculation method, HR Zone.

application: not a procedure;
 expected a procedure that can be applied to arguments
  given: #f
  arguments...:
   (object:connection% ...)
   1085
  context...:
   /home/nickb/src/ActivityLog2/rkt/dialogs/edit-session-tss.rkt:293:4: calculate-tss
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/common/queue.rkt:435:6
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/common/queue.rkt:486:32
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/common/dialog.rkt:58:4: show method in dialog-mixin
   /usr/share/racket/collects/racket/private/more-scheme.rkt:148:2: call-with-break-parameterization
   /usr/share/racket/collects/racket/private/more-scheme.rkt:265:2: call-with-exception-handler
   /home/nickb/src/ActivityLog2/rkt/widgets/edit-dialog-base.rkt:154:4: do-edit method in edit-dialog-base%
   /home/nickb/src/ActivityLog2/rkt/dialogs/edit-session-tss.rkt:409:4: run method in edit-session-tss-dialog%
   /home/nickb/src/ActivityLog2/rkt/dialogs/activity-edit.rkt:186:4: on-edit-tss
   /usr/share/racket/pkgs/gui-lib/mred/private/mrmenu.rkt:250:14: command method in basic-selectable-menu-item%
   /usr/share/racket/collects/racket/private/more-scheme.rkt:148:2: call-with-break-parameterization
   /usr/share/racket/collects/racket/private/more-scheme.rkt:265:2: call-with-exception-handler
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/common/queue.rkt:435:6
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/common/queue.rkt:486:32
   /usr/share/racket/pkgs/gui-lib/mred/private/wx/common/queue.rkt:634:3


Histogram inspector does not remember its settings

This happens occasionally, and I don't have the steps to reproduce, but, occasionally, the histogram options don't seem to be in sync with what is drawn in the plot. For example, "color by zone" is applied to the histogram when the respective checkbox is not selected, or the outliers are not trimmed when there is a percentage in the "trim outliers" input field. Need to review the code to determine what is going on.

Calculate TRIMP score for running?

Is this something that could be calculated and shown in a column for running activities with heart rate data?

I have a small python script that can calculate it given a FIT file, would be nice if it could be integrated into ActivityLog2 though.

from fitparse import FitFile

def compute_frac_trimp(seconds, hr, minhr, maxhr, gender):
  minutes = seconds / 60.0
  hrr = (float(hr) - minhr)/(maxhr - minhr)
  ret = minutes * hrr * 0.64 * math.pow(2.71828, gender * hrr)
  return ret

def compute_trimp(file_name, minhr, maxhr, gender):
  ret = 0
  hr = None
  ts = None
  old_ts = None

  fitfile = FitFile(file_name)
  for record in fitfile.get_messages('lap'):
    sport = record.get_value('sport')
    if sport != SPORT:
      return 0

  for record in fitfile.get_messages('record'):
    for record_data in record:
      if record_data.name == 'heart_rate':
        hr = record_data.value
      elif record_data.name == 'timestamp':
        old_ts = ts
        ts = time.mktime(datetime.datetime.strptime(str(record_data.value), "%Y-%m-%d %H:%M:%S").timetuple())
        if old_ts and hr:
          trimp = compute_frac_trimp(ts - old_ts, hr, minhr, maxhr, gender)
          ret += trimp

  return ret

build-id.txt does not exist

Downloaded 1.5.0 on Linux as a tarball. Ran racket run.rkt and got:

file-size: cannot get size
path: /home/pmatos/ActivityLog2-rel-1.5.0/./build-id.txt
system-error: No such file or directory; errno=2

Is this supposed to exist or do I need to bootstrap something?

Best avg for pace is incorrectly calculated

Pace values don't average over time (they do over distance). This results in a higher than average pace computed when df-best-avg is used for the "pace" series, which results in higher estimates for Critical Velocity models.

The Best Avg session inspector and trends plot will need to have some special handling code to detect when the "pace" series is requested, compute the best avg for the "spd" series and convert it back to pace. The "spd" series will correctly average for the Best Avg data.

also swim pace is not considering rest periods -- we neeed a "normalized pace" that takes pauses into account and compute the best avg on that, otherwise the swim pace estimates are too high.

While we're at it make sure that CV can be estimated for the speed series as well

can't import workout files from garmin forerunner 245 device

Hi,
Please find perfectly valid workout files from a garmin forerunner 245 device.
They give the following error message in a console window opened by the software when I try to import it:
Workouts.zip

dict-ref: no value for key: 'duration-value in: '((target-value . 0) (8 . #"") (message-index . 0) (name . #"") (duration-type . open) (target-type . open) (intensity . warmup))

observed with ActivityLog2 version 1.10.0.547

Add weather forecast to the calendar view

The Wunderground API we use supports a 4 day forecast with the free API key we use. It would be nice to use this information and display a forecast in the calendar view, similar to what other calendar applications do.

For this to work a default location or weather station will need to be set in preferences, as we cannot really do GEO lookup on a PC.

Question: Critical Power

Hi, sorry for this question using issues but I can't find a mailing list or another place for them.

I think I am missing something. You have the CP/W'/Tau model but how does this fit with existing FTP results. Say I do an FTP test using trainerroad.com and want to input the result. How can I go about doing this?

Also, it says in the critical power docs that it can determine these values from a ride but I cannot seem to find a way to do it. Could you please give me some pointers on these two issues please?

Issue creating workout

I downloaded release 1.8.2 and tried running it on a Mac using the racket run.rkt command. The application loads and I can import an activity, but when I go to the 'Workouts' section I can't seem to create a workout - am I doing something wrong? Please see the screenshot attached.

Screen Shot 2020-05-12 at 3 29 20 pm

Auto-detect Critical Power parameters

It is tedious to manually setup CP trend plots and update the CP data with the resulting values. This workflow is indented for determining current CP values, or ones for an entire season and does not work well if there is already a large amount of historical data present in the database.

A mechanism could be added to quicly estimate historical CP parameters. This could work as follows:

  • the algorithm should be given a date range and sport as input.
  • get the sessions, group them by week
  • for each week compute the aggregate best avg for the sessions in that week
  • do a rolling best avg aggregate for the past 4 to 6 weeks, and estimate CP on these.
  • need to re-check if the W'Bal becomes negative for any of these sessions. What to do about it?

All this should be given some GUI which would allow updating the CRITICAL_POWER table. Think about erasing/restoring previous data.

The algoritm could also run on import and monitor any potential CP changes, prompting the user to update them.

Incorrect ascent/descent calculation?

ActivityLog2 calculates disproportionately large ascent/descent values for my runs which are typically very flat otherwise. I have Garmin 910xt watch with barometric altimeter.

I'll try to illustrate the problem on a 2km run, for which ActivityLog calculates 58m elevation gain, although in reality there should be no more than 1-2 meter change. There are two Elevation (m) charts:

  1. I think this is the correct one, as the real elevation is around 1m:
    Screenshot_20201101_215858

  2. Presumably this one comes from the barometric measurements:
    Screenshot_20201101_220004

I'm guessing ActivityLog2 takes 2. for the ascent/descent calculation. Is it possible to influence this?
I'm not sure why it is so wacky even though it's from a flat road, possibly the sensor is broken as it's a pretty old watch.

Thanks

Read running power data

I've gotten a Stryd running pod recently, which records power and a few other running dynamics metrics.

With Garmin watches it records the data in some third-party IQ fields in the FIT file I believe, so it will need some custom code to parse it correctly. If you point me to where in the code is the parsing done, I can try to figure out how to extract this Stryd data.

compute PMC in the background and display TSB with a 1 day delay

use the same technique as for the BAVG trend for working in the background

TSB should be displayed w/ a one day delay, essentially TSB is at start of the day, fitness and fatigue at the end of the day. This could be an option for the trends chart. This seems to be the way Golden Cheetah does it, as well as other web sites.

Map is not centered

This is something I noticed earlier on both my machines. When I load the map for an activity, the map is not centered on screen. Here's a screenshot of how it's showing.
2018-07-03-080814_1920x1080_scrot

Add more UI updates via notifications

When data is changed using the GUI (e.g. a new session is added or imported, or an existing session is updated), an event is created to signal this. Most of the views make use of make-log-event-source and collect-events to determine what has changed and just update the relevant data in the view they dislpay. This reduces the need to call the "Refresh view..." menu item or risk having outdated views.

However this is not complete. In particular, we need to:

  • Update calendar totals when activities change their duration/distance, or are moved around (their date is changed)
  • Reports need to update when sessions and athlete metrics change
  • Update Activity List when body weight data changes
  • Activity list and Session inspector views needs to update when the session weather change
  • Trend charts need to update when sessions change
  • Update BW Trends Chart when body weight data changes

Best Avg Bests snip position is not remembered

The Trends Best Avg plot can display a "Model and Data Bests" snip when Critical Power values are estimated. This snip can be dragged around the plot and there is some code to remember the position of the snip. Occasionally, the position is not correctly remembered and the snip is placed at the default position.

Slowness on Session -> Charts

Not sure if it happens only for me (Ubuntu 20.04, Racket 7.9), the issue is best illustrated with a short video:

Peek 2020-11-21 15-59

ActivityLog2 is pretty unresponsive while this processing is happening and uses 100% CPU. I build the latest code on master with racket build.rkt.

Recognize time zone for an activity and display local time

Currently, the time of the activity is shown in the local time zone of the computer that ActivityLog2 runs on. For example, this means that ActivityLog2 will show that a Run stared at 3am even though it was 9am in the timezone where the run was actually done.

For activities what have GPS data we could have a function lat/lon->time-zone to determine the time zone automatically. For other activites (e.g. Lap Swims), we could allow the user to set this information.

Need to determine how would this work for reports and trend charts? Does it matter?

Some links:

http://stackoverflow.com/questions/5584602/determine-timezone-from-latitude-longitude-without-using-web-services-like-geona

http://efele.net/maps/tz/world/

http://www.geonames.org/

Create some Racket packages from the source files

The application contains several parts which might be useful as independent packages:

These would be:

  • a data frame object and related functions. This vaguely resembles the R data frame and, at least for my application, is really useful in manipulating decent sized data sets. See here https://github.com/alex-hhh/ActivityLog2/blob/master/doc/data-frame.md for an overview of what can be done with it.
  • a map widget that uses open street map tiles. It allows the usual panning and zooming functionality and can also display GPS tracks.
  • a validating-input-field% widget which provides an enhanced text field. It can be set up with a "cue text" when it is empty and will highlight red if an invalid value is entered. I have also written some other custom widgets, but these might be of a lesser general value.
  • a FIT read/write module. FIT files are used by Garmin and some other devices to record activity data (like running) as well as daily steps and other stuff. There seem to be libraries on GitHub for reading this file type in pretty much every popular programming language, and we could add a Racket package as well.

Plot the Critical Power curve on the BestAvg plot in the session view

Trend plots can display Critical Power curves by estimating CP params for the data. The Best Avg plot for a session view could display the CP curve for the model defined for the activity. It should also display model and actual values for different times, just as it is done on the trends plot.

Filter swim graphs by stroke type

Currently both session and trend swim plots just take all the lengths into consideration. It would be nice if we could filter them by stroke type, freestyle, breaststroke, etc

Needs to be done in the session plots: scatter, histogram, and quadrant

... and also in the trend plots, where a "Stroke Type" selector should be displayed, when the selected sport is "Lap Swimming"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.