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.h
Go to the documentation of this file.
1 //
2 // WFBikePower2Data.h
3 // WFConnector
4 //
5 // Created by Murray Hughes on 15/08/12.
6 // Copyright (c) 2012 Wahoo Fitness. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 #import <WFConnector/WFSensorData.h>
11 #include <AvailabilityMacros.h>
12 #import <WFConnector/WFBikePowerData_Deprecated.h>
13 #import <WFConnector/wf_btle_types.h>
14 
28 {
31 
35 
39  NSTimeInterval accumulatedTime;
40  NSTimeInterval accumulatedTimestamp;
42 
46  NSTimeInterval crankTime;
47  NSTimeInterval crankTimestamp;
49 
52  NSTimeInterval wheelTime;
53  NSTimeInterval wheelTimestamp;
55 
60 
61  NSTimeInterval lastWheelDataTime;
62  NSTimeInterval lastCadenceDataTime;
63 }
64 
65 
66 // -----------------------------------------------------------------------------
67 // -- Popular Data
68 // -----------------------------------------------------------------------------
69 
77 @property (nonatomic, assign) WFBikePowerType_t sensorType;
78 
79 
86 @property (nonatomic, assign) WFBTLESensorLocation_t sensorLocation;
87 
88 
89 
90 
94 @property (nonatomic, assign) SSHORT instantPower;
95 
99 @property (nonatomic, assign) USHORT instantCadence;
100 
104 @property (nonatomic, assign) USHORT instantWheelRPM;
105 
110 @property (nonatomic, readonly) NSNumber* instantSpeed;
111 
125 @property (nonatomic, assign) double accumulatedTorque;
126 
127 
142 @property (nonatomic, assign) double accumulatedPower;
143 
153 @property (nonatomic, assign) ULONG accumulatedEventCount;
154 
161 @property (nonatomic, assign) NSTimeInterval accumulatedTime;
162 
179 @property (nonatomic, assign) NSTimeInterval accumulatedTimestamp;
180 
185 @property (nonatomic, assign) BOOL accumulatedTimestampOverflow;
186 
187 
188 // -----------------------------------------------------------------------------
189 // -- Crank Revs
190 // -----------------------------------------------------------------------------
191 
195 @property (nonatomic, assign) BOOL cadenceSupported;
196 
200 @property (nonatomic, assign, getter = isCrankRevolutionSupported) BOOL crankRevolutionSupported;
201 
205 @property (nonatomic, assign) double crankRevolutions;
206 
207 
214 @property (nonatomic, assign) NSTimeInterval crankTime;
215 
232 @property (nonatomic, assign) NSTimeInterval crankTimestamp;
237 @property (nonatomic, assign) BOOL crankTimestampOverflow;
243 // -----------------------------------------------------------------------------
244 // -- Wheel Revs
245 // -----------------------------------------------------------------------------
246 
250 @property (nonatomic, assign, getter = isWheelRevolutionSupported) BOOL wheelRevolutionSupported;
251 
255 @property (nonatomic, assign) double wheelRevolutions;
256 
263 @property (nonatomic, assign) NSTimeInterval wheelTime;
264 
281 @property (nonatomic, assign) NSTimeInterval wheelTimestamp;
286 @property (nonatomic, assign) BOOL wheelTimestampOverflow;
287 
288 
289 // -----------------------------------------------------------------------------
290 // -- Torque Effectiveness and Pedal Smoothness
291 // -----------------------------------------------------------------------------
292 
298 @property (nonatomic, assign) float leftTorqueEffectiveness;
304 @property (nonatomic, assign) float rightTorqueEffectiveness;
310 @property (nonatomic, assign) float leftPedalSmoothness;
316 @property (nonatomic, assign) float rightPedalSmoothness;
317 
318 // -----------------------------------------------------------------------------
319 // -- Interface
320 // -----------------------------------------------------------------------------
321 
322 
335 - (id)initWithTime:(NSTimeInterval)dataTime wheelTime:(NSTimeInterval)wheelTime cadenceTime:(NSTimeInterval)cadenceTime;
339 // -----------------------------------------------------------------------------
340 // -- Formatted Values
341 // -----------------------------------------------------------------------------
342 
352 - (BOOL) isCoasting;
353 
354 
365 - (NSString*)formattedCadence:(BOOL)showUnits;
366 
377 - (NSString*)formattedDistance:(BOOL)showUnits;
378 
389 - (NSString*)formattedSpeed:(BOOL)showUnits;
390 
401 - (NSString*)formattedPower:(BOOL)showUnits;
402 
403 
404 @end
NSTimeInterval accumulatedTime
The real-time timestamp for the accumulated data.
Definition: WFBikePowerData.h:39
WFBikePowerType_t sensorType
Indicates the type of the power meter.
Definition: WFBikePowerData.h:29
WFBikePowerType_t
Describes the type of Bike Power Meter.
Definition: hardware_connector_types.h:270
BOOL accumulatedTimestampOverflow
Indicates that the time between samples from the sensor has exceeded the rollover time (64 seconds)...
Definition: WFBikePowerData.h:41
double accumulatedTorque
The total accumulated torque in Nm.
Definition: WFBikePowerData.h:36
NSTimeInterval lastWheelDataTime
Definition: WFBikePowerData.h:61
Represents the most commonly used data available from the Bike Power sensor.
Definition: WFBikePowerData.h:27
WFBTLESensorLocation_t sensorLocation
Indicates the location of a power meter.
Definition: WFBikePowerData.h:30
USHORT instantWheelRPM
The instantaneous wheel RPM, based on the last two sensor measurements.
Definition: WFBikePowerData.h:34
NSTimeInterval wheelTimestamp
The real-time timestamp for speed data from the sensor (as an offset from the Cocoa reference date)...
Definition: WFBikePowerData.h:53
float leftTorqueEffectiveness
Gets the left leg torque effectiveness as a percent, when available.
Definition: WFBikePowerData.h:56
float rightTorqueEffectiveness
Gets the right leg torque effectiveness as a percent, when available.
Definition: WFBikePowerData.h:57
NSTimeInterval lastCadenceDataTime
Definition: WFBikePowerData.h:62
unsigned short USHORT
Definition: types.h:121
NSTimeInterval wheelTime
The real-time timestamp for the wheelRevolutions data.
Definition: WFBikePowerData.h:52
double wheelRevolutions
The accumulated wheel revolutions since the sensor was connected or reset.
Definition: WFBikePowerData.h:51
signed short SSHORT
Definition: types.h:120
NSTimeInterval crankTime
The real-time timestamp for the crankRevolutions data.
Definition: WFBikePowerData.h:46
signed char BOOL
Definition: types.h:110
double crankRevolutions
The accumulated crank revolutions since the sensor was connected or reset.
Definition: WFBikePowerData.h:45
NSTimeInterval accumulatedTimestamp
The real-time timestamp for accumulated data from the sensor (as an offset from the Cocoa reference d...
Definition: WFBikePowerData.h:40
BOOL crankRevolutionSupported
Returns TRUE if the connected sensor supports Crank Revolutions (Cadence)
Definition: WFBikePowerData.h:44
BOOL cadenceSupported
TRUE if the sensor provides cadence data, otherwise FALSE.
Definition: WFBikePowerData.h:43
Represents the most commonly used data available from the ANT+ Bike Power sensor. ...
Definition: WFBikePowerData_Deprecated.h:24
ULONG accumulatedEventCount
The total number of events accumated.
Definition: WFBikePowerData.h:38
BOOL wheelTimestampOverflow
Indicates that the time between speed data samples from the sensor has exceeded the rollover time (64...
Definition: WFBikePowerData.h:54
NSTimeInterval crankTimestamp
The real-time timestamp for crank data from the sensor (as an offset from the Cocoa reference date)...
Definition: WFBikePowerData.h:47
float leftPedalSmoothness
Gets the left pedal or combined pedal smoothness as a percent, when available.
Definition: WFBikePowerData.h:58
BOOL crankTimestampOverflow
Indicates that the time between cadence data samples from the sensor has exceeded the rollover time (...
Definition: WFBikePowerData.h:48
WFBTLESensorLocation_t
Describes the location of a sensor.
Definition: wf_btle_types.h:478
unsigned long ULONG
Definition: types.h:133
float rightPedalSmoothness
Gets the right pedal smoothness as a percent, when available.
Definition: WFBikePowerData.h:59
SSHORT instantPower
The instantaneous power.
Definition: WFBikePowerData.h:32
BOOL wheelRevolutionSupported
The accumulated wheel revolutions since the sensor was connected or reset.
Definition: WFBikePowerData.h:50
USHORT instantCadence
The instantaneous cadence (crank RPM), based on the last two sensor measurements. ...
Definition: WFBikePowerData.h:33
double accumulatedPower
The total accumulated power in Watts.
Definition: WFBikePowerData.h:37