Class: Toybox.Activity.Info
- Inherits:
-
Toybox.Lang.Object
Overview
The 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 Lang.Float or Null
The altitude above mean sea level in meters (m).
-
ambientPressure as Lang.Float or Null
The ambient pressure in Pascals (Pa).
-
averageCadence as Lang.Number or Null
The average cadence during the current activity in revolutions per minute (rpm).
-
averageDistance as Lang.Float or Null
The average swim stroke distance from the previous interval in meters (m).
-
averageHeartRate as Lang.Number or Null
The average heart rate during the current activity in beats per minute (bpm).
-
averagePower as Lang.Number or Null
The average power during the current activity in Watts (W).
-
averageSpeed as Lang.Float or Null
The average speed during the current activity in meters per second (mps).
-
bearing as Lang.Float or Null
The current bearing in radians.
-
bearingFromStart as Lang.Float or Null
The bearing from the starting location to the destination in radians.
-
calories as Lang.Number or Null
The calories burned throughout the current activity in kilocalories (kcal).
-
currentCadence as Lang.Number or Null
The current cadence in revolutions per minute (rpm).
-
currentHeading as Lang.Float or Null
The true north referenced heading in radians.
-
currentHeartRate as Lang.Number or Null
The current heart rate in beats per minute (bpm).
-
currentLocation as Position.Location or Null
The current location.
-
currentLocationAccuracy as Position.Quality or Null
The current GPS accuracy.
-
currentOxygenSaturation as Lang.Number or Null
The current oxygen saturation in percent (%).
-
currentPower as Lang.Number or Null
The current power in Watts (W).
-
currentSpeed as Lang.Float or Null
The current speed in meters per second (mps).
-
distanceToDestination as Lang.Float or Null
The distance to the destination in meters (m).
-
distanceToNextPoint as Lang.Float or Null
The distance to the next point in meters (m).
-
elapsedDistance as Lang.Float or Null
The elapsed distance of the current activity in meters (m).
-
elapsedTime as Lang.Number or Null
Elapsed time of the current activity in milliseconds (ms).
-
elevationAtDestination as Lang.Number or Null
The elevation at the destination in meters (m).
-
elevationAtNextPoint as Lang.Float or Null
The elevation at the next point in meters (m).
-
energyExpenditure as Lang.Float or Null
The current energy expenditure in kilocalories per minute (kcals/min).
-
frontDerailleurIndex as Lang.Number or Null
The current front bicycle derailleur index.
-
frontDerailleurMax as Lang.Number or Null
The front bicycle derailleur maximum index.
-
frontDerailleurSize as Lang.Number or Null
The front bicycle derailleur gear size in number of teeth.
-
maxCadence as Lang.Number or Null
The maximum cadence recorded during the current activity in revolutions per minute (rpm).
-
maxHeartRate as Lang.Number or Null
The maximum heart rate recorded during the current activity in beats per minute (bpm).
-
maxPower as Lang.Number or Null
The maximum power recorded during the current activity in Watts (W).
-
maxSpeed as Lang.Float or Null
The maximum speed recorded during the current activity in meters per second (mps).
-
meanSeaLevelPressure as Lang.Float or Null
The mean sea level barometric pressure in Pascals (Pa).
-
nameOfDestination as Lang.String or Null
The name of the destination.
-
nameOfNextPoint as Lang.String or Null
The name of the next point.
-
offCourseDistance as Lang.Float or Null
The distance to the nearest point on the current course in meters (m).
-
rawAmbientPressure as Lang.Float or Null
The raw ambient pressure in Pascals (Pa).
-
rearDerailleurIndex as Lang.Number or Null
The current rear bicycle derailleur index.
-
rearDerailleurMax as Lang.Number or Null
The rear bicycle derailleur maximum index.
-
rearDerailleurSize as Lang.Number or Null
The rear bicycle derailleur gear size in number of teeth.
-
startLocation as Position.Location or Null
The starting location of the current activity.
-
startTime as Time.Moment or Null
The starting time of the current activity.
-
swimStrokeType as Activity.SwimStrokeType or Null
The swim stroke type from the previous length.
-
swimSwolf as Lang.Number or Null
The SWOLF score from the previous length.
-
timerState as Activity.TimerState or Null
The recording timer state.
-
timerTime as Lang.Number or Null
The current Timer value in milliseconds (ms).
-
totalAscent as Lang.Number or Null
The total ascent during the current activity in meters (m).
-
totalDescent as Lang.Number or Null
The total descent during the current activity in meters (m).
-
track as Lang.Float or Null
The current track in radians.
-
trainingEffect as Lang.Float or Null
The Training Effect score of the current activity.
Instance Attribute Details
var altitude as Lang.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 Lang.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 Lang.Number or Null
The average cadence during the current activity in revolutions per minute (rpm).
var averageDistance as Lang.Float or Null
The average swim stroke distance from the previous interval in meters (m).
var averageHeartRate as Lang.Number or Null
The average heart rate during the current activity in beats per minute (bpm).
var averagePower as Lang.Number or Null
The average power during the current activity in Watts (W).
var averageSpeed as Lang.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 Lang.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 Lang.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 Lang.Number or Null
The calories burned throughout the current activity in kilocalories (kcal).
var currentCadence as Lang.Number or Null
The current cadence in revolutions per minute (rpm).
var currentHeading as Lang.Float or Null
The true north referenced heading in radians.
This provides compass orientation if it is supported by the device.
var currentHeartRate as Lang.Number or Null
The current heart rate in beats per minute (bpm).
var currentLocation as Position.Location or Null
The current location.
This member will always provide a null
value unless the Positioning
Permission is enabled.
var currentLocationAccuracy as Position.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 Lang.Number or Null
The current oxygen saturation in percent (%)
var currentPower as Lang.Number or Null
The current power in Watts (W).
var currentSpeed as Lang.Float or Null
The current speed in meters per second (mps).
var distanceToDestination as Lang.Float or Null
The distance to the destination in meters (m).
var distanceToNextPoint as Lang.Float or Null
The distance to the next point in meters (m).
var elapsedDistance as Lang.Float or Null
The elapsed distance of the current activity in meters (m).
var elapsedTime as Lang.Number or Null
Elapsed time of the current activity in milliseconds (ms).
var elevationAtDestination as Lang.Number or Null
The elevation at the destination in meters (m).
var elevationAtNextPoint as Lang.Float or Null
The elevation at the next point in meters (m).
var energyExpenditure as Lang.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 Lang.Number or Null
The current front bicycle derailleur index.
Index values range from from 1 to the frontDerailleurMax.
var frontDerailleurMax as Lang.Number or Null
The front bicycle derailleur maximum index.
var frontDerailleurSize as Lang.Number or Null
The front bicycle derailleur gear size in number of teeth.
var maxCadence as Lang.Number or Null
The maximum cadence recorded during the current activity in revolutions per minute (rpm).
var maxHeartRate as Lang.Number or Null
The maximum heart rate recorded during the current activity in beats per minute (bpm).
var maxPower as Lang.Number or Null
The maximum power recorded during the current activity in Watts (W).
var maxSpeed as Lang.Float or Null
The maximum speed recorded during the current activity in meters per second (mps).
var meanSeaLevelPressure as Lang.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 Lang.String or Null
The name of the destination.
var nameOfNextPoint as Lang.String or Null
The name of the next point.
var offCourseDistance as Lang.Float or Null
The distance to the nearest point on the current course in meters (m).
var rawAmbientPressure as Lang.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 Lang.Number or Null
The current rear bicycle derailleur index.
Index values range from from 1 to the rearDerailleurMax.
var rearDerailleurMax as Lang.Number or Null
The rear bicycle derailleur maximum index.
var rearDerailleurSize as Lang.Number or Null
The rear bicycle derailleur gear size in number of teeth.
var startLocation as Position.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 Time.Moment or Null
The starting time of the current activity.
var swimStrokeType as Activity.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 Lang.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 Activity.TimerState 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 Lang.Number or Null
The current Timer value in milliseconds (ms).
var totalAscent as Lang.Number or Null
The total ascent during the current activity in meters (m).
var totalDescent as Lang.Number or Null
The total descent during the current activity in meters (m).
var track as Lang.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 Lang.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).