\( \def\bold#1{\bf #1} \newcommand{\d}{\mathrm{d}} \) BTP: Manual and Source Code Documentation

Power Uphill

bike mass [kg]
body mass [kg]
altitude gain [m]
climb length [km]
gradient [%]
time [s]
speed [km/h]
power [W]
power/mass [W/kg]
climbrate [m/min]

average power on climb stage

BTP  3.0
1 #pragma once
2 #include "DataTyps.h"
3 #include "OSM.h"
4 #include "MAP.h"
5 #include "HeightData.h"
6 #include "Track.h"
7 #include "plot2D.h"
8 #include "fibunacci.h"
9 #include <QPainter>
11 typedef struct climbpoolele{
12  float P;
13  climb* c;
14  Track* t;
15  char* name;
18  public:
19  nameaspirant(char* name, float d);
20  nameaspirant(char* name);
21  float e;
22  float s;
23  float d;
24  QString name;
25  bool operator ==(nameaspirant o);
26  bool operator < (const nameaspirant other) const{
27  return d > other.d;
28  }
29 };
53  public:
54  ClimbAnalyse();
55  ClimbAnalyse(OSM* O,short mintype, short maxtype, double minP,
57  double minSlope, double maxdwnHM, double minHM,
58  HeightData *h);
59  ~ClimbAnalyse();
61  climblayer* load_ClimbLayer(char* filename);
62  void save_ClimbLayer(char* projectname, char* folder, climblayer *c);
63  void create_MAP(char* projectname, char* folder, HeightData* h,
64  double size);
65  void create_html(char* projectname, char* folder);
66  void create_list(char* projectname, char* folder);
68  void set_brect(double minlat, double maxlat,
69  double minlon, double maxlon);
70  private:
71  void analyse();
72  void set_parameters(short mintype, short maxtype, double minP,
74  double minSlope, double maxdwnHM, double minHM);
78  double minP, minSlope, maxdwnHM, minHM, autonomP;
81  void reset_STRONG(KOO* k);
85  long int climbcount;
88  void init_fib(KOO* k);
89  climb* cp;
90  void init_climb(climb *c, KOO* k);
97  void expand(climb* c);
99  void free_tpl(trackpointlist* tp, trackpointlist* tpstop);
101  trackpointlist* add(trackpointlist* tp, trackpoint* t, int tpc,
102  readdirection rd);
104  float calc_P(trackpointlist* tp);
106  float calc_P(trackpoint* t,int arraylength);
108  float calc_Pmax(climb* c);
110  void calc_climb(climb* c);
112  short looses(climb* resident, climb* aspirant);
114  short is_climb(trackpointlist* tp);
116  short all_active(climb* c);
118  short enough_active(climb* c);
120  short storeif_climb(Neighbour* n, trackpointlist* tp, climb* from);
122  void del_climb(climb* c);
123  void count_climbs(KOO* k);
125  void collect_climbs(KOO* k);
127  void select_climbs();
129  void create_names();
131  void eval_Way_names(QList<nameaspirant> *wn, climb* c0);
133  void eval_point_names(QList<nameaspirant> *pn, points **p, double fac,
134  Track* t, bool validstart);
136  void sort_climbpool(long s, long e);
139  short check(KOO* k);
141  short crossunused(climb* c, KOO* k);
142  OSM* o;
144  double minlat,maxlat,minlon,maxlon;
146 };
void sort_climbpool(long s, long e)
quicksort for collected climbs
double minlat
bounding rect, saved html data is limited to
Definition: ClimbAnalyse.h:145
void calc_climb(climb *c)
calcs P, Pmax, Prec, tst of a climb
void create_names()
create names from OSM data
void create_climb_Track(climbpoolele *c)
trace back climb to start and creates Track instance from it
HeightData * h
Definition: ClimbAnalyse.h:143
void set_parameters(short mintype, short maxtype, double minP, double minSlope, double maxdwnHM, double minHM)
set the definitons of the climb
void collect_climbs(KOO *k)
picks raw climbs from street net, to be selected (select_climbs())
climbpoolele * climbpool
container to store climbs when collect_climbs()
Definition: ClimbAnalyse.h:87
container struct to hold data of a coordinate
Definition: DataTyps.h:82
long int climbcount
Definition: ClimbAnalyse.h:85
*short maxtype
Definition: ClimbAnalyse.h:77
short all_active(climb *c)
checks, whether used road are still avaiable in select_climbs()
short enough_active(climb *c)
checks climb, whether used roads are sufficently independend
routing container struct, connects cross via Way with each other
Definition: DataTyps.h:47
void reset_STRONG(KOO *k)
preparing cross to be inserted into f
void free_tpl(trackpointlist *tp, trackpointlist *tpstop)
deletes a trackpointlist down to tpstop
container struct for ClimbAnalyse
Definition: DataTyps.h:380
main container list climbanalyse
Definition: DataTyps.h:162
void init_fib(KOO *k)
climblayer * get_ClimbLayer()
double maxdwnHM
Definition: ClimbAnalyse.h:80
climb * cp
Definition: ClimbAnalyse.h:89
holds digital elevation model extracted from SRTM3 data
Definition: HeightData.h:26
official representation of Track in BTP3
Definition: track.h:14
double minHM
Definition: ClimbAnalyse.h:80
double autonomP
Definition: ClimbAnalyse.h:80
short crossunused(climb *c, KOO *k)
varifies, that climb has not used the cross at k before
extracts climbs from street network and provides climblayer handling
Definition: ClimbAnalyse.h:52
void select_climbs()
selects collected climbs, if suffiently independed or difficult
float calc_Pmax(climb *c)
calcs climb difficulty with loose climb end
void del_climb(climb *c)
deletes the whole climb recursivly
void set_brect(double minlat, double maxlat, double minlon, double maxlon)
restrict saved data to a rectangular area
void eval_point_names(QList< nameaspirant > *pn, points **p, double fac, Track *t, bool validstart)
create climb name aspirant list from summits and other point data
short is_climb(trackpointlist *tp)
checks whether the list represents a climb
BTP3 database, created from OpenStreetMap data.
Definition: osm.h:34
short storeif_climb(Neighbour *n, trackpointlist *tp, climb *from)
checks for existing climbs at cross and executes looses()
FibunacciHeap< CAfib > * f
priority queue to store active cross sorted by height
Definition: ClimbAnalyse.h:84
trackpointlist * add(trackpointlist *tp, trackpoint *t, int tpc, readdirection rd)
adds an branch t to a axisting trackpointlist
void eval_Way_names(QList< nameaspirant > *wn, climb *c0)
create climb name aspirant list according to street names
container struct for Track to hold distance and height data
Definition: DataTyps.h:33
float calc_P(trackpointlist *tp)
calcs climb difficulty with fixed climb end
short looses(climb *resident, climb *aspirant)
determines, whether a new climb can stop an existing or vice versa
osm data container list for point like data (summits, towns, ...)
Definition: DataTyps.h:137
*short mintype
Definition: ClimbAnalyse.h:77
void expand(climb *c)
makes this climb expand over all Neighbour relations
double minSlope
Definition: ClimbAnalyse.h:80