#ifndef TRM_DRIVINGFACE_H #define TRM_DRIVINGFACE_H #include #include #include "point.h" #define ZERO_PRECISION 1E-3 //为零的精度 struct time_point:public point{ time_t m_t; //此坐标当前记录到队列的时间 }; /* * 掘进机的三率业务类 * */ struct drivingface_biz{ uint64_t m_rec_time; //接收时间 uint64_t m_record_totals; //当前记录点个数 uint64_t m_record_cycle_start_time; //开始记录的起始时间 double m_record_min_dist; //周期内最小距离值 double m_record_max_dist; //周期内最大距离值 double m_record_avg_dist; //当前记录内的平均距离 bool m_b_first_record; //是否开始新一条数据的记录标志位 std::string m_str_record; //记录1分钟内距离和时间信息 std::vector m_vt_points; //存储1分钟内点的坐标 drivingface_biz(){ m_record_totals = 0; m_record_cycle_start_time = 0; m_record_avg_dist = 0.0; m_b_first_record = true; m_str_record = ""; } }; struct drivingface_card:public point,public drivingface_biz { uint64_t m_drivingface_id; std::string m_card_id; uint64_t m_vehicle_id; uint64_t m_area_id; uint64_t m_relay_small_reader_id; //中继小分站 uint64_t m_locate_small_reader_id; //定位小分站 uint64_t m_big_reader_id; //定位大分站,用于区分方向 uint64_t m_dept_id; double m_schedule_tunnelling_times; //计划排数 double m_drifting_footage_unit; //排数的间距 double m_schedule_work_times; //计划工作时长 bool m_old_state; //之前掘进机的状态 bool m_cur_state; //当前掘进机的状态 bool m_restart; //是否重启中(true = 没更新最大位置) double m_max_distance; //最大距离 point m_max_point; //最大距离时的位置信 std::vector m_vt_ref_points; //掘进面资料维护表中的数据 double m_total_ref_point_dist; //基准点之间的累计距离 double m_fOffset; //掘进面资料维护表中的数据-偏移数据 drivingface_card():point(0,0,0){ m_drivingface_id = m_area_id = m_relay_small_reader_id = m_locate_small_reader_id = m_big_reader_id = m_dept_id = 0; m_schedule_tunnelling_times = m_drifting_footage_unit = m_max_distance = 0.0; m_old_state = m_cur_state = false; m_restart = true; m_vehicle_id = 0; m_card_id = ""; m_fOffset = 0; m_total_ref_point_dist = 0; } ~drivingface_card(){}; }; //typedef std::unordered_map> unMapDrivingfaceCard; #endif