Browse Source

fix merge bug

researchman 7 years ago
parent
commit
7d85c958a2
22 changed files with 383 additions and 1728 deletions
  1. 0 262
      Card.cpp
  2. 0 45
      Card.h
  3. 0 2
      LogSetting.h
  4. 1 0
      ProcessRemodule.cpp
  5. 1 2
      QueueStrManager.h
  6. 1 1
      SyncTime/SyncManager.h
  7. 0 1
      YAServer.h
  8. 337 1324
      YAServerDlg.cpp
  9. 0 4
      YAServerDlg.h
  10. 5 2
      algorithm/Fit.h
  11. 6 1
      algorithm/FittingPosition.h
  12. 2 7
      classdef.cpp
  13. 18 21
      classdef.h
  14. 2 9
      constdef.h
  15. 1 3
      def.h
  16. 2 2
      locate_algorithm.cpp
  17. 0 35
      locate_algorithm.h
  18. 0 1
      log_def.h
  19. 5 1
      mylog/MyLog.h
  20. 0 1
      mylog/log_module.h
  21. 1 1
      tdoa/TDOAFunctor.h
  22. 1 3
      uwb_msg_def.h

+ 0 - 262
Card.cpp

@@ -1,262 +0,0 @@
-#include "StdAfx.h"
-#include "Card.h"
-
-
-CCard::CCard(void)
-{
-}
-
-
-CCard::~CCard(void)
-{
-}
-
-void CCard::getCordinate()
-{
-	//#include "stdio.h" 
-#include "stdlib.h" 
-#include <math.h> 
-	//坐标 
-	double ax,ay,bx,by,cx,cy,zx,zy; 
-	//距离 
-	double la,lb,lc; 
-	double cx1,cy1,cx2,cy2,cx3,cy3,cx4,cy4; 
-	int main(void) 
-	{ 
-		int i = 0,j = 0,n = 0; 
-		int okflag = 0; 
-		int err = 0; 
-		int aberr = 0; 
-		int acerr = 0; 
-		int abcerr = 0; 
-		int len; 
-		int abrequery = 0; 
-		int acrequery = 0; 
-		int requery1 = 0; 
-		int loopnum = 1; 
-		int option = 0; 
-		double cax,cay,cbx,cby,ccx,ccy; 
-		double cax_abeyance1[6000],cay_abeyance1[6000]; 
-		double cbx_abeyance1[6000],cby_abeyance1[6000]; 
-		double ccx_abeyance1[6000],ccy_abeyance1[6000]; 
-		double cabx_abeyance1[10],caby_abeyance1[10],cabx_abeyance2[10],caby_abeyance2[10]; 
-		double cacx_abeyance1[10],cacy_abeyance1[10],cacx_abeyance2[10],cacy_abeyance2[10]; 
-		//遍历圆周上所有点 
-		printf("use 'Enter' to divide x y\n"); 
-		printf("input A coordinate:\n"); 
-		scanf("%lf%lf",&ax,&ay); 
-		if((ax > 1000)||(bx > 1000)) 
-		{ 
-			printf("figure is too big! input A coordinate again:\n"); 
-			scanf("%lf%lf",&ax,&ay); 
-		} 
-		printf("input B coordinate:\n"); 
-		scanf("%lf%lf",&bx,&by); 
-		if((bx > 1000)||(bx > 1000)) 
-		{ 
-			printf("figure is too big! input B coordinate again:\n"); 
-			scanf("%lf,%lf",&bx,&by);   
-		} 
-		printf("input C coordinate:\n"); 
-		scanf("%lf%lf",&cx,&cy); 
-		if((cx > 1000)||(cx > 1000)) 
-		{ 
-			printf("figure is too big! input C coordinate again:\n"); 
-			scanf("%lf%lf",&cx,&cy); 
-		} 
-		printf("input distance from A to Z:\n"); 
-		scanf("%lf",&la); 
-		if(la > 1000) 
-		{ 
-			printf("figure is too big! inputdistance from A to Z again:\n"); 
-			scanf("%lf",&la); 
-		} 
-		printf("input distance from B to Z:\n"); 
-		scanf("%lf",&lb); 
-		if(lb > 1000) 
-		{ 
-			printf("figure is too big! inputdistance from B to Z again:\n"); 
-			scanf("%lf",&lb); 
-		} 
-		printf("input distance from C to Z:\n"); 
-		scanf("%lf",&lc); 
-		if(lc > 1000) 
-		{ 
-			printf("figure is too big! inputdistance from C to Z again:\n"); 
-			scanf("%lf",&lc); 
-		} 
-		printf("\n"); 
-		printf("A(%lf,%lf)\n",ax,ay); 
-		printf("B(%lf,%lf)\n",bx,by); 
-		printf("C(%lf,%lf)\n",cx,cy); 
-		printf("AZ = %lf\n",la); 
-		printf("BZ = %lf\n",lb); 
-		printf("CZ = %lf\n",lc); 
-		//INPUT: 
-		for(zx = ax -la;zx <= ax + la;zx++) 
-		{ 
-			do 
-			{ 
-				for(zy = ay -la;zy <= ay + la;zy++) 
-				{ 
-					cax = zx - ax; 
-					cax = fabs(cax); 
-					cax = pow(cax,2); 
-					cay = zy - ay; 
-					cay = fabs(cay); 
-					cay = pow(cay,2); 
-					if(((cax + cay) > (la*la - err))&&((cax + cay) < (la*la + err))) 
-					{ 
-						okflag = 1; 
-						cax_abeyance1[i] = zx; 
-						cay_abeyance1[i] = zy; 
-						n++; 
-					} 
-				} 
-				if(!okflag)err++; 
-			} while (okflag == 0); 
-			i++; 
-			err = 0; 
-			okflag = 0; 
-		} 
-		printf("query...\n"); 
-		i = 0; 
-		for(zx = bx -lb;zx <= bx + lb;zx++) 
-		{ 
-			do 
-			{ 
-				for(zy = by -lb;zy <= by + lb;zy++) 
-				{ 
-					cbx = zx - bx; 
-					cbx = fabs(cbx); 
-					cbx = pow(cbx,2); 
-					cby = zy - by; 
-					cby = fabs(cby); 
-					cby = pow(cby,2); 
-					if(((cbx + cby) > (lb*lb - err))&&((cbx + cby) < (lb*lb + err))) 
-					{ 
-						okflag = 1; 
-						cbx_abeyance1[i] = zx; 
-						cby_abeyance1[i] = zy; 
-					} 
-				} 
-				if(!okflag)err++;       
-			} while (okflag == 0); 
-			i++; 
-			err = 0; 
-			okflag = 0; 
-		} 
-		printf("query...\n"); 
-		getchar(); 
-		i = 0; 
-		for(zx = cx -lc;zx <= cx + lc;zx++) 
-		{ 
-			do 
-			{ 
-				for(zy = cy -lc;zy <= cy + lc;zy++) 
-				{ 
-					ccx = zx - cx; 
-					ccx = fabs(ccx); 
-					ccx = pow(ccx,2); 
-					ccy = zy - cy; 
-					ccy = fabs(ccy); 
-					ccy = pow(ccy,2); 
-					if(((ccx + ccy) > (lc*lc - err))&&((ccx + ccy) < (lc*lc + err))) 
-					{ 
-						okflag = 1; 
-
-						ccx_abeyance1[i] = zx; 
-						ccy_abeyance1[i] = zy; 
-						n++; 
-					} 
-				} 
-				if(!okflag)err++; 
-			} while (okflag == 0); 
-			i++; 
-			err = 0; 
-			okflag = 0; 
-		} 
-		printf("query a b c over!\n"); 
-		printf("press Enter to continue!\n"); 
-		//必须加不然运行出错,但不会停止 
-		getchar(); 
-		do 
-		{ 
-			//找ab 交点,因为距离的偏差,所以坐标会有偏差 
-			aberr =0; 
-			do 
-			{ 
-				for(i = 0;i <= 2*la;i++) 
-				{ 
-					for(j = 0;j <= 2*lb;j++) 
-					{ 
-						if(cax_abeyance1[i] == cbx_abeyance1[j]) 
-						{ 
-
-							if((cay_abeyance1[i]  >  (cby_abeyance1[j]  -  aberr  - abcerr))&&(cay_abeyance1[i] < (cby_abeyance1[j] + aberr + abcerr))) 
-							{ 
-								cabx_abeyance1[abrequery] = cax_abeyance1[i]; 
-								caby_abeyance1[abrequery] = cay_abeyance1[i]; 
-								printf("cabx_abeyance1[%d]=%f",abrequery,cabx_abeyance1[abrequery]); 
-								printf("caby_abeyance1[%d]=%f\n\n",abrequery,caby_abeyance1[abrequery]); 
-								abrequery++; 
-							} 
-						} 
-					} 
-				}   
-				if(abrequery < loopnum)aberr++; 
-			}while(abrequery < loopnum); 
-			acerr =0; 
-			//找ac 交点 
-			do 
-			{ 
-				for(i = 0;i <= 2*la;i++) 
-				{ 
-					for(j = 0;j <= 2*lc;j++) 
-					{ 
-						if(cax_abeyance1[i] == ccx_abeyance1[j]) 
-						{ 
-							if((cay_abeyance1[i]  >  (ccy_abeyance1[j]  -  acerr  - abcerr))&&(cay_abeyance1[i] < (ccy_abeyance1[j] + acerr + abcerr))) 
-							{ 
-								cacx_abeyance1[acrequery] = cax_abeyance1[i]; 
-								cacy_abeyance1[acrequery] = cay_abeyance1[i]; 
-								acrequery++; 
-							} 
-						} 
-					} 
-				} 
-				if(acrequery < loopnum)acerr++; 
-			}while(acrequery < loopnum); 
-			//找交点的交点 
-			for(i = 0;i < abrequery;i++) 
-			{ 
-				for(j = 0;j < acrequery;j++) 
-				{ 
-					if(cabx_abeyance1[i] == cacx_abeyance1[j]) 
-					{ 
-						requery1 = 1; 
-						printf("final result is (%f,%f)\n",cabx_abeyance1[i],caby_abeyance1[i]); 
-					} 
-				} 
-			} 
-			if(requery1 == 0) 
-			{ 
-				loopnum++; 
-				abcerr++; 
-			} 
-			if(loopnum == 10) 
-			{ 
-				printf("chech input figure is right\n"); 
-			} 
-		}while(requery1 ==0); 
-		printf("finish!\n"); 
-		getchar(); 
-		return 0; 
-	}  
-
-}
-
-int CCard::addReader( READERINFO* pReader )
-{
-
-}

+ 0 - 45
Card.h

@@ -1,45 +0,0 @@
-#pragma once
-
-#include <list>
-
-using namespace std;
-
-struct READERINFO{
-	double x;
-	double y;
-	double dist;
-};
-
-class CCard
-{
-public:
-	CCard(void);
-	virtual ~CCard(void);
-
-	LONG64 CardId;
-	int CardType;
-
-	LONG64 lTime;
-	int Power;
-	int RangingType;
-	int Acceleration;
-	double Distance;
-	WORD Timestamp;
-
-	WORD ReaderId;
-	WORD ReaderTimestamp;
-	int Antenna;
-
-	CString strRecTime; // ½ÓÊÕʱ¼ä
-	int X;
-	int Y;
-	int lastX;
-	int lastY;
-
-	STAFFER * pStaffer;
-	VEHICLE * pVehicle;
-
-public:
-	void getCordinate();
-};
-

+ 0 - 2
LogSetting.h

@@ -1,6 +1,4 @@
 #pragma once
-
-
 // CLogSetting ¶Ô»°¿ò
 
 class CLogSetting : public CDialogEx

+ 1 - 0
ProcessRemodule.cpp

@@ -151,6 +151,7 @@ unsigned __stdcall message_process_entry(void *param)
 				}
 				catch(exception e)
 				{
+					;
 				}
 				//#endif // TRACE_MEMORY_PARSE_PACKAGE
 				BufferUtility::getInstance()->releaseItem(data);

