更新:机扫和相扫程序合并,通过宏定义配置切换

Signed-off-by: waiwaylee <waiwaylee@foxmail.com>
This commit is contained in:
2026-07-31 10:52:53 +08:00
parent 06d45f5917
commit 8636179bdf
8 changed files with 94 additions and 76 deletions
+53 -51
View File
@@ -27,50 +27,11 @@
#define FREQ19 16.8
#define FREQ20 16.8
//#define MECHANICAL_SCANNING
#define PHASE_SCANNING
//波位
//#define BEAM_NUM 54
//#define BEAM_WIDTH 6.666
////一个点迹区包含波位
//#define DOT_SECTION_NUM 9
//#define BEAM_NUM_DOT_SECTION 6
//#define DOT_SECTION_1 5
//#define DOT_SECTION_2 11
//#define DOT_SECTION_3 17
//#define DOT_SECTION_4 23
//#define DOT_SECTION_5 29
//#define DOT_SECTION_6 35
//#define DOT_SECTION_7 41
//#define DOT_SECTION_8 47
//#define DOT_SECTION_9 53
//航迹区划分
//#define TRACK_SECTION_NUM 9
//#define TRACK_SECTION_WIDTH 40
//#define TRACK_SECTION_1_START 13.2
//#define TRACK_SECTION_2_START 53.2
//#define TRACK_SECTION_3_START 93.2
//#define TRACK_SECTION_4_START 133.2
//#define TRACK_SECTION_5_START 173.2
//#define TRACK_SECTION_6_START 213.2
//#define TRACK_SECTION_7_START 253.2
//#define TRACK_SECTION_8_START 293.2
//#define TRACK_SECTION_9_START 333.2
#ifdef MECHANICAL_SCANNING
/******************************数据处理参数**************************************/
//#define DATA_RATE_SHORT 1 //三种不同模式下的 数据率
//#define DATA_RATE_MIDDLE 1
//#define DATA_RATE_FAR 1
//#define DATA_RATE_TAS 0.046875
#define DATA_RATE_TAS 0.0625
#define SIGMA_R 10.0 //测量误差
@@ -84,7 +45,52 @@
#define MAX_BEAM_NUM 100 //最大TWS波位数
#define MAX_TRACK_NUM 500
#define MAX_TRACK_INDEX 500 //最大航迹批号
#define ASSOCIATE_THRESHOLD_MIN 1
#define ASSOCIATE_THRESHOLD_MID 3 //关联波门
#define ASSOCIATE_THRESHOLD_MAX 10
#define R_MIN 100
#define R_MAX 100000
#define TRACK_START_THRESHOLD 8 //起航波门 3 越大越容易起批
#define ALPHA_START 60 //起航夹角 120 越大越容易起批
#define TRACK_DIE_ROUND 4 // 航迹消亡时间
#define TRACK_DIE_ROUND_TAS 96 //
#define ASSO_THORD 3
#define H_F_WIN_LEN 3
#define TAS_QUEUE_LENGTH 1 //Tas调用的cpi数
#define MAX_TAS_NUM 1
#define T_TAS_PRED DATA_RATE_TAS
#define UNCONF_TARGET 0
#define DIRECT_TRACKING_QUEUE_LENGTH 10
#endif
#ifdef PHASE_SCANNING
/******************************数据处理参数**************************************/
#define DATA_RATE_TAS 0.3
#define SIGMA_R 10.0 //测量误差
#define SIGMA_A 0.02
#define SIGMA_E 0.2
#define SIGMA_V 2.0
#define DOT_COH_RANGE 80 //点迹凝聚
#define DOT_COH_V 2
#define DOT_COH_AZI 6
#define MAX_BEAM_NUM 100 //最大TWS波位数
#define MAX_TRACK_NUM 500
#define MAX_TRACK_INDEX 500 //最大航迹批号
@@ -102,28 +108,24 @@
#define ALPHA_START 60 //起航夹角 120 越大越容易起批
#define TRACK_DIE_ROUND 4 // 航迹消亡时间
#define TRACK_DIE_ROUND_TAS 96 //
#define TRACK_DIE_ROUND_TAS 5
#define ASSO_THORD 3
#define H_F_WIN_LEN 3
#define TAS_QUEUE_LENGTH 1 //Tas调用的cpi数
#define MAX_TAS_NUM 1
//#define T_TAS_PRED 0.046875
#define T_TAS_PRED DATA_RATE_TAS
#define TAS_QUEUE_LENGTH 4 //Tas调用的cpi数
#define MAX_TAS_NUM 4
#define T_TAS_PRED 0.7
#define UNCONF_TARGET 0
#define DIRECT_TRACKING_QUEUE_LENGTH 10
#endif
#define Round(x) (((x) > 0) \
? (((int)((x) + 0.5) > (int)(x)) ? ((int)(x) + 1) : ((int)(x))) \
: (((int)((x) - 0.5) < (int)(x)) ? ((int)(x) - 1) : ((int)(x))))
#endif // PARAMETERS_H