Wahoo Fitness API  3.6.1
Documentation for the iPhone version of the Wahoo Fitness API.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
WFBikePowerData Class Reference

Represents the most commonly used data available from the Bike Power sensor. More...

#import <WFBikePowerData.h>

+ Inheritance diagram for WFBikePowerData:
+ Collaboration diagram for WFBikePowerData:

Instance Methods

(NSString *) - formattedCadence:
 Returns the cadence as a string formatted for display. More...
 
(NSString *) - formattedDistance:
 Returns the distance as a string formatted for display. More...
 
(NSString *) - formattedPower:
 Returns the power as a string formatted for display. More...
 
(NSString *) - formattedSpeed:
 Returns the speed as a string formatted for display. More...
 
(BOOL- isCoasting
 Returns the power meter is coasting. More...
 

Protected Attributes

NSTimeInterval lastCadenceDataTime
 
NSTimeInterval lastWheelDataTime
 

Properties

ULONG accumulatedEventCount
 The total number of events accumated. More...
 
double accumulatedPower
 The total accumulated power in Watts. More...
 
NSTimeInterval accumulatedTime
 The real-time timestamp for the accumulated data. More...
 
NSTimeInterval accumulatedTimestamp
 The real-time timestamp for accumulated data from the sensor (as an offset from the Cocoa reference date). More...
 
BOOL accumulatedTimestampOverflow
 Indicates that the time between samples from the sensor has exceeded the rollover time (64 seconds). More...
 
double accumulatedTorque
 The total accumulated torque in Nm. More...
 
BOOL cadenceSupported
 TRUE if the sensor provides cadence data, otherwise FALSE. More...
 
double crankRevolutions
 The accumulated crank revolutions since the sensor was connected or reset. More...
 
BOOL crankRevolutionSupported
 Returns TRUE if the connected sensor supports Crank Revolutions (Cadence) More...
 
NSTimeInterval crankTime
 The real-time timestamp for the crankRevolutions data. More...
 
NSTimeInterval crankTimestamp
 The real-time timestamp for crank data from the sensor (as an offset from the Cocoa reference date). More...
 
BOOL crankTimestampOverflow
 Indicates that the time between cadence data samples from the sensor has exceeded the rollover time (64 seconds). More...
 
float fpAccumulatedTorque DEPRECATED_ATTRIBUTE
 The total accumulated torque in Nm. More...
 
float fpAccumulatedPower DEPRECATED_ATTRIBUTE
 The total accumulated power in Watts. More...
 
ULONG ulAccumulatedTicks DEPRECATED_ATTRIBUTE
 The total accumulated revolutions measured by the sensor. More...
 
float fpCalculatedCrankTicks DEPRECATED_ATTRIBUTE
 The total calculated crank revolutions. More...
 
UCHAR ucInstCadence DEPRECATED_ATTRIBUTE
 The instantaneous crank cadence, in RPM. More...
 
ULONG ulAveragePower DEPRECATED_ATTRIBUTE
 The average power measured over the last revolution. More...
 
UCHAR ucEventCount DEPRECATED_ATTRIBUTE
 The event counter value. More...
 
NSTimeInterval timestamp DEPRECATED_ATTRIBUTE
 The real-time timestamp for data from the sensor (as an offset from the Cocoa reference date). More...
 
BOOL timestampOverflow DEPRECATED_ATTRIBUTE
 Indicates that the time between data samples from the sensor has exceeded the rollover time (64 seconds). More...
 
USHORT instantCadence
 The instantaneous cadence (crank RPM), based on the last two sensor measurements. More...
 
SSHORT instantPower
 The instantaneous power. More...
 
NSNumber * instantSpeed
 The instantaneous speed in meters per second, based on the last two sensor measurements. More...
 
USHORT instantWheelRPM
 The instantaneous wheel RPM, based on the last two sensor measurements. More...
 
BOOL isDataStale
 TRUE if data is considered stale, otherwise FALSE. More...
 
float leftPedalSmoothness
 Gets the left pedal or combined pedal smoothness as a percent, when available. More...
 
float leftTorqueEffectiveness
 Gets the left leg torque effectiveness as a percent, when available. More...
 
float rightPedalSmoothness
 Gets the right pedal smoothness as a percent, when available. More...
 
float rightTorqueEffectiveness
 Gets the right leg torque effectiveness as a percent, when available. More...
 
WFBTLESensorLocation_t sensorLocation
 Indicates the location of a power meter. More...
 
WFBikePowerType_t sensorType
 Indicates the type of the power meter. More...
 
WFConnectorSettingssettings
 Gets the persistent settings for the Wahoo API. More...
 
double wheelRevolutions
 The accumulated wheel revolutions since the sensor was connected or reset. More...
 
BOOL wheelRevolutionSupported
 The accumulated wheel revolutions since the sensor was connected or reset. More...
 
NSTimeInterval wheelTime
 The real-time timestamp for the wheelRevolutions data. More...
 
NSTimeInterval wheelTimestamp
 The real-time timestamp for speed data from the sensor (as an offset from the Cocoa reference date). More...
 
BOOL wheelTimestampOverflow
 Indicates that the time between speed data samples from the sensor has exceeded the rollover time (64 seconds). More...
 

Detailed Description

Represents the most commonly used data available from the Bike Power sensor.

The WFBikePowerData combines the most commonly used of this data into a single entity. The data represents the latest of each data type sent from the sensor.

Note
As of 2.3.0 all the old properties for WFBikePowerData have been deprecated in order to replaced them with new properties that apply to both ANT+ and BTLE sensors. The old properties will remain to work with ANT+ sensors but will not return any data when using a BTLE power sensor. It is recomend that you move to the new properties.

Method Documentation

- (NSString*) formattedCadence: (BOOL showUnits

Returns the cadence as a string formatted for display.

See also
WFConnectorSettings
Parameters
showUnitsIf TRUE the units will be included in the string returned. Otherwise, the units are not included.
Returns
The formatted display string (cadence in RPMs).
- (NSString*) formattedDistance: (BOOL showUnits

Returns the distance as a string formatted for display.

See also
WFConnectorSettings
Parameters
showUnitsIf TRUE the units will be included in the string returned. Otherwise, the units are not included.
Returns
The formatted display string (distance in km or miles).
- (NSString*) formattedPower: (BOOL showUnits

Returns the power as a string formatted for display.

See also
WFConnectorSettings
Parameters
showUnitsIf TRUE the units will be included in the string returned. Otherwise, the units are not included.
Returns
The formatted display string (power in watts).
- (NSString*) formattedSpeed: (BOOL showUnits

Returns the speed as a string formatted for display.

See also
WFConnectorSettings
Parameters
showUnitsIf TRUE the units will be included in the string returned. Otherwise, the units are not included.
Returns
The formatted display string (speed in km/h or MPH).
- (BOOL) isCoasting

Returns the power meter is coasting.

In most cases it just uses the bikeCoastingTimeout in the settings, but for some event based power meters it will dynamicly adjust the timeout based on the current cadence.

See also
WFConnectorSettings
Returns
TRUE is the power meter is considered coasting, FALSE otherwise

Member Data Documentation

- (NSTimeInterval) lastCadenceDataTime
protected
- (NSTimeInterval) lastWheelDataTime
protected

Property Documentation

- (ULONG) accumulatedEventCount
readwritenonatomicassign

The total number of events accumated.

For example, in wheel-based power sensor, it is the total number of wheel revolutions.

Note
The accumulator is initialized when the sensor is first connected, and reset via the resetAllSensorData (WFHardwareConnector) method.
- (double) accumulatedPower
readwritenonatomicassign

The total accumulated power in Watts.

Accumulated power is the sum of the average power for each event. For example, in wheel-based power sensors, it is the sum of the average power for each wheel revolution

If availible this will be calcualted using Torque, otherwise it will be calculated using Instant/Average Power

Note
The accumulator is initialized when the sensor is first connected, and reset via the resetAllSensorData (WFHardwareConnector) method.
- (NSTimeInterval) accumulatedTime
readwritenonatomicassign

The real-time timestamp for the accumulated data.

Note
The accumulator is initialized when the sensor is first connected, and reset via the resetAllSensorData (WFHardwareConnector) method.
- (NSTimeInterval) accumulatedTimestamp
readwritenonatomicassign

The real-time timestamp for accumulated data from the sensor (as an offset from the Cocoa reference date).

Time values from the sensors are implemented as an offset in seconds between the time when the sensor is turned on and the time when a data sample is taken. This value is typically a 16-bit unsigned integer in units of 1/1024 second. The rollover is then 64 seconds.

A base real-time value is stored when the first sample from the sensor is received. The timestamp of each subsequent sample is the base time value offset by the time value offset from the sensor. If the time between samples is greater than the rollover time, the base time value is set to the time the first sample after the delay is received.

- (BOOL) accumulatedTimestampOverflow
readwritenonatomicassign

Indicates that the time between samples from the sensor has exceeded the rollover time (64 seconds).

- (double) accumulatedTorque
readwritenonatomicassign

The total accumulated torque in Nm.

Accumulated torque is the sum of the average torque for each event. For example, in wheel-based power sensors, it is the sum of the average torque for each wheel revolution.

If the sensor does not use torque, this value will be calculated from instant / average power.

Note
The accumulator is initialized when the sensor is first connected, and reset via the resetAllSensorData (WFHardwareConnector) method.
- (BOOL) cadenceSupported
readwritenonatomicassign

TRUE if the sensor provides cadence data, otherwise FALSE.

- (double) crankRevolutions
readwritenonatomicassign

The accumulated crank revolutions since the sensor was connected or reset.

- (BOOL) crankRevolutionSupported
readwritenonatomicassign

Returns TRUE if the connected sensor supports Crank Revolutions (Cadence)

- (NSTimeInterval) crankTime
readwritenonatomicassign

The real-time timestamp for the crankRevolutions data.

Note
The timestamp is initialized when the sensor is first connected, and reset via the resetAllSensorData (WFHardwareConnector) method.
- (NSTimeInterval) crankTimestamp
readwritenonatomicassign

The real-time timestamp for crank data from the sensor (as an offset from the Cocoa reference date).

Time values from the sensors are implemented as an offset in seconds between the time when the sensor is turned on and the time when a data sample is taken. This value is typically a 16-bit unsigned integer in units of 1/1024 second. The rollover is then 64 seconds.

A base real-time value is stored when the first sample from the sensor is received. The timestamp of each subsequent sample is the base time value offset by the time value offset from the sensor. If the time between samples is greater than the rollover time, the base time value is set to the time the first sample after the delay is received.

- (BOOL) crankTimestampOverflow
readwritenonatomicassign

Indicates that the time between cadence data samples from the sensor has exceeded the rollover time (64 seconds).

- (float fpAccumulatedTorque) DEPRECATED_ATTRIBUTE
readwritenonatomicassigninherited

The total accumulated torque in Nm.

Accumulated torque is the sum of the average torque for each update period. For example, in wheel-based power sensors, it is the sum of the average torque for each wheel revolution.

Note
The accumulator is initialized when the sensor is first connected, and reset via the resetAllSensorData (WFHardwareConnector) method.

DEPRECATED - Please use accumulatedTorque property.

- (float fpAccumulatedPower) DEPRECATED_ATTRIBUTE
readwritenonatomicassigninherited

The total accumulated power in Watts.

Accumlated power is the sum of the average torgue for each update period. This is ONLY used for Power Only sensors, all other power meter types use fpAccumulatedTorque

DEPRECATED - Please use accumulatedPower property.

- (ULONG ulAccumulatedTicks) DEPRECATED_ATTRIBUTE
readwritenonatomicassigninherited

The total accumulated revolutions measured by the sensor.

This source of this value depends on the sensor type. The value will be wheel revolutions for wheel-based sensors, and crank revolutions for crank based sensors.

DEPRECATED - Please use accumulatedEventCount property.

- (float fpCalculatedCrankTicks) DEPRECATED_ATTRIBUTE
readwritenonatomicassigninherited

The total calculated crank revolutions.

This value is available only for certain types of wheel-based sensors.

DEPRECATED - Please use crankRevolutions property.

- (UCHAR ucInstCadence) DEPRECATED_ATTRIBUTE
readwritenonatomicassigninherited

The instantaneous crank cadence, in RPM.

DEPRECATED - Please use instantCadence property.

- (ULONG ulAveragePower) DEPRECATED_ATTRIBUTE
readwritenonatomicassigninherited

The average power measured over the last revolution.

The span of this value depends on the type of sensor (wheel revolution for wheel-based sensors, and crank revolution for crank-based sensors).

DEPRECATED - Please use instantPower property.

- (UCHAR ucEventCount) DEPRECATED_ATTRIBUTE
readwritenonatomicassigninherited

The event counter value.

See the event counter value of the specific power meter type for more about this value (WFBikePowerCTFData, WFBikePowerCrankTorqueData, and WFBikePowerWheelTorqueData).

- (NSTimeInterval timestamp) DEPRECATED_ATTRIBUTE
readwritenonatomicassigninherited

The real-time timestamp for data from the sensor (as an offset from the Cocoa reference date).

Time values from the sensors are implemented as an offset in seconds between the time when the sensor is turned on and the time when a data sample is taken. This value is typically a 16-bit unsigned integer in units of 1/1024 second. The rollover is then 64 seconds.

A base real-time value is stored when the first sample from the sensor is received. The timestamp of each subsequent sample is the base time value offset by the time value offset from the sensor. If the time between samples is greater than the rollover time, the base time value is set to the time the first sample after the delay is received.

DEPRECATED - Please use accumulatedTimestamp property.

- (BOOL timestampOverflow) DEPRECATED_ATTRIBUTE
readwritenonatomicassigninherited

Indicates that the time between data samples from the sensor has exceeded the rollover time (64 seconds).

DEPRECATED - Please use accumulatedTimestampOverflow property.

- (USHORT) instantCadence
readwritenonatomicassign

The instantaneous cadence (crank RPM), based on the last two sensor measurements.

- (SSHORT) instantPower
readwritenonatomicassign

The instantaneous power.

- (NSNumber*) instantSpeed
readnonatomicassign

The instantaneous speed in meters per second, based on the last two sensor measurements.

Note
The value will be nil if the data is stale or the speed can not be computed
- (USHORT) instantWheelRPM
readwritenonatomicassign

The instantaneous wheel RPM, based on the last two sensor measurements.

- (BOOL) isDataStale
readnonatomicassigninherited

TRUE if data is considered stale, otherwise FALSE.

- (float) leftPedalSmoothness
readwritenonatomicassign

Gets the left pedal or combined pedal smoothness as a percent, when available.

Note
When this value is not available, the value is -1.
- (float) leftTorqueEffectiveness
readwritenonatomicassign

Gets the left leg torque effectiveness as a percent, when available.

Note
When this value is not available, the value is -1.
- (float) rightPedalSmoothness
readwritenonatomicassign

Gets the right pedal smoothness as a percent, when available.

Note
When this value is not available, the value is -1.
- (float) rightTorqueEffectiveness
readwritenonatomicassign

Gets the right leg torque effectiveness as a percent, when available.

Note
When this value is not available, the value is -1.
- (WFBTLESensorLocation_t) sensorLocation
readwritenonatomicassign

Indicates the location of a power meter.

Note
This is only supported on Bluetooth power meters
- (WFBikePowerType_t) sensorType
readwritenonatomicassign

Indicates the type of the power meter.

Note
After the sensor connects, or is reset, it may take several messages from the device before the sensor type can be determined.
- (WFConnectorSettings*) settings
readnonatomicassigninherited

Gets the persistent settings for the Wahoo API.

- (double) wheelRevolutions
readwritenonatomicassign

The accumulated wheel revolutions since the sensor was connected or reset.

- (BOOL) wheelRevolutionSupported
readwritenonatomicassign

The accumulated wheel revolutions since the sensor was connected or reset.

Returns TRUE if the connected sensor supports Wheel Revolutions (Speed/Distance)

- (NSTimeInterval) wheelTime
readwritenonatomicassign

The real-time timestamp for the wheelRevolutions data.

Note
The timestamp is initialized when the sensor is first connected, and reset via the resetAllSensorData (WFHardwareConnector) method.
- (NSTimeInterval) wheelTimestamp
readwritenonatomicassign

The real-time timestamp for speed data from the sensor (as an offset from the Cocoa reference date).

Time values from the sensors are implemented as an offset in seconds between the time when the sensor is turned on and the time when a data sample is taken. This value is typically a 16-bit unsigned integer in units of 1/1024 second. The rollover is then 64 seconds.

A base real-time value is stored when the first sample from the sensor is received. The timestamp of each subsequent sample is the base time value offset by the time value offset from the sensor. If the time between samples is greater than the rollover time, the base time value is set to the time the first sample after the delay is received.

- (BOOL) wheelTimestampOverflow
readwritenonatomicassign

Indicates that the time between speed data samples from the sensor has exceeded the rollover time (64 seconds).