+ 1 - 2
QueueStrManager.h

@@ -23,5 +23,4 @@ public:
 	~QueueStrManager(void);
 	void AddString(const char * chr);
 	void Execute();
-};
-
+};

+ 1 - 1
SyncTime/SyncManager.h

@@ -119,4 +119,4 @@ namespace HostServer{
 		void SetOutputLog(bool log){	this->isOutputLog = log;}
 		bool IsOutputLog() const {return isOutputLog;}
     };
-}
+};

+ 0 - 1
YAServer.h

@@ -1,4 +1,3 @@
-
 // YAServer.h : PROJECT_NAME ÓŚÓĂłĚĐňľÄÖ÷͡ÎÄźţ
 //
 

File diff suppressed because it is too large
+ 337 - 1324
YAServerDlg.cpp


+ 0 - 4
YAServerDlg.h

@@ -1,6 +1,4 @@
 // YAServerDlg.h : Í·Îļþ
-//
-
 #pragma once
 #include "afxwin.h"
 #include "resource.h"
@@ -9,7 +7,6 @@
 #include "def_msg.h"
 #include "socketdef.h"
 #include "ReportCtrl/ReportCtrl.h"
-
 #include <sio_client.h>
 #include "../thirdparty/include/iocp/Src/TcpServer.h"
 #include "../thirdparty/include/iocp/Global/helper.h"
