Class: Toybox::Activity::Info

Inherits:
Lang::Object show all

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.

Since:

  • 1.0.0

Instance Attribute Summary collapse

Method Summary

Methods inherited from Lang::Object

equals, hashCode, method, toString, weak

Instance Attribute Details

altitudeToybox::Lang::Float

The current altitude in meters (m).

Returns:

Since:

  • 1.0.0



301
302
303
# File 'Monkeybrains.rb', line 301

def altitude
  @altitude
end

ambientPressureToybox::Lang::Float

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.

Returns:

Since:

  • 2.4.0



476
477
478
# File 'Monkeybrains.rb', line 476

def ambientPressure
  @ambientPressure
end

averageCadenceToybox::Lang::Number

The average cadence during the current activity in revolutions per minute (rpm).

Returns:

Since:

  • 1.0.0



237
238
239
# File 'Monkeybrains.rb', line 237

def averageCadence
  @averageCadence
end

averageDistanceToybox::Lang::Float

The average swim stroke distance from the previous interval in meters (m).

Returns:

Since:

  • 1.2.2

Supported Devices:

  • Approach S60

  • fenix 5/S/X

  • fenix Chronos

  • Forerunner 735XT

  • Forerunner 935

  • vivoactive HR

  • vivoactive 3



289
290
291
# File 'Monkeybrains.rb', line 289

def averageDistance
  @averageDistance
end

averageHeartRateToybox::Lang::Number

The average heart rate during the current activity in beats per minute (bpm).

Returns:

Since:

  • 1.0.0



219
220
221
# File 'Monkeybrains.rb', line 219

def averageHeartRate
  @averageHeartRate
end

averagePowerToybox::Lang::Number

The average power during the current activity in Watts (W).

Returns:

Since:

  • 1.0.0

Supported Devices:

  • All Edge devices

  • epix

  • D2 Bravo/Titanium

  • fenix 3/HR

  • fenix 5/S/X

  • fenix Chronos

  • Forerunner 735XT

  • Forerunner 920XT

  • Forerunner 935



184
185
186
# File 'Monkeybrains.rb', line 184

def averagePower
  @averagePower
end

averageSpeedToybox::Lang::Float

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.

Returns:

Since:

  • 1.0.0



149
150
151
# File 'Monkeybrains.rb', line 149

def averageSpeed
  @averageSpeed
end

bearingToybox::Lang::Float

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.

Returns:

Since:

  • 2.1.0



433
434
435
# File 'Monkeybrains.rb', line 433

def bearing
  @bearing
end

bearingFromStartToybox::Lang::Float

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

Returns:

Since:

  • 2.1.0



443
444
445
# File 'Monkeybrains.rb', line 443

def bearingFromStart
  @bearingFromStart
end

caloriesToybox::Lang::Number

The calories burned throughout the current activity in kilocalories (kcal).

Returns:

Since:

  • 1.0.0



135
136
137
# File 'Monkeybrains.rb', line 135

def calories
  @calories
end

currentCadenceToybox::Lang::Number

The current cadence in revolutions per minute (rpm).

Returns:

Since:

  • 1.0.0



231
232
233
# File 'Monkeybrains.rb', line 231

def currentCadence
  @currentCadence
end

currentHeadingToybox::Lang::Float

The true north referenced heading in radians.

This provides compass orientation if it is supported by the device.

Returns:

Since:

  • 1.0.0



296
297
298
# File 'Monkeybrains.rb', line 296

def currentHeading
  @currentHeading
end

currentHeartRateToybox::Lang::Number

The current heart rate in beats per minute (bpm).

Returns:

Since:

  • 1.0.0



213
214
215
# File 'Monkeybrains.rb', line 213

def currentHeartRate
  @currentHeartRate
end

currentLocationToybox::Position::Location

The current location.

This member will always provide a null value unless the Positioning Permission is enabled.

Returns:

Since:

  • 1.0.0



129
130
131
# File 'Monkeybrains.rb', line 129

def currentLocation
  @currentLocation
end

currentLocationAccuracyToybox::Lang::Number

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.

Returns:

See Also:

Since:

  • 1.0.0



121
122
123
# File 'Monkeybrains.rb', line 121

def currentLocationAccuracy
  @currentLocationAccuracy
end

currentPowerToybox::Lang::Number

The current power in Watts (W).

Returns:

Since:

  • 1.0.0

Supported Devices:

  • All Edge devices

  • epix

  • D2 Bravo/Titanium

  • fenix 3/HR

  • fenix 5/S/X

  • fenix Chronos

  • Forerunner 735XT

  • Forerunner 920XT

  • Forerunner 935



170
171
172
# File 'Monkeybrains.rb', line 170

def currentPower
  @currentPower
end

currentSpeedToybox::Lang::Float

The current speed in meters per second (mps).

Returns:

See Also:

Since:

  • 1.0.0



141
142
143
# File 'Monkeybrains.rb', line 141

def currentSpeed
  @currentSpeed
end

distanceToDestinationToybox::Lang::Float

The distance to the destination in meters (m).

Returns:

Since:

  • 2.1.0



400
401
402
# File 'Monkeybrains.rb', line 400

def distanceToDestination
  @distanceToDestination
end

distanceToNextPointToybox::Lang::Float

The distance to the next point in meters (m).

Returns:

Since:

  • 2.1.0



415
416
417
# File 'Monkeybrains.rb', line 415

def distanceToNextPoint
  @distanceToNextPoint
end

elapsedDistanceToybox::Lang::Float

The elapsed distance of the current activity in meters (m).

Returns:

Since:

  • 1.0.0



112
113
114
# File 'Monkeybrains.rb', line 112

def elapsedDistance
  @elapsedDistance
end

elapsedTimeToybox::Lang::Number

Elapsed time of the current activity in milliseconds (ms).

Returns:

Since:

  • 1.0.0



102
103
104
# File 'Monkeybrains.rb', line 102

def elapsedTime
  @elapsedTime
end

elevationAtDestinationToybox::Lang::Float

The elevation at the destination in meters (m).

Returns:

Since:

  • 2.1.0



405
406
407
# File 'Monkeybrains.rb', line 405

def elevationAtDestination
  @elevationAtDestination
end

elevationAtNextPointToybox::Lang::Float

The elevation at the next point in meters (m).

Returns:

Since:

  • 2.1.0



420
421
422
# File 'Monkeybrains.rb', line 420

def elevationAtNextPoint
  @elevationAtNextPoint
end

energyExpenditureToybox::Lang::Float

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.

Returns:

See Also:

Since:

  • 1.2.0

Supported Devices:

  • All devices



322
323
324
# File 'Monkeybrains.rb', line 322

def energyExpenditure
  @energyExpenditure
end

frontDerailleurIndexToybox::Lang::Number

The current front bicycle derailleur index.

Index values range from from 1 to the frontDerailleurMax.

Returns:

Since:

  • 2.1.0

Supported Devices:

  • All Edge devices except Edge 130

  • fenix 5/S/X

  • fenix Chronos

  • Forerunner 735XT

  • Forerunner 935



343
344
345
# File 'Monkeybrains.rb', line 343

def frontDerailleurIndex
  @frontDerailleurIndex
end

frontDerailleurMaxToybox::Lang::Number

The front bicycle derailleur maximum index.

Returns:

Since:

  • 2.1.0

Supported Devices:

  • All Edge devices except Edge 130

  • fenix 5/S/X

  • fenix Chronos

  • Forerunner 735XT

  • Forerunner 935



353
354
355
# File 'Monkeybrains.rb', line 353

def frontDerailleurMax
  @frontDerailleurMax
end

frontDerailleurSizeToybox::Lang::Number

The front bicycle derailleur gear size in number of teeth.

Returns:

Since:

  • 2.1.0

Supported Devices:

  • All Edge devices except Edge 130

  • fenix 5/S/X

  • fenix Chronos

  • Forerunner 735XT

  • Forerunner 935



363
364
365
# File 'Monkeybrains.rb', line 363

def frontDerailleurSize
  @frontDerailleurSize
end

maxCadenceToybox::Lang::Number

The maximum cadence recorded during the current activity in revolutions per minute (rpm).

Returns:

Since:

  • 1.0.0



243
244
245
# File 'Monkeybrains.rb', line 243

def maxCadence
  @maxCadence
end

maxHeartRateToybox::Lang::Number

The maximum heart rate recorded during the current activity in beats per minute (bpm).

Returns:

Since:

  • 1.0.0



225
226
227
# File 'Monkeybrains.rb', line 225

def maxHeartRate
  @maxHeartRate
end

maxPowerToybox::Lang::Number

The maximum power recorded during the current activity in Watts (W).

Returns:

Since:

  • 1.0.0

Supported Devices:

  • All Edge devices

  • epix

  • D2 Bravo/Titanium

  • fenix 3/HR

  • fenix 5/S/X

  • fenix Chronos

  • Forerunner 735XT

  • Forerunner 920XT

  • Forerunner 935



198
199
200
# File 'Monkeybrains.rb', line 198

def maxPower
  @maxPower
end

maxSpeedToybox::Lang::Float

The maximum speed recorded during the current activity in meters per second (mps).

Returns:

Since:

  • 1.0.0



156
157
158
# File 'Monkeybrains.rb', line 156

def maxSpeed
  @maxSpeed
end

meanSeaLevelPressureToybox::Lang::Float

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.

Returns:

Since:

  • 2.4.0



467
468
469
# File 'Monkeybrains.rb', line 467

def meanSeaLevelPressure
  @meanSeaLevelPressure
end

nameOfDestinationToybox::Lang::String

The name of the destination.

