#include "liadr32Decoder.h"
#define LIDAR_VERSION 2 //
static LidarDatas LidarDataFrist; //fisrt echo
static LidarDatas LidarDataSecond; //second echo
static std::ofstream outputFile; //output the parsed data
static uint64_t GPStimestamp = 0; //GPS timestamp
static pcap_t *pfile;
double Angle1 = 0.0, Angle2 = 0.0; //水平补偿角度
double device_type = 0.0;
int frame_num = 1;
double theta_3[32] = { -16, -15, -14, -13, -12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
//double theta_2[32] = { -16, 0, -15, 1, -14, 2, -13, 3, -12, 4, -11, 5, -10, 6, -9, 7, -8,
// 8, -7, 9, -6, 10, -5, 11, -4, 12, -3, 13, -2, 14, -1, 15 };
double theta_2[32] = { -16, -15, -14, -13, -12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; // for a
double theta_C[32] = { -18, -15, -12, -10, -8, -7, -6, -5, -4, -3