c++更新 外壳版本展示
This commit is contained in:
		
							parent
							
								
									370bcc912d
								
							
						
					
					
						commit
						58881ccf55
					
				| @ -192,7 +192,7 @@ | ||||
|     bool __sdk_cpu_occupy__(struct CpuOccupyInfo* occupy) | ||||
|     { | ||||
|         std::string line; | ||||
|         bool root = false; //root用户权限
 | ||||
|         static constexpr bool root = false; //root用户权限
 | ||||
|         if(root) | ||||
|         { | ||||
|             std::ifstream procStat("/proc/stat"); | ||||
|  | ||||
| @ -12,7 +12,6 @@ | ||||
|  *** | ||||
|  ***  说明:编译配置选项 | ||||
|  *** | ||||
|  ***  JUDGE_USE_TSUB3T    //是否启用大车科目三测试
 | ||||
|  ***  JUDGE_USE_NSUB3       //是否启用新科三评判
 | ||||
|  ***  JUDGE_USE_OLD         //是否启用评判语音播报之前老模式
 | ||||
|  ***  JUDGE_USE_LOG         //是否启用日志功能模块
 | ||||
| @ -30,11 +29,6 @@ | ||||
|  *** | ||||
|  ********************************************************************/ | ||||
| 
 | ||||
| /*
 | ||||
|  * 是否启用大车科目三测试 | ||||
|  */ | ||||
| #define JUDGE_USE_TSUB3T  0 | ||||
| 
 | ||||
| /*
 | ||||
|  * 是否启用新科目三评判 | ||||
|  */ | ||||
|  | ||||
| @ -27,7 +27,7 @@ | ||||
| #define JUDGE_VERSION_MAJOR  1 | ||||
| #define JUDGE_VERSION_MINOR  0 | ||||
| #define JUDGE_VERSION_PATCH  3 | ||||
| #define JUDGE_VERSION_STAMP  "2504011600b" | ||||
| #define JUDGE_VERSION_STAMP  "2504110912b" | ||||
| #if JUDGE_USE_OLD | ||||
| #   undef JUDGE_VERSION_STAMP | ||||
| #   define JUDGE_VERSION_STAMP  "2411121010b.old" | ||||
|  | ||||
| @ -156,7 +156,7 @@ int SysParmTable::findQiBuGear(int carCode) | ||||
| 
 | ||||
| int SysParmTable::findHectometreImpulse(int carCode) | ||||
| { | ||||
|     //NO1=3 NO2=车型代码 NO3=4条件 TXT1
 | ||||
|     //NO1=3 NO2=车型代码 NO3=2条件 TXT1
 | ||||
|     int impulse = INVALID_INDEX; | ||||
|     int size = parm3Size(); | ||||
|     for(int i = 0; i < size; i++) | ||||
|  | ||||
| @ -198,6 +198,7 @@ class JUDGE_API SysSetTable : public IDBTable | ||||
|     SYSSET_DECLARE(414);                             //变道、超车以前后轮都过线(0-否 1-是)   //0
 | ||||
|     SYSSET_DECLARE(415, type_array, "^");            //自动报靠边停车(启用标记^全部结束n米报^)启用标记:0-否 1-是 319参数为2有效 //0^1^
 | ||||
|     SYSSET_DECLARE(418);                             //扣分时实时播报语音(0-否 1-是)  //0
 | ||||
|     SYSSET_DECLARE(419, type_int);                   //里程按百米脉冲计算(0-否 1-是 )
 | ||||
|     SYSSET_DECLARE(421);                             //模拟夜间:车辆发生故障,按近光灯和双跳进行评判(0-是 1-否)
 | ||||
|     SYSSET_DECLARE(425, type_array, ",");            //加减档位操作挂一个挡位要松一次离合器(项目,全程)(0-否 1-是)() // 0,0,
 | ||||
|     SYSSET_DECLARE(426, type_int);                   //手工取消正在考的项目(0-否 1-是) // 1
 | ||||
| @ -245,6 +246,8 @@ class JUDGE_API SysSetTable : public IDBTable | ||||
|     SYSSET_DECLARE(530, type_array2_int, ",", "^");  //环境感知参数  驾驶行为识别参数(双手同时离开方向盘时间S1^单手离开方向盘S2秒,内距离偏差L1cm^伸出窗外S3秒^     如:2^5,30^2^
 | ||||
|     SYSSET_DECLARE(531, type_array, ",");            //是否启用环境感知评判,是否启用驾驶行为评判,是否启用录像功能,   //0
 | ||||
|     SYSSET_DECLARE(533, type_array_int, ",");        //开始考试后(n秒)提示点火,(m秒不点火扣分),格式:30,60, 此参数不能与512-9参数同时设置,两个参数最多只能设置一个  //20210524增加
 | ||||
|     SYSSET_DECLARE(534, type_array2, ";", ",");      //低于设置速度累计行驶大于设置里程,不合格,(车型1,速度,里程; 车型2,速度,里程;)
 | ||||
|     SYSSET_DECLARE(535, type_array2, ";", ",");      //全程车速达标要求(车型1,速度,里程; 车型2,速度,里程;)
 | ||||
|     SYSSET_DECLARE(541);                             //压非机动车道分解线立即评判 // 0  //2023-02-14增加
 | ||||
|     SYSSET_DECLARE(544, type_array, ",");            //真实学校区域项目号 配置学校区域的xmxh
 | ||||
|     SYSSET_DECLARE(549, type_array_int, ",");        //549参数:光照,雨量阈值,如:100,10
 | ||||
| @ -339,6 +342,7 @@ class JUDGE_API SysSetTable : public IDBTable | ||||
|         SYSSET_ASSIGN(414); | ||||
|         SYSSET_ASSIGN(415); | ||||
|         SYSSET_ASSIGN(418); | ||||
|         SYSSET_ASSIGN(419); | ||||
|         SYSSET_ASSIGN(421); | ||||
|         SYSSET_ASSIGN(425); | ||||
|         SYSSET_ASSIGN(426); | ||||
| @ -386,6 +390,8 @@ class JUDGE_API SysSetTable : public IDBTable | ||||
|         SYSSET_ASSIGN(530); | ||||
|         SYSSET_ASSIGN(531); | ||||
|         SYSSET_ASSIGN(533); | ||||
|         SYSSET_ASSIGN(534); | ||||
|         SYSSET_ASSIGN(535); | ||||
|         SYSSET_ASSIGN(541); | ||||
|         SYSSET_ASSIGN(544); | ||||
|         SYSSET_ASSIGN(549); | ||||
|  | ||||
| @ -358,7 +358,7 @@ void ExamCarSub2::dealJudgeExam() | ||||
|     //}
 | ||||
| 
 | ||||
|     //2.6.1)
 | ||||
|     calcDistance();  //距离计算
 | ||||
|     calcDistance(false, 0);  //距离计算
 | ||||
| 
 | ||||
|     //2.6.2) 监管判断
 | ||||
|     //函数是一个监管检查函数,这里我们先不考虑监管,我模拟一下这个函数的写法
 | ||||
|  | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -48,7 +48,7 @@ public:  //for IExamCarSub3 override | ||||
|     virtual bool itemsNotFinishExcept(ExamItemCode excludeItemNo) const override; | ||||
|     virtual bool itemsSomeExaming() const override; | ||||
|     virtual bool itemsSomeExaming2(ExamItemCode itemno) const override; | ||||
|     virtual bool isItemPassed(ExamItemCode ItemNo) const override { return m_ctl.PassedItem.find(ItemNo) != m_ctl.PassedItem.end();}; | ||||
|     virtual bool isItemPassed(ExamItemCode ItemNo) const override { return m_PassedItem.find(ItemNo) != m_PassedItem.end();}; | ||||
|     virtual bool isMarked(ExamItemCode ItemNo) const override; | ||||
|     virtual bool isMileage() const override; | ||||
|     virtual void setEnterItem(TKM3Item* item, bool isArtif=false) const override; | ||||
| @ -80,6 +80,9 @@ protected: | ||||
|     void dealItemNoIDEndItem(); | ||||
|     void dealItemNoIDEnd14Jjdw(); | ||||
| 
 | ||||
|     bool calcToDistanceArc(const TModelLine& Lxx, const TModelPolygon& poly, const Pointi& b1, const Pointi& pt, int& dm, bool cross=false); | ||||
|     bool calcToDistanceArc2(const TModelLine& Lxx, const TModelPolygon& area, const Pointi& b1, const Pointi& pt, int& dm, bool cross=false); | ||||
|     bool calcToDistanceLine(const TModelLine& Lxx, const std::vector<Pointi>& Pts, const Pointi& b1, const Pointi& pt, int& dm, bool cross=false); | ||||
|     //行驶方向,1正向行驶,-1逆向行驶
 | ||||
|     DriveDirType driveDirection(const TModelLine* lane); | ||||
| 
 | ||||
| @ -173,10 +176,12 @@ protected:  //A2C6-20250310 大车A2挂车新增加的方法 | ||||
|     void Calc_CheLunYaXian_Tail(int curRoadIndex, int curLaneIndex); | ||||
|     //形状线计算
 | ||||
|     void RTKJudge_SubItem_Tail(); | ||||
| 
 | ||||
| private: | ||||
|     ISub3JudgeItem* m_commItem = nullptr; | ||||
|     ISub3JudgeItem* m_curItem  = nullptr; | ||||
|     std::map<ExamItemCode, ISub3JudgeItem*> m_sub3Items; //科目三考试项目
 | ||||
|     std::set<ExamItemCode> m_PassedItem; //已考项目编号列表
 | ||||
|     int m_meshIndex = INVALID_INDEX; | ||||
|     int m_meshIndex_Tail = INVALID_INDEX; //A2C6-20250306 挂车所在的网格
 | ||||
| 
 | ||||
|  | ||||
| @ -335,7 +335,7 @@ bool ExamSensor::calcCarBody(TChuanGan* cg) | ||||
|         rcb.bumper_b = GpsMath::calcCenterPoint(ps_b[II(2)], ps_b[II(24)]); //保险杠中心点坐标(对于C1,C2,C5, 就是2点和24点的中点)
 | ||||
| 
 | ||||
|         TGpsInfo& gps = cg->real.gps; | ||||
|         if(gps.rtkEnabled && gps.valid())  //if(gps.rtkEnabled)
 | ||||
|         if(/*gps.rtkEnabled &&*/ gps.valid())  //if(gps.rtkEnabled)
 | ||||
|         { | ||||
|             int x = 0, y = 0; | ||||
|             GpsMath::calcEastAndNorthDistanceCM(m_basePoint, cur, m_basePoint.gc, x, y); | ||||
| @ -356,7 +356,7 @@ bool ExamSensor::calcCarBody(TChuanGan* cg) | ||||
|             rcb.b2_b_G = ps_b[II(64)];   //挂车GPS从天线
 | ||||
| 
 | ||||
|             TGpsInfo& gps2 = cg->real.gps2; | ||||
|             if(gps2.rtkEnabled && gps2.valid())  //if(gps.rtkEnabled)
 | ||||
|             if(/*gps2.rtkEnabled &&*/ gps2.valid())  //if(gps.rtkEnabled)
 | ||||
|             { | ||||
|                 int x = 0, y = 0; | ||||
|                 GpsMath::calcEastAndNorthDistanceCM(m_basePoint, cur2, m_basePoint.gc, x, y); | ||||
| @ -457,7 +457,7 @@ bool ExamSensor::calcCarBody(TChuanGan* cg) | ||||
|         rcb.b2_b_G = ps_b[II(40)];   //挂车GPS从天线
 | ||||
| 
 | ||||
|         TGpsInfo& gps = cg->real.gps; | ||||
|         if(gps.rtkEnabled && gps.valid())  //if(gps.rtkEnabled)
 | ||||
|         if(/*gps.rtkEnabled &&*/ gps.valid())  //if(gps.rtkEnabled)
 | ||||
|         { | ||||
|             int x = 0, y = 0; | ||||
|             GpsMath::calcEastAndNorthDistanceCM(m_basePoint, cur, m_basePoint.gc, x, y); | ||||
| @ -465,7 +465,7 @@ bool ExamSensor::calcCarBody(TChuanGan* cg) | ||||
|         } | ||||
| 
 | ||||
|         TGpsInfo& gps2 = cg->real.gps2; | ||||
|         if(gps2.rtkEnabled && gps2.valid())  //if(gps2.rtkEnabled)
 | ||||
|         if(/*gps2.rtkEnabled &&*/ gps2.valid())  //if(gps2.rtkEnabled)
 | ||||
|         { | ||||
|             int x = 0, y = 0; | ||||
|             GpsMath::calcEastAndNorthDistanceCM(m_basePoint, cur2, m_basePoint.gc, x, y); | ||||
|  | ||||
| @ -586,27 +586,49 @@ void IExamCar::doExamRealExam(Package* pkg) | ||||
|     //... ...
 | ||||
| } | ||||
| 
 | ||||
| int IExamCar::calcDistance() | ||||
| int IExamCar::calcDistance(bool mc, int X_McH) | ||||
| { | ||||
|     if(m_history->size() <= 1) | ||||
|     int a = 0; | ||||
|     if(mc && X_McH > 0) | ||||
|     { | ||||
|         return 0; | ||||
|         if(m_history->size() <= 1) | ||||
|         { | ||||
|             return 0; | ||||
|         } | ||||
|         //(当前脉冲-前一帧脉冲) / 百米脉冲 * 10000   单位cm
 | ||||
|         double ljmc = historySensor().ljmc; //要用浮点计算,否则计算出来都是0
 | ||||
|         double ljmc1 = historySensor(1).ljmc; | ||||
|         a = (ljmc-ljmc1) / X_McH * 10000; | ||||
|         switch(m_cg->move) | ||||
|         { | ||||
|         case moveForward:  m_disForward += a;  break; | ||||
|         case moveBackward: m_disBackward += a; break; | ||||
|         default: break; | ||||
|         } | ||||
|     } | ||||
|     const Pointi& h = historyGps(1).ai_gps; | ||||
|     const Pointi& c = historyGps().ai_gps; | ||||
|     if( (c.x == 0 && c.y == 0) || (h.x == 0 && h.y == 0) ) | ||||
|     else | ||||
|     { | ||||
|         return 0; | ||||
|     } | ||||
|     double x = h.x - c.x; | ||||
|     double y = h.y - c.y; | ||||
|     int a = std::round(std::sqrt(x*x + y*y)); | ||||
|     switch(m_cg->move) | ||||
|     { | ||||
|     case moveForward:  m_disForward += a;  break; | ||||
|     case moveBackward: m_disBackward += a; break; | ||||
|     default: break; | ||||
|         if(m_history->size() <= 1) | ||||
|         { | ||||
|             return 0; | ||||
|         } | ||||
|         const Pointi& h = historyGps(1).ai_gps; | ||||
|         const Pointi& c = historyGps().ai_gps; | ||||
|         if( (c.x == 0 && c.y == 0) || (h.x == 0 && h.y == 0) ) | ||||
|         { | ||||
|             return 0; | ||||
|         } | ||||
|         double x = h.x - c.x; | ||||
|         double y = h.y - c.y; | ||||
|         a = std::round(std::sqrt(x*x + y*y)); | ||||
|         switch(m_cg->move) | ||||
|         { | ||||
|         case moveForward:  m_disForward += a;  break; | ||||
|         case moveBackward: m_disBackward += a; break; | ||||
|         default: break; | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     m_cg->ai_ljjl_cm = m_disForward; | ||||
|     m_cg->ai_dcjl_cm = m_disBackward; | ||||
|     m_cg->ai_ljjl = m_disForward/100.0; | ||||
|  | ||||
| @ -138,7 +138,7 @@ public: | ||||
|     virtual void doExamRealExam(Package* pkg); | ||||
|     virtual void doExamNS3(Package* pkg){}; | ||||
|     //前进 后退 距离计算
 | ||||
|     virtual int calcDistance(); | ||||
|     virtual int calcDistance(bool mc, int X_McH); | ||||
| 
 | ||||
|     //当前系统时间(回放取的事GPS时间)
 | ||||
|     virtual int64 GetCurrentTime2() const; | ||||
|  | ||||
| @ -875,6 +875,15 @@ struct TSub3Item20Comm_XLG    //标准科目三综合评判 TKm3Itm20_XLG | ||||
|     int CGD_Nums = 0; //达到次高挡的次数
 | ||||
| 
 | ||||
|     bool rmndg2 = false; //无锡地区在发动机未启动点切换,提示启动发动机,启动发动机之后播报模拟灯光
 | ||||
|     struct TSub3SpeedDistance | ||||
|     { | ||||
|         int speed = 0; | ||||
|         int limit = 0; //单位米
 | ||||
|         int distance = 0; //单位米
 | ||||
|     }; | ||||
| 
 | ||||
|     std::map<int, TSub3SpeedDistance> SDs534; | ||||
|     std::map<int, TSub3SpeedDistance> SDs535; | ||||
| }; | ||||
| 
 | ||||
| struct TSub3Item20Comm_NS3  //新科目三
 | ||||
|  | ||||
| @ -140,7 +140,7 @@ std::string Sub2Judge00Dcrk::hintMessage() | ||||
|     //}
 | ||||
|     std::string desc = m_secondInverted == false ? JUDGE_UTF8S("@第一次入库@") : JUDGE_UTF8S("@第二次入库@"); | ||||
|     std::stringstream ss; | ||||
|     ss << desc; | ||||
|     ss << desc << "-" << m_stoppedControlLine; | ||||
|     return ss.str(); | ||||
| } | ||||
| 
 | ||||
| @ -650,6 +650,31 @@ JUDGE_STAGE_IMPL(Sub2Judge00Dcrk, Sub2DcrkStage9) | ||||
|         m_stage = Sub2DcrkStage10; //10出库-->车身未碰10
 | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     if(m_stoppedControlLine == L10) | ||||
|     { | ||||
|         if(cg->move == moveForward && cg1->move == moveForward) | ||||
|         { | ||||
|             //处理倒车入库同一个方向连倒两把扣分问题
 | ||||
|             TGPSLine line = m_model->LP3F8_8(); | ||||
|             if(pureCarTouchPairLine(line, {II(33), II(34)})) | ||||
|             { | ||||
|                 ENTER_ITEM_AND_MARK(JUDGE_MARK_ITEM_MUST_ONCE(MARK_SUB2_DCRK_01)); //add enter
 | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|     else if(m_stoppedControlLine == L11) | ||||
|     { | ||||
|         if(cg->move == moveForward && cg1->move == moveForward) | ||||
|         { | ||||
|             //处理倒车入库同一个方向连倒两把扣分问题
 | ||||
|             TGPSLine line = m_model->LP6F9_9(); | ||||
|             if(pureCarTouchPairLine(line, {II(33), II(34)})) | ||||
|             { | ||||
|                 ENTER_ITEM_AND_MARK(JUDGE_MARK_ITEM_MUST_ONCE(MARK_SUB2_DCRK_01)); //add enter
 | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| JUDGE_STAGE_IMPL(Sub2Judge00Dcrk, Sub2DcrkStage10) | ||||
|  | ||||
| @ -232,10 +232,13 @@ JUDGE_STAGE_IMPL(Sub2Judge03Cftc, Sub2CftcStage1) | ||||
|                 { | ||||
|                     const TGPSLines LS = {m_model->L34(),m_model->L45(),m_model->L56(),m_model->L36()}; | ||||
|                     const PointSets& body = m_car->carModel()->body(); //车身24点
 | ||||
|                     static constexpr int history = 2; | ||||
|                     static constexpr int history = 5; | ||||
|                     if(pureCarTouchSomeLines(LS, body, history) || | ||||
|                             pureCarTouchPairLines(LS, {II(3), II(15)}) || | ||||
|                             pureCarTouchPairLines(LS, {II(11), II(23)})) | ||||
|                             pureCarTouchPairLines(LS, {II(4), II(14)}) || | ||||
|                             pureCarTouchPairLines(LS, {II(11), II(23)}) || | ||||
|                             pureCarTouchPairLines(LS, {II(12), II(22)}) || | ||||
|                             pureCarTouchPairLines(LS, {II(1), II(13)})) | ||||
|                     { | ||||
|                         m_outLine = true; | ||||
|                         //ENTER_ITEM_AND_MARK(JUDGE_MARK_ITEM_MUST_ONCE(MARK_SUB2_CFTC_01)); //add enter
 | ||||
|  | ||||
| @ -104,10 +104,10 @@ void Sub3Judge01Sczb::dealJudgeItem() | ||||
|     //if(!m_car->rtkEnabled() || !m_car->rtkEnabled(1)) return;
 | ||||
| 
 | ||||
|     const std::string& s386 = TableSysSet->get386(); | ||||
|     if(s386 == "3") //无锡地区模式只要发动机启动了,点切换就上车准备自动完成播报模拟灯光
 | ||||
|     { | ||||
|         return; | ||||
|     } | ||||
|     //if(s386 == "3") //无锡地区模式只要发动机启动了,点切换就上车准备自动完成播报模拟灯光
 | ||||
|     //{
 | ||||
|     //    return;  //解除播报语音限制,由于无锡上车准备是人工评判,但是按超声波按钮要播报声音,验收检查会用到,考试不会用到, 1,"01" 扣分值要为0
 | ||||
|     //}
 | ||||
| 
 | ||||
|     //有这种考试模式,上车准备是外壳完成的,这种少数,兼容 windows是这种做法
 | ||||
|     const TStuInfo& stuInfo = m_car->stuInfo(); | ||||
|  | ||||
| @ -411,8 +411,8 @@ void Sub3Judge02Qbxx::Judge_QiBu_GuaCuoDang() | ||||
|     { | ||||
|         const TSensorInfo& sor = cg->real.sensor; | ||||
|         //小车1档起步, 大车1、2档起步
 | ||||
|         static const int gear = TableSysParm->findQiBuGear(m_car->carCode()); | ||||
| 
 | ||||
|         //static const int gear = TableSysParm->findQiBuGear(m_car->carCode());
 | ||||
|         static const int gear = m_car->getTCar()->StartSpeed; | ||||
| #if JUDGE_USE_INSPECT | ||||
|         if(sor.dw_plc > gear)  //无锡所用原始档位
 | ||||
|         { | ||||
|  | ||||
| @ -94,9 +94,7 @@ bool Sub3Judge03Zxxs::dealJudgeEnter() | ||||
|         m_itemv.Gps_Offset = 40; | ||||
|     } | ||||
| 
 | ||||
|     TTestCtl* ctl = m_car->getTTestCtl(); | ||||
|     //GP
 | ||||
|     m_itemv.Gps_Offset = m_itemv.Gps_Offset + ctl->RtkOffset; | ||||
|     m_itemv.Gps_Offset = m_itemv.Gps_Offset + tcar->RtkOffset; | ||||
|     m_itemv.Init_LJJL = cg->ai_ljjl; | ||||
|     m_exam->TestPro = ItemProFlagJudge; | ||||
|     //ToDo2:生成进项目事件
 | ||||
|  | ||||
| @ -1373,13 +1373,15 @@ void Sub3Judge11Kbtc::Judge_KBTC_YaXian() | ||||
|     { | ||||
|         const TGpsInfo& gps = m_car->historyGps(); | ||||
|         //靠边停车以右前、后轮判靠边距离(0-否 1-是)
 | ||||
|         TTestCtl* ctl = m_car->getTTestCtl(); | ||||
|         Max_JL0 = Max_JL0 - ctl->RtkOffset - std::round(gps.jdyz * 100) - std::round(gps.wdyz * 100); | ||||
|         Max_JL1 = Max_JL1 - ctl->RtkOffset - std::round(gps.jdyz * 100) - std::round(gps.wdyz * 100); | ||||
|         Max_JL2 = Max_JL2 - ctl->RtkOffset - std::round(gps.jdyz * 100) - std::round(gps.wdyz * 100); | ||||
|         int RtkOffset = m_car->getTCar()->RtkOffset; | ||||
|         int offset = RtkOffset + std::round(gps.jdyz*100) + std::round(gps.wdyz*100); | ||||
|         Max_JL0 -= offset; | ||||
|         Max_JL1 -= offset; | ||||
|         Max_JL2 -= offset; | ||||
| 
 | ||||
|         //20170724
 | ||||
|         if(Max_JL0 > 50 + m_itemv.kbtcwc && Max_JL1 > 50 + m_itemv.kbtcwc && Max_JL2 > 50 + m_itemv.kbtcwc) | ||||
|         int kbtcwc = 50 + m_itemv.kbtcwc; | ||||
|         if(Max_JL0 > kbtcwc && Max_JL1 > kbtcwc && Max_JL2 > kbtcwc) | ||||
|         { | ||||
|             if(m_itemv.dcykkb == 0) //大车夜考相关的参数
 | ||||
|             { | ||||
| @ -1521,13 +1523,15 @@ void Sub3Judge11Kbtc::Judge_KBTC_YaXian_Tail() | ||||
|     { | ||||
|         const TGpsInfo& gps2 = m_car->historyGps2(); | ||||
|         //靠边停车以右前、后轮判靠边距离(0-否 1-是)
 | ||||
|         TTestCtl* ctl = m_car->getTTestCtl(); | ||||
|         Max_JL0 = Max_JL0 - ctl->RtkOffset - std::round(gps2.jdyz * 100) - std::round(gps2.wdyz * 100); | ||||
|         Max_JL1 = Max_JL1 - ctl->RtkOffset - std::round(gps2.jdyz * 100) - std::round(gps2.wdyz * 100); | ||||
|         Max_JL2 = Max_JL2 - ctl->RtkOffset - std::round(gps2.jdyz * 100) - std::round(gps2.wdyz * 100); | ||||
|         int RtkOffset = m_car->getTCar()->RtkOffset; | ||||
|         int offset = RtkOffset + std::round(gps2.jdyz*100) + std::round(gps2.wdyz*100); | ||||
|         Max_JL0 -= offset; | ||||
|         Max_JL1 -= offset; | ||||
|         Max_JL2 -= offset; | ||||
| 
 | ||||
|         //20170724
 | ||||
|         if(Max_JL0 > 50 + m_itemv.kbtcwc && Max_JL1 > 50 + m_itemv.kbtcwc && Max_JL2 > 50 + m_itemv.kbtcwc) | ||||
|         int kbtcwc = 50 + m_itemv.kbtcwc; | ||||
|         if(Max_JL0 > kbtcwc && Max_JL1 > kbtcwc && Max_JL2 > kbtcwc) | ||||
|         { | ||||
|             if(m_itemv.dcykkb == 0) //大车夜考相关的参数
 | ||||
|             { | ||||
|  | ||||
| @ -86,41 +86,43 @@ void Sub3Judge12Lkdt::dealJudgeItem() | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     double MaxAngleChange = 0; | ||||
|     for(int i = 1; i < 500; i++) | ||||
|     if(m_exam->Gps_Itemno1 == 3) //穿越3点才判断角度 20250409
 | ||||
|     { | ||||
|         const TChuanGan* hisi = m_car->historyChuanGan(i); | ||||
|         if(hisi == nullptr) break; | ||||
| 
 | ||||
|         const TGpsInfo& gpsi = hisi->real.gps; | ||||
| 
 | ||||
|         if(!gpsi.rtkEnabled) break; | ||||
|         if (hisi->tkCnt <= m_itemv.Enter_TK)  break; | ||||
|         double a = gps.hxj - gpsi.hxj; | ||||
|         //处理越界问题
 | ||||
|         if(a > 300) | ||||
|         for(int i = 1; i < 500; i++) | ||||
|         { | ||||
|             a = a - 360; | ||||
|         } | ||||
|         else | ||||
|         { | ||||
|             if(a < -300) | ||||
|             const TChuanGan* hisi = m_car->historyChuanGan(i); | ||||
|             if(hisi == nullptr) break; | ||||
| 
 | ||||
|             const TGpsInfo& gpsi = hisi->real.gps; | ||||
| 
 | ||||
|             if(!gpsi.rtkEnabled) break; | ||||
|             if (hisi->tkCnt <= m_itemv.Enter_TK) break; | ||||
|             double a = gps.hxj - gpsi.hxj; | ||||
|             //处理越界问题
 | ||||
|             if(a > 300) | ||||
|             { | ||||
|                  a = a + 360; | ||||
|                 a = a - 360; | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 if(a < -300) | ||||
|                 { | ||||
|                     a = a + 360; | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         a = std::abs(a); | ||||
|         if(Tools::greater(a, MaxAngleChange)) | ||||
|         { | ||||
|             MaxAngleChange = a; | ||||
|         } | ||||
|             a = std::abs(a); | ||||
|             if(Tools::greater(a, MaxAngleChange)) | ||||
|             { | ||||
|                 MaxAngleChange = a; | ||||
|             } | ||||
| 
 | ||||
|         if(a > m_itemv.LuK_Zx_Deg && a < 210)  //20180830 -150
 | ||||
|         { | ||||
|             m_itemv.LuK_FXD_AngleOKFlag = true; | ||||
|             break; | ||||
|             if(a > m_itemv.LuK_Zx_Deg && a < 210)  //20180830 -150
 | ||||
|             { | ||||
|                 m_itemv.LuK_FXD_AngleOKFlag = true; | ||||
|                 break; | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|  | ||||
| @ -101,39 +101,42 @@ void Sub3Judge15Lkzz::dealJudgeItem() | ||||
|     } | ||||
| 
 | ||||
|     double MaxAngleChange = 0; | ||||
|     for(int i = 1; i < 500; i++) | ||||
|     if(m_exam->Gps_Itemno1 == 3)  //穿越3点才判断角度 20250409
 | ||||
|     { | ||||
|         const TChuanGan* hisi = m_car->historyChuanGan(i); | ||||
|         if(hisi == nullptr) break; | ||||
| 
 | ||||
|         const TGpsInfo& gpsi = hisi->real.gps; | ||||
| 
 | ||||
|         if(!gpsi.rtkEnabled) break; | ||||
|         if (hisi->tkCnt <= m_itemv.Enter_TK)  break; | ||||
|         double a = gps.hxj - gpsi.hxj; | ||||
|         //处理越界问题
 | ||||
|         if(a > 300) | ||||
|         for(int i = 1; i < 500; i++) | ||||
|         { | ||||
|             a = a - 360; | ||||
|         } | ||||
|         else | ||||
|         { | ||||
|             if(a < -300) | ||||
|             const TChuanGan* hisi = m_car->historyChuanGan(i); | ||||
|             if(hisi == nullptr) break; | ||||
| 
 | ||||
|             const TGpsInfo& gpsi = hisi->real.gps; | ||||
| 
 | ||||
|             if(!gpsi.rtkEnabled) break; | ||||
|             if (hisi->tkCnt <= m_itemv.Enter_TK) break; | ||||
|             double a = gps.hxj - gpsi.hxj; | ||||
|             //处理越界问题
 | ||||
|             if(a > 300) | ||||
|             { | ||||
|                  a = a + 360; | ||||
|                 a = a - 360; | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 if(a < -300) | ||||
|                 { | ||||
|                     a = a + 360; | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         a = std::abs(a); | ||||
|         if(Tools::greater(a, MaxAngleChange)) | ||||
|         { | ||||
|             MaxAngleChange = a; | ||||
|         } | ||||
|             a = std::abs(a); | ||||
|             if(Tools::greater(a, MaxAngleChange)) | ||||
|             { | ||||
|                 MaxAngleChange = a; | ||||
|             } | ||||
| 
 | ||||
|         if(a > m_itemv.LuK_Zx_Deg && a < 210)  //20180830 -150
 | ||||
|         { | ||||
|             m_itemv.LuK_FXD_AngleOKFlag = true; | ||||
|             break; | ||||
|             if(a > m_itemv.LuK_Zx_Deg && a < 210)  //20180830 -150
 | ||||
|             { | ||||
|                 m_itemv.LuK_FXD_AngleOKFlag = true; | ||||
|                 break; | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|  | ||||
| @ -99,39 +99,42 @@ void Sub3Judge16Lkyz::dealJudgeItem() | ||||
|     } | ||||
| 
 | ||||
|     double MaxAngleChange = 0; | ||||
|     for(int i = 1; i < 500; i++) | ||||
|     if(m_exam->Gps_Itemno1 == 3) //穿越3点才判断角度 20250409
 | ||||
|     { | ||||
|         const TChuanGan* hisi = m_car->historyChuanGan(i); | ||||
|         if(hisi == nullptr) break; | ||||
| 
 | ||||
|         const TGpsInfo& gpsi = hisi->real.gps; | ||||
| 
 | ||||
|         if(!gpsi.rtkEnabled) break; | ||||
|         if (hisi->tkCnt <= m_itemv.Enter_TK)  break; | ||||
|         double a = gps.hxj - gpsi.hxj; | ||||
|         //处理越界问题
 | ||||
|         if(a > 300) | ||||
|         for(int i = 1; i < 500; i++) | ||||
|         { | ||||
|             a = a - 360; | ||||
|         } | ||||
|         else | ||||
|         { | ||||
|             if(a < -300) | ||||
|             const TChuanGan* hisi = m_car->historyChuanGan(i); | ||||
|             if(hisi == nullptr) break; | ||||
| 
 | ||||
|             const TGpsInfo& gpsi = hisi->real.gps; | ||||
| 
 | ||||
|             if(!gpsi.rtkEnabled) break; | ||||
|             if (hisi->tkCnt <= m_itemv.Enter_TK) break; | ||||
|             double a = gps.hxj - gpsi.hxj; | ||||
|             //处理越界问题
 | ||||
|             if(a > 300) | ||||
|             { | ||||
|                 a = a + 360; | ||||
|                 a = a - 360; | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 if(a < -300) | ||||
|                 { | ||||
|                     a = a + 360; | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         a = std::abs(a); | ||||
|         if(Tools::greater(a, MaxAngleChange)) | ||||
|         { | ||||
|             MaxAngleChange = a; | ||||
|         } | ||||
|             a = std::abs(a); | ||||
|             if(Tools::greater(a, MaxAngleChange)) | ||||
|             { | ||||
|                 MaxAngleChange = a; | ||||
|             } | ||||
| 
 | ||||
|         if(a > m_itemv.LuK_Zx_Deg && a < 210)  //20180830 -150
 | ||||
|         { | ||||
|             m_itemv.LuK_FXD_AngleOKFlag = true; | ||||
|             break; | ||||
|             if(a > m_itemv.LuK_Zx_Deg && a < 210)  //20180830 -150
 | ||||
|             { | ||||
|                 m_itemv.LuK_FXD_AngleOKFlag = true; | ||||
|                 break; | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|  | ||||
| @ -24,9 +24,6 @@ bool Sub3Judge20Comm::dealJudgeEnter() | ||||
| void Sub3Judge20Comm::dealJudgeItem() | ||||
| { | ||||
|     HELP_COST_TIME(""); | ||||
|     const TChuanGan* cg = m_car->historyChuanGan(); | ||||
|     const TGpsInfo& gps = cg->real.gps; | ||||
|     const TSensorInfo& sor = cg->real.sensor; | ||||
| 
 | ||||
|     if(!m_CSHItmv20_Flag) | ||||
|     { | ||||
| @ -36,53 +33,27 @@ void Sub3Judge20Comm::dealJudgeItem() | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     const TChuanGan* cg = m_car->historyChuanGan(); | ||||
|     const TSensorInfo& sor = cg->real.sensor; | ||||
|     //更新脚刹车距离
 | ||||
|     if(sor.jsc == SYES) | ||||
|     { | ||||
|         m_car->setPub_JSC_JL(cg->ai_ljjl); | ||||
|     } | ||||
| 
 | ||||
|     //更新累计用时 yhyflag
 | ||||
|     // if(gps.sj != 0 && m_car->getStartTime() != 0)
 | ||||
|     // {
 | ||||
|     //   Tds.LastTime := SecondsBetween(cg.ai_gps_TM, Tds.StartTime);  //Tds.LastTime
 | ||||
|     // }
 | ||||
| 
 | ||||
|     if(m_car->historyCount() <= 2*FRAMES_PER_SECOND+2) return; //必须收满2秒数据
 | ||||
|     if(sor.dw >= 4 && sor.dw != 9 && gps.sd >= 10) | ||||
|     { | ||||
|         m_itemvXLG.CGD_Nums = m_itemvXLG.CGD_Nums + 1; | ||||
|     } | ||||
| 
 | ||||
|     //Step0-4设置发动机怠速
 | ||||
|     Set_FDJ_DS(); | ||||
|     //Step0-5 座椅检查(贵州),按贵州翻译即可
 | ||||
|     doCheck_ZuoYi(); | ||||
|     //Step0-3触发起步项目
 | ||||
|     if(m_itemvCJH.qbjxmsj == 0 || (m_itemvCJH.qbjxmsj != 0 && m_car->rtkEnabled() && m_car->rtkEnabled(1) && m_car->rtkEnabled(2))) | ||||
|     { | ||||
|         CallQiBu(m_itemvCJH.qbsjcs); | ||||
|     } | ||||
|     CallQiBu(); | ||||
|     //自动靠边停车计算
 | ||||
|     Call_Auto_KBTC(); | ||||
|     //Step0-2触发模拟灯光
 | ||||
| 
 | ||||
|     CallMoNiDengGuang();  //240710
 | ||||
|     //if(!m_car->isReplay()) //(Data_Replay.Kind = 2) then //杨海洋实际考试模式(就是说非回放模式的)
 | ||||
|     //{
 | ||||
|     //    CallMoNiDengGuang(); //yhyflag  
 | ||||
|     //}
 | ||||
|     //else
 | ||||
|     //{
 | ||||
|     //    //回放相关的
 | ||||
|     //    if(sor.rmndg == SYES)
 | ||||
|     //    {
 | ||||
|     //        TKM3Item* item = m_car->findExamItem(Sub3ItemType41Mndg);
 | ||||
|     //        if(item && item->TestPro == ItemProFlagIdle)
 | ||||
|     //        {
 | ||||
|     //            m_car->setEnterItem(item);
 | ||||
|     //        }
 | ||||
|     //    }
 | ||||
|     //}
 | ||||
|     //240710 触发模拟灯光
 | ||||
|     CallMoNiDengGuang(); | ||||
| 
 | ||||
|     //1、溜车评判
 | ||||
|     //Judge_LiuChe(); //移到起步专项里评判 20240730
 | ||||
| @ -140,12 +111,15 @@ void Sub3Judge20Comm::dealJudgeItem() | ||||
|     //23、使用挡位与车速长时间不匹配,造成车辆发动机转速过高或过低(发动机转速〉2500转或〈900转,且时间大于30秒)扣100分
 | ||||
|     Judge_DangWei_CS_ZS(); | ||||
| 
 | ||||
|     Judge_Sysset534(); | ||||
|     Judge_Sysset535(false); | ||||
| 
 | ||||
|     //24、全程必须达到次高挡位 、全程必须次高挡达到5秒
 | ||||
|     Judge_CiGaoDang(); | ||||
| 
 | ||||
|     //逆向行驶评判
 | ||||
|     //JudgeDriveDirection();
 | ||||
|     //////////////////////////////////////////////////////////////////////////////
 | ||||
| 
 | ||||
|     //附加评判(比如:非法掉头、超速SystemParm8、夜间行驶)
 | ||||
|     Judge_Extra(); | ||||
| 
 | ||||
| @ -170,6 +144,43 @@ void Sub3Judge20Comm::Init_ZongHe() | ||||
|     m_itemvXLG = TSub3Item20Comm_XLG(); | ||||
|     m_itemvNS3 = TSub3Item20Comm_NS3(); | ||||
| 
 | ||||
|     const std::vector<std::vector<std::string>>& s534 = TableSysSet->asArray2_534(); | ||||
|     const std::vector<std::vector<std::string>>& s535 = TableSysSet->asArray2_535(); | ||||
| 
 | ||||
|     for(size_t i = 0 ; i < s534.size(); i++) | ||||
|     { | ||||
|         const std::vector<std::string>& ss = s534[i]; | ||||
|         if(ss.size() >= 3) | ||||
|         { | ||||
|             if(name2ExamCarType(ss[0].c_str()) == m_carType) | ||||
|             { | ||||
|                 int speed = std::atoi(ss[1].c_str()); | ||||
|                 int limit = std::atoi(ss[2].c_str()); | ||||
|                 auto& item = m_itemvXLG.SDs534[speed]; | ||||
|                 item.speed = speed; | ||||
|                 item.limit = limit; | ||||
|                 item.distance = 0; | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     for(size_t i = 0 ; i < s535.size(); i++) | ||||
|     { | ||||
|         const std::vector<std::string>& ss = s535[i]; | ||||
|         if(ss.size() >= 3) | ||||
|         { | ||||
|             if(name2ExamCarType(ss[0].c_str()) == m_carType) | ||||
|             { | ||||
|                 int speed = std::atoi(ss[1].c_str()); | ||||
|                 int limit = std::atoi(ss[2].c_str()); | ||||
|                 auto& item = m_itemvXLG.SDs535[speed]; | ||||
|                 item.speed = speed; | ||||
|                 item.limit = limit; | ||||
|                 item.distance = 0; | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     const TChuanGan* cg = m_car->historyChuanGan(); | ||||
|     const TSensorInfo& sor = cg->real.sensor; | ||||
|     const std::string& ksdd = TableSysSet->get211(); | ||||
| @ -1004,8 +1015,15 @@ void Sub3Judge20Comm::CallMoNiDengGuang() | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| void Sub3Judge20Comm::CallQiBu(int qbsj) | ||||
| void Sub3Judge20Comm::CallQiBu() | ||||
| { | ||||
|     bool condition = (m_itemvCJH.qbjxmsj == 0 || | ||||
|                       (m_itemvCJH.qbjxmsj != 0 && m_car->rtkEnabled() && m_car->rtkEnabled(1) && m_car->rtkEnabled(2))); | ||||
|     if(!condition) | ||||
|     { | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     const TChuanGan* cg = m_car->historyChuanGan(); | ||||
|     const std::string& ksdd = TableSysSet->get211(); | ||||
| 
 | ||||
| @ -1029,7 +1047,7 @@ void Sub3Judge20Comm::CallQiBu(int qbsj) | ||||
|     } | ||||
|     //20171107
 | ||||
| 
 | ||||
|     int k = qbsj * 5; | ||||
|     int k = m_itemvCJH.qbsjcs * 5; | ||||
|     for(int i = 1; i <= k; i++) | ||||
|     { | ||||
|         TChuanGan* his = m_car->historyChuanGan(i); | ||||
| @ -5510,9 +5528,65 @@ void Sub3Judge20Comm::Judge_DangWei_CS_ZS() | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| void Sub3Judge20Comm::Judge_Sysset534() | ||||
| { | ||||
|     const TChuanGan* cg = m_car->historyChuanGan(); | ||||
|     const TChuanGan* his1 = m_car->historyChuanGan(1); | ||||
|     for(auto it = m_itemvXLG.SDs534.begin(); it != m_itemvXLG.SDs534.end(); ++it) | ||||
|     { | ||||
|         auto& v = it->second; | ||||
|         if(cg->real.gps.sd < v.speed) | ||||
|         { | ||||
|             v.distance += (cg->ai_ljjl_cm - his1->ai_ljjl_cm); | ||||
|         } | ||||
| 
 | ||||
|         if(v.distance > v.limit*100) | ||||
|         { | ||||
|             JUDGE_MARK_SUB3(20, "46", true); | ||||
|         } | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| void Sub3Judge20Comm::Judge_Sysset535(bool timing) | ||||
| { | ||||
|     if(!timing) | ||||
|     { | ||||
|         const TChuanGan* cg = m_car->historyChuanGan(); | ||||
|         const TChuanGan* his1 = m_car->historyChuanGan(1); | ||||
|         for(auto it = m_itemvXLG.SDs535.begin(); it != m_itemvXLG.SDs535.end(); ++it) | ||||
|         { | ||||
|             auto& v = it->second; | ||||
|             if(cg->real.gps.sd > v.speed) | ||||
|             { | ||||
|                 v.distance += (cg->ai_ljjl_cm - his1->ai_ljjl_cm); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|     else | ||||
|     { | ||||
|         for(auto it = m_itemvXLG.SDs535.begin(); it != m_itemvXLG.SDs535.end(); ++it) | ||||
|         { | ||||
|             auto& v = it->second; | ||||
|             if(v.distance < v.limit*100) | ||||
|             { | ||||
|                 JUDGE_MARK_SUB3(20, "50", true); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| //24、全程次高挡评判
 | ||||
| void Sub3Judge20Comm::Judge_CiGaoDang() | ||||
| { | ||||
|     TChuanGan* cg = m_car->historyChuanGan(); | ||||
|     const TSensorInfo& sor = cg->real.sensor; | ||||
|     const TGpsInfo& gps = cg->real.gps; | ||||
| 
 | ||||
|     if(sor.dw >= 4 && sor.dw != 9 && gps.sd >= 10) | ||||
|     { | ||||
|         m_itemvXLG.CGD_Nums = m_itemvXLG.CGD_Nums + 1; | ||||
|     } | ||||
| 
 | ||||
|     //按照军华说的 在行驶距离达到的实际判断全程次高档 20240731
 | ||||
|     //301 第3个^参数 1:达到行驶里程 非1靠边停车开始前 20240805
 | ||||
|     bool timing = false; //次高档时机
 | ||||
| @ -5557,6 +5631,8 @@ void Sub3Judge20Comm::Judge_CiGaoDang() | ||||
|         { | ||||
|             JUDGE_MARK_SUB3(14, "04", true); | ||||
|         } | ||||
| 
 | ||||
|         Judge_Sysset535(true); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -106,7 +106,7 @@ protected: | ||||
|     //加载模拟灯光项目
 | ||||
|     void CallMoNiDengGuang(); | ||||
|     //调用起步
 | ||||
|     void CallQiBu(int qbsj = 5); | ||||
|     void CallQiBu(); | ||||
| 
 | ||||
|     //=======================================
 | ||||
|     //1、溜车评判 //移到起步专项里评判 20240730
 | ||||
| @ -193,6 +193,12 @@ protected: | ||||
|     //23、挡位与车速、转速不匹配
 | ||||
|     void Judge_DangWei_CS_ZS(); | ||||
| 
 | ||||
|     //低于设置速度累计行驶大于设置里程,不合格(车型1,速度,里程; 车型2,速度,里程;)
 | ||||
|     void Judge_Sysset534(); | ||||
| 
 | ||||
|     //全程车速达标要求(车型1,速度,里程; 车型2,速度,里程;)
 | ||||
|     void Judge_Sysset535(bool timing); | ||||
| 
 | ||||
|     //24、全程次高挡评判
 | ||||
|     void Judge_CiGaoDang(); | ||||
| 
 | ||||
|  | ||||
| @ -283,7 +283,7 @@ JUDGE_C_API BoardType name2BoardType(const char* name); | ||||
| #define EnumMakeGpsStatus(declare) \ | ||||
|     declare(gpsStatusINVALID,      "----",         JUDGE_UTF8S("无效(数据异常)")) \ | ||||
|     declare(gpsStatusSINGLE,       "SINGLE",       JUDGE_UTF8S("单点解(收星数过低10米以内)***前置机没发差分改帧数给后置机")) \ | ||||
|     declare(gpsStatusPSRDIFF,      "PSRDIFF",      JUDGE_UTF8S("伪距解(没见过这种状态3米以内)没收到差分改正数?")) \ | ||||
|     declare(gpsStatusPSRDIFF,      "PSRDIFF",      JUDGE_UTF8S("伪距解(没见过这种状态3米以内)后置机没收到差分改正数?")) \ | ||||
|     declare(gpsStatusANGLE,        "**ANGLE**",    JUDGE_UTF8S("**角度差分状态**?")) \ | ||||
|     declare(gpsStatusNARROW_INT,   "NARROW_INT",   JUDGE_UTF8S("固定解(正常状态0.02米以内)")) \ | ||||
|     declare(gpsStatusNARROW_FLOAT, "NARROW_FLOAT", JUDGE_UTF8S("浮点解(有遮挡物0.5米以内)")) | ||||
|  | ||||
| @ -111,3 +111,14 @@ bool TMarkRule::is_agree(const nlohmann::json& jsonn, const char* param) | ||||
|     } | ||||
|     return true; | ||||
| } | ||||
| 
 | ||||
| bool TDBCarInfo::is_agree(const nlohmann::json& jsonn, const char* param) | ||||
| { | ||||
|     if(JUDGE_STRING(X_MCH) == param) | ||||
|     { | ||||
|         bool agree = jsonn.contains(param); | ||||
|         if(!agree) {logwarning("TDBCarInfo missing param 'X_MCH'.");} | ||||
|         return agree; | ||||
|     } | ||||
|     return true; | ||||
| } | ||||
|  | ||||
| @ -258,16 +258,19 @@ struct TDBCarInfo | ||||
|     std::string CARID;    //考车ID
 | ||||
|     std::string IPADDR;   //IP地址
 | ||||
|     std::string CARCLASS; //考车名称,比如:桑塔纳、新捷达
 | ||||
|     std::string X_MCH;    //百米脉冲 2025-04-02 新增
 | ||||
|     std::string KSCX;     //考试车型,比如:C1,C2
 | ||||
|     std::string CARNAME;  //预留
 | ||||
|     std::string FLAG;     //预留
 | ||||
|     std::string BK1;      //预留
 | ||||
|     std::string BK2;      //预留
 | ||||
| 
 | ||||
|     bool is_agree(const nlohmann::json& jsonn, const char* param); | ||||
|     JUDGE_JSON_DEFINE(TDBCarInfo, | ||||
|                                CARID, | ||||
|                                IPADDR, | ||||
|                                CARCLASS, | ||||
|                                X_MCH, | ||||
|                                KSCX, | ||||
|                                CARNAME, | ||||
|                                FLAG, | ||||
| @ -466,7 +469,7 @@ struct TStuInfo | ||||
|     //bool nitem1   = false;  //JG_Not_Item1_Flag 不需要考上车准备(监管)免考
 | ||||
|     //bool nitem41  = false;  //JG_Not_Item_41_Flag 不需要考模拟灯光(监管)免考
 | ||||
|     bool mfxx     = false;  //满分学习学员标志  ManFenXueXi_Flag
 | ||||
|     bool mfxxn    = false;  //满分学习不扣分标志 ManFenXueXiNotKouFenFlag
 | ||||
|     //bool mfxxn    = false;  //满分学习不扣分标志 ManFenXueXiNotKouFenFlag
 | ||||
| 
 | ||||
|     bool zeng     = false;  //增驾模式标志 true增驾 false非增驾
 | ||||
| 
 | ||||
| @ -507,7 +510,7 @@ struct TStuInfo | ||||
|                                //nitem1,
 | ||||
|                                //nitem41,
 | ||||
|                                mfxx, | ||||
|                                mfxxn, | ||||
|                                //mfxxn,
 | ||||
|                                zeng); | ||||
| 
 | ||||
| }; | ||||
| @ -1401,6 +1404,7 @@ struct TCar | ||||
| { | ||||
|     TCar() { } | ||||
| 
 | ||||
|     int                 X_McH = 0; //百米脉冲值(杭州竟然用到这玩意)优先carinfo的
 | ||||
|     int                 StartSpeed = 0; //起步档位
 | ||||
|     int                 AnQuanDai = 0; //安全带:0-不判 1-判保险带 2-气压
 | ||||
|     int                 Test_Sum = 0; //考试项目总数
 | ||||
| @ -1443,13 +1447,22 @@ struct TCar | ||||
|     int                 CSBType = 0; //20171113 超声波模式
 | ||||
|     std::string         DC_YK_Must; //夜考项目 20180301
 | ||||
|     std::string         MFXX_KSXM;    //满分学习考试项目
 | ||||
|     std::string         MFXX_Parm;    //满分学习参数
 | ||||
|     int                 MFXX_XSJL = 0;   //满分学习行驶里程
 | ||||
|     bool                MFXX_Mark = false; //满分学习是否电子评判自动扣分
 | ||||
|     //std::string       MFXX_Parm;    //满分学习参数
 | ||||
| 
 | ||||
|     std::string         XSJL_Parm; | ||||
| 
 | ||||
|     //档位转速比 2014111
 | ||||
|     struct TCarZsBl { int CarZsBmin = -1; int CarZsBMax = -1; }; | ||||
|     std::array<TCarZsBl, 7> DwZsBl; //20141111 档位转速比 档位转速比  array[1..5]
 | ||||
|     bool                    ZDB_Flag = false; | ||||
| 
 | ||||
|     std::string             MustTest_List; //必考项目列表 业务写死,用不到了
 | ||||
| 
 | ||||
|     int                    RtkOffset = 0; | ||||
|     int                    MaxR = 0, MinR = 0; //最大及最小GPS搜索范围CM
 | ||||
| 
 | ||||
|     //********************以下目前没用到*******************
 | ||||
| /*
 | ||||
|     //std::string           CarTypeName; //车型名称 大货 对应carinfo表CARCLASS字段
 | ||||
| @ -1464,7 +1477,7 @@ struct TCar | ||||
|     int                     Stop_TC_ClrJZ = 0; //已停车,多少个plc周期(200MS)内无脉冲,则清除rec_QJ_LJMC,rec_HT_LJMC
 | ||||
|     int                     Stop_PanDuan = 0; //判断多少个plc周期(200MS)内无脉冲,则表示停车
 | ||||
|     int                     DeadDirect = 0; //打死方向的判断值
 | ||||
|     //std::string           MustTest_List; //必考项目列表
 | ||||
| 
 | ||||
|     double                  fdjds_ddbl = 0.0, fdjds_ddbl_gd = 0.0 ; //抖动时发动机怠速比例    fdjds_ddbl_gd 高档怠速比例
 | ||||
|     double                  plc_cs_X = 0.0; //PLC的车速系数
 | ||||
|     std::string             ASize; //车型轮廓
 | ||||
| @ -1505,9 +1518,7 @@ struct TTestCtl | ||||
| { | ||||
|     int64                  ZXD_KSSJ_TK = 0;  //转向灯考试时间
 | ||||
|     bool                   ZXD_GuanBi = false; //转向灯关闭标记
 | ||||
|     std::set<ExamItemCode> PassedItem; //std::string PassedItem; //已考项目编号列表
 | ||||
|     int                    MaxR = 0, MinR = 0; //最大及最小GPS搜索范围CM
 | ||||
|     int                    RtkOffset = 0; | ||||
|     //std::set<ExamItemCode> PassedItem; //已考项目编号列表
 | ||||
|     bool                   IsPassItem14 = false; //加减挡拉是否考过 20170117
 | ||||
|     int                    JianSuLeiXing = 0; //20171007减速类型
 | ||||
|     int                    LianXuBianDaoKind = 0; //20171008 连续变更车道方式 0:abc 1:aba和abc都判
 | ||||
|  | ||||
| @ -66,4 +66,3 @@ add_subdirectory(${CMAKE_SOURCE_DIR}/test/test_sdk) | ||||
| add_subdirectory(${CMAKE_SOURCE_DIR}/test/test_dll) | ||||
| add_subdirectory(${CMAKE_SOURCE_DIR}/test/test_lib) | ||||
| add_subdirectory(${CMAKE_SOURCE_DIR}/test/test_c) | ||||
| #add_subdirectory(${CMAKE_SOURCE_DIR}/test/test_rtsp) | ||||
|  | ||||
| @ -880,10 +880,15 @@ TEST_F(TestJudge, test_sub3_car_check_data) | ||||
|     carInfo += writeFmt("CSBType", car->CSBType); | ||||
|     carInfo += writeFmt("DC_YK_Must", car->DC_YK_Must); | ||||
|     carInfo += writeFmt("MFXX_KSXM", car->MFXX_KSXM); | ||||
|     carInfo += writeFmt("MFXX_Parm", car->MFXX_Parm); | ||||
|     carInfo += writeFmt("MFXX_Mark", car->MFXX_Mark); | ||||
|     //carInfo += writeFmt("MFXX_Parm", car->MFXX_Parm);
 | ||||
|     carInfo += writeFmt("DwZsBl", car->DwZsBl); | ||||
|     carInfo += writeFmt("ZDB_Flag", car->ZDB_Flag); | ||||
| 
 | ||||
|     carInfo += writeFmt("RtkOffset", car->RtkOffset); | ||||
|     carInfo += writeFmt("MaxR", car->MaxR); | ||||
|     carInfo += writeFmt("MinR", car->MinR); | ||||
| 
 | ||||
| /*
 | ||||
|     carInfo += writeFmt("CarTypeName", car->CarTypeName); | ||||
|     carInfo += writeFmt("CarTypeSystemParmNo", car->CarTypeSystemParmNo); | ||||
| @ -931,11 +936,8 @@ TEST_F(TestJudge, test_sub3_car_check_data) | ||||
|     carInfo += writeFmt("DW_change", car->DW_change); | ||||
| */ | ||||
|     std::string ctlInfo; | ||||
|     ctlInfo += writeFmt("PassedItem", ctl->PassedItem); | ||||
|     ctlInfo += writeFmt("MaxR", ctl->MaxR); | ||||
|     ctlInfo += writeFmt("MinR", ctl->MinR); | ||||
|     //ctlInfo += writeFmt("PassedItem", ctl->PassedItem);
 | ||||
|     ctlInfo += writeFmt("Gps_St", ctl->Gps_St); | ||||
|     ctlInfo += writeFmt("RtkOffset", ctl->RtkOffset); | ||||
|     //ctlInfo += writeFmt("KSDD", ctl->KSDD);
 | ||||
|     ctlInfo += writeFmt("IsPassItem14", ctl->IsPassItem14); | ||||
|     ctlInfo += writeFmt("JianSuLeiXing", ctl->JianSuLeiXing); | ||||
|  | ||||
| @ -265,14 +265,6 @@ bool ReplayWrapper::replayTrackTypeInitExam(const TTrackData::Ptr& data) | ||||
|         return false; | ||||
|     } | ||||
| 
 | ||||
| #if JUDGE_USE_TSUB3T | ||||
|     std::string cartype = "A2"; | ||||
|     std::string filepath = "/home/duolun/work/yhy/harmony/cpp/model/test_model_enc/"; | ||||
|     info.carmodel = Tools::readFileText(filepath + cartype + ".txt"); | ||||
|     info.kscx = cartype; | ||||
|     strInit = XParser::toAny(info); | ||||
| #endif | ||||
| 
 | ||||
|     if(!replayCheckSdkVersion(info.sdkver)) | ||||
|     { | ||||
|         return false; | ||||
| @ -370,36 +362,6 @@ void ReplayWrapper::replayTrackTypeRealExam(const TTrackData::Ptr& data) | ||||
| { | ||||
|     std::string strReal(data->data); | ||||
| 
 | ||||
| #if JUDGE_USE_TSUB3T | ||||
|     static const TGPSPoint p37(103.841274135,31.012432248,230.955,0,0); | ||||
|     static const TGPSPoint p38(103.841286701451,31.0124322861895,230.955,1.20004482295139,89.7968345127514); | ||||
|     static const TGPSPoint p39(103.841279465,31.012412912,230.955,0,0); | ||||
|     static const TGPSPoint p40(103.841279443108,31.0124020886131,230.955,1.20003086096901,180.099325685847); | ||||
|     double jd1 = p39.jd - p37.jd; | ||||
|     double wd1 = p39.wd - p37.wd; | ||||
|     //double jd2 = p40.jd - p38.jd;
 | ||||
|     //double wd2 = p40.wd - p38.wd;
 | ||||
|     TRealExam info; | ||||
|     if(!XParser::fromAny(strReal, info)) | ||||
|     { | ||||
|         logerror("replayTrackTypeRealExam parser error."); | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     info.gps2 = info.gps; | ||||
| 
 | ||||
|     ExamCarType cartype = replayExamCarType(); | ||||
|     if(IS_A2(cartype)) | ||||
|     { | ||||
|         info.gps.hxj -= 90; | ||||
|     } | ||||
|     else if(IS_A1(cartype)) | ||||
|     { | ||||
| 
 | ||||
|     } | ||||
|     strReal = XParser::toAny(info); | ||||
| #endif | ||||
| 
 | ||||
|     int codeValue = examJudgeRealExam(strReal.c_str(), strReal.length()); | ||||
|     TASSERT(codeValue == codeSuccess, ""); | ||||
| 
 | ||||
|  | ||||
| @ -33,6 +33,12 @@ export default class ServiceExtImpl extends IdlServiceExtStub { | ||||
|         console.log("lixiao error", JSON.stringify(err)) | ||||
|       }) | ||||
|     }).catch(err => { | ||||
|       callback(0, JSON.stringify({ | ||||
|         code: 1, | ||||
|         data: JSON.stringify({ | ||||
|           code: 2300007 | ||||
|         }) | ||||
|       })); | ||||
|       console.log("lixiao paste error", JSON.stringify(err)) | ||||
|     }) | ||||
|   } | ||||
|  | ||||
| @ -26,7 +26,7 @@ export const GlobalConfig={ | ||||
|     //济南
 | ||||
|     jn:{ | ||||
|       km2:[], | ||||
|       km3:['2023.12.13.01','2023.09.30.1'] | ||||
|       km3:['2025.04.16.01','2023.09.30.1'] | ||||
|     }, | ||||
|     //洛阳
 | ||||
|     ly:{ | ||||
|  | ||||
| @ -8,7 +8,7 @@ import { TempLogger } from '../common/utils/TempLogger'; | ||||
| import DB from '../common/database/DbSql'; | ||||
| import { initTable } from '../common/service/initable'; | ||||
| import Want from '@ohos.app.ability.Want'; | ||||
| import { examPeerOccupy } from '../pages/judgeSDK/api'; | ||||
| import { examJudgeVersion, examPeerOccupy } from '../pages/judgeSDK/api'; | ||||
| 
 | ||||
| export default class EntryAbility extends UIAbility { | ||||
|   async onCreate(want, launchParam) { | ||||
| @ -55,7 +55,7 @@ export default class EntryAbility extends UIAbility { | ||||
|     // globalThis.judgeVersion ='2024.08.24.1' | ||||
|     // globalThis.version ='2023.12.13.01'; | ||||
|     globalThis.version = GlobalConfig.version.jn.km3[0]; | ||||
|     globalThis.judgeVersion = GlobalConfig.version.jn.km3[1]; | ||||
|     globalThis.judgeVersion = await examJudgeVersion(); | ||||
|     globalThis.tcpSendNum = 0 | ||||
|     globalThis.videoVersion = '1.0' | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user