@@ -26,7 +23,6 @@ using namespace sio;
 using namespace std;
 using namespace HostServer;
 
-
 struct  _SLS // system_limit_setting
 {
 	unsigned int over_count_person;

+ 5 - 2
algorithm/Fit.h

@@ -1,4 +1,5 @@
-#pragma 
+#ifndef FIT_H
+#define FIT_H
 
 #include <vector>
 using namespace std;
@@ -304,4 +305,6 @@ private:
 
 		r = pow((double)E*0.1/((double)F*0.1),2);
 	}
-};
+};
+
+#endif

+ 6 - 1
algorithm/FittingPosition.h

@@ -1,3 +1,6 @@
+#ifndef FITTING_POSITION_H
+#define FITTING_POSITION_H
+
 namespace Fitting{
 	
 	#define REF_POSITION_NUM 5		//²Î¿¼µãÊýÁ¿
@@ -20,4 +23,6 @@ namespace Fitting{
 	double polyval(vector<double> vt,double v);
 	double VAR(double *);
 	double VAR(vector<double> vt);
-}
+};
+
+#endif

+ 2 - 7
classdef.cpp

@@ -8,7 +8,7 @@
 #include "log_process_module.h"
 #include "Functions/Functions.h"
 #include "algorithm/Fit.h"
-#include "./mylog/log_module.h"
+#include "mylog/log_module.h"
 
 #include <math.h>
 
