\( \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
Routing/ClimbAnalysis/PowerCalculation
strongcalc.h
1 #ifndef STRONGCALC_H
2 #define STRONGCALC_H
3 #include <QThread>
4 #include "DataTyps.h"
5 #include "Track.h"
6 #include "fibunacci.h"
7 #include "osm.h"
8 
9 enum RunMode {RMcalc,RMcalcRestricted,RMcalcClimb,RMcalcClimbRestricted,RMload,RMsave};
11 
28 class STRONGcalc: public QThread{
29 Q_OBJECT
30 public:
32  STRONGcalc(OSM* o, KOO* s, KOO* e,char max, char min,
33  STRONGsetting* hs,Track*** trck, int* N, bool Hmonly);
35  STRONGcalc(OSM* o, int N, char* filename,Track***results);
37  STRONGcalc(OSM* o, int*N, char* filename,Track*** results);
38  void run();
39  void exit();
40 public slots:
42  void stop_calculations();
43 signals:
45  void finished(int succesful);
47  void refresh_progress(int step);
48 private:
49  int counter;
51 
60  template <class T> void calc(FibunacciHeap<T>**f);
63 
67  void init_Strong();
68  void init_StrongPlus();
69  void init_StrongClimb();
73 
79  void init_AreaStrong(KOO* k);
80  void init_AreaStrongPlus(KOO* k);
81  void init_AreaStrongClimb(KOO* k);
84 
89  void setSTRONG(KOO* k);
91 
92  short traceback(STRONG* s, Neighbour* n);
95  int index_STRONG(STRONGfib* t,Neighbour* n);
101  void store_STRONG(STRONGfib* t, Neighbour* n,int si, int i);
102  void store_STRONG(STRONGPlusfib* t, Neighbour* n,int si, int i);
103  void store_STRONG(STRONGClimbfib* t, Neighbour* n,int si, int i);
106 
109  void STRONG_to_trck(int i);
111 
114  void extract_neighbourlist(STRONG* s, STRONG* e,
115  Neighbour ***nl,long int* nc);
121  void load_STRONG();
123  void save_STRONG();
125  void load_crossdata(FILE* f);
127  void save_crossdata(KOO *k, FILE* f);
128  RunMode runmode;
129  OSM* o;
130  char filename[999];
131  KOO *s;
132  KOO *e;
133  char max, min;
135  Track*** trck;
136  /*Variablen des STRONG-Algorithmus*/
137  int N, *Nout, calcstopped;
139  float radius;
140  short foundSTRONG;
148  double* mind;
149  STRONG** mindSTRONG;
153  float hm, hmup, hmdown, Psum, dP;
155 };
156 
157 #endif // STRONGCALC_H
void calc(FibunacciHeap< T > **f)
core function of the algorithm
Definition: strongcalc.cpp:83
double * mind
Definition: strongcalc.h:148
void setSTRONG(KOO *k)
Definition: strongcalc.cpp:336
Track *** trck
intermediate results of iterations
Definition: strongcalc.h:135
void extract_neighbourlist(STRONG *s, STRONG *e, Neighbour ***nl, long int *nc)
reconstructs link between start STRONG and end STRONG
Definition: strongcalc.cpp:546
void STRONG_to_trck(int i)
Definition: strongcalc.cpp:356
FibunacciHeap< STRONGClimbfib > ** fclimb
Definition: strongcalc.h:146
FibunacciHeap element to store STRONG data with climb restrictions.
Definition: DataTyps.h:270
void refresh_progress(int step)
emitted if iteration step has finished
char filename[999]
for save and load
Definition: strongcalc.h:130
STRONGsetting * hs
major settings of the calculation
Definition: strongcalc.h:134
container struct to hold data of a coordinate
Definition: DataTyps.h:82
void init_Strong()
Definition: strongcalc.cpp:161
int extract_STRONGPlus_restriciton(Neighbour *n)
checks if STRONG can expand concerning restrictions
Definition: strongcalc.cpp:425
float hmdown
Definition: strongcalc.h:153
FibunacciHeap element to store STRONG data.
Definition: DataTyps.h:261
KOO * s
start point
Definition: strongcalc.h:131
routing container struct, connects cross via Way with each other
Definition: DataTyps.h:47
STRONGcalc(OSM *o, KOO *s, KOO *e, char max, char min, STRONGsetting *hs, Track ***trck, int *N, bool Hmonly)
STRONG calculation.
Definition: strongcalc.cpp:3
label algorithm to solve multicriteria shortes path problem
Definition: strongcalc.h:28
int extract_STRONGClimb_restriciton(Neighbour *n)
checks if STRONG can expand concerning restrictions
Definition: strongcalc.cpp:475
void init_AreaStrongClimb(KOO *k)
Definition: strongcalc.cpp:316
KOO * e
end point
Definition: strongcalc.h:132
void load_STRONG()
executes the loading of a STRONG network from file filename
Definition: strongcalc.cpp:671
float hmup
Definition: strongcalc.h:153
FibunacciHeap element to store STRONG data with climb analysis.
Definition: DataTyps.h:280
void init_AreaStrongPlus(KOO *k)
Definition: strongcalc.cpp:299
RunMode runmode
type of STRONGcalc to be executed
Definition: strongcalc.h:128
void load_crossdata(FILE *f)
low level load routine of load_STRONG
Definition: strongcalc.cpp:634
official representation of Track in BTP3
Definition: track.h:14
FibunacciHeap< STRONGfib > ** f
Definition: strongcalc.h:144
void save_STRONG()
executes the save of a STRONG network to file filename
Definition: strongcalc.cpp:707
void finished(int succesful)
returns succes if a track was extracted from the STRONG network
char min
restrictions on Neighbour Way type
Definition: strongcalc.h:133
void init_AreaStrong(KOO *k)
Definition: strongcalc.cpp:284
float hm
Definition: strongcalc.h:153
void stop_calculations()
sets STRONGcalc::calcstopped and stops algorithm in next iteration
Definition: strongcalc.cpp:599
STRONG ** mindSTRONG
end point array of shortest track at specific strong index
Definition: strongcalc.h:150
short traceback(STRONG *s, Neighbour *n)
reconstructs track and checks if Neighbour n was already used
Definition: strongcalc.cpp:385
int index_STRONG(STRONGfib *t, Neighbour *n)
Definition: strongcalc.cpp:398
FibunacciHeap< STRONGPlusfib > ** fplus
Definition: strongcalc.h:145
Neighbour * dummy
Definition: strongcalc.h:141
void init_StrongClimb()
Definition: strongcalc.cpp:241
float Psum
Definition: strongcalc.h:153
BTP3 database, created from OpenStreetMap data.
Definition: osm.h:34
void store_STRONG(STRONGfib *t, Neighbour *n, int si, int i)
Definition: strongcalc.cpp:563
OSM * o
dataset to operate on
Definition: strongcalc.h:129
short foundSTRONG
if 1 return succes when finished
Definition: strongcalc.h:140
float radius
data ellipse radius calculated from STRONGsetting and start/ end point
Definition: strongcalc.h:139
float dP
Definition: strongcalc.h:153
void save_crossdata(KOO *k, FILE *f)
low level save routine of save_STRONG
Definition: strongcalc.cpp:610
void init_StrongPlus()
Definition: strongcalc.cpp:200
main struct for routing purpose
Definition: DataTyps.h:255