Class: Joule::Workout

Inherits:
Object
  • Object
show all
Defined in:
lib/joule/workout.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeWorkout

Returns a new instance of Workout.



21
22
23
24
25
26
# File 'lib/joule/workout.rb', line 21

def initialize()
  @data_points = Array.new
  @markers = Array.new
  @peak_powers = Array.new 
  @properties = Object.new     
end

Instance Attribute Details

#data_pointsObject

An Array of DataPoint objects. Contains all the data points.



4
5
6
# File 'lib/joule/workout.rb', line 4

def data_points
  @data_points
end

#markersObject

An Array of Marker objects. The first marker always represents the entire set of data.



8
9
10
# File 'lib/joule/workout.rb', line 8

def markers
  @markers
end

#peak_powersObject

An Array of Hash objects representing the peak powers for a give duration (5 second, 5 minute, 20 minute, etc). This is also sometimes referred to the mean maximal power. Peak power calculations can add a significant amount of time to parsing, so you can perform these later on if you want to with the Joule::Calculator::PeakPowerCalculator.



15
16
17
# File 'lib/joule/workout.rb', line 15

def peak_powers
  @peak_powers
end

#propertiesObject

The properties object represents device properties specific to the data being parsed.



19
20
21
# File 'lib/joule/workout.rb', line 19

def properties
  @properties
end