I'm using org-mode
tables to record workouts and would like to calculate the pace I achieve on runs/cycling. I've read the org spreadsheets introduction and found a thread about calculating units but am unsure how to go about doing this.
Currently I have very crudely entered the length of the run/cycle in km
and the time as minutes/seconds (min secs
) and used a simple formula $6=($5 / $4)
in the pace column but the calculation isn't coming out as I'd hoped, I include the column Should Be
for reference...
| Date | Activity | Distance | Time | Pace | Should Be |
|------------------+----------+----------+---------+---------------------+----------------|
| <2020-06-21 Sun> | Run | 10.75km | 72m46s | 6.6976744 m46s / km | 5.50 min/km |
| <2020-06-19 Fri> | Run | 6.56km | 35m26s | 5.3353659 m26s / km | 5.24 min/km |
| <2020-06-16 Tue> | Run | 6.47km | 34m44s | 5.2550232 m44s / km | 5.22 min/km |
| <2020-06-13 Sat> | Run | 8.03km | 47m28s | 5.8530511 m28s / km | 5.55 min/km |
| <2020-06-11 Thu> | Cycle | 22.23km | 85m30s | 3.8236617 m30s / km | 3.51 min/km |
The calculating units thread doesn't describe how to handle time and I haven't yet found a method to do this.
Is it feasible? Or should I start considering using timestamps to calculate elapsed time and go from there?
org-sbe
to call a code block, and then handle units and parse strings in your preferred language to generate the new column.