Custom fields
Custom fields
With some programming and JavaScript knowledge, you can create your own custom fields and values. You have full access to all values of the training as well as to your zone and body data.
Custom fields are marked with a * in lists and are shown on the training page, also aggregated and represented in the annual overview and in the diagrams of the evaluation.
Ruleset
The training object is bound to "this"
The training object with all its predefined metrics is bound to the keyword "this".
You can output this object with "console.log(this);" to the developer console of your web browser to see which metrics a training has.
Then go to the calendar view, evaluation or training details view to run the custom field.
The developer console can be opened on Windows with Ctrl+Shift+I.
The field must return a number
The "return" keyword must be given a number. Otherwise the field "NaN" is calculated by the field and is not displayed.
Other strings cannot be returned for security reasons.
Aggregation
The aggregation of the field determines which method is used to aggregate the field in the evaluation, i.e. in Aggregation chart or Relation chart.
Total
The calculation of the result of each training is added together in the evaluation.
An example is the "distance" or "duration" of an activity. These metrics are summed.
Average by number
The result of the trainings is totaled in the evaluation and then divided by the number of trainings.
An example is the "temperature", which is displayed as an average of the number of training sessions in the evaluation.
Average by duration
The result of the training is summed up in the evaluation and then divided by the total duration of the training.
An example is the "heart rate", which is displayed as an average of the training duration in the evaluation.
Metrics and values of a workout
Please note that the list may be incomplete as new metrics are added from time to time and the list may not have been updated.
It is always a good idea to temporarily activate the debug field to see what metrics a training really has.
The underlying value system is metric and must be converted if necessary.
The following metrics can be bound to the training object "this".
Name | Description | Type |
---|---|---|
heartrate | Average heart rate | Number |
aerobicTrainingEffect | Aerobic training effect - proprietary | Number |
altitude | elevation data - ascent, descent, climb, fall, vertical meters (Meter) | Object{ "ascent": 124, "descent": 242, "elevation": 82 } |
anaerobicTrainingEffect | Anaerobic training effect | Number |
apparentTemperature | Feels like temperature (Celcius) | Number |
bikes | Equipment - Bicycles | Object |
bodyElasticity | Body elasticity | Number |
cadence | Average cadence | Number |
cadenceMax | Maximum cadence | Number |
calories | Kilocalories | Number |
cloudCover | Clouds | Number |
confirmed | Confirmed planned training | Boolean |
date | Date of training | Date |
deviceName | Name of the recording device | String |
devices | Devices (Strap, Stryd, etc..) | Object |
distance | Distance (Meter) | Number |
distanceBySpeed | Distance by speed (Meter) | Number |
duration | Active duration (Seconds) | Number |
durationPaused | Pause time (Seconds) | Number |
durationTotal | Total duration (Seconds) | Number |
efficency | Swimming efficiency | Number |
efficencyMin | Minimal swimming efficiency | Number |
effort | Effort - determined by zone priority | Number |
enjoyment | Enjoyment | Number |
fat | Bodyfat | Number |
formPower | Form Power | Number |
formPowerFactor | "Form Power" Index | Number |
ftp | Functional Threshold Power | Number |
ftpa | Functional power threshold speed | Number |
groundContactTime | Ground contact time (Milliseconds) | Number |
groundContactTimeBalance | Ground contact time balance (Percentage of left) | Number |
groundContactTimeMin | Minimum ground contact time (Milliseconds) | Number |
groundContactTimeOEM | Ground contact time of the original device (Milliseconds) | Number |
heartrate | Average heart rate | Number |
heartrateMax | Maximum heart rate | Number |
heartratePerceived | Perceived Heart Rate | Number |
heartratePerceivedPercentage | Perceived heart rate %maxHF | Number |
heartratePercentage | Heart rate %maxHF | Number |
height | Height (Centimeter) | Number |
hrLth | Lactate threshold heart rate of capacity | Number |
hrMax | Maximum heart rate of capacity | Number |
hrRest | Resting heart rate | Number |
hrvValue | Recovery value - proprietary | Number |
humidity | Humidity | Number |
id | Unique identification number | String |
intensityDistribution | Intensity distribution (Seconds) | Object{ "heartrate": null, "power": { "0": 1852, "1": 0, "2": 0 }, "pace": { "0": 1858, "1": 0, "2": 0 }, "cadence": { "0": 402, "1": 1264, "2": 192 } } |
isRace | Competition | Boolean |
kiloJoule | Kilojoules | Number |
leftPedalSmoothness | Pedal smoothness | Number |
rightPedalSmoothness | Pedal smoothness | Number |
leftRightBalance | Pedal balance | Number |
leftTorqueEffectiveness | Torque efficiency | Number |
rightTorqueEffectiveness | Torque efficiency | Number |
legSpringStiffness | Leg Spring Stiffness | Number |
legSpringStiffnessMax | Maximum Leg Spring Stiffness | Number |
miscEquipment | Generic Equipment | Object |
muscle | Muscle percentage | Number |
ozone | Atmospheric ozone | Number |
peakEpoc | Peak EPOC - proprietary (ml/kg) | Number |
pace | Average Pace (Seconds per kilometer) | Number |
paceBySpeed | Average Pace by speed (Seconds per kilometer) | Number |
paceGradeAdjusted | Grade adjusted average pace (Seconds per kilometer) | Number |
paceGradeAdjustedPerceived | Perceived grade adjusted average pace (Seconds per kilometer) | Number |
paceMax | Maximum Pace (Seconds per kilometer) | Number |
pacePercentage | Pace from FTPa in % | Number |
perceivedEffort | Perceived effort | Number |
performanceCondition | Performance condition - proprietary | Object |
poolLength | Pool length | Number |
positionLat | Latitude | Number |
positionLong | Longitude | Number |
power | Average power | Number |
powerAerobicFactor | Heart Rate Power Factor | Number |
powerMax | Maximum power | Number |
powerPerceived | Perceived Power | Number |
powerPerceivedPercentage | Perceived power in % of FTP | Number |
powerPercentage | Power in % of FTP | Number |
precipIntensity | Precipitation intensity | Number |
precipProbability | Probability of precipitation | Number |
pressure | Pressure | Number |
recoveryTime | Recovery time - proprietary | Number |
shareId | Identification number of the public training | String |
shoes | Equipment Shoes | Object |
sicknessIntensity | Disease - Intensity | Number |
speed | Speed (Meters per second) | Number |
speedAerobicFactor | Heart Rate Pace Factor | Number |
speedIndex | Pace Power Index | Number |
speedMax | Maximum speed (Meters per second) | Number |
sportType | Sport | String"running" "cycling" "swimming" "misc" |
subSportType | Subsport | String"hiking" "skiing" "treadmill" ... |
stepLength | Step length | Number |
stepLengthMax | Maximum stride length | Number |
steps | Steps | Number |
strokeLength | Stroke length | Number |
strokeLengthMax | Maximum stroke length | Number |
strokes | Swim strokes | Number |
temperature | Device temperature | Number |
temperatureStation | Temperature | Number |
timezone | Timezone | Number |
title | Title | String |
trainingType | Type of training | String"planned" "file" |
uvIndex | UV index | Number |
verticalOscillation | Vertical oscillation | Number |
verticalOscillationOEM | Vertical oscillation (original device) | Number |
visibility | Visibility | Number |
vo2max | VO2max | Number |
vo2maxRelative | Relative VO2max | Number |
walkingDuration | Duration walking | Number |
water | Body water percentage in % | Number |
weight | Body weight | Number |
windBearing | Wind direction | Number |
windGust | Gust | Number |
windSpeed | Wind speed | Number |
zones | Zone distribution | Object{ "cadence": [ { "name": "Leicht", "from": -1, "to": 167, "intensity": 0, }, { "name": "Moderat", "from": 168, "to": 176, "intensity": 1, }, { "name": "Intensiv", "from": 177, "to": -1, "intensity": 2, } ], "heartrate": [ { "name": "Sehr leicht", "from": -1, "to": 125, "intensity": 0, }, { "name": "Leicht", "from": 126, "to": 149, "intensity": 0, }, ... ], "pace": [ { "name": "Sehr leicht", "to": 410, "from": -1, "intensity": 0, }, { "name": "Leicht", "to": 371, "from": 409, "intensity": 0, }, ... ], "power": [ { "name": "Sehr leicht", "from": -1, "to": 170, "intensity": 0, }, { "name": "Leicht ", "from": 171, "to": 190, "intensity": 0, }, ... ] } |
... | ... | ... |
Series of a training
This function is only available in the training details view.
In the object "seriesSampled" the time series of a training are stored.
Get an exact overview of the possible values with the activated debug field.
The time series are stored in reduced form and must be extrapolated with "sampleSize".
this = { ..., seriesSampled: { sampleSize: 2, endOffset: 0, data: { heartrate: [ 123, 122, 122, 130, 132, ... ], power: [ 223, 222, 252, 270, 270, ... ], ... } }, ... }