Class: Toybox.Activity.Info
- Inherits:
-
Toybox.Lang.Object
Overview
The Activity.Info class contains information about the current activity.
This information can be retrieved with the
getActivityInfo() method. Fields in
this class may return null
so should be checked for null
values prior
to use.
Instance Member Summary collapse
-
altitude as Float or Null
The altitude above mean sea level in meters (m).
-
ambientPressure as Float or Null
The ambient pressure in Pascals (Pa).
-
averageCadence as Number or Null
The average cadence during the current activity in revolutions per minute (rpm).
-
averageDistance as Float or Null
The average swim stroke distance from the previous interval in meters (m).
-
averageHeartRate as Number or Null
The average heart rate during the current activity in beats per minute (bpm).
-
averagePower as Number or Null
The average power during the current activity in Watts (W).
-
averageSpeed as Float or Null
The average speed during the current activity in meters per second (mps).
-
bearing as Float or Null
The current bearing in radians.
-
bearingFromStart as Float or Null
The bearing from the starting location to the destination in radians.
-
calories as Number or Null
The calories burned throughout the current activity in kilocalories (kcal).
-
currentCadence as Number or Null
The current cadence in revolutions per minute (rpm).
-
currentHeading as Float or Null
The true north referenced heading in radians.
-
currentHeartRate as Number or Null
The current heart rate in beats per minute (bpm).
-
currentLocation as Location or Null
The current location.
-
currentLocationAccuracy as Quality or Null
The current GPS accuracy.
-
currentOxygenSaturation as Number or Null
The current oxygen saturation in percent (%).
-
currentPower as Number or Null
The current power in Watts (W).
-
currentSpeed as Float or Null
The current speed in meters per second (mps).
-
distanceToDestination as Float or Null
The distance to the destination in meters (m).
-
distanceToNextPoint as Float or Null
The distance to the next point in meters (m).
-
elapsedDistance as Float or Null
The elapsed distance of the current activity in meters (m).
-
elapsedTime as Number or Null
Elapsed time of the current activity in milliseconds (ms).
-
elevationAtDestination as Number or Null
The elevation at the destination in meters (m).
-
elevationAtNextPoint as Float or Null
The elevation at the next point in meters (m).
-
energyExpenditure as Float or Null
The current energy expenditure in kilocalories per minute (kcals/min).
-
frontDerailleurIndex as Number or Null
The current front bicycle derailleur index.
-
frontDerailleurMax as Number or Null
The front bicycle derailleur maximum index.
-
frontDerailleurSize as Number or Null
The front bicycle derailleur gear size in number of teeth.
-
maxCadence as Number or Null
The maximum cadence recorded during the current activity in revolutions per minute (rpm).
-
maxHeartRate as Number or Null
The maximum heart rate recorded during the current activity in beats per minute (bpm).
-
maxPower as Number or Null
The maximum power recorded during the current activity in Watts (W).
-
maxSpeed as Float or Null
The maximum speed recorded during the current activity in meters per second (mps).
-
meanSeaLevelPressure as Float or Null
The mean sea level barometric pressure in Pascals (Pa).
-
nameOfDestination as String or Null
The name of the destination.
-
nameOfNextPoint as String or Null
The name of the next point.
-
offCourseDistance as Float or Null
The distance to the nearest point on the current course in meters (m).
-
rawAmbientPressure as Float or Null
The raw ambient pressure in Pascals (Pa).
-
rearDerailleurIndex as Number or Null
The current front bicycle derailleur index.
-
rearDerailleurMax as Number or Null
The rear bicycle derailleur maximum index.
-
rearDerailleurSize as Number or Null
The rear bicycle derailleur gear size in number of teeth.
-
startLocation as Location or Null
The starting location of the current activity.
-
startTime as Moment or Null
The starting time of the current activity.
-
swimStrokeType as SwimStrokeType or Null
The swim stroke type from the previous length.
-
swimSwolf as Number or Null
The SWOLF score from the previous length.
-
timerState as Number or Null
The recording timer state.
-
timerTime as Number or Null
The current Timer value in milliseconds (ms).
-
totalAscent as Number or Null
The total ascent during the current activity in meters (m).
-
totalDescent as Number or Null
The total descent during the current activity in meters (m).
-
track as Float or Null
The current track in radians.
-
trainingEffect as Float or Null
The Training Effect score of the current activity.
Instance Attribute Details
var altitude as Float or Null
The altitude above mean sea level in meters (m).
Elevation is derived from the most accurate source: Barometer or GPS
var ambientPressure as Float or Null
The ambient pressure in Pascals (Pa).
This returns ambient (local) barometric pressure as measured by the pressure sensor. The data is smoothed by a two-stage filter to reduce noise and instantaneous variation.
var averageCadence as Number or Null
The average cadence during the current activity in revolutions per minute (rpm).
var averageDistance as Float or Null
The average swim stroke distance from the previous interval in meters (m).
var averageHeartRate as Number or Null
The average heart rate during the current activity in beats per minute (bpm).
var averagePower as Number or Null
The average power during the current activity in Watts (W).
var averageSpeed as Float or Null
The average speed during the current activity in meters per second (mps).
The average is computed as the elapsed 3-D accumulated distance divided by the elapsed time.
var bearing as Float or Null
The current bearing in radians.
Bearing is the direction from your current location or position to the destination of navigation, dependent on your current location.
var bearingFromStart as Float or Null
The bearing from the starting location to the destination in radians.
Bearing from start is the direction of desired track from the start of navigation to the destination in radians. This is only dependent on your location when a course is set, and it is not dependent on where you may have moved to during an activity
var calories as Number or Null
The calories burned throughout the current activity in kilocalories (kcal).
var currentCadence as Number or Null
The current cadence in revolutions per minute (rpm).
var currentHeading as Float or Null
The true north referenced heading in radians.
This provides compass orientation if it is supported by the device.
var currentHeartRate as Number or Null
The current heart rate in beats per minute (bpm).
var currentLocation as Location or Null
The current location.
This member will always provide a null
value unless the Positioning
Permission is enabled.
var currentLocationAccuracy as Quality or Null
The current GPS accuracy.
GPS accuracy values range from 0-4. A value of 0 indicates an accuracy value is not available, while a value of 4 indicates a good GPS fix.
var currentOxygenSaturation as Number or Null
The current oxygen saturation in percent (%)
var currentPower as Number or Null
The current power in Watts (W).
var currentSpeed as Float or Null
The current speed in meters per second (mps).
var distanceToDestination as Float or Null
The distance to the destination in meters (m).
var distanceToNextPoint as Float or Null
The distance to the next point in meters (m).
var elapsedDistance as Float or Null
The elapsed distance of the current activity in meters (m).
var elapsedTime as Number or Null
Elapsed time of the current activity in milliseconds (ms).
var elevationAtDestination as Number or Null
The elevation at the destination in meters (m).
var elevationAtNextPoint as Float or Null
The elevation at the next point in meters (m).
var energyExpenditure as Float or Null
The current energy expenditure in kilocalories per minute (kcals/min).
Energy expenditure is a metric developed by FirstBeat that provides an estimation of the calorie burn rate calculated from heart rate data.
var frontDerailleurIndex as Number or Null
The current front bicycle derailleur index.
Index values range from from 1 to the frontDerailleurMax.
var frontDerailleurMax as Number or Null
The front bicycle derailleur maximum index.
var frontDerailleurSize as Number or Null
The front bicycle derailleur gear size in number of teeth.
var maxCadence as Number or Null
The maximum cadence recorded during the current activity in revolutions per minute (rpm).
var maxHeartRate as Number or Null
The maximum heart rate recorded during the current activity in beats per minute (bpm).
var maxPower as Number or Null
The maximum power recorded during the current activity in Watts (W).
var maxSpeed as Float or Null
The maximum speed recorded during the current activity in meters per second (mps).
var meanSeaLevelPressure as Float or Null
The mean sea level barometric pressure in Pascals (Pa).
This returns barometric pressure calibrated to sea level. Since pressure varies dues to several factors, a GPS-based altitude must first be obtained, then the ambient (local) pressure is measured by the pressure sensor before conversion to a calibrated barometric pressure value.
var nameOfDestination as String or Null
The name of the destination.
var nameOfNextPoint as String or Null
The name of the next point.
var offCourseDistance as Float or Null
The distance to the nearest point on the current course in meters (m).
var rawAmbientPressure as Float or Null
The raw ambient pressure in Pascals (Pa).
This returns ambient (local) barometric pressure as measured by the internal pressure sensor. The data is the temperature compensated information read directly from the internal sensor.
var rearDerailleurIndex as Number or Null
The current front bicycle derailleur index.
Index values range from from 1 to the rearDerailleurMax.
var rearDerailleurMax as Number or Null
The rear bicycle derailleur maximum index.
var rearDerailleurSize as Number or Null
The rear bicycle derailleur gear size in number of teeth.
var startLocation as Location or Null
The starting location of the current activity.
This member will always provide a null
value unless the Positioning
Permission is enabled.
var startTime as Moment or Null
The starting time of the current activity.
var swimStrokeType as SwimStrokeType or Null
The swim stroke type from the previous length.
Swim stroke type values range from 0-6. Each Number value represents a different swim stroke type (e.g. freestyle, backstroke, etc.).
var swimSwolf as Number or Null
The SWOLF score from the previous length.
SWOLF is an abbreviation for Swim-Golf, a measure of swimming efficiency. The score is obtained by adding the strokes per length to the total time of the length. For example, if it takes ten strokes and thirty seconds to swim a pool length, the SWOLF score is 40. Just like golf, a lower SWOLF score is better.
var timerState as Number or Null
The recording timer state.
The timer state ranges from 0-3. A value of 0 indicates that the timer is off and there is no active recording, while a value of 3 indicates timer is on and there is an active recording.
var timerTime as Number or Null
The current Timer value in milliseconds (ms).
var totalAscent as Number or Null
The total ascent during the current activity in meters (m).
var totalDescent as Number or Null
The total descent during the current activity in meters (m).
var track as Float or Null
The current track in radians.
Track is the direction of travel in radians based on GPS movement. If supported by the device, this provides compass orientation when stopped.
var trainingEffect as Float or Null
The Training Effect score of the current activity.
Training Effect is a score developed by FirstBeat, which indicates an activity's level of effect on aerobic fitness. Scores range from 1.0 (easy) to 5.0 (overreaching).