\( \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
HeightData.h
1 #pragma once
2 #include <string>
3 #include <math.h>
4 #include "DataTyps.h"
5 #include "MathExt.h"
6 #include <stdio.h>
7 using namespace std;
9 typedef struct rect{double minlat, maxlat,minlon,maxlon;}rect;
11 typedef struct recti{int minlat, maxlat,minlon,maxlon;}recti;
13 typedef struct CubicKernel3{int index[6]; double weights[6];}CubicKernel3;
14 
15 
17 
27 {
28 public:
29  HeightData(void);
30  ~HeightData(void);
32 
47  double height(double lon,double lat,void* hc,short mode);
49  void set_SRTM3_folder(char* folder);
51  void set_rect(double minlat,double maxlat,double minlon,double maxlon);
53  void reset_t(double minlat,double maxlat,double minlon,double maxlon);
54  //Erstellt das Gitter
56  int max_t();
58 
62  double height_t(double lon,double lat,void* hc,short mode);
64  void paek_pro(double lon, double lat, qint64** c,float* Ahigher, int cc,
65  int ac, float d,float mperlon, float mperlat);
67 
71  void interpolate_linear(int width,int height,double alpha,
72  double** h, double** dhdx, double** dhdy);
74 
78  void interpolate_linear_mercator(int width,int height,double alpha,
79  double** h, double** dhdx, double** dhdy);
81 
85  void interpolate_bicubic_conv3(int width,int height,double alpha,
86  double** h, double** dhdx, double** dhdy);
88 
92  void interpolate_bicubic_conv3_mercator(int width,int height,double alpha,
93  double** h, double** dhdx, double** dhdy);
95 
99  void get_sorted_grid_data(short** heights, double** lons, double** lats,
100  long* count);
101  recti get_GridRect();
102  int correct_hgt(char* filename);
103 private:
104  int sx,sy,nReserve;
107  char SRTM3folder[1000];
108  void create_grid();
109  void free_grid();
110  short** grid;
111  int lty(double lat);
112  int ltx(double lon);
113  double ltdy(double lat);
114  double ltdx(double lon);
116  void sort_GridList(long s, long e);
118  short *qsh; double *qslon,*qslat;
120  double Cubic_conv_kernel3(double x);
122  double Cubic_conv_kernel3_d(double x);
124  double Bicubic_conv3(CubicKernel3 kx, CubicKernel3 ky);
125 };
126 
short ** grid
Definition: HeightData.h:110
rect DEMRect
Definition: HeightData.h:105
holds data grid information
Definition: HeightData.h:9
holds weights for cubic interpolation
Definition: HeightData.h:13
holds data grid information with angles multiplied by 1200
Definition: HeightData.h:11
recti GridRect
Definition: HeightData.h:106
holds digital elevation model extracted from SRTM3 data
Definition: HeightData.h:26
int nReserve
Definition: HeightData.h:104