\( \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
Routing Class Reference

class to perform routing routines on osm data sets More...

#include <Routing.h>

Collaboration diagram for Routing:

Public Member Functions

 Routing (OSM *o)
 
short DijkstraFib (KOO *s, KOO *e, char max, char min, OSM *o, int Si)
 this is famous Dijkstra shortes path algothim More...
 
short DijkstraFib_minHM (KOO *s, KOO *e, char max, char min, OSM *o, int Si)
 see DijkstraFib(), but minimizing Hm instead of distance
 
void extract_neighbourlist (STRONG *s, STRONG *e, Neighbour ***nl, int *nc)
 collects a Neighbour list from STRONG network More...
 
void resetSTRONG (KOO *k, int STRONGindex)
 resets the STRONG network to begin calculation
 
void finish_STRONG ()
 resets STRONG network of a STRONGcalc to normal Dijkstra state More...
 
STRONGlayerSTRONGlayer_create (STRONGlayer *SL, int N)
 creates STRONGlayer from a unfinalized STRONG network
 
STRONGlayerSTRONGlayer_create (int N)
 creates STRONGlayer from a unfinalized STRONG network
 
STRONGlayerSTRONGlayer_load (char *filename)
 loades STRONGlayer from file
 
void STRONGlayer_save (char *filename, STRONGlayer *SL)
 saves STRONGlayer to file
 

Private Member Functions

void setSTRONG (KOO *k, KOO *s, KOO *e, float radius, int n)
 body of finish_STRONG();
 
void STRONGlayer_reset_d (KOO *k)
 sets Neighbour distance attribute d to zero
 
void STRONGlayer_reconstruct_d (KOO *k)
 reconstructs Neighbour distance attribute d from Way data
 
void STRONGlayer_count_neighbours (KOO *k, int *nbc)
 counts total Neighbour count on osm data set
 
void STRONGlayer_mark_neighbours (KOO *k, int si)
 increment Neighbour attribute d by its usage rate on STRONG network
 
void STRONGlayer_fill_neighbours (KOO *k, STRONGlayerele *data, int *nbc)
 copy Neighbour attribut d to STRONGlayer data
 
void STRONGlayer_sort (STRONGlayer *SL, long s, long e)
 quicksort neighbours by its usage rate
 

Private Attributes

OSMo
 
char ** SLgrid
 
int nlat
 
int nlon
 
double SLlonmax
 
double SLlatmax
 
double SLlonmin
 
double SLlatmin
 
double dlat
 
double dlon
 
void STRONGlayer_grid_new ()
 
void STRONGlayer_grid_reset ()
 
short STRONGlayer_grid_free (KOO *k)
 
void STRONGlayer_grid_delete ()
 

Detailed Description

class to perform routing routines on osm data sets

this class provides routing routines to work on an Neighbour network. STRONGcalc does this as well, but in a seperate thread. Here, Dijkstra algorithms are implemented. Additionally this class handels the STRONGlayer buisness, i.g. creating map layers from finished STRONGcalc calculation.

Definition at line 18 of file Routing.h.

Member Function Documentation

short Routing::DijkstraFib ( KOO s,
KOO e,
char  max,
char  min,
OSM o,
int  Si 
)

this is famous Dijkstra shortes path algothim

calculates shortes path on an osm dataset using Dijkstra algorithm. a FibunacciHeap priority queue is used for best performance. When algorithm finishes there will we a network of STRONG references from which the shortes paths to the startpoint s can be traced back by iterating over the KOO->cd->s[Si]->from reference. The algorithm respects the road restrictions min and max describing allowed road types. If no way to the end point e is found zero will be returned, otherwise 1.

Definition at line 8 of file Routing.cpp.

void Routing::extract_neighbourlist ( STRONG s,
STRONG e,
Neighbour ***  nl,
int *  nc 
)

collects a Neighbour list from STRONG network

tries to find a path from e to s and collects a list of Neighbour relations which is used for that purpose. This list can be used to create Track objects.

Definition at line 180 of file Routing.cpp.

void Routing::finish_STRONG ( )

resets STRONG network of a STRONGcalc to normal Dijkstra state

normal state of STRONG network consistsof crossdata with STRONG arrays of length two. Dijkstra will usually use only one of them but when modifying a track both ar used. In the State for STRONGcalc these arrays may contain several 100 elements depending on the setup of the STRONGcalc

Definition at line 197 of file Routing.cpp.

void Routing::STRONGlayer_grid_delete ( )
private

grid to decide whether a cross can still be used to mark neighbours

to homogeniously probe the STRONG network to reconstruct the STRONGlayer it is necessary to check that probe points, i.g. cross are equally distant to each other. Therefor a net with 0.5x0.5 km cells is created, first cross belonging to this cell will probe the STRONG network, all following cross belonging to this cell will be ignored thus avoiding overjudging of regions with high cross density, e.g. big citys

Definition at line 307 of file Routing.cpp.

short Routing::STRONGlayer_grid_free ( KOO k)
private

grid to decide whether a cross can still be used to mark neighbours

to homogeniously probe the STRONG network to reconstruct the STRONGlayer it is necessary to check that probe points, i.g. cross are equally distant to each other. Therefor a net with 0.5x0.5 km cells is created, first cross belonging to this cell will probe the STRONG network, all following cross belonging to this cell will be ignored thus avoiding overjudging of regions with high cross density, e.g. big citys

Definition at line 297 of file Routing.cpp.

void Routing::STRONGlayer_grid_new ( )
private

grid to decide whether a cross can still be used to mark neighbours

to homogeniously probe the STRONG network to reconstruct the STRONGlayer it is necessary to check that probe points, i.g. cross are equally distant to each other. Therefor a net with 0.5x0.5 km cells is created, first cross belonging to this cell will probe the STRONG network, all following cross belonging to this cell will be ignored thus avoiding overjudging of regions with high cross density, e.g. big citys

Definition at line 277 of file Routing.cpp.

void Routing::STRONGlayer_grid_reset ( )
private

grid to decide whether a cross can still be used to mark neighbours

to homogeniously probe the STRONG network to reconstruct the STRONGlayer it is necessary to check that probe points, i.g. cross are equally distant to each other. Therefor a net with 0.5x0.5 km cells is created, first cross belonging to this cell will probe the STRONG network, all following cross belonging to this cell will be ignored thus avoiding overjudging of regions with high cross density, e.g. big citys

Definition at line 292 of file Routing.cpp.

Member Data Documentation

double Routing::dlat
private

grid to decide whether a cross can still be used to mark neighbours

to homogeniously probe the STRONG network to reconstruct the STRONGlayer it is necessary to check that probe points, i.g. cross are equally distant to each other. Therefor a net with 0.5x0.5 km cells is created, first cross belonging to this cell will probe the STRONG network, all following cross belonging to this cell will be ignored thus avoiding overjudging of regions with high cross density, e.g. big citys

Definition at line 91 of file Routing.h.

double Routing::dlon
private

grid to decide whether a cross can still be used to mark neighbours

to homogeniously probe the STRONG network to reconstruct the STRONGlayer it is necessary to check that probe points, i.g. cross are equally distant to each other. Therefor a net with 0.5x0.5 km cells is created, first cross belonging to this cell will probe the STRONG network, all following cross belonging to this cell will be ignored thus avoiding overjudging of regions with high cross density, e.g. big citys

Definition at line 91 of file Routing.h.

int Routing::nlat
private

grid to decide whether a cross can still be used to mark neighbours

to homogeniously probe the STRONG network to reconstruct the STRONGlayer it is necessary to check that probe points, i.g. cross are equally distant to each other. Therefor a net with 0.5x0.5 km cells is created, first cross belonging to this cell will probe the STRONG network, all following cross belonging to this cell will be ignored thus avoiding overjudging of regions with high cross density, e.g. big citys

Definition at line 90 of file Routing.h.

int Routing::nlon
private

grid to decide whether a cross can still be used to mark neighbours

to homogeniously probe the STRONG network to reconstruct the STRONGlayer it is necessary to check that probe points, i.g. cross are equally distant to each other. Therefor a net with 0.5x0.5 km cells is created, first cross belonging to this cell will probe the STRONG network, all following cross belonging to this cell will be ignored thus avoiding overjudging of regions with high cross density, e.g. big citys

Definition at line 90 of file Routing.h.

char** Routing::SLgrid
private

grid to decide whether a cross can still be used to mark neighbours

to homogeniously probe the STRONG network to reconstruct the STRONGlayer it is necessary to check that probe points, i.g. cross are equally distant to each other. Therefor a net with 0.5x0.5 km cells is created, first cross belonging to this cell will probe the STRONG network, all following cross belonging to this cell will be ignored thus avoiding overjudging of regions with high cross density, e.g. big citys

Definition at line 89 of file Routing.h.

double Routing::SLlatmax
private

grid to decide whether a cross can still be used to mark neighbours

to homogeniously probe the STRONG network to reconstruct the STRONGlayer it is necessary to check that probe points, i.g. cross are equally distant to each other. Therefor a net with 0.5x0.5 km cells is created, first cross belonging to this cell will probe the STRONG network, all following cross belonging to this cell will be ignored thus avoiding overjudging of regions with high cross density, e.g. big citys

Definition at line 91 of file Routing.h.

double Routing::SLlatmin
private

grid to decide whether a cross can still be used to mark neighbours

to homogeniously probe the STRONG network to reconstruct the STRONGlayer it is necessary to check that probe points, i.g. cross are equally distant to each other. Therefor a net with 0.5x0.5 km cells is created, first cross belonging to this cell will probe the STRONG network, all following cross belonging to this cell will be ignored thus avoiding overjudging of regions with high cross density, e.g. big citys

Definition at line 91 of file Routing.h.

double Routing::SLlonmax
private

grid to decide whether a cross can still be used to mark neighbours

to homogeniously probe the STRONG network to reconstruct the STRONGlayer it is necessary to check that probe points, i.g. cross are equally distant to each other. Therefor a net with 0.5x0.5 km cells is created, first cross belonging to this cell will probe the STRONG network, all following cross belonging to this cell will be ignored thus avoiding overjudging of regions with high cross density, e.g. big citys

Definition at line 91 of file Routing.h.

double Routing::SLlonmin
private

grid to decide whether a cross can still be used to mark neighbours

to homogeniously probe the STRONG network to reconstruct the STRONGlayer it is necessary to check that probe points, i.g. cross are equally distant to each other. Therefor a net with 0.5x0.5 km cells is created, first cross belonging to this cell will probe the STRONG network, all following cross belonging to this cell will be ignored thus avoiding overjudging of regions with high cross density, e.g. big citys

Definition at line 91 of file Routing.h.


The documentation for this class was generated from the following files: