Commit 0c25a1d9 authored by Jeremy Swerdlow's avatar Jeremy Swerdlow
Browse files

adds sample number from data, and headers for it and number of rotations

parent eeec2937
......@@ -56,7 +56,7 @@ static int print_data(urg_t *urg, long data[], long time_stamp,
y = (long)(length * sin(radian));
// print out the results
fprintf(stderr, "%ld,%ld,%ld,%d,%ld,%f,%d,",
z, y, time_stamp, intensity[i], length, radian, num_rotations);
z, y, time_stamp, intensity[i], length, radian, num_rotations, i);
fprintf(stderr, "%02d.%02d.%02d.%03d\n", tm_info->tm_hour, tm_info->tm_min, tm_info->tm_sec, tp.tv_usec/1000);
return num_rotations;
......@@ -108,8 +108,8 @@ int main(int argc, char *argv[]) {
1); // step, TODO: look at increasing this to reduce num samples
urg_start_measurement(&urg, URG_DISTANCE_INTENSITY, URG_SCAN_INFINITY, 0);
fprintf(stderr, "z,y,time stamp from lidar,intensity,");
fprintf(stderr, "length,radian,time stamp from print_data\n");
fprintf(stderr, "z,y,time stamp from lidar,intensity,length,radian,");
fprintf(stderr, "number of rotations,sample number from data,time stamp from print_data\n");
do {
n = urg_get_distance_intensity(&urg, data, intensity, &time_stamp);
num_rotations = print_data(&urg, data, time_stamp, intensity, n, num_rotations);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment