\( \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
MainWindow Class Reference
Inheritance diagram for MainWindow:
Collaboration diagram for MainWindow:

Signals

void stop_STRONG ()
 

Public Member Functions

 MainWindow (QWidget *parent=0)
 
void closeEvent (QCloseEvent *)
 
void load_btp (QString filename)
 
void save_btp (QString filename, double minlat, double maxlat, double minlon, double maxlon)
 
void read_osm (QString filename)
 
void analyse_gpx (QString filename)
 

Public Attributes

HeightDatahd
 
OSMosm
 
config c
 
int autosave
 

Private Slots

void set_SRTM3_folder ()
 
void set_start_btp ()
 
void load_btp ()
 
void save_btp ()
 
void read_osm ()
 
void analyse_gpx ()
 
void toggle_poweranalysis ()
 conroles communication from profil to mainwindow
 
void profilinfo (double x)
 
void profil_settings ()
 
void map_settings ()
 
void STRONG_preview (int i)
 
void STRONG_settings ()
 
void route_STRONG_finalize (int succes)
 
void save_profile ()
 
void save_gpx ()
 
void create_STRONGlayer ()
 
void save_STRONGlayer ()
 
void load_STRONGlayer ()
 
void toggle_STRONGlayer ()
 
void load_STRONGcalc ()
 
void save_STRONGcalc ()
 
void AnalyseClimbs ()
 
void load_Climblayer ()
 
void toggle_Climblayer ()
 
void generate_Map ()
 
void normalize_Hm ()
 
void invert_Hm ()
 
void update_profil ()
 
void center_track (double d)
 
void zoom_profil (double dmin, double dmax)
 repaints profil with current dataset, but refreshed titel
 
void toggle_showpower ()
 
void toggle_showspeed ()
 
void generate_tiles ()
 creates tiles for map server More...
 
void split_europe_pbf ()
 splits europe.pbf $osm data More...
 
void next_command ()
 slot to organize multithreating task More...
 
void add_Cmd (webdatacmd *w)
 slot to organize multithreating task More...
 
void correct_hgt ()
 slot to organize multithreating task More...
 
void read_europe ()
 slot to organize multithreating task More...
 
void CA_europe ()
 slot to organize multithreating task More...
 
void STRONG_europe ()
 slot to organize multithreating task More...
 
void zoom14_collection ()
 copy high zoom level tiles for desired areas in europe
 

Private Member Functions

void init ()
 loads settings, initialized variables
 
void init_config ()
 
void autoload_setting ()
 
void autosave_setting ()
 
void resizeEvent (QResizeEvent *event)
 change of main window size More...
 
void keyPressEvent (QKeyEvent *event)
 handles keyboard input
 
void mousePressEvent (QMouseEvent *event)
 handles all mouse inputs
 
void mouseReleaseEvent (QMouseEvent *event)
 
void mouseDoubleClickEvent (QMouseEvent *event)
 
void mouseMoveEvent (QMouseEvent *event)
 
void wheelEvent (QWheelEvent *event)
 
void MouseToTrack ()
 
void zoom (double zoomfactor, double dlonfactor, double dlatfactor)
 handles all map modification (mooving, zooming)
 
void update_statusbar ()
 
void set_routingmode (inputstate ip)
 sets routing mode and shows hints in statusbar
 
void set_mintype (char mt)
 
void set_maxtype (char mt)
 
void delete_to_cross (int cc)
 
void undo ()
 
void redo ()
 
void enter ()
 
void update_map_raw ()
 
void update_map_track ()
 
void update_map_MovObj (Way *w)
 
void drawRoute (QPainter *p)
 
void drawCross (QPainter *p)
 
void route_short ()
 
void route_flat ()
 
void route_STRONG ()
 
void acceptSTRONG ()
 
void selectSTRONG (readdirection rd, short steps)
 
void delete_STRONG_tracks ()
 
void toggle_preview ()
 
int route_preview (int x, int y)
 
void accept_ct ()
 
void reset_track ()
 
int trace_back (KOO *k)
 
void recalc_power ()
 
QColor colorgradient (float x)
 STRONGlayer.
 

Private Attributes

Ui::MainWindowui
 
MAPmap
 
Routingr
 
PowerAnalysisPA
 
QPixmap * cmap
 
int x
 
int y
 
int xold
 
int yold
 
KOOkold
 
KOOknew
 
KOOkdot
 
KOOanchorfrom
 
KOOanchorto
 
Trackct
 
Tracklrt
 
Track ** STRONGtracks
 
int sN
 
int STRONGindex
 
UndoRedoUR
 
dotstate dstate
 
int ydot
 
int xdot
 
inputstate oldroutemode
 
Wayselected_way
 
QString status1
 
QString status2
 
short readytotrace
 
int STRONGstate
 
short traceback
 
long int SLnbc
 
int SLN
 
int SLc
 
STRONGlayerSL
 
climblayerCL
 Climblayer.
 
QLabel * statusLeft
 
QLabel * statusMiddle
 
QList< webdatacmdCmdl
 command list to calculate web content multithreated
 
int threadscount
 

Detailed Description

Definition at line 179 of file mainwindow.h.

Member Function Documentation

void MainWindow::accept_ct ( )
private

releases ct and sets lrt

Definition at line 1237 of file mainwindow.cpp.

void MainWindow::acceptSTRONG ( )
private

accepts STRONG as new segment

Definition at line 917 of file mainwindow.cpp.

void MainWindow::add_Cmd ( webdatacmd w)
privateslot

slot to organize multithreating task

receives signals from working threads to expand tast list Cmdl

Definition at line 1684 of file mainwindow.cpp.

void MainWindow::CA_europe ( )
privateslot

slot to organize multithreating task

loads btp and executes ClimbAnalysem, than saves html data for website

Definition at line 1750 of file mainwindow.cpp.

void MainWindow::center_track ( double  d)
privateslot

connected to plot2d::clicked signal, centers map around trackpoint

Definition at line 1463 of file mainwindow.cpp.

void MainWindow::correct_hgt ( )
privateslot

slot to organize multithreating task

check all SRTM3 hgt-files of a folder for voids and interpolate lineary

Definition at line 1698 of file mainwindow.cpp.

void MainWindow::delete_to_cross ( int  cc)
private

deletes last cc crosses rom ct

Definition at line 1059 of file mainwindow.cpp.

void MainWindow::drawCross ( QPainter *  p)
private

update_map: draws selected cross

Definition at line 386 of file mainwindow.cpp.

void MainWindow::drawRoute ( QPainter *  p)
private

update_map: draws current tracks

Definition at line 398 of file mainwindow.cpp.

void MainWindow::enter ( )
private

handles all return events

Definition at line 1196 of file mainwindow.cpp.

void MainWindow::generate_Map ( )
privateslot

high end map after user dialog

Definition at line 1380 of file mainwindow.cpp.

void MainWindow::generate_tiles ( )
privateslot

creates tiles for map server

loads precalculated btp data and generates tiles from zoomlevel 5 to 14, output are png files, used by openlayers or google map API

Definition at line 1563 of file mainwindow.cpp.

void MainWindow::invert_Hm ( )
privateslot

for routing algorithms: fwd- and bwd-height meters are swapped, interesting for STRONG algorithm forced to finish at top of a mountain when the mountain is chosen as start point

Definition at line 1419 of file mainwindow.cpp.

void MainWindow::next_command ( )
privateslot

slot to organize multithreating task

receives finished signals from finished tasks restarts new threats if necesary. These leads to a maximum count of threats being active, i.g. optimized for example for eight active threads

Definition at line 1672 of file mainwindow.cpp.

void MainWindow::normalize_Hm ( )
privateslot

for routing algorithms: total height meters from to cross to cross are reduced by the height difference of the related two cross

Definition at line 1414 of file mainwindow.cpp.

void MainWindow::read_europe ( )
privateslot

slot to organize multithreating task

reads $*.osm files and saves btp

Definition at line 1718 of file mainwindow.cpp.

void MainWindow::recalc_power ( )
private

triggers PowerAnalyse to calc

Definition at line 1450 of file mainwindow.cpp.

void MainWindow::redo ( )
private

loads newest backup before undo

Definition at line 1103 of file mainwindow.cpp.

void MainWindow::reset_track ( )
private

resets track

Definition at line 939 of file mainwindow.cpp.

void MainWindow::resizeEvent ( QResizeEvent *  event)
private

change of main window size

generates new map and plots it in the size changed window

Definition at line 97 of file mainwindow.cpp.

void MainWindow::route_flat ( )
private

least Hm from kold to knew

Definition at line 823 of file mainwindow.cpp.

int MainWindow::route_preview ( int  x,
int  y 
)
private

preview of open end routing

void MainWindow::route_short ( )
private

shortes path from kold to knew

Definition at line 801 of file mainwindow.cpp.

void MainWindow::route_STRONG ( )
private

most Hm from kold to knew

Definition at line 847 of file mainwindow.cpp.

void MainWindow::route_STRONG_finalize ( int  succes)
privateslot

finallizes succesful STRONG calc

Definition at line 862 of file mainwindow.cpp.

void MainWindow::selectSTRONG ( readdirection  rd,
short  steps 
)
private

show the result of STRONG calc

Definition at line 1117 of file mainwindow.cpp.

void MainWindow::set_maxtype ( char  mt)
private

sets maximum road category

Definition at line 1078 of file mainwindow.cpp.

void MainWindow::set_mintype ( char  mt)
private

sets minimum road category

Definition at line 1074 of file mainwindow.cpp.

void MainWindow::split_europe_pbf ( )
privateslot

splits europe.pbf $osm data

takes europe data set of $OSM data in pbf file format and splits into either files representing zoomlevel 9 or higher depending on the maximum output file size of 400 MB

Definition at line 1687 of file mainwindow.cpp.

void MainWindow::STRONG_europe ( )
privateslot

slot to organize multithreating task

loads btp, calcs and saves STRONG and creates transparent tiles

Definition at line 1629 of file mainwindow.cpp.

void MainWindow::STRONG_preview ( int  i)
privateslot

refreshes STRONG calc

Definition at line 1262 of file mainwindow.cpp.

void MainWindow::STRONG_settings ( )
privateslot

settings user interface

Definition at line 1274 of file mainwindow.cpp.

void MainWindow::toggle_preview ( )
private

choose any endpoint at STRONG?

Definition at line 1253 of file mainwindow.cpp.

void MainWindow::toggle_showpower ( )
privateslot

speed is/not shown in plot

Definition at line 1486 of file mainwindow.cpp.

void MainWindow::toggle_showspeed ( )
privateslot

power is/not shown in plot

Definition at line 1494 of file mainwindow.cpp.

int MainWindow::trace_back ( KOO k)
private

if ready to trace tries to trace back beginning with k

Definition at line 725 of file mainwindow.cpp.

void MainWindow::undo ( )
private

loads news valid backup

Definition at line 1093 of file mainwindow.cpp.

void MainWindow::update_map_MovObj ( Way w)
private

draws short time objects

Definition at line 327 of file mainwindow.cpp.

void MainWindow::update_map_raw ( )
private

creates map fitting main window

Definition at line 296 of file mainwindow.cpp.

void MainWindow::update_map_track ( )
private

draws markers/tracks on raw map

Definition at line 313 of file mainwindow.cpp.

void MainWindow::update_profil ( )
privateslot

draws ct/pt/st to profil

Definition at line 351 of file mainwindow.cpp.

Member Data Documentation

KOO * MainWindow::anchorto
private

drag&drop between these anchors

Definition at line 339 of file mainwindow.h.

QPixmap* MainWindow::cmap
private

last generated map

Definition at line 335 of file mainwindow.h.

Track* MainWindow::ct
private

current Track

Definition at line 340 of file mainwindow.h.

dotstate MainWindow::dstate
private

state of the dot to be drawn

Definition at line 346 of file mainwindow.h.

KOO * MainWindow::kdot
private

old/new click cross postion

Definition at line 338 of file mainwindow.h.

short MainWindow::readytotrace
private

routing calculation is finished, any point can be backtraced

Definition at line 351 of file mainwindow.h.

Way* MainWindow::selected_way
private

way to be editted

Definition at line 349 of file mainwindow.h.

int MainWindow::sN
private

STRONG-tracks count

Definition at line 343 of file mainwindow.h.

QString MainWindow::status2
private

status bar contents

Definition at line 350 of file mainwindow.h.

QLabel* MainWindow::statusLeft
private

status bar splitting

Definition at line 366 of file mainwindow.h.

QLabel* MainWindow::statusMiddle
private

status bar splitting

Definition at line 367 of file mainwindow.h.

int MainWindow::STRONGindex
private

STRONG-tracks: current index

Definition at line 344 of file mainwindow.h.

int MainWindow::STRONGstate
private

0: two ele, 1: threat running, 2: multiple ele

Definition at line 353 of file mainwindow.h.

Track** MainWindow::STRONGtracks
private

STRONG-tracks

Definition at line 342 of file mainwindow.h.

int MainWindow::threadscount
private

number of active threads

Definition at line 370 of file mainwindow.h.

short MainWindow::traceback
private

try to trace back selected point

Definition at line 355 of file mainwindow.h.

UndoRedo* MainWindow::UR
private

Undo Redo list

Definition at line 345 of file mainwindow.h.

int MainWindow::xdot
private

buffer for dots to be drawn

Definition at line 347 of file mainwindow.h.

int MainWindow::y
private

current mouse postion

Definition at line 336 of file mainwindow.h.

int MainWindow::yold
private

old/new mouse postion

Definition at line 337 of file mainwindow.h.


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