@@ -161,19 +161,14 @@ Card::Card( string cardid, int cardtype, double z_offset, double offset_x /*= 12
 	landmark_dis = 0;
 	landmark_direction = NODIRECTORY;
 
-<<<<<<< HEAD
 	isIdling = false;
 	data_cell_time = 0;
 	calc_cell_time = 0;
 	last_cell = nullptr;
-
 	::GetLocalTime(&cellDealTime);
 
-	//hEvent = CreateEvent(NULL,TRUE,FALSE,NULL);
-	//ResetEvent(hEvent);
-=======
 	drive_face_location_write_time = 0;
->>>>>>> newprotocal
+
 }
 
 Card::Card( void )

+ 18 - 21
classdef.h

@@ -56,7 +56,6 @@
 #include "algorithm/cell/cell_struct.h"
 #include "LocateRecord.h"
 
-
 #define MIN(x,y) (x < y ? x : y)
 #define MAX(x,y) (x > y ? x : y)
 
@@ -97,9 +96,9 @@ enum ALARM_FLAG{
 
 enum AREA_TYPE
 {
-	AREA_TYPE_FORBIDDEN = 3, // 限制区域
-	AREA_TYPE_NO_COVER = 1000, // 非覆盖区域,车辆信号消失后,定位到附近非覆盖区域内
-	AREA_TYPE_SPECIAL = 1001, // 特殊区域,只给你前端用来标识是否显示图标,胶轮车硐室
+	AREA_TYPE_FORBIDDEN = 3,	// 限制区域
+	AREA_TYPE_NO_COVER = 1000,	// 非覆盖区域,车辆信号消失后,定位到附近非覆盖区域内
+	AREA_TYPE_SPECIAL = 1001	// 特殊区域,只给你前端用来标识是否显示图标,胶轮车硐室
 };
 
 enum EDIT_TYPE_ID{
@@ -112,12 +111,12 @@ enum ALARM_TYPE_ID
 {
 	ATID_OVER_COUNT_PERSON = 1,
 	ATID_POWER,
-	ATID_OVER_COUNT_VEHICLE,
+	ATID_OVER_COUNT_VEHICLE
 };
 
 enum STATUS_DEVICE{
 	STATUS_DEVICE_NORMAL = 0,
-	STATUS_DEVICE_ERROR,
+	STATUS_DEVICE_ERROR
 };
 
 enum STATUS_MOVING
@@ -188,18 +187,18 @@ enum LIGHT_STATE{
 enum LOCATE_TYPE
 {
 	LT_COORDINATE = 0, // 使用坐标定位
-	LT_READER, // 使用分站定位
+	LT_READER // 使用分站定位
 };
 
 enum FILTER_TYPE{
-	NO_FILTER = 0, // 不使用滤波
-	FILTER_KALMAN = 1, // 使用kalman滤波
+	NO_FILTER = 0,		// 不使用滤波
+	FILTER_KALMAN = 1	// 使用kalman滤波
 };
 
 enum SECTION_STATE{
 	SECTION_STATE_NORMAL = 0,		//正常
 	SECTION_STATE_BUSY = 1,			//繁忙
-	SECTION_STATE_CONGESTION = 2,	//拥堵
+	SECTION_STATE_CONGESTION = 2	//拥堵
 };
 
 enum LIGHT_SHAPE{
@@ -216,17 +215,17 @@ enum LIGHT_SHAPE{
 
 enum LIGHT_STREAM{
 	UP_STREAM = 1,		//上行
-	DOWN_STREAM = 2,	//下行
+	DOWN_STREAM = 2	//下行
 };
 
 enum LIGHT_COLOR{
 	COLOR_RED = 1, // 红色
-	COLOR_GREEN = 2, // 绿色
+	COLOR_GREEN = 2 // 绿色
 };
 
 enum LIGHT_CTRL_STATE{
 	CTRL_STATE_AUTO = 1, //  自动控制
-	CTRL_STATE_MANUAL = 2, // 手动控制
+	CTRL_STATE_MANUAL = 2 // 手动控制
 };
 
 enum LIGHTS_SELECT_TYPE
@@ -239,7 +238,7 @@ enum LIGHTS_SELECT_TYPE
 
 enum AREA_PROPERTY{
 	MAIN_TUNNEL = 0, // 主巷道
-	BRANCH_TUNNEL = 1, // 分支巷道
+	BRANCH_TUNNEL = 1 // 分支巷道
 };
 
 enum OUTPUT_POS{
@@ -304,7 +303,7 @@ enum ALGO_RETURN_VALUE{
 
 	KALMAN_FILTER_LONG_INTERVAL = 60001,
 
-	ALGO_USE_KALMAN_FILTER = 70001,
+	ALGO_USE_KALMAN_FILTER = 70001
 };
 
 extern unsigned int g_nAlgoFailedCounts[ALGO_LOC_TOTAL];	//全局的统计所有次数
@@ -343,8 +342,7 @@ enum CALL_STATE{
 	CALL_NONE = 0,			//无呼叫信息
 	CALL_SUCCESSED = 1,		//呼叫成功
 	CALL_ING = 2,			//呼叫中
-	CALL_FAILED = 3,		//呼叫失败
-	
+	CALL_FAILED = 3		//呼叫失败
 };
 
 struct SQLTHREAD_DATA//写数据库线程传递的参数
@@ -493,6 +491,7 @@ struct _call_info_reader
 	int cards_count;
 	CallInfoCardMap mpCard;
 };
+
 typedef map<int, std::shared_ptr<_call_info_reader>> CallInfoReaderMap;
 
 struct _call_info_user
@@ -502,7 +501,6 @@ struct _call_info_user
 };
 typedef map<string, std::shared_ptr<_call_info_user>> CallInfoUserMap;
 
-
 // 分站接收时间定义
 struct ReceiveData{
 	unsigned int reader_id;		// 分站号
@@ -747,6 +745,7 @@ public:
 	LightMap map_light_list;
 	LightGroupMap map_light_group_list;
 };
+
 class LandmarkInfo
 {
 public:
@@ -1352,8 +1351,6 @@ public:
 	int ChangeSystemTime(SYSTEMTIME& st,const int condition);
 	int ChangeSystemTime(SYSTEMTIME& st);	//在st基础上加500ms
 
-	//void handle_data_thread(LPVOID pContext);
-	//HANDLE hEvent;
 	HWND pMainWnd;
 
 	int SetMainHwnd(HWND hWnd){
@@ -1653,7 +1650,7 @@ enum EVENT_TYPE{ // 
 	ET_CARD_PATROL_ERROR = 26, // 人员巡检异常
 	ET_CARD_LOST = 27, // 标识卡信号丢失
 	ET_CARD_DRIVINGFACE_WARNING_AREA = 28,  //掘进面靠近预警区域告警
-	CARD_EVENT_COUNT_MAX,
+	CARD_EVENT_COUNT_MAX
 };
 
 enum OBJECT_TYPE // 对象类型

+ 2 - 9
constdef.h

@@ -37,7 +37,7 @@
 #define JSON_CMD_VALUE_SET_LIMIT_VALUE "set_limit_value"
 #define JSON_CMD_VALUE_CALL_CARD "call_card"
 #define JSON_CMD_VALUE_CLEAR_CARD "clear_card"
-#define JSON_CMD_VALUE_DEAL_HELP "helpme_done"   //deal_help
+#define JSON_CMD_VALUE_DEAL_HELP "helpme_done"
 #define JSON_CMD_VALUE_EDIT_MAP "edit_map"
 #define JSON_CMD_VALUE_EDIT_AREA "edit_area"
 #define JSON_CMD_VALUE_EDIT_STATION "edit_station"
@@ -119,13 +119,7 @@
 #define JSON_KEY_USERNAME "user_name"
 #define JSON_KEY_PASSWORD "user_pass"
 #define JSON_VALUE_USERNAME "COLLECTOR"
-#define JSON_VALUE_PASSWORD "666666"  //"666666"
-//#define JSON_VALUE_USERNAME "lihz"
-//#define JSON_VALUE_PASSWORD "000"
-//#define JSON_KEY_VEHICLE_ID "񅧏"
-//#define JSON_KEY_VEHICLE_TYPE "³µÁ¾ÀàÐÍ"
-//#define JSON_KEY_VEHICLE_DEPT "²¿ÃÅ"
-//#define JSON_KEY_VEHICLE_NO "³µÅƺÅ"
+#define JSON_VALUE_PASSWORD "666666"
 #define JSON_KEY_CARD_ID "card_id" //"¿¨ºÅ"
 #define JSON_KEY_CARD_TYPE_ID "card_type_id"
 #define JSON_KEY_CARD_NUM "number" //"񅧏"
@@ -260,7 +254,6 @@
 #define JSON_KEY_EVENT_LANDMARK_DIRECTION "lmdirect"
 #define JSON_KEY_EVENT_LANDMARK_DISTANCE "lmdistance"
 
-
 #define JSON_CMD_VALUE_REQUEST_COUNTS_INFO "count_detail_req"		//web¶ËÇëÇóͳ¼Æ×ÜÊýÏêϸÁбí
 #define JSON_KEY_RESPONSE_COUNTS_DETAIL "count_detail_resp"
 

+ 1 - 3
def.h

@@ -67,14 +67,12 @@
 #define CONF_SECT_READER "READER_SET"
 #define CONF_READER_INTERVAL_TIME "interval_time"
 
-#ifdef _DEBUG
+#ifdef DEBUG
 #define SQL_EXECUTE_SENTENCE_COUNT_MAX       1
 #else
 #define SQL_EXECUTE_SENTENCE_COUNT_MAX       10
 #endif // DEBUG
 
-
-
 #define MAX_LOG_LENGTH 500
 
 #define SQL_SENTENCE_LENGTH_MAX       2000

+ 2 - 2
locate_algorithm.cpp

@@ -2392,12 +2392,12 @@ std::shared_ptr<POS> LocateAlgorithm::MappingToPath( std::shared_ptr<POS> pos, s
 
 	// 计算两点间斜率
 	// 垂直
-	if(pRP->x[0] - pRP->x[1] < 1E-6)
+	if(abs(pRP->x[0] - pRP->x[1]) < 1E-6)
 	{
 		p->posx = pRP->x[0];
 	}
 	// 水平
-	else if(pRP->y[0] - pRP->y[1] < 1E-6)
+	else if(abs(pRP->y[0] - pRP->y[1]) < 1E-6)
 	{
 		p->posy = pRP->y[0];
 	}

+ 0 - 35
locate_algorithm.h

@@ -33,41 +33,6 @@ void AdjustMaxHeap(_coordinate** pCoordinateArray,int n,int nHeapSize);
 void SwapElement(_coordinate* a,_coordinate*b);
 void SelectSort(_coordinate** pCoordinateArray,int nLen);
 
-//static double Pnt2SegmentDist(Point A, Point B, Point C,Point* pD = NULL)
-//{
-//
-//	//AB为线段,C为点,pD为需要返回C距离AB最近的点,返回值为C到AB的距离
-//
-//	//Dist为求两点之间的距离,第三个参数若是0不开方,若使用默认参数值1则需要开方。
-//	Point AB = B - A; //向量AB
-//	Point AC = C - A;
-//	double r = AB.x * AC.x + AB.y * AC.y;//AB与AC的点乘积
-//	r /= Dist(A,B,0);//AC在AB上的投影比上AB。调用Dist(),不开方
-//	//若C的投影在AB外
-//	if(r < 0)
-//	{
-//		if(pD)
-//			*pD = A;
-//		return Dist(A, C);//调用Dist(),开方
-//	}
-//	if(r > 1)
-//	{
-//		if(pD)
-//			*pD = B;
-//		return Dist(B, C);
-//	}
-//	//若C的投影在AB之间
-//	Point D = AB;
-//	D.x *= r;
-//	D.y *= r;//因为AB是向量,所以可以这样做。得到AC在AB上的投影向量。
-//	D.Offset(A);//点D的绝对坐标
-//	if(pD)
-//	{
-//		*pD = D;
-//	}
-//	return Dist(C, D);
-//}
-
 /*
  * 定位算法
  *

+ 0 - 1
log_def.h

@@ -76,5 +76,4 @@
 
 #define LOG_INVALID_PARSE "·Ç·¨Êý¾Ý½âÎö"
 
-
 #endif // !_SERVER_LOG_DEF_H_

+ 5 - 1
mylog/MyLog.h

@@ -1,4 +1,6 @@
 #pragma once
+#ifndef MYLOG_H
+#define MYLOG_H
 
 #include <Windows.h>
 
@@ -112,4 +114,6 @@ private:
 	log4cpp::Appender* pAppender;
 	log4cpp::PatternLayout* pLayout;
 	log4cpp::Category* pCategory;
-};
+};
+
+#endif

+ 0 - 1
mylog/log_module.h

@@ -14,7 +14,6 @@ namespace Log{
 	int write_log(FILE_TYPE fileType,const char* pValue,bool status);
 	//int write_log(FILE_TYPE fileType,const char* pValue,...);
 	int clear();
-
 };
 
 #endif

+ 1 - 1
tdoa/TDOAFunctor.h

@@ -44,4 +44,4 @@ namespace TdoaAlgo{
             return 0;
         }
     };
-}
+};

+ 1 - 3
uwb_msg_def.h

@@ -77,7 +77,6 @@ typedef struct
 	UINT16               CRCInfo;
 }SyncMsgMultiRoot;
 
-
 typedef struct
 {
     UINT32      AnchorNum;
@@ -170,7 +169,6 @@ typedef struct
     UINT16                CRCInfo;
 }INAVLocateMsg;
 
-
 enum INAV_MOVING_STATUS
 {
     INAV_STATIC = 0,
@@ -207,4 +205,4 @@ const double DISPLACEMENT_THRESHOLD = 100;
 const double JOIN_ACCERATE_THRESHOLD = 0.3;
 const double MOVING_THRESHOLD = 1.2;
 const int DISPLACE_MENT_MOVING_THRESHOLD = 45;
-#endif
+#endif