Returns:

Since:

  • 2.1.0



410
411
412
# File 'Monkeybrains.rb', line 410

def nameOfDestination
  @nameOfDestination
end

nameOfNextPointToybox::Lang::String

The name of the next point.

Returns:

Since:

  • 2.1.0



425
426
427
# File 'Monkeybrains.rb', line 425

def nameOfNextPoint
  @nameOfNextPoint
end

offCourseDistanceToybox::Lang::Float

The distance to the nearest point on the current course in meters (m).

Returns:

Since:

  • 2.1.0



457
458
459
# File 'Monkeybrains.rb', line 457

def offCourseDistance
  @offCourseDistance
end

rawAmbientPressureToybox::Lang::Float

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.

Returns:

Since:

  • 2.4.0



485
486
487
# File 'Monkeybrains.rb', line 485

def rawAmbientPressure
  @rawAmbientPressure
end

rearDerailleurIndexToybox::Lang::Number

The current front bicycle derailleur index.

Index values range from from 1 to the rearDerailleurMax.

Returns:

Since:

  • 2.1.0

Supported Devices:

  • All Edge devices except Edge 130

  • fenix 5/S/X

  • fenix Chronos

  • Forerunner 735XT

  • Forerunner 935



375
376
377
# File 'Monkeybrains.rb', line 375

def rearDerailleurIndex
  @rearDerailleurIndex
end

rearDerailleurMaxToybox::Lang::Number

The rear bicycle derailleur maximum index.

Returns:

Since:

  • 2.1.0

Supported Devices:

  • All Edge devices except Edge 130

  • fenix 5/S/X

  • fenix Chronos

  • Forerunner 735XT

  • Forerunner 935



385
386
387
# File 'Monkeybrains.rb', line 385

def rearDerailleurMax
  @rearDerailleurMax
end

rearDerailleurSizeToybox::Lang::Number

The rear bicycle derailleur gear size in number of teeth.

Returns:

Since:

  • 2.1.0

Supported Devices:

  • All Edge devices except Edge 130

  • fenix 5/S/X

  • fenix Chronos

  • Forerunner 735XT

  • Forerunner 935



395
396
397
# File 'Monkeybrains.rb', line 395

def rearDerailleurSize
  @rearDerailleurSize
end

startLocationToybox::Position::Location

The starting location of the current activity.

This member will always provide a null value unless the Positioning Permission is enabled.

Returns:

Since:

  • 1.0.0



92
93
94
# File 'Monkeybrains.rb', line 92

def startLocation
  @startLocation
end

startTimeToybox::Time::Moment

The starting time of the current activity.

Returns:

Since:

  • 1.0.0



97
98
99
# File 'Monkeybrains.rb', line 97

def startTime
  @startTime
end

swimStrokeTypeToybox::Lang::Number

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.).

Returns:

Since:

  • 1.2.2

Supported Devices:

  • Approach S60

  • fenix 5/S/X

  • fenix Chronos

  • Forerunner 735XT

  • Forerunner 935

  • vivoactive HR

  • vivoactive 3



258
259
260
# File 'Monkeybrains.rb', line 258

def swimStrokeType
  @swimStrokeType
end

swimSwolfToybox::Lang::Number

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.

Returns:

Since:

  • 1.2.2

Supported Devices:

  • Approach S60

  • fenix 5/S/X

  • fenix Chronos

  • Forerunner 735XT

  • Forerunner 935

  • vivoactive HR

  • vivoactive 3



276
277
278
# File 'Monkeybrains.rb', line 276

def swimSwolf
  @swimSwolf
end

timerStateToybox::Lang::Number

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.

Returns:

Since:

  • 2.1.0



331
332
333
# File 'Monkeybrains.rb', line 331

def timerState
  @timerState
end

timerTimeToybox::Lang::Number

The current Timer value in milliseconds (ms).

Returns:

Since:

  • 1.0.0



107
108
109
# File 'Monkeybrains.rb', line 107

def timerTime
  @timerTime
end

totalAscentToybox::Lang::Float

The total ascent during the current activity in meters (m).

Returns:

Since:

  • 1.0.0



203
204
205
# File 'Monkeybrains.rb', line 203

def totalAscent
  @totalAscent
end

totalDescentToybox::Lang::Float

The total descent during the current activity in meters (m).

Returns:

Since:

  • 1.0.0



208
209
210
# File 'Monkeybrains.rb', line 208

def totalDescent
  @totalDescent
end

trackToybox::Lang::Float

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.

Returns:

Since:

  • 2.1.0



452
453
454
# File 'Monkeybrains.rb', line 452

def track
  @track
end

trainingEffectToybox::Lang::Float

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).

Returns:

See Also:

Since:

  • 1.2.0

Supported Devices:

  • All devices



312
313
314
# File 'Monkeybrains.rb', line 312

def trainingEffect
  @trainingEffect
end