Package sabx10 :: Package map :: Module elevations :: Class SegmentProcessor
[hide private]
[frames] | no frames]

Class SegmentProcessor

source code

     object --+    
              |    
PointsProcessor --+
                  |
                 SegmentProcessor

Hold all the values we are interested in for a ride segment and create a dictionary to present them.

Instance Methods [hide private]
 
__init__(self, seg, accum)
Initialize and calculate all values for the segment.
source code
dict
create_element(self)
Create a dictionary that can be used by Jinja2 to present this data.
source code

Inherited from PointsProcessor: calc_points_climbs, calc_points_distance, calc_points_fall, calc_points_rise

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables [hide private]
list climbs
list of "top" climbs for the segment
float fall_dist
length of the part of the segment going down
float fall_grade
average descending grade of segment
float fall_height
cumulative height of descent in this segment
float length
length of the segment
float rise_dist
length of the part of the segment going up
float rise_grade
average climbing grade of segment
float rise_height
cumulative height of ascent in this segment
Segment seg
segment we are processing
float start_dist
distance into ride for first point of segment

Inherited from PointsProcessor: intras

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, seg, accum)
(Constructor)

source code 

Initialize and calculate all values for the segment.

Parameters:
Overrides: object.__init__

create_element(self)

source code 

Create a dictionary that can be used by Jinja2 to present this data.

The dictionary contains the following:

  • id: id of segment
  • start_dist: distance in ride for starting point
  • end_dist: distance in ride for ending point
  • length: length of ride
  • net_height: net change in elevation over segment
  • rise_height: height of climbing in segment
  • rise_dist: distance spent climbing in segment
  • rise_grade: average grade of climbing in segment
  • fall_height: height of descending in segment
  • fall_dist: distance spent descending in segment
  • fall_grade: average grade of descending in segment
  • gradients: table containing gradients and how much time spent in them
  • climbs: list with climbs, their grades, and their lengths in segment
Returns: dict
presentable data