64 lines
2.3 KiB
C
Raw Normal View History

2025-03-26 16:56:51 +08:00
/*
*
*
* :
* : 2023-06-28
*/
#ifndef EXAMSENSOR_H
#define EXAMSENSOR_H
#include "IExamCarAbstract.h"
class JUDGE_API ExamSensor
{
public:
ExamSensor();
virtual ~ExamSensor();
//重置初始化设置基准点
virtual void resetSensor(IExamCarAbstract* car, const TGPSPoint& base);
//GPS传感数据预处理过滤错误数据等
virtual bool pretreatment(TChuanGan* cg);
//对接收到的GPS数据做加工转换处理
virtual bool convertDatas(TChuanGan* cg);
//计算车身实时所有点坐标 Calc_CarPos
virtual bool calcCarBody(TChuanGan* cg);
//过滤异常数据
virtual bool filterWrong(TChuanGan* cg);
2025-05-14 14:19:43 +08:00
virtual bool filterGpsWrong(TGpsInfo* gps, const TGpsInfo* h_gps);
2025-03-26 16:56:51 +08:00
//计算考车状态(科目三)
virtual bool GetCarDirStauts(TChuanGan* cg);
//计算考车状态(科目二)
virtual bool GetCarDirStatus_KM2(TChuanGan* cg);
//计算档位(科目三)
virtual bool calcCarGears(TChuanGan* cg);
virtual int GetStop_Interval(int ItemNo, bool pTaiZhouFlag);
virtual int GetDBStop_Interval(int ItemNo);
//计算考车前进状态 1:表示前进状态 -1:表示后退 0:无变化(停车)
virtual CarMoveState calcMoveState();
virtual void cloneWith(TChuanGan* src, TChuanGan* dest);
virtual void setStatus(TChuanGan* cg, CarMoveState s);
virtual TGPSPoint calcPoint(const TGPSPoint& px, const TGPSPoint& cur, const TGPSPoint& b2);
private:
IExamCarAbstract* m_car = nullptr;
TGPSPoint m_basePoint; //地图对应的基准点(地图就是测绘项目, 跟考车模型没有关系)
bool m_initGPSFlag = false; //初始化标志
Pointi m_stopOffset; //停车时刻的X、Y(单位厘米CM) //相对于基准点的距离X、Y单位厘米
#if JUDGE_USE_INSPECT
//无锡所方向等信号是一闪一闪的,我们要做一层过滤 20240604无锡所
virtual void inspectSensor(TChuanGan* cg);
int Pub_ZFXD_OKNum = 0;
int Pub_YFXD_OKNum = 0;
int Pub_STD_OKNum = 0;
int Pub_Last_DW = 0;
#endif
};
#endif // EXAMSENSOR_H