]> rtime.felk.cvut.cz Git - eurobot/public.git/blob - src/lidars/lidar/lidar.h
lidars: Add support for Sick Tim 551 and fix some identation issues
[eurobot/public.git] / src / lidars / lidar / lidar.h
1 #ifndef LIDAR_H
2 #define LIDAR_H
3
4 enum LIDAR_TYPE {
5     HOKUYO,
6     SICK_TIM3XX,
7     SICK_TIM551
8 };
9
10 struct lidar_params {
11     enum LIDAR_TYPE type;
12     int data_lenght;    // lenght of data
13     int split_div;      // split division
14     int initial_meas;   // initial measurement
15     int final_meas;     // final measurement
16     double start_angle_deg; // start angle in degrees
17     int range_angle_left;
18     int range_angle_right;
19     int orientation;    // see robodim.h
20     double center_offset_m; // see robodim.h. center offset in metres
21     double range_dist_min_m;
22     double range_dist_max_m;
23 };
24
25 // C functions can be called from C++ code, e.g. RobomonAtlantis.cpp
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29
30 double index2deg(const struct lidar_params lidar, int index);
31 double index2rad(const struct lidar_params lidar, int index);
32 int deg2index(const struct lidar_params lidar, double deg);
33 int rad2index(const struct lidar_params lidar, double rad);
34
35 #ifdef __cplusplus
36 }
37 #endif
38
39 #endif //LIDAR_H