]> rtime.felk.cvut.cz Git - hubacji1/bcar.git/blob - api/bcar.h
85041580c752cb4474a7479d9ebc7f3aee80bc11
[hubacji1/bcar.git] / api / bcar.h
1 #ifndef BCAR_H
2 #define BCAR_H
3
4 /*! \brief Bicycle car basic class.
5
6 This class contains some geometrical computations of bicycle car.
7
8 \param x Horizontal coordinate of rear axle center.
9 \param y Vertical coordinate of rear axle center.
10 \param h Heading of the car.
11 \param mtr Minimum turning radius.
12 \param wb Wheelbase.
13 \param w The width of the car.
14 \param l The length of the car.
15 \param h The height of the car.
16 \param sd The safety distance.
17 \param df Distance from rear axle center to the front of the car.
18 \param dr Distance from rear axle center to the back of the car.
19 */
20 class BicycleCar {
21         private:
22                 // coordinates
23                 double x_ = 0;
24                 double y_ = 0;
25                 double h_ = 0;
26                 // kinematic constraints
27                 double mtr_ = 10.820;
28                 double wb_ = 2.450;
29                 // dimensions
30                 double w_ = 1.625;
31                 double l_ = 3.760;
32                 double h_ = 1.450;
33                 double sd_ = 0;
34                 double df_ = 3.105;
35                 double dr_ = 0.655;
36         public:
37                 double x() { return this->x_; }
38                 void x(double x) { this->x_ = x; }
39
40                 double y() { return this->y_; }
41                 void y(double y) { this->y_ = y; }
42
43                 double h() { return this->h_; }
44                 void h(double h) { this->h_ = h; }
45
46                 double mtr() { return this->mtr_; }
47                 void mtr(double mtr) { this->mtr_ = mtr; }
48
49                 double wb() { return this->wb_; }
50                 void wb(double wb) { this->wb_ = wb; }
51
52                 double w() { return this->w_; }
53                 void w(double w) { this->w_ = w; }
54
55                 double l() { return this->l_; }
56                 void l(double l) { this->l_ = l; }
57
58                 double h() { return this->h_; }
59                 void h(double h) { this->h_ = h; }
60
61                 double sd() { return this->sd_; }
62                 void sd(double sd) { this->sd_ = sd; }
63
64                 double df() { return this->df_; }
65                 void df(double df) { this->df_ = df; }
66
67                 double dr() { return this->dr_; }
68                 void dr(double dr) { this->dr_ = dr; }
69 };
70
71 #endif /* BCAR_H */