11 #define _USE_MATH_DEFINES 18 static int max(
int a,
int b)
20 return (a > b) ? a : b;
24 static int min(
int a,
int b)
26 return (a < b) ? a : b;
39 error_messages_t errors[] = {
60 int n =
sizeof(errors) /
sizeof(errors[0]);
63 for (i = 0; i < n; ++i) {
65 return errors[i].message;
69 return "Unknown error.";
74 long *min_distance,
long *max_distance)
const char * urg_error(const urg_t *urg)
int urg_rad2step(const urg_t *urg, double radian)
void urg_step_min_max(const urg_t *urg, int *min_index, int *max_index)
int urg_max_data_size(const urg_t *urg)
int urg_step2index(const urg_t *urg, int step)
double urg_step2deg(const urg_t *urg, int step)
urg_range_data_byte_t range_data_byte
static int min(int a, int b)
double urg_index2deg(const urg_t *urg, int index)
double urg_index2rad(const urg_t *urg, int index)
void urg_distance_min_max(const urg_t *urg, long *min_distance, long *max_distance)
int urg_deg2index(const urg_t *urg, double degree)
int urg_deg2step(const urg_t *urg, double degree)
double urg_step2rad(const urg_t *urg, int step)
int urg_rad2index(const urg_t *urg, double radian)
static int max(int a, int b)
long urg_scan_usec(const urg_t *urg)