-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSettings.h
executable file
·68 lines (55 loc) · 1.6 KB
/
Settings.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
* Settings.h
*
* Created on: Jan 4, 2016
* Author: colman
*/
#ifndef SETTINGS_H_
#define SETTINGS_H_
#include <math.h>
#include <string>
#include <Configuration.h>
#include <iostream>
using namespace config4cpp;
using namespace std;
class Settings {
private:
static Configuration* cfg;
static const char* scope;
static const char* configFile;
public:
/** Connection Settings **/
static string HOST; //host address
static int PORT; //port
/** Constants **/
static float ROBOT_SIZE; //size of robot in meters
static float MAP_RESOLUTION; //resolution of the map
static int MAP_WIDTH; //map width in pixels
static int MAP_HEIGHT; //map height in pixels
static string MAP_IMAGE_PATH; //path of original map image in file system
static int STC_START_POS_X; //X value of STC start position
static int STC_START_POS_Y; //Y value of STC start position
static string STC_IMAGE_PATH; //path of map + STC path image in file system
static float INFLATION_RADIUS_FACTOR;
static float SAFE_DISTANCE; //the distance from obstacle
static int ROBOT_ODOMETRY_X;
static int ROBOT_ODOMETRY_Y;
static float ROBOT_ODOMETRY_YAW;
static float WAYPOINT_RADIUS;
static float LINEAR_SPEED;
static float RADIAL_SPEED;
/** Static Methods **/
//load all static variables values from configuration file
static void loadConfFile();
//convert from degrees to radians
static double degToRadians (double deg) {
return (deg * M_PI) / 180;
}
//convert from radians to degrees
static double radiansToDeg (double rad) {
return (rad * 180) / M_PI;
}
Settings();
virtual ~Settings();
};
#endif /* SETTINGS_H_ */