@@ -7,14 +7,14 @@ using namespace std;
|
|||||||
//极坐标转直角坐标
|
//极坐标转直角坐标
|
||||||
void coor_trans::polar2cart(double *x, double *y, double Range, double Azimuth)
|
void coor_trans::polar2cart(double *x, double *y, double Range, double Azimuth)
|
||||||
{
|
{
|
||||||
*x=Range*cos(Azimuth);
|
*x=Range*cos(Azimuth);
|
||||||
*y=Range*sin(Azimuth);
|
*y=Range*sin(Azimuth);
|
||||||
}
|
}
|
||||||
|
|
||||||
void coor_trans::cart2polar(double x, double y, double *Range, double *Azimuth)
|
void coor_trans::cart2polar(double x, double y, double *Range, double *Azimuth)
|
||||||
{
|
{
|
||||||
*Range=sqrt(x*x+y*y);
|
*Range=sqrt(x*x+y*y);
|
||||||
*Azimuth=atan2(y,x);
|
*Azimuth=atan2(y,x);
|
||||||
if(*Azimuth<0)
|
if(*Azimuth<0)
|
||||||
*Azimuth=*Azimuth+2*PI;
|
*Azimuth=*Azimuth+2*PI;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ class coor_trans
|
|||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void polar2cart( double*x, double *y, double Range, double Azimuth);
|
void polar2cart( double*x, double *y, double Range, double Azimuth);
|
||||||
|
|
||||||
void cart2polar(double x, double y, double *Range, double *Azimuth);
|
void cart2polar(double x, double y, double *Range, double *Azimuth);
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -13,71 +13,71 @@ using namespace std;
|
|||||||
|
|
||||||
|
|
||||||
//数据预处理
|
//数据预处理
|
||||||
int Data_Process::data_preprocess(struct DataRev Data_Input[150])
|
int Data_Process::data_preprocess(struct DataRev Data_Input[150])
|
||||||
{
|
{
|
||||||
//数据存入缓存区域 Data_buffer
|
//数据存入缓存区域 Data_buffer
|
||||||
if(Data_Input[0].point_type == 0) //tws数据
|
if(Data_Input[0].point_type == 0) //tws数据
|
||||||
{
|
{
|
||||||
data_num=Data_Input[0].Point_Sum;
|
data_num=Data_Input[0].Point_Sum;
|
||||||
TAS_track_idx = Data_Input[0].TAS_track_index;
|
TAS_track_idx = Data_Input[0].TAS_track_index;
|
||||||
for (int i=0; i<data_num;i++)
|
for (int i=0; i<data_num;i++)
|
||||||
{
|
{
|
||||||
PointRecv Data_buffer_temp;
|
PointRecv Data_buffer_temp;
|
||||||
Data_buffer_temp.Amplitude=Data_Input[i].Amplitude;
|
Data_buffer_temp.Amplitude=Data_Input[i].Amplitude;
|
||||||
Data_buffer_temp.Azimuth=Data_Input[i].Azimuth/180*PI;
|
Data_buffer_temp.Azimuth=Data_Input[i].Azimuth/180*PI;
|
||||||
Data_buffer_temp.snr = Data_Input[i].Snr;
|
Data_buffer_temp.snr = Data_Input[i].Snr;
|
||||||
Data_buffer_temp.RCS = Data_Input[i].RCS;
|
Data_buffer_temp.RCS = Data_Input[i].RCS;
|
||||||
Data_buffer_temp.CPI_Time = Data_Input[i].CPI_time;
|
Data_buffer_temp.CPI_Time = Data_Input[i].CPI_time;
|
||||||
Data_buffer_temp.Freq_index = Data_Input[i].Freq_index;
|
Data_buffer_temp.Freq_index = Data_Input[i].Freq_index;
|
||||||
Data_buffer_temp.PRF_index = Data_Input[i].PRI;
|
Data_buffer_temp.PRF_index = Data_Input[i].PRI;
|
||||||
Data_buffer_temp.Range = Data_Input[i].Range;
|
Data_buffer_temp.Range = Data_Input[i].Range;
|
||||||
Data_buffer_temp.Height= Data_Input[i].Range*sin(Data_Input[i].Elevation/180*PI);
|
Data_buffer_temp.Height= Data_Input[i].Range*sin(Data_Input[i].Elevation/180*PI);
|
||||||
Data_buffer_temp.Use_Flag = 0;
|
Data_buffer_temp.Use_Flag = 0;
|
||||||
Data_buffer_temp.Velocity = Data_Input[i].Velocity;
|
Data_buffer_temp.Velocity = Data_Input[i].Velocity;
|
||||||
|
|
||||||
Data_buffer_temp.pitch_num = Data_Input[i].pitch_num;
|
Data_buffer_temp.pitch_num = Data_Input[i].pitch_num;
|
||||||
|
|
||||||
std::memcpy(Data_buffer_temp.speed_dim, Data_Input[i].speed_dim, sizeof(Data_buffer_temp.speed_dim));
|
std::memcpy(Data_buffer_temp.speed_dim, Data_Input[i].speed_dim, sizeof(Data_buffer_temp.speed_dim));
|
||||||
std::memcpy(Data_buffer_temp.range_dim, Data_Input[i].range_dim, sizeof(Data_buffer_temp.range_dim));
|
std::memcpy(Data_buffer_temp.range_dim, Data_Input[i].range_dim, sizeof(Data_buffer_temp.range_dim));
|
||||||
|
|
||||||
Data_buffer.push_back(Data_buffer_temp);
|
Data_buffer.push_back(Data_buffer_temp);
|
||||||
}
|
}
|
||||||
if(Data_Input[0].Beam_index_aiz == 16) //TWS
|
if(Data_Input[0].Beam_index_aiz == 16) //TWS
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(Data_Input[0].point_type == 1) //tas数据
|
else if(Data_Input[0].point_type == 1) //tas数据
|
||||||
{
|
{
|
||||||
// qDebug() << "TAS TARGET :" <<Data_Input[0].TAS_track_index;
|
// qDebug() << "TAS TARGET :" <<Data_Input[0].TAS_track_index;
|
||||||
// qDebug() << "TAS POINT :" <<Data_Input[0].Point_Sum;
|
// qDebug() << "TAS POINT :" <<Data_Input[0].Point_Sum;
|
||||||
|
|
||||||
data_num=Data_Input[0].Point_Sum;
|
data_num=Data_Input[0].Point_Sum;
|
||||||
TAS_track_idx = Data_Input[0].TAS_track_index;
|
TAS_track_idx = Data_Input[0].TAS_track_index;
|
||||||
for (int i=0; i<data_num;i++)
|
for (int i=0; i<data_num;i++)
|
||||||
{
|
{
|
||||||
PointRecv Data_buffer_temp;
|
PointRecv Data_buffer_temp;
|
||||||
Data_buffer_temp.Amplitude=Data_Input[i].Amplitude;
|
Data_buffer_temp.Amplitude=Data_Input[i].Amplitude;
|
||||||
Data_buffer_temp.Azimuth=Data_Input[i].Azimuth/180*PI;
|
Data_buffer_temp.Azimuth=Data_Input[i].Azimuth/180*PI;
|
||||||
Data_buffer_temp.snr = Data_Input[i].Snr;
|
Data_buffer_temp.snr = Data_Input[i].Snr;
|
||||||
Data_buffer_temp.RCS = Data_Input[i].RCS;
|
Data_buffer_temp.RCS = Data_Input[i].RCS;
|
||||||
Data_buffer_temp.CPI_Time = Data_Input[i].CPI_time;
|
Data_buffer_temp.CPI_Time = Data_Input[i].CPI_time;
|
||||||
Data_buffer_temp.Freq_index = Data_Input[i].Freq_index;
|
Data_buffer_temp.Freq_index = Data_Input[i].Freq_index;
|
||||||
Data_buffer_temp.PRF_index = Data_Input[i].PRI;
|
Data_buffer_temp.PRF_index = Data_Input[i].PRI;
|
||||||
Data_buffer_temp.Range = Data_Input[i].Range;
|
Data_buffer_temp.Range = Data_Input[i].Range;
|
||||||
Data_buffer_temp.Height= Data_Input[i].Range*sin(Data_Input[i].Elevation/180*PI);
|
Data_buffer_temp.Height= Data_Input[i].Range*sin(Data_Input[i].Elevation/180*PI);
|
||||||
Data_buffer_temp.Use_Flag = 0;
|
Data_buffer_temp.Use_Flag = 0;
|
||||||
Data_buffer_temp.Velocity = Data_Input[i].Velocity;
|
Data_buffer_temp.Velocity = Data_Input[i].Velocity;
|
||||||
Data_buffer_temp.pitch_num = Data_Input[i].pitch_num;
|
Data_buffer_temp.pitch_num = Data_Input[i].pitch_num;
|
||||||
std::memcpy(Data_buffer_temp.speed_dim, Data_Input[i].speed_dim, sizeof(Data_buffer_temp.speed_dim));
|
std::memcpy(Data_buffer_temp.speed_dim, Data_Input[i].speed_dim, sizeof(Data_buffer_temp.speed_dim));
|
||||||
std::memcpy(Data_buffer_temp.range_dim, Data_Input[i].range_dim, sizeof(Data_buffer_temp.range_dim));
|
std::memcpy(Data_buffer_temp.range_dim, Data_Input[i].range_dim, sizeof(Data_buffer_temp.range_dim));
|
||||||
|
|
||||||
Data_buffer_tas.push_back(Data_buffer_temp);
|
Data_buffer_tas.push_back(Data_buffer_temp);
|
||||||
|
|
||||||
// qDebug() << "Azimuth:" << Data_Input[i].Azimuth
|
// qDebug() << "Azimuth:" << Data_Input[i].Azimuth
|
||||||
// << "Range:" << Data_Input[i].Range
|
// << "Range:" << Data_Input[i].Range
|
||||||
@@ -85,15 +85,15 @@ int Data_Process::data_preprocess(struct DataRev Data_Input[150])
|
|||||||
// << "CPI_Time"<< Data_Input[i].CPI_time
|
// << "CPI_Time"<< Data_Input[i].CPI_time
|
||||||
// << "data_num:" << data_num;
|
// << "data_num:" << data_num;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,55 +101,55 @@ int Data_Process::data_preprocess(struct DataRev Data_Input[150])
|
|||||||
|
|
||||||
//数据处理
|
//数据处理
|
||||||
int Data_Process::track_process(struct Track Trust_Track_Output[MAX_TRACK_NUM][10],
|
int Data_Process::track_process(struct Track Trust_Track_Output[MAX_TRACK_NUM][10],
|
||||||
int *Trust_track_num_Output,
|
int *Trust_track_num_Output,
|
||||||
int Track_die_Index_Output[],
|
int Track_die_Index_Output[],
|
||||||
int *Track_die_num_Output,
|
int *Track_die_num_Output,
|
||||||
int model)
|
int model)
|
||||||
{
|
{
|
||||||
|
|
||||||
//TWS处理
|
//TWS处理
|
||||||
if(model==2)
|
if(model==2)
|
||||||
{
|
{
|
||||||
|
|
||||||
dot_coh.dot_coh_process_buff(&Data_buffer,&point_recv,Work_Parameter);
|
dot_coh.dot_coh_process_buff(&Data_buffer,&point_recv,Work_Parameter);
|
||||||
QVector<PointRecv>().swap(Data_buffer);
|
QVector<PointRecv>().swap(Data_buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(model==1)
|
if(model==1)
|
||||||
{
|
{
|
||||||
*Trust_track_num_Output=0; //航迹更新数
|
*Trust_track_num_Output=0; //航迹更新数
|
||||||
*Track_die_num_Output=0; //航迹消亡数目
|
*Track_die_num_Output=0; //航迹消亡数目
|
||||||
|
|
||||||
track_asso.track_asso_process(&point_recv,
|
track_asso.track_asso_process(&point_recv,
|
||||||
&trust_track,
|
&trust_track,
|
||||||
Trust_Track_Output,
|
Trust_Track_Output,
|
||||||
Trust_track_num_Output,
|
Trust_track_num_Output,
|
||||||
Work_Parameter
|
Work_Parameter
|
||||||
);
|
);
|
||||||
|
|
||||||
track_die.track_die_process( &trust_track,
|
track_die.track_die_process( &trust_track,
|
||||||
Track_die_Index_Output,
|
Track_die_Index_Output,
|
||||||
Track_die_num_Output);
|
Track_die_num_Output);
|
||||||
|
|
||||||
track_init.track_init_process_logic( &point_recv,
|
track_init.track_init_process_logic( &point_recv,
|
||||||
&trust_track,
|
&trust_track,
|
||||||
&temp_track,
|
&temp_track,
|
||||||
Trust_Track_Output,
|
Trust_Track_Output,
|
||||||
Trust_track_num_Output,
|
Trust_track_num_Output,
|
||||||
Work_Parameter);
|
Work_Parameter);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TAS处理
|
// TAS处理
|
||||||
if(model==3)
|
if(model==3)
|
||||||
{
|
{
|
||||||
*Trust_track_num_Output=0; //航迹更新数
|
*Trust_track_num_Output=0; //航迹更新数
|
||||||
*Track_die_num_Output=0; //航迹消亡数目
|
*Track_die_num_Output=0; //航迹消亡数目
|
||||||
|
|
||||||
dot_coh_tas.dot_coh_tas_process(&Data_buffer_tas,&point_recv_tas); //点迹凝聚
|
dot_coh_tas.dot_coh_tas_process(&Data_buffer_tas,&point_recv_tas); //点迹凝聚
|
||||||
|
|
||||||
// if(point_recv_tas.size()>0)
|
// if(point_recv_tas.size()>0)
|
||||||
// {
|
// {
|
||||||
@@ -157,42 +157,42 @@ int Data_Process::track_process(struct Track Trust_Track_Output[MAX_TRACK_NUM][1
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
QVector<PointRecv>().swap(Data_buffer_tas);//凝聚完毕 清除Data_buffer
|
QVector<PointRecv>().swap(Data_buffer_tas);//凝聚完毕 清除Data_buffer
|
||||||
|
|
||||||
|
|
||||||
track_asso_tas.track_asso_process_tas(&point_recv_tas, //点迹文件
|
track_asso_tas.track_asso_process_tas(&point_recv_tas, //点迹文件
|
||||||
&trust_track, //航迹文件
|
&trust_track, //航迹文件
|
||||||
Trust_Track_Output, //更新航迹信息
|
Trust_Track_Output, //更新航迹信息
|
||||||
Trust_track_num_Output, //更新航迹数
|
Trust_track_num_Output, //更新航迹数
|
||||||
Work_Parameter, //工作参数
|
Work_Parameter, //工作参数
|
||||||
TAS_track_idx);
|
TAS_track_idx);
|
||||||
|
|
||||||
|
|
||||||
QVector<PointRecv>().swap(point_recv_tas); //清除 point_recv_tas
|
QVector<PointRecv>().swap(point_recv_tas); //清除 point_recv_tas
|
||||||
|
|
||||||
track_die_tas.track_die_process_tas( &trust_track,
|
track_die_tas.track_die_process_tas( &trust_track,
|
||||||
Track_die_Index_Output,
|
Track_die_Index_Output,
|
||||||
Track_die_num_Output);
|
Track_die_num_Output);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//波束控制
|
//波束控制
|
||||||
void Data_Process::Beam_Ctrl(struct TrackingBeam *Tracking_beam,
|
void Data_Process::Beam_Ctrl(struct TrackingBeam *Tracking_beam,
|
||||||
struct Track Trust_Track_Output[][10],
|
struct Track Trust_Track_Output[][10],
|
||||||
int *Trust_track_num_Output)
|
int *Trust_track_num_Output)
|
||||||
{
|
{
|
||||||
|
|
||||||
tas_ctrl.tas_ctrl_process(&trust_track,Tracking_beam, Trust_Track_Output, Trust_track_num_Output,Work_Parameter);
|
tas_ctrl.tas_ctrl_process(&trust_track,Tracking_beam, Trust_Track_Output, Trust_track_num_Output,Work_Parameter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -202,10 +202,10 @@ void Data_Process::Beam_Ctrl(struct TrackingBeam *Tracking_beam,
|
|||||||
int Data_Process::track_process_parameters_initial(struct RadarPara Radar_Parameter)
|
int Data_Process::track_process_parameters_initial(struct RadarPara Radar_Parameter)
|
||||||
{
|
{
|
||||||
|
|
||||||
//工作参数设置
|
//工作参数设置
|
||||||
memcpy(&Work_Parameter, &Radar_Parameter, sizeof(RadarPara));
|
memcpy(&Work_Parameter, &Radar_Parameter, sizeof(RadarPara));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -216,59 +216,59 @@ int Data_Process::track_process_parameters_initial(struct RadarPara Radar_Parame
|
|||||||
//数据处理参数修改
|
//数据处理参数修改
|
||||||
int Data_Process::track_process_parameters_modify(struct RadarPara Radar_Parameter)
|
int Data_Process::track_process_parameters_modify(struct RadarPara Radar_Parameter)
|
||||||
{
|
{
|
||||||
memcpy(&Work_Parameter, &Radar_Parameter, sizeof(RadarPara));
|
memcpy(&Work_Parameter, &Radar_Parameter, sizeof(RadarPara));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//航迹清空函数
|
//航迹清空函数
|
||||||
int Data_Process::track_clear_all(void)
|
int Data_Process::track_clear_all(void)
|
||||||
{
|
{
|
||||||
//清空可靠航迹
|
//清空可靠航迹
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//手动航迹删除函数
|
//手动航迹删除函数
|
||||||
int Data_Process:: track_delete(int delete_track_num, //手动删除的航迹数目
|
int Data_Process:: track_delete(int delete_track_num, //手动删除的航迹数目
|
||||||
int delete_track_index[]) //手动删除的航迹号
|
int delete_track_index[]) //手动删除的航迹号
|
||||||
{
|
{
|
||||||
for (int i=0;i<delete_track_num ;i++)
|
for (int i=0;i<delete_track_num ;i++)
|
||||||
{
|
{
|
||||||
for (int j=0;j<trust_track.size();j++)
|
for (int j=0;j<trust_track.size();j++)
|
||||||
{
|
{
|
||||||
if(trust_track[j].Track_Index == delete_track_index[i])
|
if(trust_track[j].Track_Index == delete_track_index[i])
|
||||||
{
|
{
|
||||||
|
|
||||||
trust_track[j].manual_delete_flag=1;
|
trust_track[j].manual_delete_flag=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//手动转TAS跟踪函数
|
//手动转TAS跟踪函数
|
||||||
int Data_Process:: tracking_start(int track_index) //需要手动转入TAS跟踪的航迹号
|
int Data_Process:: tracking_start(int track_index) //需要手动转入TAS跟踪的航迹号
|
||||||
{
|
{
|
||||||
|
|
||||||
for ( int i=0; i<trust_track.size();i++)
|
for ( int i=0; i<trust_track.size();i++)
|
||||||
if(trust_track[i].Track_Index==track_index)
|
if(trust_track[i].Track_Index==track_index)
|
||||||
{
|
{
|
||||||
trust_track[i].manual_tracking_flag = 1;
|
trust_track[i].manual_tracking_flag = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//手动打跟踪波束
|
//手动打跟踪波束
|
||||||
int Data_Process::tracking_point(float Azimuth)//方位角
|
int Data_Process::tracking_point(float Azimuth)//方位角
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -24,88 +24,88 @@ class Data_Process : public Data_process_class_dll
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
Data_Process(void)
|
Data_Process(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//数据预处理函数
|
//数据预处理函数
|
||||||
int data_preprocess(struct DataRev Data_Input[150]);
|
int data_preprocess(struct DataRev Data_Input[150]);
|
||||||
|
|
||||||
//航迹处理函数
|
//航迹处理函数
|
||||||
int track_process( struct Track Trust_Track_Output[MAX_TRACK_NUM][10], //数据处理输出的航迹更新信息 主程序创建全局变量 数据处理函数更新其中数据
|
int track_process( struct Track Trust_Track_Output[MAX_TRACK_NUM][10], //数据处理输出的航迹更新信息 主程序创建全局变量 数据处理函数更新其中数据
|
||||||
int *Trust_track_num_Output, //数据处理后输出的航迹数目 主程序创建全局变量 数据处理函数更新其中数据
|
int *Trust_track_num_Output, //数据处理后输出的航迹数目 主程序创建全局变量 数据处理函数更新其中数据
|
||||||
int Track_die_Index_Output[], //数据处理后要消亡的航迹 主程序创建全局变量 数据处理函数更新其中数据
|
int Track_die_Index_Output[], //数据处理后要消亡的航迹 主程序创建全局变量 数据处理函数更新其中数据
|
||||||
int *Track_die_num_Output, //数据处理后要消亡的航迹数目 主程序创建全局变量 数据处理函数更新其中数据
|
int *Track_die_num_Output, //数据处理后要消亡的航迹数目 主程序创建全局变量 数据处理函数更新其中数据
|
||||||
int model
|
int model
|
||||||
);
|
);
|
||||||
|
|
||||||
//波束控制
|
//波束控制
|
||||||
void Beam_Ctrl(struct TrackingBeam *Tracking_beam,
|
void Beam_Ctrl(struct TrackingBeam *Tracking_beam,
|
||||||
struct Track Trust_Track_Output[][10],
|
struct Track Trust_Track_Output[][10],
|
||||||
int *Trust_track_num_Output);
|
int *Trust_track_num_Output);
|
||||||
|
|
||||||
//航迹清空函数
|
//航迹清空函数
|
||||||
int track_clear_all(void);
|
int track_clear_all(void);
|
||||||
|
|
||||||
|
|
||||||
//手动航迹删除函数
|
//手动航迹删除函数
|
||||||
int track_delete(int delete_track_num, //手动删除的航迹数目
|
int track_delete(int delete_track_num, //手动删除的航迹数目
|
||||||
int delete_track_index[]); //手动删除的航迹号
|
int delete_track_index[]); //手动删除的航迹号
|
||||||
|
|
||||||
//手动转TAS跟踪函数
|
//手动转TAS跟踪函数
|
||||||
int tracking_start(int track_index); //需要手动转入TAS跟踪的航迹号
|
int tracking_start(int track_index); //需要手动转入TAS跟踪的航迹号
|
||||||
|
|
||||||
//手动打跟踪波束
|
//手动打跟踪波束
|
||||||
int tracking_point(float Azimuth); //方位角
|
int tracking_point(float Azimuth); //方位角
|
||||||
|
|
||||||
//参数设置初始化
|
//参数设置初始化
|
||||||
int track_process_parameters_initial(struct RadarPara Radar_Parameter);
|
int track_process_parameters_initial(struct RadarPara Radar_Parameter);
|
||||||
|
|
||||||
//参数设置修改函数
|
//参数设置修改函数
|
||||||
int track_process_parameters_modify(struct RadarPara Radar_Parameter);
|
int track_process_parameters_modify(struct RadarPara Radar_Parameter);
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
QVector <PointRecv> Data_buffer; //接收点迹 TWS 输入凝聚
|
QVector <PointRecv> Data_buffer; //接收点迹 TWS 输入凝聚
|
||||||
QVector <PointRecv> Data_buffer_tas; //接收点迹 TAS 输入凝聚
|
QVector <PointRecv> Data_buffer_tas; //接收点迹 TAS 输入凝聚
|
||||||
|
|
||||||
QVector <PointRecv> point_recv; //凝聚后输出的点迹 按点迹区存入 输入航迹关联、起始
|
QVector <PointRecv> point_recv; //凝聚后输出的点迹 按点迹区存入 输入航迹关联、起始
|
||||||
QVector <PointRecv> point_recv_tas; //凝聚后输出的点迹 TAS
|
QVector <PointRecv> point_recv_tas; //凝聚后输出的点迹 TAS
|
||||||
QVector <Trust_Track> trust_track; //可靠航迹 按航迹区存入
|
QVector <Trust_Track> trust_track; //可靠航迹 按航迹区存入
|
||||||
QVector <QVector<Temp_track>> temp_track; //临时航迹 按临时航迹区存入
|
QVector <QVector<Temp_track>> temp_track; //临时航迹 按临时航迹区存入
|
||||||
|
|
||||||
|
|
||||||
int Beam_num; //波位数
|
int Beam_num; //波位数
|
||||||
int beam_count; //波位计数
|
int beam_count; //波位计数
|
||||||
int data_num; //波位1点数
|
int data_num; //波位1点数
|
||||||
|
|
||||||
int beam_index[3]; //3个波位号(当前帧)
|
int beam_index[3]; //3个波位号(当前帧)
|
||||||
|
|
||||||
int TAS_track_idx; //TAS数据的目标批号
|
int TAS_track_idx; //TAS数据的目标批号
|
||||||
|
|
||||||
int Track_Mode; //跟踪模式 1TAS 0TWS
|
int Track_Mode; //跟踪模式 1TAS 0TWS
|
||||||
|
|
||||||
|
|
||||||
struct RadarPara Work_Parameter; //工作参数 参数设置函数外部输入
|
struct RadarPara Work_Parameter; //工作参数 参数设置函数外部输入
|
||||||
|
|
||||||
Dot_Coh dot_coh; //点迹凝聚
|
Dot_Coh dot_coh; //点迹凝聚
|
||||||
|
|
||||||
Dot_Coh_TAS dot_coh_tas;
|
Dot_Coh_TAS dot_coh_tas;
|
||||||
|
|
||||||
Track_Asso track_asso; //航迹关联
|
Track_Asso track_asso; //航迹关联
|
||||||
|
|
||||||
Track_Asso_Tas track_asso_tas;
|
Track_Asso_Tas track_asso_tas;
|
||||||
|
|
||||||
Track_Init track_init; //航迹起始
|
Track_Init track_init; //航迹起始
|
||||||
|
|
||||||
Track_Die track_die; //航迹消亡
|
Track_Die track_die; //航迹消亡
|
||||||
|
|
||||||
Track_Die_Tas track_die_tas;
|
Track_Die_Tas track_die_tas;
|
||||||
|
|
||||||
TAS_Ctrl tas_ctrl; //TAS波束控制
|
TAS_Ctrl tas_ctrl; //TAS波束控制
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -13,12 +13,12 @@ Data_process_class_dll *Data_Process_Factory::p = 0;
|
|||||||
|
|
||||||
Data_process_class_dll *Data_Process_Factory::GetB()
|
Data_process_class_dll *Data_Process_Factory::GetB()
|
||||||
{
|
{
|
||||||
if(!p)
|
if(!p)
|
||||||
{
|
{
|
||||||
p=new Data_Process();
|
p=new Data_Process();
|
||||||
}
|
}
|
||||||
|
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Data_Process_Factory::Destroy()
|
void Data_Process_Factory::Destroy()
|
||||||
@@ -26,8 +26,8 @@ void Data_Process_Factory::Destroy()
|
|||||||
// if (p)
|
// if (p)
|
||||||
// delete p;
|
// delete p;
|
||||||
|
|
||||||
if (p) {
|
if (p) {
|
||||||
delete p;
|
delete p;
|
||||||
p = nullptr;
|
p = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,74 +8,74 @@
|
|||||||
// 输入点迹的数据结构 用户可见
|
// 输入点迹的数据结构 用户可见
|
||||||
struct DATA_PROCESS_CLASS_DLLSHARED_EXPORT DataRev
|
struct DATA_PROCESS_CLASS_DLLSHARED_EXPORT DataRev
|
||||||
{
|
{
|
||||||
float Range; //径向距离 (米)
|
float Range; //径向距离 (米)
|
||||||
float Azimuth; //方位 (度)
|
float Azimuth; //方位 (度)
|
||||||
float Elevation; //俯仰 (度)
|
float Elevation; //俯仰 (度)
|
||||||
float Velocity; //速度 (m/s)
|
float Velocity; //速度 (m/s)
|
||||||
float Amplitude; //幅度
|
float Amplitude; //幅度
|
||||||
float Threshold; //目标门限
|
float Threshold; //目标门限
|
||||||
float Snr; //目标信噪比
|
float Snr; //目标信噪比
|
||||||
float RCS; //目标RCS
|
float RCS; //目标RCS
|
||||||
int CPI_time; //CPI时间 该波位无点迹输入时也需要给出当前时间
|
int CPI_time; //CPI时间 该波位无点迹输入时也需要给出当前时间
|
||||||
int Beam_index_azi_0; //上一个cpi波位
|
int Beam_index_azi_0; //上一个cpi波位
|
||||||
int Beam_index_aiz; //方位波位号(0-24) 该波位无输入点迹时 也需要给出当前波位
|
int Beam_index_aiz; //方位波位号(0-24) 该波位无输入点迹时 也需要给出当前波位
|
||||||
int Beam_index_elev; //俯仰波位号(0-13)
|
int Beam_index_elev; //俯仰波位号(0-13)
|
||||||
int PRI; //PRI(us) 给0
|
int PRI; //PRI(us) 给0
|
||||||
int Freq_index; //频点号 给0
|
int Freq_index; //频点号 给0
|
||||||
int Point_Sum; //输入点迹总数 若该波位无点迹输入 置为0
|
int Point_Sum; //输入点迹总数 若该波位无点迹输入 置为0
|
||||||
int Point_Num; //点迹号(1,2,3,4...)
|
int Point_Num; //点迹号(1,2,3,4...)
|
||||||
int UseFlag; //点迹使用标记 使用1/未使用0 主程序存入数据时置为0
|
int UseFlag; //点迹使用标记 使用1/未使用0 主程序存入数据时置为0
|
||||||
int TAS_track_index; //TAS的航迹号
|
int TAS_track_index; //TAS的航迹号
|
||||||
int point_type; //点迹类型 TAS 1/TWS 0
|
int point_type; //点迹类型 TAS 1/TWS 0
|
||||||
int pitch_num; // 俯仰波位号
|
int pitch_num; // 俯仰波位号
|
||||||
float speed_dim[129]; // 目标的十字星数据,目标点速度维129个点
|
float speed_dim[129]; // 目标的十字星数据,目标点速度维129个点
|
||||||
float range_dim[8]; // 目标的十字星数据,目标点距离维8个点
|
float range_dim[8]; // 目标的十字星数据,目标点距离维8个点
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//输出航迹的数据结构 用户可见
|
//输出航迹的数据结构 用户可见
|
||||||
struct DATA_PROCESS_CLASS_DLLSHARED_EXPORT Track
|
struct DATA_PROCESS_CLASS_DLLSHARED_EXPORT Track
|
||||||
{
|
{
|
||||||
float x; //x坐标
|
float x; //x坐标
|
||||||
float y; //y坐标
|
float y; //y坐标
|
||||||
float z; //z坐标
|
float z; //z坐标
|
||||||
float v_x; //x速度
|
float v_x; //x速度
|
||||||
float v_y; //y速度
|
float v_y; //y速度
|
||||||
float v_z; //z速度
|
float v_z; //z速度
|
||||||
float Range; //径向距离
|
float Range; //径向距离
|
||||||
float Azimuth; //方位
|
float Azimuth; //方位
|
||||||
float Elevation; //俯仰
|
float Elevation; //俯仰
|
||||||
float Range_V; //速度
|
float Range_V; //速度
|
||||||
float Amplitude; //幅度
|
float Amplitude; //幅度
|
||||||
int Track_Index; //航迹号
|
int Track_Index; //航迹号
|
||||||
int Point_Sum; //本条航迹更新点的数目
|
int Point_Sum; //本条航迹更新点的数目
|
||||||
int Flag_Direction; //方向标志1靠近/0远离
|
int Flag_Direction; //方向标志1靠近/0远离
|
||||||
int Flag_Point; //点迹类型1实点/0补点
|
int Flag_Point; //点迹类型1实点/0补点
|
||||||
float x_Predict; //x坐标的一步预测
|
float x_Predict; //x坐标的一步预测
|
||||||
float y_Predict; //y坐标的一步预测
|
float y_Predict; //y坐标的一步预测
|
||||||
float z_Predict; //z坐标的一步预测
|
float z_Predict; //z坐标的一步预测
|
||||||
float Range_Predict; //径向距离的一步预测
|
float Range_Predict; //径向距离的一步预测
|
||||||
float Azimuth_Predict; //方位的一步预测
|
float Azimuth_Predict; //方位的一步预测
|
||||||
float Elevation_Predict; //俯仰的一步预测
|
float Elevation_Predict; //俯仰的一步预测
|
||||||
int Track_Mode; //跟踪模式,TAS 1/TWS 0
|
int Track_Mode; //跟踪模式,TAS 1/TWS 0
|
||||||
float Direction_Angle; //目标航向角
|
float Direction_Angle; //目标航向角
|
||||||
int Target_Type; //目标类型
|
int Target_Type; //目标类型
|
||||||
|
|
||||||
int point_type; //点迹类型 TAS 1/TWS 0
|
int point_type; //点迹类型 TAS 1/TWS 0
|
||||||
|
|
||||||
float range_point; //关联上的点迹信息(距离、方位、俯仰、径向速度)
|
float range_point; //关联上的点迹信息(距离、方位、俯仰、径向速度)
|
||||||
float azi_point;
|
float azi_point;
|
||||||
float elev_point;
|
float elev_point;
|
||||||
float vr_point;
|
float vr_point;
|
||||||
float prf_point;
|
float prf_point;
|
||||||
|
|
||||||
float track_time; //航迹时间 (单位 s)
|
float track_time; //航迹时间 (单位 s)
|
||||||
float track_snr; //信噪比
|
float track_snr; //信噪比
|
||||||
float track_rcs; //rcs
|
float track_rcs; //rcs
|
||||||
|
|
||||||
int pitch_num; // 俯仰波位号
|
int pitch_num; // 俯仰波位号
|
||||||
float speed_dim[129]; // 目标的十字星数据,目标点速度维129个点
|
float speed_dim[129]; // 目标的十字星数据,目标点速度维129个点
|
||||||
float range_dim[8]; // 目标的十字星数据,目标点距离维8个点
|
float range_dim[8]; // 目标的十字星数据,目标点距离维8个点
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -83,24 +83,24 @@ struct DATA_PROCESS_CLASS_DLLSHARED_EXPORT Track
|
|||||||
// 跟踪波束信息的结构体
|
// 跟踪波束信息的结构体
|
||||||
struct DATA_PROCESS_CLASS_DLLSHARED_EXPORT TrackingBeam
|
struct DATA_PROCESS_CLASS_DLLSHARED_EXPORT TrackingBeam
|
||||||
{
|
{
|
||||||
int open_flag; //是否开启 1开启 0不开启
|
int open_flag; //是否开启 1开启 0不开启
|
||||||
|
|
||||||
int type; //类型
|
int type; //类型
|
||||||
float Range; //跟踪目标距离
|
float Range; //跟踪目标距离
|
||||||
float Azi; //跟踪目标方位
|
float Azi; //跟踪目标方位
|
||||||
float Elev; //跟踪目标俯仰
|
float Elev; //跟踪目标俯仰
|
||||||
|
|
||||||
int TAS_track_index; //目标批号
|
int TAS_track_index; //目标批号
|
||||||
};
|
};
|
||||||
|
|
||||||
//引导跟踪信息的结构体
|
//引导跟踪信息的结构体
|
||||||
struct DATA_PROCESS_CLASS_DLLSHARED_EXPORT Target_direct_tracking
|
struct DATA_PROCESS_CLASS_DLLSHARED_EXPORT Target_direct_tracking
|
||||||
{
|
{
|
||||||
int Track_ID; //引导目标批号
|
int Track_ID; //引导目标批号
|
||||||
float Range; //引导目标距离
|
float Range; //引导目标距离
|
||||||
float Azi; //引导目标方位
|
float Azi; //引导目标方位
|
||||||
float Elev; //引导目标俯仰
|
float Elev; //引导目标俯仰
|
||||||
int open_flag; // 1 引导跟踪 0 结束引导跟踪
|
int open_flag; // 1 引导跟踪 0 结束引导跟踪
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -108,65 +108,65 @@ struct DATA_PROCESS_CLASS_DLLSHARED_EXPORT Target_direct_tracking
|
|||||||
// 雷达参数结构体
|
// 雷达参数结构体
|
||||||
struct DATA_PROCESS_CLASS_DLLSHARED_EXPORT RadarPara
|
struct DATA_PROCESS_CLASS_DLLSHARED_EXPORT RadarPara
|
||||||
{
|
{
|
||||||
int Beam_num; //波位数
|
int Beam_num; //波位数
|
||||||
|
|
||||||
float Height; //雷达平台高度 (m)
|
float Height; //雷达平台高度 (m)
|
||||||
|
|
||||||
float Sys_delay; //系统延迟 (s)
|
float Sys_delay; //系统延迟 (s)
|
||||||
float R_TAS_max; //TAS最大距离 (m)
|
float R_TAS_max; //TAS最大距离 (m)
|
||||||
float R_TAS_min; //TAS最小距离 (m)
|
float R_TAS_min; //TAS最小距离 (m)
|
||||||
|
|
||||||
float V_TAS_max; //TAS最大速度 (m/s)
|
float V_TAS_max; //TAS最大速度 (m/s)
|
||||||
float V_TAS_min; //TAS最小速度 (m/s)
|
float V_TAS_min; //TAS最小速度 (m/s)
|
||||||
|
|
||||||
float TAS_Height_1; //TAS跟踪高度1 (m)
|
float TAS_Height_1; //TAS跟踪高度1 (m)
|
||||||
float TAS_Height_2; //TAS跟踪高度2 (m)
|
float TAS_Height_2; //TAS跟踪高度2 (m)
|
||||||
float TAS_Height_3; //TAS跟踪高度3 (m)
|
float TAS_Height_3; //TAS跟踪高度3 (m)
|
||||||
float TAS_Height_4; //TAS跟踪高度4 (m)
|
float TAS_Height_4; //TAS跟踪高度4 (m)
|
||||||
float TAS_Height_5; //TAS跟踪高度5 (m)
|
float TAS_Height_5; //TAS跟踪高度5 (m)
|
||||||
|
|
||||||
|
|
||||||
int track_prohibite_area_num; //禁止航迹起始的区域数目
|
int track_prohibite_area_num; //禁止航迹起始的区域数目
|
||||||
float R_max_track_prohibited[30]; //最大距离 (m)
|
float R_max_track_prohibited[30]; //最大距离 (m)
|
||||||
float R_min_track_prohibited[30]; //最小距离 (m)
|
float R_min_track_prohibited[30]; //最小距离 (m)
|
||||||
float Azimuth_max_track_prohibited[30]; //最大方位角 (度)
|
float Azimuth_max_track_prohibited[30]; //最大方位角 (度)
|
||||||
float Azimuth_min_track_prohibited[30]; //最小方位角 (度)
|
float Azimuth_min_track_prohibited[30]; //最小方位角 (度)
|
||||||
|
|
||||||
|
|
||||||
int TAS_prohibite_area_num; //禁止TAS的区域数目
|
int TAS_prohibite_area_num; //禁止TAS的区域数目
|
||||||
float R_max_TAS_prohibited[30]; //最大距离 (m)
|
float R_max_TAS_prohibited[30]; //最大距离 (m)
|
||||||
float R_min_TAS_prohibited[30]; //最小距离 (m)
|
float R_min_TAS_prohibited[30]; //最小距离 (m)
|
||||||
float Azimuth_max_TAS_prohibited[30]; //最大方位角 (度)
|
float Azimuth_max_TAS_prohibited[30]; //最大方位角 (度)
|
||||||
float Azimuth_min_TAS_prohibited[30]; //最小方位角 (度)
|
float Azimuth_min_TAS_prohibited[30]; //最小方位角 (度)
|
||||||
|
|
||||||
int cfar_th; //cfar门限
|
int cfar_th; //cfar门限
|
||||||
|
|
||||||
int work_mode; //工作模式 0进程 1中程 3远程
|
int work_mode; //工作模式 0进程 1中程 3远程
|
||||||
int north_angle; //北偏角
|
int north_angle; //北偏角
|
||||||
|
|
||||||
float V_MAX; //最大速度
|
float V_MAX; //最大速度
|
||||||
float V_MIN; //最小速度
|
float V_MIN; //最小速度
|
||||||
|
|
||||||
float DATA_RATE_SHORT; //三种不同模式下的 数据率
|
float DATA_RATE_SHORT; //三种不同模式下的 数据率
|
||||||
float DATA_RATE_MIDDLE;
|
float DATA_RATE_MIDDLE;
|
||||||
float DATA_RATE_FAR;
|
float DATA_RATE_FAR;
|
||||||
|
|
||||||
|
|
||||||
//数据关联参数
|
//数据关联参数
|
||||||
int track_start_point_num; //起批点数(典型值 3或4)
|
int track_start_point_num; //起批点数(典型值 3或4)
|
||||||
float track_start_threshold; //起航波门大小(典型值 3)
|
float track_start_threshold; //起航波门大小(典型值 3)
|
||||||
float track_asso_threshold; //关联波门大小(典型值 3)
|
float track_asso_threshold; //关联波门大小(典型值 3)
|
||||||
float track_asso_threshold_tas; //关联波门大小tas (典型值 3)
|
float track_asso_threshold_tas; //关联波门大小tas (典型值 3)
|
||||||
|
|
||||||
//singer模型机动参数
|
//singer模型机动参数
|
||||||
float Model1_Q_fast; //0.00001
|
float Model1_Q_fast; //0.00001
|
||||||
float Model1_Q_slow; //0.00001
|
float Model1_Q_slow; //0.00001
|
||||||
|
|
||||||
float Model2_Q_fast; //0.1
|
float Model2_Q_fast; //0.1
|
||||||
float Model2_Q_slow; //0.001
|
float Model2_Q_slow; //0.001
|
||||||
|
|
||||||
float Model3_Q_fast; //0.8
|
float Model3_Q_fast; //0.8
|
||||||
float Model3_Q_slow; //0.4
|
float Model3_Q_slow; //0.4
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -178,90 +178,90 @@ class DATA_PROCESS_CLASS_DLLSHARED_EXPORT Data_process_class_dll
|
|||||||
public:
|
public:
|
||||||
// Data_process_class_dll();
|
// Data_process_class_dll();
|
||||||
|
|
||||||
//数据预处理函数
|
//数据预处理函数
|
||||||
virtual int data_preprocess(struct DataRev Data_Input[150]) //雷达的输入点迹 主程序创建全局变量 输入数据
|
virtual int data_preprocess(struct DataRev Data_Input[150]) //雷达的输入点迹 主程序创建全局变量 输入数据
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//数据处理函数
|
//数据处理函数
|
||||||
virtual int track_process(struct Track Trust_Track_Output[][10], //数据处理输出的航迹更新信息 主程序创建全局变量 数据处理函数更新其中数据
|
virtual int track_process(struct Track Trust_Track_Output[][10], //数据处理输出的航迹更新信息 主程序创建全局变量 数据处理函数更新其中数据
|
||||||
int *Trust_track_num_Output, //数据处理后输出的航迹数目 主程序创建全局变量 数据处理函数更新其中数据
|
int *Trust_track_num_Output, //数据处理后输出的航迹数目 主程序创建全局变量 数据处理函数更新其中数据
|
||||||
int Track_die_Index_Output[], //数据处理后要消亡的航迹 主程序创建全局变量 数据处理函数更新其中数据
|
int Track_die_Index_Output[], //数据处理后要消亡的航迹 主程序创建全局变量 数据处理函数更新其中数据
|
||||||
int *Track_die_num_Output, //数据处理后要消亡的航迹数目
|
int *Track_die_num_Output, //数据处理后要消亡的航迹数目
|
||||||
int model //模式 输入data_preprocess的返回值
|
int model //模式 输入data_preprocess的返回值
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//波束控制
|
//波束控制
|
||||||
virtual void Beam_Ctrl(struct TrackingBeam *Tracking_beam,
|
virtual void Beam_Ctrl(struct TrackingBeam *Tracking_beam,
|
||||||
struct Track Trust_Track_Output[][10],
|
struct Track Trust_Track_Output[][10],
|
||||||
int *Trust_track_num_Output)
|
int *Trust_track_num_Output)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//引导跟踪处理函数
|
//引导跟踪处理函数
|
||||||
virtual int direct_tracking_process(struct Target_direct_tracking Target_direct_info, //引导信息
|
virtual int direct_tracking_process(struct Target_direct_tracking Target_direct_info, //引导信息
|
||||||
struct DataRev Data_Input[150], //雷达的输入点迹
|
struct DataRev Data_Input[150], //雷达的输入点迹
|
||||||
struct Track Trust_Track_Output[][10], //数据处理输出的航迹更新信息 主程序创建全局变量 数据处理函数更新其中数据
|
struct Track Trust_Track_Output[][10], //数据处理输出的航迹更新信息 主程序创建全局变量 数据处理函数更新其中数据
|
||||||
int *Trust_track_num_Output, //数据处理后输出的航迹数目 主程序创建全局变量 数据处理函数更新其中数据
|
int *Trust_track_num_Output, //数据处理后输出的航迹数目 主程序创建全局变量 数据处理函数更新其中数据
|
||||||
int Track_die_Index_Output[], //数据处理后要消亡的航迹 主程序创建全局变量 数据处理函数更新其中数据
|
int Track_die_Index_Output[], //数据处理后要消亡的航迹 主程序创建全局变量 数据处理函数更新其中数据
|
||||||
int *Track_die_num_Output, //数据处理后要消亡的航迹数目
|
int *Track_die_num_Output, //数据处理后要消亡的航迹数目
|
||||||
struct TrackingBeam *Tracking_beam //波束控制信息
|
struct TrackingBeam *Tracking_beam //波束控制信息
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//航迹清空函数
|
//航迹清空函数
|
||||||
virtual int track_clear_all(void)
|
virtual int track_clear_all(void)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//手动航迹删除函数
|
//手动航迹删除函数
|
||||||
virtual int track_delete(int delete_track_num, //手动删除的航迹数目
|
virtual int track_delete(int delete_track_num, //手动删除的航迹数目
|
||||||
int delete_track_index[]) //手动删除的航迹号
|
int delete_track_index[]) //手动删除的航迹号
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//手动转TAS跟踪函数
|
//手动转TAS跟踪函数
|
||||||
virtual int tracking_start(int track_index) //需要手动转入TAS跟踪的航迹号
|
virtual int tracking_start(int track_index) //需要手动转入TAS跟踪的航迹号
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//手动打跟踪波束
|
//手动打跟踪波束
|
||||||
virtual int tracking_point(float Azimuth) //方位角
|
virtual int tracking_point(float Azimuth) //方位角
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//参数设置初始化函数
|
//参数设置初始化函数
|
||||||
virtual int track_process_parameters_initial(struct RadarPara Radar_Parameter)
|
virtual int track_process_parameters_initial(struct RadarPara Radar_Parameter)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//参数设置修改函数
|
//参数设置修改函数
|
||||||
virtual int track_process_parameters_modify(struct RadarPara Radar_Parameter)
|
virtual int track_process_parameters_modify(struct RadarPara Radar_Parameter)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -272,11 +272,11 @@ public:
|
|||||||
class DATA_PROCESS_CLASS_DLLSHARED_EXPORT Data_Process_Factory
|
class DATA_PROCESS_CLASS_DLLSHARED_EXPORT Data_Process_Factory
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static Data_process_class_dll *GetB(); //创建
|
static Data_process_class_dll *GetB(); //创建
|
||||||
static void Destroy(); //销毁
|
static void Destroy(); //销毁
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static Data_process_class_dll *p;
|
static Data_process_class_dll *p;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+197
-197
@@ -6,249 +6,249 @@ using namespace std;
|
|||||||
|
|
||||||
|
|
||||||
int Dot_Coh::dot_coh_process(QVector <PointRecv> *data_input,
|
int Dot_Coh::dot_coh_process(QVector <PointRecv> *data_input,
|
||||||
QVector <PointRecv> *point_recv,
|
QVector <PointRecv> *point_recv,
|
||||||
struct RadarPara Work_Parameter)
|
struct RadarPara Work_Parameter)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(data_input->size()>1)
|
if(data_input->size()>1)
|
||||||
{
|
{
|
||||||
|
|
||||||
for (unsigned int loop_of_point=0; loop_of_point<data_input->size()-1;loop_of_point++ )
|
for (unsigned int loop_of_point=0; loop_of_point<data_input->size()-1;loop_of_point++ )
|
||||||
{
|
{
|
||||||
if( (*data_input)[loop_of_point].Use_Flag!=1)
|
if( (*data_input)[loop_of_point].Use_Flag!=1)
|
||||||
{
|
{
|
||||||
float point_0_R=(*data_input)[loop_of_point].Range;
|
float point_0_R=(*data_input)[loop_of_point].Range;
|
||||||
float point_0_V=(*data_input)[loop_of_point].Velocity;
|
float point_0_V=(*data_input)[loop_of_point].Velocity;
|
||||||
float point_0_F=(*data_input)[loop_of_point].Azimuth;
|
float point_0_F=(*data_input)[loop_of_point].Azimuth;
|
||||||
float point_0_A=(*data_input)[loop_of_point].Amplitude;
|
float point_0_A=(*data_input)[loop_of_point].Amplitude;
|
||||||
for (unsigned int i=loop_of_point+1;i<data_input->size();i++)
|
for (unsigned int i=loop_of_point+1;i<data_input->size();i++)
|
||||||
{
|
{
|
||||||
if((*data_input)[loop_of_point].Use_Flag!=1)
|
if((*data_input)[loop_of_point].Use_Flag!=1)
|
||||||
{
|
{
|
||||||
float point_1_R=(*data_input)[i].Range;
|
float point_1_R=(*data_input)[i].Range;
|
||||||
float point_1_V=(*data_input)[i].Velocity;
|
float point_1_V=(*data_input)[i].Velocity;
|
||||||
float point_1_F=(*data_input)[i].Azimuth;
|
float point_1_F=(*data_input)[i].Azimuth;
|
||||||
float point_1_A=(*data_input)[i].Amplitude;
|
float point_1_A=(*data_input)[i].Amplitude;
|
||||||
|
|
||||||
//凝聚条件: 距离、方位接近
|
//凝聚条件: 距离、方位接近
|
||||||
if(Work_Parameter.work_mode == 0)
|
if(Work_Parameter.work_mode == 0)
|
||||||
{
|
{
|
||||||
if( (fabs(point_0_R-point_1_R)<=DOT_COH_RANGE && fabs(point_0_F-point_1_F) <=DOT_COH_AZI/180.0*PI && fabs(point_0_V-point_1_V)<=DOT_COH_V)//
|
if( (fabs(point_0_R-point_1_R)<=DOT_COH_RANGE && fabs(point_0_F-point_1_F) <=DOT_COH_AZI/180.0*PI && fabs(point_0_V-point_1_V)<=DOT_COH_V)//
|
||||||
&& point_0_A <point_1_A )//
|
&& point_0_A <point_1_A )//
|
||||||
{
|
{
|
||||||
point_0_R=(*data_input)[i].Range;
|
point_0_R=(*data_input)[i].Range;
|
||||||
point_0_V=(*data_input)[i].Velocity;
|
point_0_V=(*data_input)[i].Velocity;
|
||||||
point_0_A=(*data_input)[i].Amplitude;
|
point_0_A=(*data_input)[i].Amplitude;
|
||||||
point_0_F=(*data_input)[i].Azimuth;
|
point_0_F=(*data_input)[i].Azimuth;
|
||||||
(*data_input)[loop_of_point].Use_Flag=1;
|
(*data_input)[loop_of_point].Use_Flag=1;
|
||||||
}
|
}
|
||||||
else if( (fabs(point_0_R-point_1_R)<=DOT_COH_RANGE && fabs(point_0_F-point_1_F) <=DOT_COH_AZI/180.0*PI && fabs(point_0_V-point_1_V)<=DOT_COH_V)//
|
else if( (fabs(point_0_R-point_1_R)<=DOT_COH_RANGE && fabs(point_0_F-point_1_F) <=DOT_COH_AZI/180.0*PI && fabs(point_0_V-point_1_V)<=DOT_COH_V)//
|
||||||
&& point_0_A >= point_1_A)//
|
&& point_0_A >= point_1_A)//
|
||||||
{
|
{
|
||||||
(*data_input)[i].Use_Flag=1;
|
(*data_input)[i].Use_Flag=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
float delta_F = fabs(point_0_F-point_1_F)<2*PI-fabs(point_0_F-point_1_F) ? fabs(point_0_F-point_1_F) :2*PI-fabs(point_0_F-point_1_F);
|
float delta_F = fabs(point_0_F-point_1_F)<2*PI-fabs(point_0_F-point_1_F) ? fabs(point_0_F-point_1_F) :2*PI-fabs(point_0_F-point_1_F);
|
||||||
if( (fabs(point_0_R-point_1_R)<=DOT_COH_RANGE && delta_F <=DOT_COH_AZI/180.0*PI )//
|
if( (fabs(point_0_R-point_1_R)<=DOT_COH_RANGE && delta_F <=DOT_COH_AZI/180.0*PI )//
|
||||||
&& point_0_A <point_1_A )//
|
&& point_0_A <point_1_A )//
|
||||||
{
|
{
|
||||||
point_0_R=(*data_input)[i].Range;
|
point_0_R=(*data_input)[i].Range;
|
||||||
point_0_V=(*data_input)[i].Velocity;
|
point_0_V=(*data_input)[i].Velocity;
|
||||||
point_0_A=(*data_input)[i].Amplitude;
|
point_0_A=(*data_input)[i].Amplitude;
|
||||||
point_0_F=(*data_input)[i].Azimuth;
|
point_0_F=(*data_input)[i].Azimuth;
|
||||||
(*data_input)[loop_of_point].Use_Flag=1;
|
(*data_input)[loop_of_point].Use_Flag=1;
|
||||||
}
|
}
|
||||||
else if( (fabs(point_0_R-point_1_R)<=DOT_COH_RANGE && delta_F <=DOT_COH_AZI/180.0*PI )//
|
else if( (fabs(point_0_R-point_1_R)<=DOT_COH_RANGE && delta_F <=DOT_COH_AZI/180.0*PI )//
|
||||||
&& point_0_A >= point_1_A)//
|
&& point_0_A >= point_1_A)//
|
||||||
{
|
{
|
||||||
(*data_input)[i].Use_Flag=1;
|
(*data_input)[i].Use_Flag=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//删除凝聚点 和 量程范围外点
|
//删除凝聚点 和 量程范围外点
|
||||||
QVector <PointRecv>::iterator Iter;
|
QVector <PointRecv>::iterator Iter;
|
||||||
for (Iter=data_input->begin(); Iter!=data_input->end();)
|
for (Iter=data_input->begin(); Iter!=data_input->end();)
|
||||||
{
|
{
|
||||||
if((*Iter).Use_Flag==1 || (*Iter).Range <R_MIN || (*Iter).Range > R_MAX )
|
if((*Iter).Use_Flag==1 || (*Iter).Range <R_MIN || (*Iter).Range > R_MAX )
|
||||||
{
|
{
|
||||||
data_input->erase(Iter);
|
data_input->erase(Iter);
|
||||||
Iter=data_input->begin();
|
Iter=data_input->begin();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Iter++;
|
Iter++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i=0;i<data_input->size();i++) //data_buffer_2 ---> point_recv
|
for (int i=0;i<data_input->size();i++) //data_buffer_2 ---> point_recv
|
||||||
{
|
{
|
||||||
(*point_recv).push_back((*data_input)[i]);
|
(*point_recv).push_back((*data_input)[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int Dot_Coh::dot_coh_process_buff( QVector <PointRecv> *data_input, //输入的点迹
|
int Dot_Coh::dot_coh_process_buff( QVector <PointRecv> *data_input, //输入的点迹
|
||||||
QVector <PointRecv> *point_recv, //输出点迹
|
QVector <PointRecv> *point_recv, //输出点迹
|
||||||
struct RadarPara Work_Parameter //工作参数
|
struct RadarPara Work_Parameter //工作参数
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//1. data_input与data_input_buff进行凝聚
|
//1. data_input与data_input_buff进行凝聚
|
||||||
|
|
||||||
//1.1 data_input、data_input_buff中的数据放在一起
|
//1.1 data_input、data_input_buff中的数据放在一起
|
||||||
QVector <PointRecv> data_tmp;
|
QVector <PointRecv> data_tmp;
|
||||||
for (int i=0;i<data_input_buff.size();i++)
|
for (int i=0;i<data_input_buff.size();i++)
|
||||||
{
|
{
|
||||||
data_tmp.push_back(data_input_buff[i]);
|
data_tmp.push_back(data_input_buff[i]);
|
||||||
data_tmp[data_tmp.size()-1].point_section_asso = 1;
|
data_tmp[data_tmp.size()-1].point_section_asso = 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
for (int i=0;i<data_input->size();i++)
|
for (int i=0;i<data_input->size();i++)
|
||||||
{
|
{
|
||||||
data_tmp.push_back((*data_input)[i]);
|
data_tmp.push_back((*data_input)[i]);
|
||||||
data_tmp[data_tmp.size()-1].point_section_asso = 2;
|
data_tmp[data_tmp.size()-1].point_section_asso = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
//1.2 把data_input、data_input_buff清空
|
//1.2 把data_input、data_input_buff清空
|
||||||
|
|
||||||
QVector<PointRecv>().swap(data_input_buff);
|
QVector<PointRecv>().swap(data_input_buff);
|
||||||
QVector<PointRecv>().swap(*data_input);
|
QVector<PointRecv>().swap(*data_input);
|
||||||
|
|
||||||
|
|
||||||
//1.3 对data_tmp进行凝聚
|
//1.3 对data_tmp进行凝聚
|
||||||
if(data_tmp.size()>1)
|
if(data_tmp.size()>1)
|
||||||
{
|
{
|
||||||
|
|
||||||
for (unsigned int loop_of_point=0; loop_of_point<data_tmp.size()-1;loop_of_point++ )
|
for (unsigned int loop_of_point=0; loop_of_point<data_tmp.size()-1;loop_of_point++ )
|
||||||
{
|
{
|
||||||
if( data_tmp[loop_of_point].Use_Flag!=1)
|
if( data_tmp[loop_of_point].Use_Flag!=1)
|
||||||
{
|
{
|
||||||
float point_0_R=data_tmp[loop_of_point].Range;
|
float point_0_R=data_tmp[loop_of_point].Range;
|
||||||
float point_0_V=data_tmp[loop_of_point].Velocity;
|
float point_0_V=data_tmp[loop_of_point].Velocity;
|
||||||
float point_0_F=data_tmp[loop_of_point].Azimuth;
|
float point_0_F=data_tmp[loop_of_point].Azimuth;
|
||||||
float point_0_A=data_tmp[loop_of_point].Amplitude;
|
float point_0_A=data_tmp[loop_of_point].Amplitude;
|
||||||
for (unsigned int i=loop_of_point+1;i<data_tmp.size();i++)
|
for (unsigned int i=loop_of_point+1;i<data_tmp.size();i++)
|
||||||
{
|
{
|
||||||
if(data_tmp[loop_of_point].Use_Flag!=1)
|
if(data_tmp[loop_of_point].Use_Flag!=1)
|
||||||
{
|
{
|
||||||
float point_1_R=data_tmp[i].Range;
|
float point_1_R=data_tmp[i].Range;
|
||||||
float point_1_V=data_tmp[i].Velocity;
|
float point_1_V=data_tmp[i].Velocity;
|
||||||
float point_1_F=data_tmp[i].Azimuth;
|
float point_1_F=data_tmp[i].Azimuth;
|
||||||
float point_1_A=data_tmp[i].Amplitude;
|
float point_1_A=data_tmp[i].Amplitude;
|
||||||
|
|
||||||
//凝聚条件: 距离、方位接近
|
//凝聚条件: 距离、方位接近
|
||||||
if(Work_Parameter.work_mode == 0)
|
if(Work_Parameter.work_mode == 0)
|
||||||
{
|
{
|
||||||
if( (fabs(point_0_R-point_1_R)<=DOT_COH_RANGE && fabs(point_0_F-point_1_F) <=DOT_COH_AZI/180.0*PI && fabs(point_0_V-point_1_V)<=DOT_COH_V)//
|
if( (fabs(point_0_R-point_1_R)<=DOT_COH_RANGE && fabs(point_0_F-point_1_F) <=DOT_COH_AZI/180.0*PI && fabs(point_0_V-point_1_V)<=DOT_COH_V)//
|
||||||
&& point_0_A <point_1_A )//
|
&& point_0_A <point_1_A )//
|
||||||
{
|
{
|
||||||
point_0_R=data_tmp[i].Range;
|
point_0_R=data_tmp[i].Range;
|
||||||
point_0_V=data_tmp[i].Velocity;
|
point_0_V=data_tmp[i].Velocity;
|
||||||
point_0_A=data_tmp[i].Amplitude;
|
point_0_A=data_tmp[i].Amplitude;
|
||||||
point_0_F=data_tmp[i].Azimuth;
|
point_0_F=data_tmp[i].Azimuth;
|
||||||
data_tmp[loop_of_point].Use_Flag=1;
|
data_tmp[loop_of_point].Use_Flag=1;
|
||||||
}
|
}
|
||||||
else if( (fabs(point_0_R-point_1_R)<=DOT_COH_RANGE && fabs(point_0_F-point_1_F) <=DOT_COH_AZI/180.0*PI && fabs(point_0_V-point_1_V)<=DOT_COH_V)//
|
else if( (fabs(point_0_R-point_1_R)<=DOT_COH_RANGE && fabs(point_0_F-point_1_F) <=DOT_COH_AZI/180.0*PI && fabs(point_0_V-point_1_V)<=DOT_COH_V)//
|
||||||
&& point_0_A >= point_1_A)//
|
&& point_0_A >= point_1_A)//
|
||||||
{
|
{
|
||||||
data_tmp[i].Use_Flag=1;
|
data_tmp[i].Use_Flag=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
float delta_F = fabs(point_0_F-point_1_F)<2*PI-fabs(point_0_F-point_1_F) ? fabs(point_0_F-point_1_F) :2*PI-fabs(point_0_F-point_1_F);
|
float delta_F = fabs(point_0_F-point_1_F)<2*PI-fabs(point_0_F-point_1_F) ? fabs(point_0_F-point_1_F) :2*PI-fabs(point_0_F-point_1_F);
|
||||||
if( (fabs(point_0_R-point_1_R)<=DOT_COH_RANGE && delta_F <=DOT_COH_AZI/180.0*PI )//
|
if( (fabs(point_0_R-point_1_R)<=DOT_COH_RANGE && delta_F <=DOT_COH_AZI/180.0*PI )//
|
||||||
&& point_0_A <point_1_A )//
|
&& point_0_A <point_1_A )//
|
||||||
{
|
{
|
||||||
point_0_R=data_tmp[i].Range;
|
point_0_R=data_tmp[i].Range;
|
||||||
point_0_V=data_tmp[i].Velocity;
|
point_0_V=data_tmp[i].Velocity;
|
||||||
point_0_A=data_tmp[i].Amplitude;
|
point_0_A=data_tmp[i].Amplitude;
|
||||||
point_0_F=data_tmp[i].Azimuth;
|
point_0_F=data_tmp[i].Azimuth;
|
||||||
data_tmp[loop_of_point].Use_Flag=1;
|
data_tmp[loop_of_point].Use_Flag=1;
|
||||||
}
|
}
|
||||||
else if( (fabs(point_0_R-point_1_R)<=DOT_COH_RANGE && delta_F <=DOT_COH_AZI/180.0*PI )//
|
else if( (fabs(point_0_R-point_1_R)<=DOT_COH_RANGE && delta_F <=DOT_COH_AZI/180.0*PI )//
|
||||||
&& point_0_A >= point_1_A)//
|
&& point_0_A >= point_1_A)//
|
||||||
{
|
{
|
||||||
data_tmp[i].Use_Flag=1;
|
data_tmp[i].Use_Flag=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//1.4 删除凝聚点 和 量程范围外点
|
//1.4 删除凝聚点 和 量程范围外点
|
||||||
QVector <PointRecv>::iterator Iter;
|
QVector <PointRecv>::iterator Iter;
|
||||||
for (Iter=data_tmp.begin(); Iter!=data_tmp.end();)
|
for (Iter=data_tmp.begin(); Iter!=data_tmp.end();)
|
||||||
{
|
{
|
||||||
if((*Iter).Use_Flag==1 || (*Iter).Range <R_MIN || (*Iter).Range > R_MAX )
|
if((*Iter).Use_Flag==1 || (*Iter).Range <R_MIN || (*Iter).Range > R_MAX )
|
||||||
{
|
{
|
||||||
data_tmp.erase(Iter);
|
data_tmp.erase(Iter);
|
||||||
Iter=data_tmp.begin();
|
Iter=data_tmp.begin();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Iter++;
|
Iter++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//1.5 将data_tmp中凝聚后的点再分到 data_input_buff和data_input中
|
//1.5 将data_tmp中凝聚后的点再分到 data_input_buff和data_input中
|
||||||
for (int i=0;i<data_tmp.size();i++)
|
for (int i=0;i<data_tmp.size();i++)
|
||||||
{
|
{
|
||||||
if(data_tmp[i].point_section_asso==1)
|
if(data_tmp[i].point_section_asso==1)
|
||||||
{
|
{
|
||||||
data_input_buff.push_back(data_tmp[i]);
|
data_input_buff.push_back(data_tmp[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(data_tmp[i].point_section_asso==2)
|
if(data_tmp[i].point_section_asso==2)
|
||||||
{
|
{
|
||||||
(*data_input).push_back(data_tmp[i]);
|
(*data_input).push_back(data_tmp[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QVector<PointRecv>().swap(data_tmp);
|
QVector<PointRecv>().swap(data_tmp);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//2.data_input_buff数据输出给point_recv
|
//2.data_input_buff数据输出给point_recv
|
||||||
|
|
||||||
for (int i=0;i<data_input_buff.size();i++)
|
for (int i=0;i<data_input_buff.size();i++)
|
||||||
{
|
{
|
||||||
(*point_recv).push_back(data_input_buff[i]);
|
(*point_recv).push_back(data_input_buff[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
QVector<PointRecv>().swap(data_input_buff);
|
QVector<PointRecv>().swap(data_input_buff);
|
||||||
|
|
||||||
|
|
||||||
//3.data_input数据输出给data_input_buff
|
//3.data_input数据输出给data_input_buff
|
||||||
for (int i=0;i<data_input->size();i++)
|
for (int i=0;i<data_input->size();i++)
|
||||||
{
|
{
|
||||||
data_input_buff.push_back((*data_input)[i]);
|
data_input_buff.push_back((*data_input)[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -13,29 +13,29 @@ class Dot_Coh
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// 点迹凝聚函数
|
// 点迹凝聚函数
|
||||||
int dot_coh_process( QVector <PointRecv> *data_input, //输入的点迹
|
int dot_coh_process( QVector <PointRecv> *data_input, //输入的点迹
|
||||||
QVector <PointRecv> *point_recv, //输出点迹
|
QVector <PointRecv> *point_recv, //输出点迹
|
||||||
struct RadarPara Work_Parameter //工作参数
|
struct RadarPara Work_Parameter //工作参数
|
||||||
);
|
);
|
||||||
|
|
||||||
//点迹凝聚函数,缓存一帧,一边输出,一边进行滑窗凝聚
|
//点迹凝聚函数,缓存一帧,一边输出,一边进行滑窗凝聚
|
||||||
int dot_coh_process_buff( QVector <PointRecv> *data_input, //输入的点迹
|
int dot_coh_process_buff( QVector <PointRecv> *data_input, //输入的点迹
|
||||||
QVector <PointRecv> *point_recv, //输出点迹
|
QVector <PointRecv> *point_recv, //输出点迹
|
||||||
struct RadarPara Work_Parameter //工作参数
|
struct RadarPara Work_Parameter //工作参数
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//构造函数
|
//构造函数
|
||||||
Dot_Coh();
|
Dot_Coh();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QVector <PointRecv> data_input_buff;
|
QVector <PointRecv> data_input_buff;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -7,73 +7,73 @@ using namespace std;
|
|||||||
|
|
||||||
|
|
||||||
int Dot_Coh_TAS::dot_coh_tas_process(QVector <PointRecv> *data_input, //输入点迹
|
int Dot_Coh_TAS::dot_coh_tas_process(QVector <PointRecv> *data_input, //输入点迹
|
||||||
QVector <PointRecv> *point_recv_tas //输出点迹
|
QVector <PointRecv> *point_recv_tas //输出点迹
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
for (int loop_of_point=0; loop_of_point<data_input->size()-1;loop_of_point++ )
|
for (int loop_of_point=0; loop_of_point<data_input->size()-1;loop_of_point++ )
|
||||||
{
|
{
|
||||||
if( (*data_input)[loop_of_point].Use_Flag!=1)
|
if( (*data_input)[loop_of_point].Use_Flag!=1)
|
||||||
{
|
{
|
||||||
float point_0_R=(*data_input)[loop_of_point].Range;
|
float point_0_R=(*data_input)[loop_of_point].Range;
|
||||||
float point_0_V=(*data_input)[loop_of_point].Velocity;
|
float point_0_V=(*data_input)[loop_of_point].Velocity;
|
||||||
float point_0_F=(*data_input)[loop_of_point].Azimuth;
|
float point_0_F=(*data_input)[loop_of_point].Azimuth;
|
||||||
float point_0_A=(*data_input)[loop_of_point].Amplitude;
|
float point_0_A=(*data_input)[loop_of_point].Amplitude;
|
||||||
for ( int i=loop_of_point+1;i<(*data_input).size();i++)
|
for ( int i=loop_of_point+1;i<(*data_input).size();i++)
|
||||||
{
|
{
|
||||||
if((*data_input)[loop_of_point].Use_Flag!=1)
|
if((*data_input)[loop_of_point].Use_Flag!=1)
|
||||||
{
|
{
|
||||||
float point_1_R=(*data_input)[i].Range;
|
float point_1_R=(*data_input)[i].Range;
|
||||||
float point_1_V=(*data_input)[i].Velocity;
|
float point_1_V=(*data_input)[i].Velocity;
|
||||||
float point_1_F=(*data_input)[i].Azimuth;
|
float point_1_F=(*data_input)[i].Azimuth;
|
||||||
float point_1_A=(*data_input)[i].Amplitude;
|
float point_1_A=(*data_input)[i].Amplitude;
|
||||||
|
|
||||||
//凝聚条件: 距离、方位接近
|
//凝聚条件: 距离、方位接近
|
||||||
if( (fabs(point_0_R-point_1_R)<=DOT_COH_RANGE && fabs(point_0_F-point_1_F) <=DOT_COH_AZI/180.0*PI && fabs(point_0_V-point_1_V)<=DOT_COH_V)
|
if( (fabs(point_0_R-point_1_R)<=DOT_COH_RANGE && fabs(point_0_F-point_1_F) <=DOT_COH_AZI/180.0*PI && fabs(point_0_V-point_1_V)<=DOT_COH_V)
|
||||||
&& point_0_A <point_1_A )
|
&& point_0_A <point_1_A )
|
||||||
{
|
{
|
||||||
point_0_R=(*data_input)[i].Range;
|
point_0_R=(*data_input)[i].Range;
|
||||||
point_0_V=(*data_input)[i].Velocity;
|
point_0_V=(*data_input)[i].Velocity;
|
||||||
point_0_A=(*data_input)[i].Amplitude;
|
point_0_A=(*data_input)[i].Amplitude;
|
||||||
point_0_F=(*data_input)[i].Azimuth;
|
point_0_F=(*data_input)[i].Azimuth;
|
||||||
(*data_input)[loop_of_point].Use_Flag=1;
|
(*data_input)[loop_of_point].Use_Flag=1;
|
||||||
}
|
}
|
||||||
else if( (fabs(point_0_R-point_1_R)<=DOT_COH_RANGE && fabs(point_0_F-point_1_F) <=DOT_COH_AZI/180.0*PI && fabs(point_0_V-point_1_V)<=DOT_COH_V)
|
else if( (fabs(point_0_R-point_1_R)<=DOT_COH_RANGE && fabs(point_0_F-point_1_F) <=DOT_COH_AZI/180.0*PI && fabs(point_0_V-point_1_V)<=DOT_COH_V)
|
||||||
&& point_0_A >= point_1_A)
|
&& point_0_A >= point_1_A)
|
||||||
{
|
{
|
||||||
(*data_input)[i].Use_Flag=1;
|
(*data_input)[i].Use_Flag=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//删除凝聚点 和 量程范围外点
|
//删除凝聚点 和 量程范围外点
|
||||||
QVector <PointRecv>::iterator Iter;
|
QVector <PointRecv>::iterator Iter;
|
||||||
for (Iter=data_input->begin(); Iter!=data_input->end();)
|
for (Iter=data_input->begin(); Iter!=data_input->end();)
|
||||||
{
|
{
|
||||||
if((*Iter).Use_Flag==1 || (*Iter).Range <R_MIN || (*Iter).Range > R_MAX )
|
if((*Iter).Use_Flag==1 || (*Iter).Range <R_MIN || (*Iter).Range > R_MAX )
|
||||||
{
|
{
|
||||||
data_input->erase(Iter);
|
data_input->erase(Iter);
|
||||||
Iter=data_input->begin();
|
Iter=data_input->begin();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Iter++;
|
Iter++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for (int i=0;i<data_input->size();i++)
|
for (int i=0;i<data_input->size();i++)
|
||||||
{
|
{
|
||||||
(*point_recv_tas).push_back((*data_input)[i]);
|
(*point_recv_tas).push_back((*data_input)[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ class Dot_Coh_TAS
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// 点迹凝聚函数
|
// 点迹凝聚函数
|
||||||
int dot_coh_tas_process(QVector <PointRecv> *data_input, //输入点迹
|
int dot_coh_tas_process(QVector <PointRecv> *data_input, //输入点迹
|
||||||
QVector <PointRecv> *point_recv_tas //输出点迹
|
QVector <PointRecv> *point_recv_tas //输出点迹
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+575
-575
File diff suppressed because it is too large
Load Diff
@@ -12,32 +12,32 @@ class kalman
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void kalman_pred(double F[6][6], double Q[6][6], double X[6], double P[6][6], double X_pred[6], double P_pred[6][6]);
|
void kalman_pred(double F[6][6], double Q[6][6], double X[6], double P[6][6], double X_pred[6], double P_pred[6][6]);
|
||||||
|
|
||||||
void kalman_filter_init_2dots(double Z0[2], double Z1[2], double T,double X[4], double P[4][4]);//两点初始化卡尔曼滤波器
|
void kalman_filter_init_2dots(double Z0[2], double Z1[2], double T,double X[4], double P[4][4]);//两点初始化卡尔曼滤波器
|
||||||
|
|
||||||
|
|
||||||
double d_cal_track_init(double Z[2],double X[4],double P[4][4],double T); //计算点 临时航迹的d
|
double d_cal_track_init(double Z[2],double X[4],double P[4][4],double T); //计算点 临时航迹的d
|
||||||
|
|
||||||
double d_cal_track_init_with_doppler(double Z[2],double X[4],double P[4][4],double T,double vr,double prt,double freq_ind);
|
double d_cal_track_init_with_doppler(double Z[2],double X[4],double P[4][4],double T,double vr,double prt,double freq_ind);
|
||||||
|
|
||||||
double d_cal_track_init_EKF(double Z[3],double X[4],double P[4][4],double T,double prt,double freq_ind);
|
double d_cal_track_init_EKF(double Z[3],double X[4],double P[4][4],double T,double prt,double freq_ind);
|
||||||
|
|
||||||
void kalman_filter_init_3dots(double Z0[2], double Z1[2],double Z2[2], double T1,double T2, double X[6], double P[6][6]);
|
void kalman_filter_init_3dots(double Z0[2], double Z1[2],double Z2[2], double T1,double T2, double X[6], double P[6][6]);
|
||||||
|
|
||||||
double d_cal(double Z[2],double X[6],double P[6][6]);
|
double d_cal(double Z[2],double X[6],double P[6][6]);
|
||||||
|
|
||||||
double d_cal_with_doppler(double F[6][6], double Q[6][6] ,double Z[2],double X[6],double P[6][6],double vr,double prt,double freq_ind);
|
double d_cal_with_doppler(double F[6][6], double Q[6][6] ,double Z[2],double X[6],double P[6][6],double vr,double prt,double freq_ind);
|
||||||
|
|
||||||
double d_cal_EKF(double F[6][6], double Q[6][6] ,double Z[3],double X[6],double P[6][6],double prt,double freq_ind);
|
double d_cal_EKF(double F[6][6], double Q[6][6] ,double Z[3],double X[6],double P[6][6],double prt,double freq_ind);
|
||||||
|
|
||||||
void kalman_filter(double F[6][6], double Q[6][6], double X[6],double P[6][6],double Z[2],double X_filter[6],double P_filter[6][6],double S_filter[2][2]);
|
void kalman_filter(double F[6][6], double Q[6][6], double X[6],double P[6][6],double Z[2],double X_filter[6],double P_filter[6][6],double S_filter[2][2]);
|
||||||
|
|
||||||
void kalman_filter_EKF(double F[6][6], double Q[6][6], double X[6],double P[6][6],double Z[3],
|
void kalman_filter_EKF(double F[6][6], double Q[6][6], double X[6],double P[6][6],double Z[3],
|
||||||
double X_filter[6],double P_filter[6][6],double S_filter[2][2],
|
double X_filter[6],double P_filter[6][6],double S_filter[2][2],
|
||||||
double prt,double freq_ind );
|
double prt,double freq_ind );
|
||||||
|
|
||||||
double Bind_speed(double prt,double freq_ind); //根据PRT 和 频率 计算不模糊速度
|
double Bind_speed(double prt,double freq_ind); //根据PRT 和 频率 计算不模糊速度
|
||||||
|
|
||||||
};
|
};
|
||||||
#endif // KALMAN_H
|
#endif // KALMAN_H
|
||||||
|
|||||||
@@ -5,27 +5,27 @@
|
|||||||
#define PI 3.1415926f
|
#define PI 3.1415926f
|
||||||
|
|
||||||
//频点(GHz)
|
//频点(GHz)
|
||||||
#define FREQ0 16.8
|
#define FREQ0 16.8
|
||||||
#define FREQ1 16.8
|
#define FREQ1 16.8
|
||||||
#define FREQ2 16.8
|
#define FREQ2 16.8
|
||||||
#define FREQ3 16.8
|
#define FREQ3 16.8
|
||||||
#define FREQ4 16.8
|
#define FREQ4 16.8
|
||||||
#define FREQ5 16.8
|
#define FREQ5 16.8
|
||||||
#define FREQ6 16.8
|
#define FREQ6 16.8
|
||||||
#define FREQ7 16.8
|
#define FREQ7 16.8
|
||||||
#define FREQ8 16.8
|
#define FREQ8 16.8
|
||||||
#define FREQ9 16.8
|
#define FREQ9 16.8
|
||||||
#define FREQ10 16.8
|
#define FREQ10 16.8
|
||||||
#define FREQ11 16.8
|
#define FREQ11 16.8
|
||||||
#define FREQ12 16.8
|
#define FREQ12 16.8
|
||||||
#define FREQ13 16.8
|
#define FREQ13 16.8
|
||||||
#define FREQ14 16.8
|
#define FREQ14 16.8
|
||||||
#define FREQ15 16.8
|
#define FREQ15 16.8
|
||||||
#define FREQ16 16.8
|
#define FREQ16 16.8
|
||||||
#define FREQ17 16.8
|
#define FREQ17 16.8
|
||||||
#define FREQ18 16.8
|
#define FREQ18 16.8
|
||||||
#define FREQ19 16.8
|
#define FREQ19 16.8
|
||||||
#define FREQ20 16.8
|
#define FREQ20 16.8
|
||||||
|
|
||||||
|
|
||||||
//波位
|
//波位
|
||||||
@@ -72,35 +72,35 @@
|
|||||||
|
|
||||||
#define DATA_RATE_TAS 0.3
|
#define DATA_RATE_TAS 0.3
|
||||||
|
|
||||||
#define SIGMA_R 10.0 //测量误差
|
#define SIGMA_R 10.0 //测量误差
|
||||||
#define SIGMA_A 0.02
|
#define SIGMA_A 0.02
|
||||||
#define SIGMA_E 0.2
|
#define SIGMA_E 0.2
|
||||||
#define SIGMA_V 2.0
|
#define SIGMA_V 2.0
|
||||||
|
|
||||||
#define DOT_COH_RANGE 80 //点迹凝聚
|
#define DOT_COH_RANGE 80 //点迹凝聚
|
||||||
#define DOT_COH_V 2
|
#define DOT_COH_V 2
|
||||||
#define DOT_COH_AZI 6
|
#define DOT_COH_AZI 6
|
||||||
|
|
||||||
#define MAX_BEAM_NUM 100 //最大TWS波位数
|
#define MAX_BEAM_NUM 100 //最大TWS波位数
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define MAX_TRACK_NUM 500
|
#define MAX_TRACK_NUM 500
|
||||||
#define MAX_TRACK_INDEX 500 //最大航迹批号
|
#define MAX_TRACK_INDEX 500 //最大航迹批号
|
||||||
|
|
||||||
#define ASSOCIATE_THRESHOLD_MIN 1
|
#define ASSOCIATE_THRESHOLD_MIN 1
|
||||||
#define ASSOCIATE_THRESHOLD_MID 3 //关联波门
|
#define ASSOCIATE_THRESHOLD_MID 3 //关联波门
|
||||||
#define ASSOCIATE_THRESHOLD_MAX 10
|
#define ASSOCIATE_THRESHOLD_MAX 10
|
||||||
|
|
||||||
#define R_MIN 100
|
#define R_MIN 100
|
||||||
#define R_MAX 100000
|
#define R_MAX 100000
|
||||||
|
|
||||||
//#define V_MAX 500 //最大速度
|
//#define V_MAX 500 //最大速度
|
||||||
//#define V_MIN 1 //速度最小
|
//#define V_MIN 1 //速度最小
|
||||||
#define TRACK_START_THRESHOLD 8 //起航波门 3 越大越容易起批
|
#define TRACK_START_THRESHOLD 8 //起航波门 3 越大越容易起批
|
||||||
#define ALPHA_START 60 //起航夹角 120 越大越容易起批
|
#define ALPHA_START 60 //起航夹角 120 越大越容易起批
|
||||||
|
|
||||||
#define TRACK_DIE_ROUND 4 // 航迹消亡时间
|
#define TRACK_DIE_ROUND 4 // 航迹消亡时间
|
||||||
#define TRACK_DIE_ROUND_TAS 5
|
#define TRACK_DIE_ROUND_TAS 5
|
||||||
|
|
||||||
#define ASSO_THORD 3
|
#define ASSO_THORD 3
|
||||||
|
|||||||
@@ -9,84 +9,84 @@ using namespace std;
|
|||||||
// 点迹数据结构
|
// 点迹数据结构
|
||||||
struct PointRecv
|
struct PointRecv
|
||||||
{
|
{
|
||||||
double Range; //径向距离
|
double Range; //径向距离
|
||||||
double Azimuth; //方位 (弧度)
|
double Azimuth; //方位 (弧度)
|
||||||
double Velocity ; //速度
|
double Velocity ; //速度
|
||||||
double Amplitude ; //幅度
|
double Amplitude ; //幅度
|
||||||
double Height; //高度
|
double Height; //高度
|
||||||
double snr; //信噪比
|
double snr; //信噪比
|
||||||
double RCS; //目标RCS
|
double RCS; //目标RCS
|
||||||
int CPI_Time; //CPI时间
|
int CPI_Time; //CPI时间
|
||||||
int Point_index; //点迹号 1~50
|
int Point_index; //点迹号 1~50
|
||||||
int Point_Sum; //点迹总数
|
int Point_Sum; //点迹总数
|
||||||
int Use_Flag; //点迹使用标志 1使用 0未使用
|
int Use_Flag; //点迹使用标志 1使用 0未使用
|
||||||
int beam_index; //波位号
|
int beam_index; //波位号
|
||||||
int PRF_index; //PRF号
|
int PRF_index; //PRF号
|
||||||
int Freq_index; //频点
|
int Freq_index; //频点
|
||||||
int track_mode; //TAS 1 TWS0
|
int track_mode; //TAS 1 TWS0
|
||||||
int point_section_asso; //点迹区
|
int point_section_asso; //点迹区
|
||||||
|
|
||||||
int pitch_num; // 俯仰波位号
|
int pitch_num; // 俯仰波位号
|
||||||
float speed_dim[129]; // 目标的十字星数据,目标点速度维129个点
|
float speed_dim[129]; // 目标的十字星数据,目标点速度维129个点
|
||||||
float range_dim[8]; // 目标的十字星数据,目标点距离维8个点
|
float range_dim[8]; // 目标的十字星数据,目标点距离维8个点
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// 可靠航迹数据结构
|
// 可靠航迹数据结构
|
||||||
struct Trust_Track
|
struct Trust_Track
|
||||||
{
|
{
|
||||||
int Track_Index; //航迹号
|
int Track_Index; //航迹号
|
||||||
|
|
||||||
double Amplitude; //幅度
|
double Amplitude; //幅度
|
||||||
double Height; //高度
|
double Height; //高度
|
||||||
|
|
||||||
int T_track; //航迹时间
|
int T_track; //航迹时间
|
||||||
|
|
||||||
int Track_Sum; //航迹总数
|
int Track_Sum; //航迹总数
|
||||||
int Point_Index; //该航迹上的第几个点
|
int Point_Index; //该航迹上的第几个点
|
||||||
|
|
||||||
int Track_Mode; //跟踪模式
|
int Track_Mode; //跟踪模式
|
||||||
int Track_Update_Flag; //航迹更新标志 1已更新/0未更新
|
int Track_Update_Flag; //航迹更新标志 1已更新/0未更新
|
||||||
|
|
||||||
int Extrapolate_round; //航迹持续外推时间
|
int Extrapolate_round; //航迹持续外推时间
|
||||||
int point_flag; //是否实点 1实点 0外推
|
int point_flag; //是否实点 1实点 0外推
|
||||||
int approach_flag; //接近标志 1接近 0远离
|
int approach_flag; //接近标志 1接近 0远离
|
||||||
|
|
||||||
int manual_delete_flag; //手动航迹删除
|
int manual_delete_flag; //手动航迹删除
|
||||||
int manual_tracking_flag; //手动TAS
|
int manual_tracking_flag; //手动TAS
|
||||||
int associate_point_number; //关联的点数
|
int associate_point_number; //关联的点数
|
||||||
|
|
||||||
int Target_Type; //目标类型 搜索目标 低空目标 地面目标
|
int Target_Type; //目标类型 搜索目标 低空目标 地面目标
|
||||||
|
|
||||||
int Track_section_idx; //航迹区号
|
int Track_section_idx; //航迹区号
|
||||||
|
|
||||||
QVector <double> Hight_smooth; //高度平滑
|
QVector <double> Hight_smooth; //高度平滑
|
||||||
|
|
||||||
|
|
||||||
double range_point; //关联上的点信息(距离、方位、俯仰)
|
double range_point; //关联上的点信息(距离、方位、俯仰)
|
||||||
double azi_point;
|
double azi_point;
|
||||||
double elev_point;
|
double elev_point;
|
||||||
double vr_point;
|
double vr_point;
|
||||||
double prf_point;
|
double prf_point;
|
||||||
int point_type; //TWS TAS
|
int point_type; //TWS TAS
|
||||||
double snr_point; //信噪比
|
double snr_point; //信噪比
|
||||||
|
|
||||||
double RCS;
|
double RCS;
|
||||||
|
|
||||||
int pitch_num; // 俯仰波位号
|
int pitch_num; // 俯仰波位号
|
||||||
float speed_dim[129]; // 目标的十字星数据,目标点速度维129个点
|
float speed_dim[129]; // 目标的十字星数据,目标点速度维129个点
|
||||||
float range_dim[8]; // 目标的十字星数据,目标点距离维8个点
|
float range_dim[8]; // 目标的十字星数据,目标点距离维8个点
|
||||||
|
|
||||||
double X[6]; //IMM
|
double X[6]; //IMM
|
||||||
double P[6][6];
|
double P[6][6];
|
||||||
|
|
||||||
double X1[6];
|
double X1[6];
|
||||||
double X2[6];
|
double X2[6];
|
||||||
double X3[6];
|
double X3[6];
|
||||||
double P1[6][6];
|
double P1[6][6];
|
||||||
double P2[6][6];
|
double P2[6][6];
|
||||||
double P3[6][6];
|
double P3[6][6];
|
||||||
double u[3];
|
double u[3];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -96,29 +96,29 @@ struct Trust_Track
|
|||||||
struct Temp_track
|
struct Temp_track
|
||||||
{
|
{
|
||||||
|
|
||||||
double X[4]; //状态
|
double X[4]; //状态
|
||||||
double P[4][4]; //协方差
|
double P[4][4]; //协方差
|
||||||
|
|
||||||
double r; //距离
|
double r; //距离
|
||||||
double azi; //方位
|
double azi; //方位
|
||||||
double vr; //径向速度
|
double vr; //径向速度
|
||||||
double height; //高度
|
double height; //高度
|
||||||
double snr; //信噪比
|
double snr; //信噪比
|
||||||
double RCS; //RCS
|
double RCS; //RCS
|
||||||
double Amp; //幅度
|
double Amp; //幅度
|
||||||
int T; //时间戳
|
int T; //时间戳
|
||||||
|
|
||||||
double d; //关联上的点的d
|
double d; //关联上的点的d
|
||||||
|
|
||||||
int buff_round; //已缓存圈数
|
int buff_round; //已缓存圈数
|
||||||
|
|
||||||
int Temp_track_section_idx; //临时航迹区号 与点迹区的划分相同
|
int Temp_track_section_idx; //临时航迹区号 与点迹区的划分相同
|
||||||
|
|
||||||
int asso_flag; //关联标志 已关联:1 未关联:0
|
int asso_flag; //关联标志 已关联:1 未关联:0
|
||||||
|
|
||||||
int pitch_num; // 俯仰波位号
|
int pitch_num; // 俯仰波位号
|
||||||
float speed_dim[129]; // 目标的十字星数据,目标点速度维129个点
|
float speed_dim[129]; // 目标的十字星数据,目标点速度维129个点
|
||||||
float range_dim[8]; // 目标的十字星数据,目标点距离维8个点
|
float range_dim[8]; // 目标的十字星数据,目标点距离维8个点
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -129,8 +129,8 @@ struct Temp_track
|
|||||||
// TAS跟踪目标结构体
|
// TAS跟踪目标结构体
|
||||||
struct Tracking_Target
|
struct Tracking_Target
|
||||||
{
|
{
|
||||||
int Index; //目标批号
|
int Index; //目标批号
|
||||||
int empty_flag; //是否为空标志位 1非空 0空
|
int empty_flag; //是否为空标志位 1非空 0空
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -138,11 +138,11 @@ struct Tracking_Target
|
|||||||
//引导跟踪目标结构体
|
//引导跟踪目标结构体
|
||||||
struct Direct_Tracking_Target
|
struct Direct_Tracking_Target
|
||||||
{
|
{
|
||||||
int ID;
|
int ID;
|
||||||
double Azi;
|
double Azi;
|
||||||
double Elev;
|
double Elev;
|
||||||
double Range;
|
double Range;
|
||||||
int empty_flag; //是否为空标志位 1非空 0空
|
int empty_flag; //是否为空标志位 1非空 0空
|
||||||
// int track_init_flag; //是否已经建航 1是 0否
|
// int track_init_flag; //是否已经建航 1是 0否
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
+152
-152
@@ -13,29 +13,29 @@ using namespace std;
|
|||||||
|
|
||||||
TAS_Ctrl::TAS_Ctrl()
|
TAS_Ctrl::TAS_Ctrl()
|
||||||
{
|
{
|
||||||
memset(tas_target_queue,0,TAS_QUEUE_LENGTH*sizeof(Tracking_Target));
|
memset(tas_target_queue,0,TAS_QUEUE_LENGTH*sizeof(Tracking_Target));
|
||||||
|
|
||||||
tas_target_num=0;
|
tas_target_num=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TAS_Ctrl::tas_ctrl_process(QVector<Trust_Track> *trust_track,
|
void TAS_Ctrl::tas_ctrl_process(QVector<Trust_Track> *trust_track,
|
||||||
struct TrackingBeam *Tracking_beam,
|
struct TrackingBeam *Tracking_beam,
|
||||||
struct Track Trust_Track_Output[][10],
|
struct Track Trust_Track_Output[][10],
|
||||||
int *Trust_track_num_Output,
|
int *Trust_track_num_Output,
|
||||||
struct RadarPara Work_Parameter)
|
struct RadarPara Work_Parameter)
|
||||||
{
|
{
|
||||||
tas_target_add(trust_track, Trust_Track_Output, Trust_track_num_Output,Work_Parameter);
|
tas_target_add(trust_track, Trust_Track_Output, Trust_track_num_Output,Work_Parameter);
|
||||||
tas_target_del(trust_track, Trust_Track_Output, Trust_track_num_Output,Work_Parameter);
|
tas_target_del(trust_track, Trust_Track_Output, Trust_track_num_Output,Work_Parameter);
|
||||||
tas_beam_output(trust_track,Tracking_beam);
|
tas_beam_output(trust_track,Tracking_beam);
|
||||||
|
|
||||||
//跟踪队列移位
|
//跟踪队列移位
|
||||||
struct Tracking_Target tas_target_tmp;
|
struct Tracking_Target tas_target_tmp;
|
||||||
memcpy(&tas_target_tmp, &tas_target_queue[TAS_QUEUE_LENGTH-1], sizeof(Tracking_Target));
|
memcpy(&tas_target_tmp, &tas_target_queue[TAS_QUEUE_LENGTH-1], sizeof(Tracking_Target));
|
||||||
for (int i=TAS_QUEUE_LENGTH-1;i>0;i--)
|
for (int i=TAS_QUEUE_LENGTH-1;i>0;i--)
|
||||||
{
|
{
|
||||||
memcpy(&tas_target_queue[i],&tas_target_queue[i-1],sizeof(Tracking_Target));
|
memcpy(&tas_target_queue[i],&tas_target_queue[i-1],sizeof(Tracking_Target));
|
||||||
}
|
}
|
||||||
memcpy(&tas_target_queue[0], &tas_target_tmp, sizeof(Tracking_Target));
|
memcpy(&tas_target_queue[0], &tas_target_tmp, sizeof(Tracking_Target));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -43,65 +43,65 @@ void TAS_Ctrl::tas_ctrl_process(QVector<Trust_Track> *trust_track,
|
|||||||
|
|
||||||
|
|
||||||
void TAS_Ctrl::tas_target_add(QVector<Trust_Track> *trust_track,
|
void TAS_Ctrl::tas_target_add(QVector<Trust_Track> *trust_track,
|
||||||
struct Track Trust_Track_Output[][10],
|
struct Track Trust_Track_Output[][10],
|
||||||
int *Trust_track_num_Output,
|
int *Trust_track_num_Output,
|
||||||
struct RadarPara Work_Parameter)
|
struct RadarPara Work_Parameter)
|
||||||
{
|
{
|
||||||
|
|
||||||
for (int i=0;i<trust_track->size();i++)
|
for (int i=0;i<trust_track->size();i++)
|
||||||
{
|
{
|
||||||
double r=sqrt(pow((*trust_track)[i].X[0],2)+pow((*trust_track)[i].X[3],2));
|
double r=sqrt(pow((*trust_track)[i].X[0],2)+pow((*trust_track)[i].X[3],2));
|
||||||
double v=sqrt(pow((*trust_track)[i].X[1],2)+pow((*trust_track)[i].X[4],2));
|
double v=sqrt(pow((*trust_track)[i].X[1],2)+pow((*trust_track)[i].X[4],2));
|
||||||
double h=(*trust_track)[i].Height+Work_Parameter.Height;
|
double h=(*trust_track)[i].Height+Work_Parameter.Height;
|
||||||
double azi = atan2((*trust_track)[i].X[3],(*trust_track)[i].X[0]);
|
double azi = atan2((*trust_track)[i].X[3],(*trust_track)[i].X[0]);
|
||||||
if(azi<0)
|
if(azi<0)
|
||||||
azi=azi+2*PI;
|
azi=azi+2*PI;
|
||||||
azi=azi/PI*180;
|
azi=azi/PI*180;
|
||||||
|
|
||||||
//进入跟踪的条件: 1.手动跟踪的目标 或 满足速度、距离、高度条件满足 关联点数大于2 2.不在禁止跟踪区域
|
//进入跟踪的条件: 1.手动跟踪的目标 或 满足速度、距离、高度条件满足 关联点数大于2 2.不在禁止跟踪区域
|
||||||
if( ( (*trust_track)[i].manual_tracking_flag == 1)//|| (tas_auto_start( v, r, h, Work_Parameter)==1 && (*trust_track)[i][k].associate_point_number>=2)
|
if( ( (*trust_track)[i].manual_tracking_flag == 1)//|| (tas_auto_start( v, r, h, Work_Parameter)==1 && (*trust_track)[i][k].associate_point_number>=2)
|
||||||
&& tas_target_num < MAX_TAS_NUM
|
&& tas_target_num < MAX_TAS_NUM
|
||||||
&& (*trust_track)[i].Track_Mode == 0
|
&& (*trust_track)[i].Track_Mode == 0
|
||||||
&& tas_prohibite_area( r, azi, v, h, Work_Parameter) == 0)
|
&& tas_prohibite_area( r, azi, v, h, Work_Parameter) == 0)
|
||||||
{
|
{
|
||||||
for(int j=0;j<TAS_QUEUE_LENGTH;j++)
|
for(int j=0;j<TAS_QUEUE_LENGTH;j++)
|
||||||
{
|
{
|
||||||
if(tas_target_queue[j].empty_flag==0 && j%2==0)
|
if(tas_target_queue[j].empty_flag==0 && j%2==0)
|
||||||
{
|
{
|
||||||
//插入跟踪队列
|
//插入跟踪队列
|
||||||
tas_target_queue[j].Index=(*trust_track)[i].Track_Index;
|
tas_target_queue[j].Index=(*trust_track)[i].Track_Index;
|
||||||
tas_target_queue[j].empty_flag=1;
|
tas_target_queue[j].empty_flag=1;
|
||||||
|
|
||||||
//跟踪目标数目加一
|
//跟踪目标数目加一
|
||||||
tas_target_num=tas_target_num+1;
|
tas_target_num=tas_target_num+1;
|
||||||
|
|
||||||
//TAS跟踪标志置1
|
//TAS跟踪标志置1
|
||||||
(*trust_track)[i].Track_Mode=1;
|
(*trust_track)[i].Track_Mode=1;
|
||||||
|
|
||||||
//目标跟踪状态发生改变 对外输出航迹更新信息
|
//目标跟踪状态发生改变 对外输出航迹更新信息
|
||||||
*Trust_track_num_Output= *Trust_track_num_Output+1;
|
*Trust_track_num_Output= *Trust_track_num_Output+1;
|
||||||
double r_output,azmi_output;
|
double r_output,azmi_output;
|
||||||
coor_trans Coor_trans;
|
coor_trans Coor_trans;
|
||||||
Coor_trans.cart2polar((*trust_track)[i].X[0],(*trust_track)[i].X[3],&r_output,&azmi_output);
|
Coor_trans.cart2polar((*trust_track)[i].X[0],(*trust_track)[i].X[3],&r_output,&azmi_output);
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][0].Point_Sum=1;
|
Trust_Track_Output[*Trust_track_num_Output-1][0].Point_Sum=1;
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][0].Range=r_output;
|
Trust_Track_Output[*Trust_track_num_Output-1][0].Range=r_output;
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][0].Azimuth=azmi_output/PI*180;
|
Trust_Track_Output[*Trust_track_num_Output-1][0].Azimuth=azmi_output/PI*180;
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][0].Track_Index=(*trust_track)[i].Track_Index; //航迹号
|
Trust_Track_Output[*Trust_track_num_Output-1][0].Track_Index=(*trust_track)[i].Track_Index; //航迹号
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][0].Range_V=
|
Trust_Track_Output[*Trust_track_num_Output-1][0].Range_V=
|
||||||
sqrt((*trust_track)[i].X[1]*(*trust_track)[i].X[1]+(*trust_track)[i].X[4]*(*trust_track)[i].X[4]);
|
sqrt((*trust_track)[i].X[1]*(*trust_track)[i].X[1]+(*trust_track)[i].X[4]*(*trust_track)[i].X[4]);
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][0].Amplitude=(*trust_track)[i].Amplitude;
|
Trust_Track_Output[*Trust_track_num_Output-1][0].Amplitude=(*trust_track)[i].Amplitude;
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][0].Flag_Point=(*trust_track)[i].point_flag;
|
Trust_Track_Output[*Trust_track_num_Output-1][0].Flag_Point=(*trust_track)[i].point_flag;
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][0].Track_Mode=(*trust_track)[i].Track_Mode;
|
Trust_Track_Output[*Trust_track_num_Output-1][0].Track_Mode=(*trust_track)[i].Track_Mode;
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][0].Elevation=asin((*trust_track)[i].Height/r_output)/PI*180;
|
Trust_Track_Output[*Trust_track_num_Output-1][0].Elevation=asin((*trust_track)[i].Height/r_output)/PI*180;
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][0].z=(*trust_track)[i].Height+Work_Parameter.Height;
|
Trust_Track_Output[*Trust_track_num_Output-1][0].z=(*trust_track)[i].Height+Work_Parameter.Height;
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][0].Target_Type=(*trust_track)[i].Target_Type;
|
Trust_Track_Output[*Trust_track_num_Output-1][0].Target_Type=(*trust_track)[i].Target_Type;
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][0].track_snr = (*trust_track)[i].snr_point;
|
Trust_Track_Output[*Trust_track_num_Output-1][0].track_snr = (*trust_track)[i].snr_point;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -109,7 +109,7 @@ void TAS_Ctrl::tas_target_add(QVector<Trust_Track> *trust_track,
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//int TAS_Ctrl:: tas_auto_start(double v, double r, double h, struct RadarPara Work_Parameter)
|
//int TAS_Ctrl:: tas_auto_start(double v, double r, double h, struct RadarPara Work_Parameter)
|
||||||
//{
|
//{
|
||||||
|
|
||||||
//// if(r>Work_Parameter.R_TAS_min && r<Work_Parameter.R_TAS_max && v<Work_Parameter.V_TAS_max && v>Work_Parameter.V_TAS_min
|
//// if(r>Work_Parameter.R_TAS_min && r<Work_Parameter.R_TAS_max && v<Work_Parameter.V_TAS_max && v>Work_Parameter.V_TAS_min
|
||||||
@@ -130,52 +130,52 @@ void TAS_Ctrl::tas_target_add(QVector<Trust_Track> *trust_track,
|
|||||||
//};
|
//};
|
||||||
|
|
||||||
|
|
||||||
int TAS_Ctrl::tas_prohibite_area(double r,double azi, double v, double h,struct RadarPara Work_Parameter)
|
int TAS_Ctrl::tas_prohibite_area(double r,double azi, double v, double h,struct RadarPara Work_Parameter)
|
||||||
{
|
{
|
||||||
|
|
||||||
for (int i=0;i<Work_Parameter.TAS_prohibite_area_num;i++)
|
for (int i=0;i<Work_Parameter.TAS_prohibite_area_num;i++)
|
||||||
{
|
{
|
||||||
if(r<Work_Parameter.R_max_TAS_prohibited[i] && r>Work_Parameter.R_min_TAS_prohibited[i] && azi<Work_Parameter.Azimuth_max_TAS_prohibited[i] && azi>Work_Parameter.Azimuth_min_TAS_prohibited[i])
|
if(r<Work_Parameter.R_max_TAS_prohibited[i] && r>Work_Parameter.R_min_TAS_prohibited[i] && azi<Work_Parameter.Azimuth_max_TAS_prohibited[i] && azi>Work_Parameter.Azimuth_min_TAS_prohibited[i])
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TAS_Ctrl::tas_target_del(QVector<Trust_Track> *trust_track,
|
void TAS_Ctrl::tas_target_del(QVector<Trust_Track> *trust_track,
|
||||||
struct Track Trust_Track_Output[][10],
|
struct Track Trust_Track_Output[][10],
|
||||||
int *Trust_track_num_Output,
|
int *Trust_track_num_Output,
|
||||||
struct RadarPara Work_Parameter)
|
struct RadarPara Work_Parameter)
|
||||||
{
|
{
|
||||||
|
|
||||||
//查找TAS目标是否已经消批 若消批则移出TAS队列
|
//查找TAS目标是否已经消批 若消批则移出TAS队列
|
||||||
for (int i=0;i<TAS_QUEUE_LENGTH;i++)
|
for (int i=0;i<TAS_QUEUE_LENGTH;i++)
|
||||||
{
|
{
|
||||||
if(tas_target_queue[i].empty_flag == 1)
|
if(tas_target_queue[i].empty_flag == 1)
|
||||||
{
|
{
|
||||||
//查找TAS队列里的目标是否存在
|
//查找TAS队列里的目标是否存在
|
||||||
int flag=0;
|
int flag=0;
|
||||||
for (int j=0;j<trust_track->size();j++)
|
for (int j=0;j<trust_track->size();j++)
|
||||||
{
|
{
|
||||||
if(tas_target_queue[i].Index==(*trust_track)[j].Track_Index && (*trust_track)[j].Track_Mode == 1)
|
if(tas_target_queue[i].Index==(*trust_track)[j].Track_Index && (*trust_track)[j].Track_Mode == 1)
|
||||||
{
|
{
|
||||||
flag=1;
|
flag=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//目标不存在 说明已消批 从队列里删除
|
//目标不存在 说明已消批 从队列里删除
|
||||||
if(flag == 0)
|
if(flag == 0)
|
||||||
{
|
{
|
||||||
memset(&tas_target_queue[i],0,sizeof(Tracking_Target));
|
memset(&tas_target_queue[i],0,sizeof(Tracking_Target));
|
||||||
tas_target_num=tas_target_num-1;
|
tas_target_num=tas_target_num-1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//判断TAS目标是否满足自动跟踪条件 若不满足移除TAS队列 通知界面改变目标状态
|
//判断TAS目标是否满足自动跟踪条件 若不满足移除TAS队列 通知界面改变目标状态
|
||||||
// for ( int i=0;i<trust_track->size();i++)
|
// for ( int i=0;i<trust_track->size();i++)
|
||||||
// {
|
// {
|
||||||
// double r=sqrt(pow((*trust_track)[i].X[0],2)+pow((*trust_track)[i].X[3],2));
|
// double r=sqrt(pow((*trust_track)[i].X[0],2)+pow((*trust_track)[i].X[3],2));
|
||||||
@@ -209,7 +209,7 @@ void TAS_Ctrl::tas_target_del(QVector<Trust_Track> *trust_track,
|
|||||||
// Trust_Track_Output[*Trust_track_num_Output-1][0].Point_Sum=1;
|
// Trust_Track_Output[*Trust_track_num_Output-1][0].Point_Sum=1;
|
||||||
// Trust_Track_Output[*Trust_track_num_Output-1][0].Range=r_output;
|
// Trust_Track_Output[*Trust_track_num_Output-1][0].Range=r_output;
|
||||||
// Trust_Track_Output[*Trust_track_num_Output-1][0].Azimuth=azmi_output/PI*180;
|
// Trust_Track_Output[*Trust_track_num_Output-1][0].Azimuth=azmi_output/PI*180;
|
||||||
// Trust_Track_Output[*Trust_track_num_Output-1][0].Track_Index=(*trust_track)[i].Track_Index; //航迹号
|
// Trust_Track_Output[*Trust_track_num_Output-1][0].Track_Index=(*trust_track)[i].Track_Index; //航迹号
|
||||||
// Trust_Track_Output[*Trust_track_num_Output-1][0].Range_V=sqrt((*trust_track)[i].X[1]*(*trust_track)[i].X[1]+(*trust_track)[i].X[4]*(*trust_track)[i].X[4]);
|
// Trust_Track_Output[*Trust_track_num_Output-1][0].Range_V=sqrt((*trust_track)[i].X[1]*(*trust_track)[i].X[1]+(*trust_track)[i].X[4]*(*trust_track)[i].X[4]);
|
||||||
// Trust_Track_Output[*Trust_track_num_Output-1][0].Amplitude=(*trust_track)[i].Amplitude;
|
// Trust_Track_Output[*Trust_track_num_Output-1][0].Amplitude=(*trust_track)[i].Amplitude;
|
||||||
// Trust_Track_Output[*Trust_track_num_Output-1][0].Flag_Point=(*trust_track)[i].point_flag;
|
// Trust_Track_Output[*Trust_track_num_Output-1][0].Flag_Point=(*trust_track)[i].point_flag;
|
||||||
@@ -227,7 +227,7 @@ void TAS_Ctrl::tas_target_del(QVector<Trust_Track> *trust_track,
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//int TAS_Ctrl::tas_auto_end(double v, double r, double h, struct RadarPara Work_Parameter)
|
//int TAS_Ctrl::tas_auto_end(double v, double r, double h, struct RadarPara Work_Parameter)
|
||||||
//{
|
//{
|
||||||
// if((r<=1000 && h<Work_Parameter.TAS_Height_1) || (r<=2000 && r>1000 && h<Work_Parameter.TAS_Height_2) || (r<=3000 && r>2000 && h<Work_Parameter.TAS_Height_3) || (r<=4000 && r>3000 && h<Work_Parameter.TAS_Height_4) || (r>4000 && h<Work_Parameter.TAS_Height_5)
|
// if((r<=1000 && h<Work_Parameter.TAS_Height_1) || (r<=2000 && r>1000 && h<Work_Parameter.TAS_Height_2) || (r<=3000 && r>2000 && h<Work_Parameter.TAS_Height_3) || (r<=4000 && r>3000 && h<Work_Parameter.TAS_Height_4) || (r>4000 && h<Work_Parameter.TAS_Height_5)
|
||||||
// || v<Work_Parameter.V_TAS_min || v>Work_Parameter.V_TAS_max
|
// || v<Work_Parameter.V_TAS_min || v>Work_Parameter.V_TAS_max
|
||||||
@@ -249,65 +249,65 @@ void TAS_Ctrl::tas_target_del(QVector<Trust_Track> *trust_track,
|
|||||||
|
|
||||||
|
|
||||||
void TAS_Ctrl::tas_beam_output(QVector<Trust_Track> *trust_track,
|
void TAS_Ctrl::tas_beam_output(QVector<Trust_Track> *trust_track,
|
||||||
struct TrackingBeam *Tracking_beam)
|
struct TrackingBeam *Tracking_beam)
|
||||||
{
|
{
|
||||||
if(tas_target_queue[0].empty_flag==1)
|
if(tas_target_queue[0].empty_flag==1)
|
||||||
{
|
{
|
||||||
|
|
||||||
double H_track;
|
double H_track;
|
||||||
double X_now[6];
|
double X_now[6];
|
||||||
for (int i=0;i<trust_track->size();i++ )
|
for (int i=0;i<trust_track->size();i++ )
|
||||||
{
|
{
|
||||||
if((*trust_track)[i].Track_Index == tas_target_queue[0].Index)
|
if((*trust_track)[i].Track_Index == tas_target_queue[0].Index)
|
||||||
{
|
{
|
||||||
H_track = (*trust_track)[i].Height;
|
H_track = (*trust_track)[i].Height;
|
||||||
for(int ii=0;ii<6;ii++)
|
for(int ii=0;ii<6;ii++)
|
||||||
X_now[ii]=(*trust_track)[i].X[ii];
|
X_now[ii]=(*trust_track)[i].X[ii];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//预测目标位置 计算跟踪波束波位号 俯仰角
|
//预测目标位置 计算跟踪波束波位号 俯仰角
|
||||||
|
|
||||||
double x_track=X_now[0]+X_now[1]*T_TAS_PRED;
|
double x_track=X_now[0]+X_now[1]*T_TAS_PRED;
|
||||||
double y_track=X_now[3]+X_now[4]*T_TAS_PRED;
|
double y_track=X_now[3]+X_now[4]*T_TAS_PRED;
|
||||||
double amzi,range;
|
double amzi,range;
|
||||||
coor_trans Coor_trans;
|
coor_trans Coor_trans;
|
||||||
Coor_trans.cart2polar(x_track,y_track,&range,&amzi);
|
Coor_trans.cart2polar(x_track,y_track,&range,&amzi);
|
||||||
|
|
||||||
|
|
||||||
//目标距离
|
//目标距离
|
||||||
Tracking_beam->Range=range;
|
Tracking_beam->Range=range;
|
||||||
//目标方位
|
//目标方位
|
||||||
Tracking_beam->Azi=amzi/PI*180;
|
Tracking_beam->Azi=amzi/PI*180;
|
||||||
//目标俯仰角
|
//目标俯仰角
|
||||||
double elev=asin(H_track/range)/PI*180;
|
double elev=asin(H_track/range)/PI*180;
|
||||||
|
|
||||||
|
|
||||||
if(elev<=0)
|
if(elev<=0)
|
||||||
elev=0;
|
elev=0;
|
||||||
else if(elev>=40)
|
else if(elev>=40)
|
||||||
elev=40;
|
elev=40;
|
||||||
else
|
else
|
||||||
elev=elev;
|
elev=elev;
|
||||||
|
|
||||||
|
|
||||||
Tracking_beam->Elev=elev;
|
Tracking_beam->Elev=elev;
|
||||||
|
|
||||||
//跟踪波束类型
|
//跟踪波束类型
|
||||||
Tracking_beam->type=1;
|
Tracking_beam->type=1;
|
||||||
|
|
||||||
//跟踪目标批号
|
//跟踪目标批号
|
||||||
Tracking_beam->TAS_track_index = tas_target_queue[0].Index;
|
Tracking_beam->TAS_track_index = tas_target_queue[0].Index;
|
||||||
|
|
||||||
//跟踪波束开关开启
|
//跟踪波束开关开启
|
||||||
Tracking_beam->open_flag=1;
|
Tracking_beam->open_flag=1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//跟踪波束开关关闭
|
//跟踪波束开关关闭
|
||||||
Tracking_beam->open_flag=0;
|
Tracking_beam->open_flag=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,45 +12,45 @@ class TAS_Ctrl
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
TAS_Ctrl();
|
TAS_Ctrl();
|
||||||
|
|
||||||
void tas_ctrl_process( QVector<Trust_Track> *trust_track,
|
void tas_ctrl_process( QVector<Trust_Track> *trust_track,
|
||||||
struct TrackingBeam *Tracking_beam,
|
struct TrackingBeam *Tracking_beam,
|
||||||
struct Track Trust_Track_Output[][10],
|
struct Track Trust_Track_Output[][10],
|
||||||
int *Trust_track_num_Output,
|
int *Trust_track_num_Output,
|
||||||
struct RadarPara Work_Parameter);
|
struct RadarPara Work_Parameter);
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
//添加TAS目标
|
//添加TAS目标
|
||||||
void tas_target_add(QVector<Trust_Track> *trust_track,
|
void tas_target_add(QVector<Trust_Track> *trust_track,
|
||||||
struct Track Trust_Track_Output[][10],
|
struct Track Trust_Track_Output[][10],
|
||||||
int *Trust_track_num_Output,
|
int *Trust_track_num_Output,
|
||||||
struct RadarPara Work_Parameter);
|
struct RadarPara Work_Parameter);
|
||||||
|
|
||||||
//删除TAS目标
|
//删除TAS目标
|
||||||
void tas_target_del(QVector<Trust_Track> *trust_track,
|
void tas_target_del(QVector<Trust_Track> *trust_track,
|
||||||
struct Track Trust_Track_Output[][10],
|
struct Track Trust_Track_Output[][10],
|
||||||
int *Trust_track_num_Output,
|
int *Trust_track_num_Output,
|
||||||
struct RadarPara Work_Parameter);
|
struct RadarPara Work_Parameter);
|
||||||
|
|
||||||
//TAS队列信息输出
|
//TAS队列信息输出
|
||||||
void tas_beam_output(QVector<Trust_Track> *trust_track,
|
void tas_beam_output(QVector<Trust_Track> *trust_track,
|
||||||
struct TrackingBeam *Tracking_beam);
|
struct TrackingBeam *Tracking_beam);
|
||||||
|
|
||||||
//TAS 自动开启条件
|
//TAS 自动开启条件
|
||||||
int tas_auto_start(double v, double r, double h, struct RadarPara Work_Parameter);
|
int tas_auto_start(double v, double r, double h, struct RadarPara Work_Parameter);
|
||||||
|
|
||||||
//TAS 自动退出条件
|
//TAS 自动退出条件
|
||||||
int tas_auto_end(double v, double r, double h, struct RadarPara Work_Parameter);
|
int tas_auto_end(double v, double r, double h, struct RadarPara Work_Parameter);
|
||||||
|
|
||||||
// 禁止跟踪区域判断
|
// 禁止跟踪区域判断
|
||||||
int tas_prohibite_area(double r,double azi, double v, double h,struct RadarPara Work_Parameter);
|
int tas_prohibite_area(double r,double azi, double v, double h,struct RadarPara Work_Parameter);
|
||||||
|
|
||||||
struct Tracking_Target tas_target_queue[TAS_QUEUE_LENGTH]; //跟踪目标信息队列
|
struct Tracking_Target tas_target_queue[TAS_QUEUE_LENGTH]; //跟踪目标信息队列
|
||||||
|
|
||||||
int tas_target_num; //跟踪目标数量
|
int tas_target_num; //跟踪目标数量
|
||||||
|
|
||||||
};
|
};
|
||||||
#endif // TAS_CTRL_H
|
#endif // TAS_CTRL_H
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -15,50 +15,50 @@ using namespace std;
|
|||||||
class Track_Asso
|
class Track_Asso
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int track_asso_process(QVector <PointRecv> *point_recv, //点迹文件
|
int track_asso_process(QVector <PointRecv> *point_recv, //点迹文件
|
||||||
QVector <Trust_Track> *trust_track, //航迹文件
|
QVector <Trust_Track> *trust_track, //航迹文件
|
||||||
struct Track Trust_Track_Output[MAX_TRACK_NUM][10], //更新航迹信息
|
struct Track Trust_Track_Output[MAX_TRACK_NUM][10], //更新航迹信息
|
||||||
int *Trust_track_num_Output, //更新航迹数
|
int *Trust_track_num_Output, //更新航迹数
|
||||||
struct RadarPara Work_Parameter //工作参数
|
struct RadarPara Work_Parameter //工作参数
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
Track_Asso();
|
Track_Asso();
|
||||||
private:
|
private:
|
||||||
|
|
||||||
//要处理的点迹
|
//要处理的点迹
|
||||||
QVector<PointRecv> point_process;
|
QVector<PointRecv> point_process;
|
||||||
|
|
||||||
|
|
||||||
//IMM
|
//IMM
|
||||||
void model_interaction(QVector <Trust_Track> *trust_track); //模型交互
|
void model_interaction(QVector <Trust_Track> *trust_track); //模型交互
|
||||||
|
|
||||||
|
|
||||||
void model_filter(QVector <Trust_Track> *trust_track, //滤波
|
void model_filter(QVector <Trust_Track> *trust_track, //滤波
|
||||||
struct RadarPara Work_Parameter
|
struct RadarPara Work_Parameter
|
||||||
);
|
);
|
||||||
|
|
||||||
void model_output(QVector <Trust_Track> *trust_track ); //模型输出
|
void model_output(QVector <Trust_Track> *trust_track ); //模型输出
|
||||||
|
|
||||||
void IMM_d_cal(double v_track,
|
void IMM_d_cal(double v_track,
|
||||||
double X1[6], double P1[6][6],
|
double X1[6], double P1[6][6],
|
||||||
double X2[6], double P2[6][6],
|
double X2[6], double P2[6][6],
|
||||||
double X3[6], double P3[6][6],
|
double X3[6], double P3[6][6],
|
||||||
double Z[3], double prt,double freq_ind,
|
double Z[3], double prt,double freq_ind,
|
||||||
double delta_T,
|
double delta_T,
|
||||||
double *d1,double *d2,double *d3,
|
double *d1,double *d2,double *d3,
|
||||||
struct RadarPara Work_Parameter);
|
struct RadarPara Work_Parameter);
|
||||||
|
|
||||||
void IMM_F_Q_gen(double v_track, double delta_T,double F[6][6], double Q1[6][6], double Q2[6][6], double Q3[6][6],struct RadarPara Work_Parameter);
|
void IMM_F_Q_gen(double v_track, double delta_T,double F[6][6], double Q1[6][6], double Q2[6][6], double Q3[6][6],struct RadarPara Work_Parameter);
|
||||||
|
|
||||||
double Pt[3][3]; //模型转移概率
|
double Pt[3][3]; //模型转移概率
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//高度维更新
|
//高度维更新
|
||||||
void track_hight_update(int updata_track_index, //更新的航迹号
|
void track_hight_update(int updata_track_index, //更新的航迹号
|
||||||
int asso_point_index, //点迹号
|
int asso_point_index, //点迹号
|
||||||
QVector <Trust_Track> *trust_track //航迹
|
QVector <Trust_Track> *trust_track //航迹
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
#endif // TRACK_ASSO_H
|
#endif // TRACK_ASSO_H
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -9,50 +9,50 @@ using namespace std;
|
|||||||
|
|
||||||
class Track_Asso_Direct_Tracking
|
class Track_Asso_Direct_Tracking
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int track_asso_process_direct_tracking(QVector<PointRecv> *point_recv, //点迹
|
int track_asso_process_direct_tracking(QVector<PointRecv> *point_recv, //点迹
|
||||||
Trust_Track *trust_track, //航迹
|
Trust_Track *trust_track, //航迹
|
||||||
struct Track Trust_Track_Output[MAX_TRACK_NUM][10], //更新航迹信息
|
struct Track Trust_Track_Output[MAX_TRACK_NUM][10], //更新航迹信息
|
||||||
int *Trust_track_num_Output, //更新航迹数
|
int *Trust_track_num_Output, //更新航迹数
|
||||||
struct RadarPara Work_Parameter //工作参数
|
struct RadarPara Work_Parameter //工作参数
|
||||||
);
|
);
|
||||||
|
|
||||||
Track_Asso_Direct_Tracking();
|
Track_Asso_Direct_Tracking();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
//要处理的点迹
|
//要处理的点迹
|
||||||
QVector<PointRecv> point_process;
|
QVector<PointRecv> point_process;
|
||||||
|
|
||||||
|
|
||||||
//IMM
|
//IMM
|
||||||
void model_interaction(Trust_Track *trust_track); //模型交互
|
void model_interaction(Trust_Track *trust_track); //模型交互
|
||||||
|
|
||||||
|
|
||||||
void model_filter(Trust_Track *trust_track, //滤波
|
void model_filter(Trust_Track *trust_track, //滤波
|
||||||
struct RadarPara Work_Parameter
|
struct RadarPara Work_Parameter
|
||||||
);
|
);
|
||||||
|
|
||||||
void model_output(Trust_Track *trust_track); //模型输出
|
void model_output(Trust_Track *trust_track); //模型输出
|
||||||
|
|
||||||
void IMM_d_cal(double v_track,
|
void IMM_d_cal(double v_track,
|
||||||
double X1[6], double P1[6][6],
|
double X1[6], double P1[6][6],
|
||||||
double X2[6], double P2[6][6],
|
double X2[6], double P2[6][6],
|
||||||
double X3[6], double P3[6][6],
|
double X3[6], double P3[6][6],
|
||||||
double Z[3], double prt,double freq_ind,
|
double Z[3], double prt,double freq_ind,
|
||||||
double delta_T,
|
double delta_T,
|
||||||
double *d1,double *d2,double *d3,
|
double *d1,double *d2,double *d3,
|
||||||
struct RadarPara Work_Parameter);
|
struct RadarPara Work_Parameter);
|
||||||
|
|
||||||
void IMM_F_Q_gen(double v_track, double delta_T,double F[6][6], double Q1[6][6], double Q2[6][6], double Q3[6][6],struct RadarPara Work_Parameter);
|
void IMM_F_Q_gen(double v_track, double delta_T,double F[6][6], double Q1[6][6], double Q2[6][6], double Q3[6][6],struct RadarPara Work_Parameter);
|
||||||
|
|
||||||
double Pt[3][3]; //模型转移概率
|
double Pt[3][3]; //模型转移概率
|
||||||
|
|
||||||
//高度维更新
|
//高度维更新
|
||||||
void track_hight_update(int asso_point_index, //点迹号
|
void track_hight_update(int asso_point_index, //点迹号
|
||||||
Trust_Track *trust_track //航迹
|
Trust_Track *trust_track //航迹
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -12,51 +12,51 @@ using namespace std;
|
|||||||
class Track_Asso_Tas
|
class Track_Asso_Tas
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int track_asso_process_tas(QVector<PointRecv> *point_recv_tas, //点迹文件
|
int track_asso_process_tas(QVector<PointRecv> *point_recv_tas, //点迹文件
|
||||||
QVector<Trust_Track> *trust_track, //航迹文件
|
QVector<Trust_Track> *trust_track, //航迹文件
|
||||||
struct Track Trust_Track_Output[MAX_TRACK_NUM][10], //更新航迹信息
|
struct Track Trust_Track_Output[MAX_TRACK_NUM][10], //更新航迹信息
|
||||||
int *Trust_track_num_Output, //更新航迹数
|
int *Trust_track_num_Output, //更新航迹数
|
||||||
struct RadarPara Work_Parameter, //工作参数
|
struct RadarPara Work_Parameter, //工作参数
|
||||||
int tas_track_idx
|
int tas_track_idx
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
Track_Asso_Tas();
|
Track_Asso_Tas();
|
||||||
private:
|
private:
|
||||||
|
|
||||||
//要处理的点迹
|
//要处理的点迹
|
||||||
QVector<PointRecv> point_process;
|
QVector<PointRecv> point_process;
|
||||||
|
|
||||||
|
|
||||||
//IMM
|
//IMM
|
||||||
void model_interaction(QVector<Trust_Track> *trust_track, int tas_track_idx); //模型交互
|
void model_interaction(QVector<Trust_Track> *trust_track, int tas_track_idx); //模型交互
|
||||||
|
|
||||||
|
|
||||||
void model_filter(QVector<Trust_Track> *trust_track, //滤波
|
void model_filter(QVector<Trust_Track> *trust_track, //滤波
|
||||||
struct RadarPara Work_Parameter,
|
struct RadarPara Work_Parameter,
|
||||||
int tas_track_idx
|
int tas_track_idx
|
||||||
);
|
);
|
||||||
|
|
||||||
void model_output(QVector<Trust_Track> *trust_track, int tas_track_idx ); //模型输出
|
void model_output(QVector<Trust_Track> *trust_track, int tas_track_idx ); //模型输出
|
||||||
|
|
||||||
void IMM_d_cal(double v_track,
|
void IMM_d_cal(double v_track,
|
||||||
double X1[6], double P1[6][6],
|
double X1[6], double P1[6][6],
|
||||||
double X2[6], double P2[6][6],
|
double X2[6], double P2[6][6],
|
||||||
double X3[6], double P3[6][6],
|
double X3[6], double P3[6][6],
|
||||||
double Z[3], double prt,double freq_ind,
|
double Z[3], double prt,double freq_ind,
|
||||||
double delta_T,
|
double delta_T,
|
||||||
double *d1,double *d2,double *d3,
|
double *d1,double *d2,double *d3,
|
||||||
struct RadarPara Work_Parameter);
|
struct RadarPara Work_Parameter);
|
||||||
|
|
||||||
void IMM_F_Q_gen(double v_track, double delta_T,double F[6][6], double Q1[6][6], double Q2[6][6], double Q3[6][6],struct RadarPara Work_Parameter);
|
void IMM_F_Q_gen(double v_track, double delta_T,double F[6][6], double Q1[6][6], double Q2[6][6], double Q3[6][6],struct RadarPara Work_Parameter);
|
||||||
|
|
||||||
double Pt[3][3]; //模型转移概率
|
double Pt[3][3]; //模型转移概率
|
||||||
|
|
||||||
//高度维更新
|
//高度维更新
|
||||||
void track_hight_update(int tas_track_index, //更新的航迹号
|
void track_hight_update(int tas_track_index, //更新的航迹号
|
||||||
int asso_point_index, //点迹号
|
int asso_point_index, //点迹号
|
||||||
QVector<Trust_Track> *trust_track //航迹
|
QVector<Trust_Track> *trust_track //航迹
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,30 +8,30 @@ using namespace std;
|
|||||||
|
|
||||||
|
|
||||||
void Track_Die::track_die_process( QVector <Trust_Track> *trust_track,
|
void Track_Die::track_die_process( QVector <Trust_Track> *trust_track,
|
||||||
int Track_die_Index_Output[],
|
int Track_die_Index_Output[],
|
||||||
int *Track_die_num_Output)
|
int *Track_die_num_Output)
|
||||||
{
|
{
|
||||||
|
|
||||||
QVector <Trust_Track>::iterator Iter;
|
QVector <Trust_Track>::iterator Iter;
|
||||||
for (Iter=trust_track->begin(); Iter!=trust_track->end();)
|
for (Iter=trust_track->begin(); Iter!=trust_track->end();)
|
||||||
{
|
{
|
||||||
if( ((*Iter).Track_Mode == 0 && (*Iter).Extrapolate_round >= TRACK_DIE_ROUND)
|
if( ((*Iter).Track_Mode == 0 && (*Iter).Extrapolate_round >= TRACK_DIE_ROUND)
|
||||||
// ||((*Iter).Track_Mode == 1 && (*Iter).Extrapolate_round >= TRACK_DIE_ROUND_TAS)
|
// ||((*Iter).Track_Mode == 1 && (*Iter).Extrapolate_round >= TRACK_DIE_ROUND_TAS)
|
||||||
||(*Iter).manual_delete_flag == 1)
|
||(*Iter).manual_delete_flag == 1)
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
//输出消亡信息
|
//输出消亡信息
|
||||||
*Track_die_num_Output=*Track_die_num_Output+1;
|
*Track_die_num_Output=*Track_die_num_Output+1;
|
||||||
Track_die_Index_Output[*Track_die_num_Output-1]=(*Iter).Track_Index;
|
Track_die_Index_Output[*Track_die_num_Output-1]=(*Iter).Track_Index;
|
||||||
|
|
||||||
trust_track->erase(Iter);
|
trust_track->erase(Iter);
|
||||||
Iter=trust_track->begin();
|
Iter=trust_track->begin();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Iter++;
|
Iter++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ using namespace std;
|
|||||||
class Track_Die
|
class Track_Die
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void track_die_process( QVector <Trust_Track> *trust_track,
|
void track_die_process( QVector <Trust_Track> *trust_track,
|
||||||
int Track_die_Index_Output[],
|
int Track_die_Index_Output[],
|
||||||
int *Track_die_num_Output);
|
int *Track_die_num_Output);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,29 +8,29 @@ using namespace std;
|
|||||||
|
|
||||||
|
|
||||||
void Track_Die_Tas::track_die_process_tas( QVector <Trust_Track> *trust_track,
|
void Track_Die_Tas::track_die_process_tas( QVector <Trust_Track> *trust_track,
|
||||||
int Track_die_Index_Output[],
|
int Track_die_Index_Output[],
|
||||||
int *Track_die_num_Output)
|
int *Track_die_num_Output)
|
||||||
{
|
{
|
||||||
|
|
||||||
QVector <Trust_Track>::iterator Iter;
|
QVector <Trust_Track>::iterator Iter;
|
||||||
for (Iter=trust_track->begin(); Iter!=trust_track->end();)
|
for (Iter=trust_track->begin(); Iter!=trust_track->end();)
|
||||||
{
|
{
|
||||||
if( ((*Iter).Track_Mode == 1 && (*Iter).Extrapolate_round >= TRACK_DIE_ROUND_TAS)
|
if( ((*Iter).Track_Mode == 1 && (*Iter).Extrapolate_round >= TRACK_DIE_ROUND_TAS)
|
||||||
||(*Iter).manual_delete_flag == 1)
|
||(*Iter).manual_delete_flag == 1)
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
//输出消亡信息
|
//输出消亡信息
|
||||||
*Track_die_num_Output=*Track_die_num_Output+1;
|
*Track_die_num_Output=*Track_die_num_Output+1;
|
||||||
Track_die_Index_Output[*Track_die_num_Output-1]=(*Iter).Track_Index;
|
Track_die_Index_Output[*Track_die_num_Output-1]=(*Iter).Track_Index;
|
||||||
|
|
||||||
trust_track->erase(Iter);
|
trust_track->erase(Iter);
|
||||||
Iter=trust_track->begin();
|
Iter=trust_track->begin();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Iter++;
|
Iter++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ using namespace std;
|
|||||||
class Track_Die_Tas
|
class Track_Die_Tas
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void track_die_process_tas( QVector <Trust_Track> *trust_track,
|
void track_die_process_tas( QVector <Trust_Track> *trust_track,
|
||||||
int Track_die_Index_Output[],
|
int Track_die_Index_Output[],
|
||||||
int *Track_die_num_Output);
|
int *Track_die_num_Output);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,69 +7,69 @@ using namespace std;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
int Track_Ind_Mangement ::track_ind_get( QVector<Trust_Track> *trust_track)
|
int Track_Ind_Mangement ::track_ind_get( QVector<Trust_Track> *trust_track)
|
||||||
{
|
{
|
||||||
|
|
||||||
int isempty = 1;
|
int isempty = 1;
|
||||||
if((*trust_track).size()>0)
|
if((*trust_track).size()>0)
|
||||||
{
|
{
|
||||||
|
|
||||||
isempty = 0;
|
isempty = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (isempty == 1)
|
if (isempty == 1)
|
||||||
{
|
{
|
||||||
lastest_index = 1;
|
lastest_index = 1;
|
||||||
return lastest_index;
|
return lastest_index;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//建立航迹号列表
|
//建立航迹号列表
|
||||||
int List[MAX_TRACK_INDEX]={0};
|
int List[MAX_TRACK_INDEX]={0};
|
||||||
for (int i=0;i<trust_track->size();i++)
|
for (int i=0;i<trust_track->size();i++)
|
||||||
{
|
{
|
||||||
List[(*trust_track)[i].Track_Index-1]=1;
|
List[(*trust_track)[i].Track_Index-1]=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//分配航迹号
|
//分配航迹号
|
||||||
if(lastest_index<MAX_TRACK_INDEX)
|
if(lastest_index<MAX_TRACK_INDEX)
|
||||||
{
|
{
|
||||||
for (int i=lastest_index+1;i<=MAX_TRACK_INDEX;i++)
|
for (int i=lastest_index+1;i<=MAX_TRACK_INDEX;i++)
|
||||||
{
|
{
|
||||||
if(List[i-1]==0)
|
if(List[i-1]==0)
|
||||||
{
|
{
|
||||||
lastest_index = i;
|
lastest_index = i;
|
||||||
return lastest_index;
|
return lastest_index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i=1;i<MAX_TRACK_INDEX;i++)
|
for (int i=1;i<MAX_TRACK_INDEX;i++)
|
||||||
{
|
{
|
||||||
if(List[i-1]==0)
|
if(List[i-1]==0)
|
||||||
{
|
{
|
||||||
lastest_index = i;
|
lastest_index = i;
|
||||||
return lastest_index;
|
return lastest_index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(lastest_index == MAX_TRACK_INDEX)
|
else if(lastest_index == MAX_TRACK_INDEX)
|
||||||
{
|
{
|
||||||
for (int i=1;i<MAX_TRACK_INDEX;i++)
|
for (int i=1;i<MAX_TRACK_INDEX;i++)
|
||||||
{
|
{
|
||||||
if(List[i-1]==0)
|
if(List[i-1]==0)
|
||||||
{
|
{
|
||||||
lastest_index = i;
|
lastest_index = i;
|
||||||
return lastest_index;
|
return lastest_index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,12 +12,12 @@ class Track_Ind_Mangement
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
int track_ind_get( QVector<Trust_Track> *trust_track);
|
int track_ind_get( QVector<Trust_Track> *trust_track);
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
int lastest_index;
|
int lastest_index;
|
||||||
|
|
||||||
};
|
};
|
||||||
#endif // TRACK_INDEX_MANGEMENT_H
|
#endif // TRACK_INDEX_MANGEMENT_H
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -16,43 +16,43 @@ class Track_Init
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//航迹起始逻辑法
|
//航迹起始逻辑法
|
||||||
int track_init_process_logic( QVector<PointRecv> *point_recv, //输入点迹
|
int track_init_process_logic( QVector<PointRecv> *point_recv, //输入点迹
|
||||||
QVector<Trust_Track> *trust_track, //可靠航迹
|
QVector<Trust_Track> *trust_track, //可靠航迹
|
||||||
QVector <QVector<Temp_track>> *temp_track,
|
QVector <QVector<Temp_track>> *temp_track,
|
||||||
struct Track Trust_Track_Output[MAX_TRACK_NUM][10],
|
struct Track Trust_Track_Output[MAX_TRACK_NUM][10],
|
||||||
int *Trust_track_num_Output,
|
int *Trust_track_num_Output,
|
||||||
struct RadarPara Work_Parameter
|
struct RadarPara Work_Parameter
|
||||||
);
|
);
|
||||||
|
|
||||||
Track_Init();
|
Track_Init();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
||||||
QVector<PointRecv> point_process; //要处理的点迹
|
QVector<PointRecv> point_process; //要处理的点迹
|
||||||
|
|
||||||
|
|
||||||
void point_temp_track_asso(QVector <QVector<Temp_track>> *temp_track,
|
void point_temp_track_asso(QVector <QVector<Temp_track>> *temp_track,
|
||||||
struct RadarPara Work_Parameter); //临时航迹与点迹关联
|
struct RadarPara Work_Parameter); //临时航迹与点迹关联
|
||||||
|
|
||||||
|
|
||||||
void point_track_head_asso( QVector <QVector<Temp_track>> *temp_track,
|
void point_track_head_asso( QVector <QVector<Temp_track>> *temp_track,
|
||||||
struct RadarPara Work_Parameter); //航迹头与点迹关联
|
struct RadarPara Work_Parameter); //航迹头与点迹关联
|
||||||
|
|
||||||
void tmp_track_to_trust_track( QVector <Trust_Track> *trust_track, //临时航迹转可靠航迹
|
void tmp_track_to_trust_track( QVector <Trust_Track> *trust_track, //临时航迹转可靠航迹
|
||||||
QVector <QVector<Temp_track>> *temp_track,
|
QVector <QVector<Temp_track>> *temp_track,
|
||||||
struct Track Trust_Track_Output[MAX_TRACK_NUM][10],
|
struct Track Trust_Track_Output[MAX_TRACK_NUM][10],
|
||||||
int *Trust_track_num_Output,
|
int *Trust_track_num_Output,
|
||||||
struct RadarPara Work_Parameter);
|
struct RadarPara Work_Parameter);
|
||||||
|
|
||||||
void tmp_track_die(QVector <QVector<Temp_track>> *temp_track);//临时航迹消亡
|
void tmp_track_die(QVector <QVector<Temp_track>> *temp_track);//临时航迹消亡
|
||||||
|
|
||||||
double alpha_cal_track_init(double x0,double y0,double x1,double y1,double x2,double y2); //计算夹角
|
double alpha_cal_track_init(double x0,double y0,double x1,double y1,double x2,double y2); //计算夹角
|
||||||
|
|
||||||
int track_init_prohibit(double r, double azi, struct RadarPara Work_Parameter); //判断目标是否位于航迹起始屏蔽区 是返回1 否返回0
|
int track_init_prohibit(double r, double azi, struct RadarPara Work_Parameter); //判断目标是否位于航迹起始屏蔽区 是返回1 否返回0
|
||||||
|
|
||||||
Track_Ind_Mangement track_index_mangement;
|
Track_Ind_Mangement track_index_mangement;
|
||||||
|
|
||||||
};
|
};
|
||||||
#endif // TRACK_INIT_H
|
#endif // TRACK_INIT_H
|
||||||
|
|||||||
@@ -8,422 +8,422 @@
|
|||||||
#include<iomanip>
|
#include<iomanip>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
int Track_Init_Direct_Tracking::track_init_process_logic( QVector<PointRecv> *point_recv, //输入点迹
|
int Track_Init_Direct_Tracking::track_init_process_logic( QVector<PointRecv> *point_recv, //输入点迹
|
||||||
QVector<Trust_Track> *trust_track, //可靠航迹
|
QVector<Trust_Track> *trust_track, //可靠航迹
|
||||||
QVector <QVector<Temp_track>> *temp_track,
|
QVector <QVector<Temp_track>> *temp_track,
|
||||||
struct Track Trust_Track_Output[MAX_TRACK_NUM][10],
|
struct Track Trust_Track_Output[MAX_TRACK_NUM][10],
|
||||||
int *Trust_track_num_Output,
|
int *Trust_track_num_Output,
|
||||||
struct RadarPara Work_Parameter,
|
struct RadarPara Work_Parameter,
|
||||||
int track_ID
|
int track_ID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Track_Init_Direct_Tracking::point_temp_track_asso(QVector <QVector<Temp_track>> *temp_track,
|
void Track_Init_Direct_Tracking::point_temp_track_asso(QVector <QVector<Temp_track>> *temp_track,
|
||||||
struct RadarPara Work_Parameter) //临时航迹与点迹关联
|
struct RadarPara Work_Parameter) //临时航迹与点迹关联
|
||||||
{
|
{
|
||||||
//关联信息
|
//关联信息
|
||||||
struct Asso_info
|
struct Asso_info
|
||||||
{
|
{
|
||||||
int track_idx;
|
int track_idx;
|
||||||
int point_idx;
|
int point_idx;
|
||||||
};
|
};
|
||||||
QVector <Asso_info> asso_info;
|
QVector <Asso_info> asso_info;
|
||||||
|
|
||||||
for ( int i=0;i<point_process.size();i++)
|
for ( int i=0;i<point_process.size();i++)
|
||||||
{
|
{
|
||||||
for ( int j=0;j<(*temp_track).size();j++)
|
for ( int j=0;j<(*temp_track).size();j++)
|
||||||
{
|
{
|
||||||
int L = (*temp_track)[j].size();
|
int L = (*temp_track)[j].size();
|
||||||
|
|
||||||
if( (*temp_track)[j].size() > 1 && (*temp_track)[j][L-1].buff_round >= 2)
|
if( (*temp_track)[j].size() > 1 && (*temp_track)[j][L-1].buff_round >= 2)
|
||||||
{
|
{
|
||||||
|
|
||||||
//点迹信息
|
//点迹信息
|
||||||
// double Z[2]={ point_process[i].Range*cos(point_process[i].Azimuth),point_process[i].Range*sin(point_process[i].Azimuth)} ;
|
// double Z[2]={ point_process[i].Range*cos(point_process[i].Azimuth),point_process[i].Range*sin(point_process[i].Azimuth)} ;
|
||||||
double Z[3]={point_process[i].Range,
|
double Z[3]={point_process[i].Range,
|
||||||
point_process[i].Azimuth,
|
point_process[i].Azimuth,
|
||||||
point_process[i].Velocity};
|
point_process[i].Velocity};
|
||||||
double vr_point=point_process[i].Velocity;
|
double vr_point=point_process[i].Velocity;
|
||||||
double r_point=point_process[i].Range;
|
double r_point=point_process[i].Range;
|
||||||
double prt = point_process[i].PRF_index;
|
double prt = point_process[i].PRF_index;
|
||||||
double freq_ind = point_process[i].Freq_index;
|
double freq_ind = point_process[i].Freq_index;
|
||||||
double h_point = point_process[i].Height;
|
double h_point = point_process[i].Height;
|
||||||
double T_point = point_process[i].CPI_Time;
|
double T_point = point_process[i].CPI_Time;
|
||||||
|
|
||||||
//航迹信息
|
//航迹信息
|
||||||
double X[4];
|
double X[4];
|
||||||
double P[4][4];
|
double P[4][4];
|
||||||
memcpy(X,(*temp_track)[j][L-1].X,4*sizeof(double));
|
memcpy(X,(*temp_track)[j][L-1].X,4*sizeof(double));
|
||||||
memcpy(P,(*temp_track)[j][L-1].P,4*4*sizeof(double));
|
memcpy(P,(*temp_track)[j][L-1].P,4*4*sizeof(double));
|
||||||
double v_temp_track=(*temp_track)[j][L-1].vr;
|
double v_temp_track=(*temp_track)[j][L-1].vr;
|
||||||
double r_temp_track=(*temp_track)[j][L-1].r;
|
double r_temp_track=(*temp_track)[j][L-1].r;
|
||||||
double h_temp_track=(*temp_track)[j][L-1].height;
|
double h_temp_track=(*temp_track)[j][L-1].height;
|
||||||
double T_track_head = (*temp_track)[j][L-1].T;
|
double T_track_head = (*temp_track)[j][L-1].T;
|
||||||
|
|
||||||
|
|
||||||
double delta_T = (T_point - T_track_head)/1000.0;
|
double delta_T = (T_point - T_track_head)/1000.0;
|
||||||
|
|
||||||
if( fabs(r_point-r_temp_track)>=5 )
|
if( fabs(r_point-r_temp_track)>=5 )
|
||||||
{
|
{
|
||||||
//计算d
|
//计算d
|
||||||
kalman Kalman;
|
kalman Kalman;
|
||||||
double d = Kalman.d_cal_track_init_EKF(Z,X,P,delta_T,prt,freq_ind);
|
double d = Kalman.d_cal_track_init_EKF(Z,X,P,delta_T,prt,freq_ind);
|
||||||
//double d = Kalman.d_cal_track_init_with_doppler(Z,X,P,delta_T,vr_point,prt,freq_ind);
|
//double d = Kalman.d_cal_track_init_with_doppler(Z,X,P,delta_T,vr_point,prt,freq_ind);
|
||||||
//double d = Kalman.d_cal_track_init(Z,X,P,delta_T);
|
//double d = Kalman.d_cal_track_init(Z,X,P,delta_T);
|
||||||
//计算夹角
|
//计算夹角
|
||||||
double x0=(*temp_track)[j][L-2].X[0];
|
double x0=(*temp_track)[j][L-2].X[0];
|
||||||
double y0=(*temp_track)[j][L-2].X[2];
|
double y0=(*temp_track)[j][L-2].X[2];
|
||||||
double x1=(*temp_track)[j][L-1].X[0];
|
double x1=(*temp_track)[j][L-1].X[0];
|
||||||
double y1=(*temp_track)[j][L-1].X[2];
|
double y1=(*temp_track)[j][L-1].X[2];
|
||||||
double x2=Z[0]*cos(Z[1]);
|
double x2=Z[0]*cos(Z[1]);
|
||||||
double y2=Z[0]*sin(Z[1]);
|
double y2=Z[0]*sin(Z[1]);
|
||||||
double alpha = alpha_cal_track_init(x0,y0,x1,y1,x2,y2);
|
double alpha = alpha_cal_track_init(x0,y0,x1,y1,x2,y2);
|
||||||
|
|
||||||
|
|
||||||
if(d*d<=TRACK_START_THRESHOLD*TRACK_START_THRESHOLD && alpha<ALPHA_START && vr_point*v_temp_track>0)// && fabs(h_point-h_temp_track )<= r_point*SIGMA_E&& abs(vr_point-v_temp_track)/abs(v_temp_track)<0.8
|
if(d*d<=TRACK_START_THRESHOLD*TRACK_START_THRESHOLD && alpha<ALPHA_START && vr_point*v_temp_track>0)// && fabs(h_point-h_temp_track )<= r_point*SIGMA_E&& abs(vr_point-v_temp_track)/abs(v_temp_track)<0.8
|
||||||
{
|
{
|
||||||
struct Asso_info asso_info_tmp;
|
struct Asso_info asso_info_tmp;
|
||||||
asso_info_tmp.point_idx = i+1;
|
asso_info_tmp.point_idx = i+1;
|
||||||
asso_info_tmp.track_idx = j+1;
|
asso_info_tmp.track_idx = j+1;
|
||||||
asso_info.push_back(asso_info_tmp);
|
asso_info.push_back(asso_info_tmp);
|
||||||
(*temp_track)[j][L-1].asso_flag = 1;
|
(*temp_track)[j][L-1].asso_flag = 1;
|
||||||
point_process[i].Use_Flag = 1;
|
point_process[i].Use_Flag = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// temp_track中加入新关联上的临时航迹
|
// temp_track中加入新关联上的临时航迹
|
||||||
for (int i = 0 ; i<asso_info.size();i++ )
|
for (int i = 0 ; i<asso_info.size();i++ )
|
||||||
{
|
{
|
||||||
(*temp_track).push_back(QVector <Temp_track> ());
|
(*temp_track).push_back(QVector <Temp_track> ());
|
||||||
|
|
||||||
//前L个点
|
//前L个点
|
||||||
int L = (*temp_track)[asso_info[i].track_idx-1].size();
|
int L = (*temp_track)[asso_info[i].track_idx-1].size();
|
||||||
for (int j=0;j < L;j++ )
|
for (int j=0;j < L;j++ )
|
||||||
{
|
{
|
||||||
(*temp_track)[(*temp_track).size()-1].push_back((*temp_track)[asso_info[i].track_idx-1][j]);
|
(*temp_track)[(*temp_track).size()-1].push_back((*temp_track)[asso_info[i].track_idx-1][j]);
|
||||||
(*temp_track)[(*temp_track).size()-1][j].asso_flag = 0;
|
(*temp_track)[(*temp_track).size()-1][j].asso_flag = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//关联上的点
|
//关联上的点
|
||||||
Temp_track asso_track_info_tmp;
|
Temp_track asso_track_info_tmp;
|
||||||
asso_track_info_tmp.r = point_process[asso_info[i].point_idx-1].Range;
|
asso_track_info_tmp.r = point_process[asso_info[i].point_idx-1].Range;
|
||||||
asso_track_info_tmp.azi = point_process[asso_info[i].point_idx-1].Azimuth;
|
asso_track_info_tmp.azi = point_process[asso_info[i].point_idx-1].Azimuth;
|
||||||
asso_track_info_tmp.height = point_process[asso_info[i].point_idx-1].Height;
|
asso_track_info_tmp.height = point_process[asso_info[i].point_idx-1].Height;
|
||||||
asso_track_info_tmp.Amp = point_process[asso_info[i].point_idx-1].Amplitude;
|
asso_track_info_tmp.Amp = point_process[asso_info[i].point_idx-1].Amplitude;
|
||||||
asso_track_info_tmp.T = point_process[asso_info[i].point_idx-1].CPI_Time;
|
asso_track_info_tmp.T = point_process[asso_info[i].point_idx-1].CPI_Time;
|
||||||
asso_track_info_tmp.vr = point_process[asso_info[i].point_idx-1].Velocity;
|
asso_track_info_tmp.vr = point_process[asso_info[i].point_idx-1].Velocity;
|
||||||
asso_track_info_tmp.snr = point_process[asso_info[i].point_idx-1].snr;
|
asso_track_info_tmp.snr = point_process[asso_info[i].point_idx-1].snr;
|
||||||
asso_track_info_tmp.RCS = point_process[asso_info[i].point_idx-1].RCS;
|
asso_track_info_tmp.RCS = point_process[asso_info[i].point_idx-1].RCS;
|
||||||
asso_track_info_tmp.pitch_num = point_process[asso_info[i].point_idx-1].pitch_num;
|
asso_track_info_tmp.pitch_num = point_process[asso_info[i].point_idx-1].pitch_num;
|
||||||
std::memcpy(asso_track_info_tmp.speed_dim, point_process[asso_info[i].point_idx-1].speed_dim, sizeof(asso_track_info_tmp.speed_dim));
|
std::memcpy(asso_track_info_tmp.speed_dim, point_process[asso_info[i].point_idx-1].speed_dim, sizeof(asso_track_info_tmp.speed_dim));
|
||||||
std::memcpy(asso_track_info_tmp.range_dim, point_process[asso_info[i].point_idx-1].range_dim, sizeof(asso_track_info_tmp.range_dim));
|
std::memcpy(asso_track_info_tmp.range_dim, point_process[asso_info[i].point_idx-1].range_dim, sizeof(asso_track_info_tmp.range_dim));
|
||||||
asso_track_info_tmp.asso_flag=0;
|
asso_track_info_tmp.asso_flag=0;
|
||||||
asso_track_info_tmp.buff_round = 1;
|
asso_track_info_tmp.buff_round = 1;
|
||||||
// asso_track_info_tmp.Temp_track_section_idx = floor(point_process[asso_info[i].point_idx-1].beam_index/BEAM_NUM_DOT_SECTION)+1;
|
// asso_track_info_tmp.Temp_track_section_idx = floor(point_process[asso_info[i].point_idx-1].beam_index/BEAM_NUM_DOT_SECTION)+1;
|
||||||
double Z0[2]={(*temp_track)[asso_info[i].track_idx-1][L-1].r*cos((*temp_track)[asso_info[i].track_idx-1][L-1].azi),
|
double Z0[2]={(*temp_track)[asso_info[i].track_idx-1][L-1].r*cos((*temp_track)[asso_info[i].track_idx-1][L-1].azi),
|
||||||
(*temp_track)[asso_info[i].track_idx-1][L-1].r*sin((*temp_track)[asso_info[i].track_idx-1][L-1].azi)};
|
(*temp_track)[asso_info[i].track_idx-1][L-1].r*sin((*temp_track)[asso_info[i].track_idx-1][L-1].azi)};
|
||||||
double Z1[2]={point_process[asso_info[i].point_idx-1].Range*cos(point_process[asso_info[i].point_idx-1].Azimuth),
|
double Z1[2]={point_process[asso_info[i].point_idx-1].Range*cos(point_process[asso_info[i].point_idx-1].Azimuth),
|
||||||
point_process[asso_info[i].point_idx-1].Range*sin(point_process[asso_info[i].point_idx-1].Azimuth)};
|
point_process[asso_info[i].point_idx-1].Range*sin(point_process[asso_info[i].point_idx-1].Azimuth)};
|
||||||
double X[4];
|
double X[4];
|
||||||
double P[4][4];
|
double P[4][4];
|
||||||
kalman Kalman;
|
kalman Kalman;
|
||||||
double T = ( point_process[asso_info[i].point_idx-1].CPI_Time - (*temp_track)[asso_info[i].track_idx-1][L-1].T)/1000.0;
|
double T = ( point_process[asso_info[i].point_idx-1].CPI_Time - (*temp_track)[asso_info[i].track_idx-1][L-1].T)/1000.0;
|
||||||
|
|
||||||
Kalman.kalman_filter_init_2dots(Z0,Z1,T,X,P);
|
Kalman.kalman_filter_init_2dots(Z0,Z1,T,X,P);
|
||||||
memcpy(asso_track_info_tmp.X, X, 4*sizeof(double));
|
memcpy(asso_track_info_tmp.X, X, 4*sizeof(double));
|
||||||
memcpy(asso_track_info_tmp.P, P, 4*4*sizeof(double));
|
memcpy(asso_track_info_tmp.P, P, 4*4*sizeof(double));
|
||||||
(*temp_track)[(*temp_track).size()-1].push_back(asso_track_info_tmp);
|
(*temp_track)[(*temp_track).size()-1].push_back(asso_track_info_tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//temp_track中删除关联上的临时航迹
|
//temp_track中删除关联上的临时航迹
|
||||||
QVector <QVector<Temp_track>>::iterator Iter;
|
QVector <QVector<Temp_track>>::iterator Iter;
|
||||||
for (Iter=temp_track->begin(); Iter!=temp_track->end();)
|
for (Iter=temp_track->begin(); Iter!=temp_track->end();)
|
||||||
{
|
{
|
||||||
if((*Iter).size()>=2)
|
if((*Iter).size()>=2)
|
||||||
{
|
{
|
||||||
if((*Iter)[(*Iter).size()-1].asso_flag==1)
|
if((*Iter)[(*Iter).size()-1].asso_flag==1)
|
||||||
{
|
{
|
||||||
temp_track->erase(Iter);
|
temp_track->erase(Iter);
|
||||||
Iter=temp_track->begin();
|
Iter=temp_track->begin();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Iter++;
|
Iter++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Iter++;
|
Iter++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Track_Init_Direct_Tracking::point_track_head_asso( QVector <QVector<Temp_track>> *temp_track,
|
void Track_Init_Direct_Tracking::point_track_head_asso( QVector <QVector<Temp_track>> *temp_track,
|
||||||
struct RadarPara Work_Parameter) //航迹头与点迹关联
|
struct RadarPara Work_Parameter) //航迹头与点迹关联
|
||||||
{
|
{
|
||||||
//关联上的信息
|
//关联上的信息
|
||||||
struct Asso_info
|
struct Asso_info
|
||||||
{
|
{
|
||||||
int track_idx;
|
int track_idx;
|
||||||
int point_idx;
|
int point_idx;
|
||||||
};
|
};
|
||||||
QVector <Asso_info> asso_info;
|
QVector <Asso_info> asso_info;
|
||||||
|
|
||||||
|
|
||||||
//关联
|
//关联
|
||||||
for ( int i=0;i<point_process.size();i++)
|
for ( int i=0;i<point_process.size();i++)
|
||||||
{
|
{
|
||||||
|
|
||||||
for ( int j=0;j<temp_track->size();j++)
|
for ( int j=0;j<temp_track->size();j++)
|
||||||
{
|
{
|
||||||
|
|
||||||
if((*temp_track)[j].size()==1 && (*temp_track)[j][0].buff_round >= 2)
|
if((*temp_track)[j].size()==1 && (*temp_track)[j][0].buff_round >= 2)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
//点迹信息
|
//点迹信息
|
||||||
double x_point, y_point, vr_point;
|
double x_point, y_point, vr_point;
|
||||||
coor_trans Coor_trans;
|
coor_trans Coor_trans;
|
||||||
Coor_trans.polar2cart(&x_point,&y_point,point_process[i].Range,point_process[i].Azimuth);
|
Coor_trans.polar2cart(&x_point,&y_point,point_process[i].Range,point_process[i].Azimuth);
|
||||||
vr_point=point_process[i].Velocity;
|
vr_point=point_process[i].Velocity;
|
||||||
double r_point=point_process[i].Range;
|
double r_point=point_process[i].Range;
|
||||||
double h_point = point_process[i].Height;
|
double h_point = point_process[i].Height;
|
||||||
double T_point = point_process[i].CPI_Time;
|
double T_point = point_process[i].CPI_Time;
|
||||||
|
|
||||||
//航迹信息
|
//航迹信息
|
||||||
double x_track_head, y_track_head;
|
double x_track_head, y_track_head;
|
||||||
x_track_head=(*temp_track)[j][0].X[0];
|
x_track_head=(*temp_track)[j][0].X[0];
|
||||||
y_track_head=(*temp_track)[j][0].X[2];
|
y_track_head=(*temp_track)[j][0].X[2];
|
||||||
double v_track_head=(*temp_track)[j][0].vr;
|
double v_track_head=(*temp_track)[j][0].vr;
|
||||||
double h_track_head = (*temp_track)[j][0].height;
|
double h_track_head = (*temp_track)[j][0].height;
|
||||||
double T_track_head = (*temp_track)[j][0].T;
|
double T_track_head = (*temp_track)[j][0].T;
|
||||||
|
|
||||||
|
|
||||||
//距离差
|
//距离差
|
||||||
double dis = sqrt(pow(x_point-x_track_head,2)+pow(y_point-y_track_head,2));
|
double dis = sqrt(pow(x_point-x_track_head,2)+pow(y_point-y_track_head,2));
|
||||||
|
|
||||||
double vmax;
|
double vmax;
|
||||||
if(Work_Parameter.work_mode == 0) //近程模式 最大速度减小一点
|
if(Work_Parameter.work_mode == 0) //近程模式 最大速度减小一点
|
||||||
{
|
{
|
||||||
//vmax = V_MAX/5;
|
//vmax = V_MAX/5;
|
||||||
vmax = Work_Parameter.V_MAX;
|
vmax = Work_Parameter.V_MAX;
|
||||||
|
|
||||||
}
|
}
|
||||||
else //中远程模式 最大速度正常用
|
else //中远程模式 最大速度正常用
|
||||||
{
|
{
|
||||||
// vmax = V_MAX;
|
// vmax = V_MAX;
|
||||||
vmax = Work_Parameter.V_MAX;
|
vmax = Work_Parameter.V_MAX;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
double delta_T = (T_point - T_track_head)/1000.0;
|
double delta_T = (T_point - T_track_head)/1000.0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//满足关联条件的点航
|
//满足关联条件的点航
|
||||||
if( ( (r_point>=1000 && dis<=vmax*delta_T && dis>=Work_Parameter.V_MIN*delta_T) || (r_point<1000 && dis<=vmax*delta_T/2.0 && dis>=Work_Parameter.V_MIN*delta_T/2.0) )
|
if( ( (r_point>=1000 && dis<=vmax*delta_T && dis>=Work_Parameter.V_MIN*delta_T) || (r_point<1000 && dis<=vmax*delta_T/2.0 && dis>=Work_Parameter.V_MIN*delta_T/2.0) )
|
||||||
&& vr_point*v_track_head>0 )//&& fabs(vr_point-v_track_head)/fabs(v_track_head)<0.2 && fabs(h_point-h_track_head)<=r_point*SIGMA_E
|
&& vr_point*v_track_head>0 )//&& fabs(vr_point-v_track_head)/fabs(v_track_head)<0.2 && fabs(h_point-h_track_head)<=r_point*SIGMA_E
|
||||||
{
|
{
|
||||||
struct Asso_info asso_info_tmp;
|
struct Asso_info asso_info_tmp;
|
||||||
asso_info_tmp.point_idx = i+1;
|
asso_info_tmp.point_idx = i+1;
|
||||||
asso_info_tmp.track_idx = j+1;
|
asso_info_tmp.track_idx = j+1;
|
||||||
asso_info.push_back(asso_info_tmp);
|
asso_info.push_back(asso_info_tmp);
|
||||||
(*temp_track)[j][0].asso_flag = 1;
|
(*temp_track)[j][0].asso_flag = 1;
|
||||||
point_process[i].Use_Flag = 1;
|
point_process[i].Use_Flag = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// temp_track中加入新关联上的临时航迹
|
// temp_track中加入新关联上的临时航迹
|
||||||
for (int i = 0 ; i<asso_info.size();i++ )
|
for (int i = 0 ; i<asso_info.size();i++ )
|
||||||
{
|
{
|
||||||
(*temp_track).push_back(QVector <Temp_track> ());
|
(*temp_track).push_back(QVector <Temp_track> ());
|
||||||
|
|
||||||
//第一个点
|
//第一个点
|
||||||
(*temp_track)[(*temp_track).size()-1].push_back((*temp_track)[asso_info[i].track_idx-1][0]);
|
(*temp_track)[(*temp_track).size()-1].push_back((*temp_track)[asso_info[i].track_idx-1][0]);
|
||||||
(*temp_track)[(*temp_track).size()-1][0].asso_flag = 0;
|
(*temp_track)[(*temp_track).size()-1][0].asso_flag = 0;
|
||||||
|
|
||||||
//第二个点
|
//第二个点
|
||||||
struct Temp_track asso_track_info_tmp;
|
struct Temp_track asso_track_info_tmp;
|
||||||
asso_track_info_tmp.r = point_process[asso_info[i].point_idx-1].Range;
|
asso_track_info_tmp.r = point_process[asso_info[i].point_idx-1].Range;
|
||||||
asso_track_info_tmp.azi = point_process[asso_info[i].point_idx-1].Azimuth;
|
asso_track_info_tmp.azi = point_process[asso_info[i].point_idx-1].Azimuth;
|
||||||
asso_track_info_tmp.height = point_process[asso_info[i].point_idx-1].Height;
|
asso_track_info_tmp.height = point_process[asso_info[i].point_idx-1].Height;
|
||||||
asso_track_info_tmp.Amp = point_process[asso_info[i].point_idx-1].Amplitude;
|
asso_track_info_tmp.Amp = point_process[asso_info[i].point_idx-1].Amplitude;
|
||||||
asso_track_info_tmp.vr = point_process[asso_info[i].point_idx-1].Velocity;
|
asso_track_info_tmp.vr = point_process[asso_info[i].point_idx-1].Velocity;
|
||||||
asso_track_info_tmp.snr = point_process[asso_info[i].point_idx-1].snr;
|
asso_track_info_tmp.snr = point_process[asso_info[i].point_idx-1].snr;
|
||||||
asso_track_info_tmp.RCS = point_process[asso_info[i].point_idx-1].RCS;
|
asso_track_info_tmp.RCS = point_process[asso_info[i].point_idx-1].RCS;
|
||||||
asso_track_info_tmp.T = point_process[asso_info[i].point_idx-1].CPI_Time;
|
asso_track_info_tmp.T = point_process[asso_info[i].point_idx-1].CPI_Time;
|
||||||
asso_track_info_tmp.pitch_num = point_process[asso_info[i].point_idx-1].pitch_num;
|
asso_track_info_tmp.pitch_num = point_process[asso_info[i].point_idx-1].pitch_num;
|
||||||
std::memcpy(asso_track_info_tmp.speed_dim, point_process[asso_info[i].point_idx-1].speed_dim, sizeof(asso_track_info_tmp.speed_dim));
|
std::memcpy(asso_track_info_tmp.speed_dim, point_process[asso_info[i].point_idx-1].speed_dim, sizeof(asso_track_info_tmp.speed_dim));
|
||||||
std::memcpy(asso_track_info_tmp.range_dim, point_process[asso_info[i].point_idx-1].range_dim, sizeof(asso_track_info_tmp.range_dim));
|
std::memcpy(asso_track_info_tmp.range_dim, point_process[asso_info[i].point_idx-1].range_dim, sizeof(asso_track_info_tmp.range_dim));
|
||||||
asso_track_info_tmp.asso_flag = 0;
|
asso_track_info_tmp.asso_flag = 0;
|
||||||
asso_track_info_tmp.buff_round = 1;
|
asso_track_info_tmp.buff_round = 1;
|
||||||
// asso_track_info_tmp.Temp_track_section_idx = floor(point_process[asso_info[i].point_idx-1].beam_index/BEAM_NUM_DOT_SECTION)+1;;
|
// asso_track_info_tmp.Temp_track_section_idx = floor(point_process[asso_info[i].point_idx-1].beam_index/BEAM_NUM_DOT_SECTION)+1;;
|
||||||
double Z0[2]={(*temp_track)[asso_info[i].track_idx-1][0].r*cos((*temp_track)[asso_info[i].track_idx-1][0].azi),
|
double Z0[2]={(*temp_track)[asso_info[i].track_idx-1][0].r*cos((*temp_track)[asso_info[i].track_idx-1][0].azi),
|
||||||
(*temp_track)[asso_info[i].track_idx-1][0].r*sin((*temp_track)[asso_info[i].track_idx-1][0].azi)};
|
(*temp_track)[asso_info[i].track_idx-1][0].r*sin((*temp_track)[asso_info[i].track_idx-1][0].azi)};
|
||||||
double Z1[2]={point_process[asso_info[i].point_idx-1].Range*cos(point_process[asso_info[i].point_idx-1].Azimuth),
|
double Z1[2]={point_process[asso_info[i].point_idx-1].Range*cos(point_process[asso_info[i].point_idx-1].Azimuth),
|
||||||
point_process[asso_info[i].point_idx-1].Range*sin(point_process[asso_info[i].point_idx-1].Azimuth)};
|
point_process[asso_info[i].point_idx-1].Range*sin(point_process[asso_info[i].point_idx-1].Azimuth)};
|
||||||
double X[4];
|
double X[4];
|
||||||
double P[4][4];
|
double P[4][4];
|
||||||
kalman Kalman;
|
kalman Kalman;
|
||||||
double T = (point_process[asso_info[i].point_idx-1].CPI_Time - (*temp_track)[asso_info[i].track_idx-1][0].T)/1000.0;
|
double T = (point_process[asso_info[i].point_idx-1].CPI_Time - (*temp_track)[asso_info[i].track_idx-1][0].T)/1000.0;
|
||||||
|
|
||||||
Kalman.kalman_filter_init_2dots(Z0,Z1,T,X,P);
|
Kalman.kalman_filter_init_2dots(Z0,Z1,T,X,P);
|
||||||
memcpy(asso_track_info_tmp.X, X, 4*sizeof(double));
|
memcpy(asso_track_info_tmp.X, X, 4*sizeof(double));
|
||||||
memcpy(asso_track_info_tmp.P, P, 4*4*sizeof(double));
|
memcpy(asso_track_info_tmp.P, P, 4*4*sizeof(double));
|
||||||
(*temp_track)[(*temp_track).size()-1].push_back(asso_track_info_tmp);
|
(*temp_track)[(*temp_track).size()-1].push_back(asso_track_info_tmp);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//temp_track中删除关联上的航迹头
|
//temp_track中删除关联上的航迹头
|
||||||
QVector <QVector<Temp_track>>::iterator Iter;
|
QVector <QVector<Temp_track>>::iterator Iter;
|
||||||
for (Iter=temp_track->begin(); Iter!=temp_track->end();)
|
for (Iter=temp_track->begin(); Iter!=temp_track->end();)
|
||||||
{
|
{
|
||||||
if((*Iter)[0].asso_flag==1)
|
if((*Iter)[0].asso_flag==1)
|
||||||
{
|
{
|
||||||
temp_track->erase(Iter);
|
temp_track->erase(Iter);
|
||||||
Iter=temp_track->begin();
|
Iter=temp_track->begin();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Iter++;
|
Iter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Track_Init_Direct_Tracking::tmp_track_to_trust_track( QVector<Trust_Track> *trust_track, //临时航迹转可靠航迹
|
void Track_Init_Direct_Tracking::tmp_track_to_trust_track( QVector<Trust_Track> *trust_track, //临时航迹转可靠航迹
|
||||||
QVector <QVector<Temp_track>> *temp_track,
|
QVector <QVector<Temp_track>> *temp_track,
|
||||||
struct Track Trust_Track_Output[MAX_TRACK_NUM][10],
|
struct Track Trust_Track_Output[MAX_TRACK_NUM][10],
|
||||||
int *Trust_track_num_Output,
|
int *Trust_track_num_Output,
|
||||||
struct RadarPara Work_Parameter,
|
struct RadarPara Work_Parameter,
|
||||||
int track_ID)
|
int track_ID)
|
||||||
{
|
{
|
||||||
//temp_track中的临时航迹转为可靠航迹
|
//temp_track中的临时航迹转为可靠航迹
|
||||||
QVector <QVector<Temp_track>>::iterator Iter;
|
QVector <QVector<Temp_track>>::iterator Iter;
|
||||||
for (Iter=temp_track->begin(); Iter!=temp_track->end();)
|
for (Iter=temp_track->begin(); Iter!=temp_track->end();)
|
||||||
{
|
{
|
||||||
int L=(*Iter).size();
|
int L=(*Iter).size();
|
||||||
double range=(*Iter)[L-1].r;
|
double range=(*Iter)[L-1].r;
|
||||||
double azi=(*Iter)[L-1].azi/PI*180;
|
double azi=(*Iter)[L-1].azi/PI*180;
|
||||||
if( L==Work_Parameter.track_start_point_num) //按长度查找TRUST_TRACK_POINT
|
if( L==Work_Parameter.track_start_point_num) //按长度查找TRUST_TRACK_POINT
|
||||||
{
|
{
|
||||||
|
|
||||||
//加入本地航迹文件
|
//加入本地航迹文件
|
||||||
double Z0[2]={((*Iter)[L-3].r)*cos((*Iter)[L-3].azi),((*Iter)[L-3].r)*sin((*Iter)[L-3].azi) };
|
double Z0[2]={((*Iter)[L-3].r)*cos((*Iter)[L-3].azi),((*Iter)[L-3].r)*sin((*Iter)[L-3].azi) };
|
||||||
double Z1[2]={((*Iter)[L-2].r)*cos((*Iter)[L-2].azi),((*Iter)[L-2].r)*sin((*Iter)[L-2].azi) };
|
double Z1[2]={((*Iter)[L-2].r)*cos((*Iter)[L-2].azi),((*Iter)[L-2].r)*sin((*Iter)[L-2].azi) };
|
||||||
double Z2[2]={((*Iter)[L-1].r)*cos((*Iter)[L-1].azi),((*Iter)[L-1].r)*sin((*Iter)[L-1].azi) };
|
double Z2[2]={((*Iter)[L-1].r)*cos((*Iter)[L-1].azi),((*Iter)[L-1].r)*sin((*Iter)[L-1].azi) };
|
||||||
double X[6];
|
double X[6];
|
||||||
double P[6][6];
|
double P[6][6];
|
||||||
double T1=((*Iter)[L-2].T-(*Iter)[L-3].T)/1000.0;
|
double T1=((*Iter)[L-2].T-(*Iter)[L-3].T)/1000.0;
|
||||||
double T2=((*Iter)[L-1].T-(*Iter)[L-2].T)/1000.0;
|
double T2=((*Iter)[L-1].T-(*Iter)[L-2].T)/1000.0;
|
||||||
kalman Kalman;
|
kalman Kalman;
|
||||||
Kalman.kalman_filter_init_3dots(Z0, Z1, Z2, T1,T2, X ,P);
|
Kalman.kalman_filter_init_3dots(Z0, Z1, Z2, T1,T2, X ,P);
|
||||||
Trust_Track trust_track_tmp;
|
Trust_Track trust_track_tmp;
|
||||||
memcpy(trust_track_tmp.X, X, 6*sizeof(double));
|
memcpy(trust_track_tmp.X, X, 6*sizeof(double));
|
||||||
memcpy(trust_track_tmp.P, P, 6*6*sizeof(double));
|
memcpy(trust_track_tmp.P, P, 6*6*sizeof(double));
|
||||||
|
|
||||||
trust_track_tmp.Track_Index = track_ID;
|
trust_track_tmp.Track_Index = track_ID;
|
||||||
trust_track_tmp.Amplitude=(*Iter)[L-1].Amp;
|
trust_track_tmp.Amplitude=(*Iter)[L-1].Amp;
|
||||||
trust_track_tmp.snr_point = (*Iter)[L-1].snr;
|
trust_track_tmp.snr_point = (*Iter)[L-1].snr;
|
||||||
trust_track_tmp.RCS = (*Iter)[L-1].RCS;
|
trust_track_tmp.RCS = (*Iter)[L-1].RCS;
|
||||||
trust_track_tmp.T_track = (*Iter)[L-1].T;
|
trust_track_tmp.T_track = (*Iter)[L-1].T;
|
||||||
trust_track_tmp.point_flag=1; //实点
|
trust_track_tmp.point_flag=1; //实点
|
||||||
trust_track_tmp.Track_Mode=1; //跟踪模式 TWS 0
|
trust_track_tmp.Track_Mode=1; //跟踪模式 TWS 0
|
||||||
trust_track_tmp.Target_Type=UNCONF_TARGET;
|
trust_track_tmp.Target_Type=UNCONF_TARGET;
|
||||||
trust_track_tmp.Height=(*Iter)[L-1].height;
|
trust_track_tmp.Height=(*Iter)[L-1].height;
|
||||||
trust_track_tmp.Extrapolate_round=0;
|
trust_track_tmp.Extrapolate_round=0;
|
||||||
trust_track_tmp.approach_flag = -1;
|
trust_track_tmp.approach_flag = -1;
|
||||||
trust_track_tmp.manual_delete_flag = 0;
|
trust_track_tmp.manual_delete_flag = 0;
|
||||||
trust_track_tmp.associate_point_number = 0;
|
trust_track_tmp.associate_point_number = 0;
|
||||||
trust_track_tmp.manual_tracking_flag = 0;
|
trust_track_tmp.manual_tracking_flag = 0;
|
||||||
trust_track_tmp.point_type = 0;
|
trust_track_tmp.point_type = 0;
|
||||||
trust_track_tmp.u[0]=0.3333;
|
trust_track_tmp.u[0]=0.3333;
|
||||||
trust_track_tmp.u[1]=0.3333;
|
trust_track_tmp.u[1]=0.3333;
|
||||||
trust_track_tmp.u[2]=0.3333;
|
trust_track_tmp.u[2]=0.3333;
|
||||||
memcpy(trust_track_tmp.X1, X, 6*sizeof(double));
|
memcpy(trust_track_tmp.X1, X, 6*sizeof(double));
|
||||||
memcpy(trust_track_tmp.P1, P, 6*6*sizeof(double));
|
memcpy(trust_track_tmp.P1, P, 6*6*sizeof(double));
|
||||||
memcpy(trust_track_tmp.X2, X, 6*sizeof(double));
|
memcpy(trust_track_tmp.X2, X, 6*sizeof(double));
|
||||||
memcpy(trust_track_tmp.P2, P, 6*6*sizeof(double));
|
memcpy(trust_track_tmp.P2, P, 6*6*sizeof(double));
|
||||||
memcpy(trust_track_tmp.X3, X, 6*sizeof(double));
|
memcpy(trust_track_tmp.X3, X, 6*sizeof(double));
|
||||||
memcpy(trust_track_tmp.P3, P, 6*6*sizeof(double));
|
memcpy(trust_track_tmp.P3, P, 6*6*sizeof(double));
|
||||||
(*trust_track).push_back(trust_track_tmp);
|
(*trust_track).push_back(trust_track_tmp);
|
||||||
|
|
||||||
trust_track_tmp.pitch_num = (*Iter)[L-1].pitch_num;
|
trust_track_tmp.pitch_num = (*Iter)[L-1].pitch_num;
|
||||||
|
|
||||||
std::memcpy(trust_track_tmp.speed_dim, (*Iter)[L-1].speed_dim, sizeof(trust_track_tmp.speed_dim));
|
std::memcpy(trust_track_tmp.speed_dim, (*Iter)[L-1].speed_dim, sizeof(trust_track_tmp.speed_dim));
|
||||||
std::memcpy(trust_track_tmp.range_dim, (*Iter)[L-1].range_dim, sizeof(trust_track_tmp.range_dim));
|
std::memcpy(trust_track_tmp.range_dim, (*Iter)[L-1].range_dim, sizeof(trust_track_tmp.range_dim));
|
||||||
|
|
||||||
//输出航迹更新信息
|
//输出航迹更新信息
|
||||||
*Trust_track_num_Output=*Trust_track_num_Output+1;
|
*Trust_track_num_Output=*Trust_track_num_Output+1;
|
||||||
for (int j=0;j<L;j++)
|
for (int j=0;j<L;j++)
|
||||||
{
|
{
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][j].Track_Index=track_ID;
|
Trust_Track_Output[*Trust_track_num_Output-1][j].Track_Index=track_ID;
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][j].Point_Sum=L;
|
Trust_Track_Output[*Trust_track_num_Output-1][j].Point_Sum=L;
|
||||||
|
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][j].Range=(*Iter)[j].r;
|
Trust_Track_Output[*Trust_track_num_Output-1][j].Range=(*Iter)[j].r;
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][j].Azimuth=(*Iter)[j].azi/PI*180;
|
Trust_Track_Output[*Trust_track_num_Output-1][j].Azimuth=(*Iter)[j].azi/PI*180;
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][j].Elevation=asin((*Iter)[j].height/(*Iter)[j].r)/PI*180;
|
Trust_Track_Output[*Trust_track_num_Output-1][j].Elevation=asin((*Iter)[j].height/(*Iter)[j].r)/PI*180;
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][j].Range_V=sqrt(pow((*Iter)[j].X[1],2)+pow((*Iter)[j].X[3],2));
|
Trust_Track_Output[*Trust_track_num_Output-1][j].Range_V=sqrt(pow((*Iter)[j].X[1],2)+pow((*Iter)[j].X[3],2));
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][j].z=(*Iter)[j].height;
|
Trust_Track_Output[*Trust_track_num_Output-1][j].z=(*Iter)[j].height;
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][j].Amplitude=(*Iter)[j].Amp;
|
Trust_Track_Output[*Trust_track_num_Output-1][j].Amplitude=(*Iter)[j].Amp;
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][j].track_snr = (*Iter)[j].snr;
|
Trust_Track_Output[*Trust_track_num_Output-1][j].track_snr = (*Iter)[j].snr;
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][j].track_rcs = (*Iter)[j].RCS;
|
Trust_Track_Output[*Trust_track_num_Output-1][j].track_rcs = (*Iter)[j].RCS;
|
||||||
double Direction_Angle;
|
double Direction_Angle;
|
||||||
Direction_Angle=atan2((*Iter)[j].X[3],(*Iter)[j].X[1]);
|
Direction_Angle=atan2((*Iter)[j].X[3],(*Iter)[j].X[1]);
|
||||||
if(Direction_Angle<0)
|
if(Direction_Angle<0)
|
||||||
Direction_Angle=Direction_Angle+2*PI;
|
Direction_Angle=Direction_Angle+2*PI;
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][j].Direction_Angle=Direction_Angle/PI*180;
|
Trust_Track_Output[*Trust_track_num_Output-1][j].Direction_Angle=Direction_Angle/PI*180;
|
||||||
|
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][j].track_time=((*Iter)[j].T)/1000.0;
|
Trust_Track_Output[*Trust_track_num_Output-1][j].track_time=((*Iter)[j].T)/1000.0;
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][j].x=(*Iter)[j].X[0];
|
Trust_Track_Output[*Trust_track_num_Output-1][j].x=(*Iter)[j].X[0];
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][j].v_x=(*Iter)[j].X[1];
|
Trust_Track_Output[*Trust_track_num_Output-1][j].v_x=(*Iter)[j].X[1];
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][j].y=(*Iter)[j].X[2];
|
Trust_Track_Output[*Trust_track_num_Output-1][j].y=(*Iter)[j].X[2];
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][j].v_y=(*Iter)[j].X[3];
|
Trust_Track_Output[*Trust_track_num_Output-1][j].v_y=(*Iter)[j].X[3];
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][j].range_point=(*Iter)[j].r;
|
Trust_Track_Output[*Trust_track_num_Output-1][j].range_point=(*Iter)[j].r;
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][j].azi_point=(*Iter)[j].azi/PI*180;
|
Trust_Track_Output[*Trust_track_num_Output-1][j].azi_point=(*Iter)[j].azi/PI*180;
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][j].elev_point=asin((*Iter)[j].height/(*Iter)[j].r)/PI*180;
|
Trust_Track_Output[*Trust_track_num_Output-1][j].elev_point=asin((*Iter)[j].height/(*Iter)[j].r)/PI*180;
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][j].vr_point=(*Iter)[j].vr;
|
Trust_Track_Output[*Trust_track_num_Output-1][j].vr_point=(*Iter)[j].vr;
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][j].point_type=0;
|
Trust_Track_Output[*Trust_track_num_Output-1][j].point_type=0;
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][j].Flag_Point=1;
|
Trust_Track_Output[*Trust_track_num_Output-1][j].Flag_Point=1;
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][j].Track_Mode=1;//跟踪模式 TWS 0
|
Trust_Track_Output[*Trust_track_num_Output-1][j].Track_Mode=1;//跟踪模式 TWS 0
|
||||||
Trust_Track_Output[*Trust_track_num_Output-1][j].pitch_num = (*Iter)[j].pitch_num;
|
Trust_Track_Output[*Trust_track_num_Output-1][j].pitch_num = (*Iter)[j].pitch_num;
|
||||||
|
|
||||||
std::memcpy(Trust_Track_Output[*Trust_track_num_Output-1][j].speed_dim, (*Iter)[j].speed_dim, sizeof(Trust_Track_Output[*Trust_track_num_Output-1][j].speed_dim));
|
std::memcpy(Trust_Track_Output[*Trust_track_num_Output-1][j].speed_dim, (*Iter)[j].speed_dim, sizeof(Trust_Track_Output[*Trust_track_num_Output-1][j].speed_dim));
|
||||||
std::memcpy(Trust_Track_Output[*Trust_track_num_Output-1][j].range_dim, (*Iter)[j].range_dim, sizeof(Trust_Track_Output[*Trust_track_num_Output-1][j].range_dim));
|
std::memcpy(Trust_Track_Output[*Trust_track_num_Output-1][j].range_dim, (*Iter)[j].range_dim, sizeof(Trust_Track_Output[*Trust_track_num_Output-1][j].range_dim));
|
||||||
}
|
}
|
||||||
|
|
||||||
temp_track->erase(Iter);
|
temp_track->erase(Iter);
|
||||||
Iter=temp_track->begin();
|
Iter=temp_track->begin();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Iter++;
|
Iter++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -432,20 +432,20 @@ void Track_Init_Direct_Tracking::tmp_track_to_trust_track( QVector<Trust_Track>
|
|||||||
void Track_Init_Direct_Tracking::tmp_track_die(QVector <QVector<Temp_track>> *temp_track)
|
void Track_Init_Direct_Tracking::tmp_track_die(QVector <QVector<Temp_track>> *temp_track)
|
||||||
{
|
{
|
||||||
|
|
||||||
QVector <QVector<Temp_track>>::iterator Iter;
|
QVector <QVector<Temp_track>>::iterator Iter;
|
||||||
for (Iter=temp_track->begin(); Iter!=temp_track->end();)
|
for (Iter=temp_track->begin(); Iter!=temp_track->end();)
|
||||||
{
|
{
|
||||||
int n=(*Iter).size();
|
int n=(*Iter).size();
|
||||||
if( (*Iter)[n-1].buff_round >1 || n>=10)
|
if( (*Iter)[n-1].buff_round >1 || n>=10)
|
||||||
{
|
{
|
||||||
temp_track->erase(Iter);
|
temp_track->erase(Iter);
|
||||||
Iter=temp_track->begin();
|
Iter=temp_track->begin();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Iter++;
|
Iter++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -453,11 +453,11 @@ void Track_Init_Direct_Tracking::tmp_track_die(QVector <QVector<Temp_track>>
|
|||||||
|
|
||||||
double Track_Init_Direct_Tracking::alpha_cal_track_init(double x0,double y0,double x1,double y1,double x2,double y2)
|
double Track_Init_Direct_Tracking::alpha_cal_track_init(double x0,double y0,double x1,double y1,double x2,double y2)
|
||||||
{
|
{
|
||||||
double D12[2]={x1-x0,y1-y0};
|
double D12[2]={x1-x0,y1-y0};
|
||||||
double D23[2]={x2-x1,y2-y1};
|
double D23[2]={x2-x1,y2-y1};
|
||||||
double alpha=acos((D12[0]*D23[0]+D12[1]*D23[1])/(sqrt(D12[0]*D12[0]+D12[1]*D12[1])*sqrt(D23[0]*D23[0]+D23[1]*D23[1])))/PI*180;
|
double alpha=acos((D12[0]*D23[0]+D12[1]*D23[1])/(sqrt(D12[0]*D12[0]+D12[1]*D12[1])*sqrt(D23[0]*D23[0]+D23[1]*D23[1])))/PI*180;
|
||||||
|
|
||||||
return alpha;
|
return alpha;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,43 +9,43 @@ class Track_Init_Direct_Tracking
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//航迹起始逻辑法
|
//航迹起始逻辑法
|
||||||
int track_init_process_logic( QVector<PointRecv> *point_recv, //输入点迹
|
int track_init_process_logic( QVector<PointRecv> *point_recv, //输入点迹
|
||||||
QVector<Trust_Track> *trust_track, //可靠航迹
|
QVector<Trust_Track> *trust_track, //可靠航迹
|
||||||
QVector <QVector<Temp_track>> *temp_track,
|
QVector <QVector<Temp_track>> *temp_track,
|
||||||
struct Track Trust_Track_Output[MAX_TRACK_NUM][10],
|
struct Track Trust_Track_Output[MAX_TRACK_NUM][10],
|
||||||
int *Trust_track_num_Output,
|
int *Trust_track_num_Output,
|
||||||
struct RadarPara Work_Parameter,
|
struct RadarPara Work_Parameter,
|
||||||
int track_ID
|
int track_ID
|
||||||
);
|
);
|
||||||
|
|
||||||
Track_Init_Direct_Tracking();
|
Track_Init_Direct_Tracking();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
||||||
QVector<PointRecv> point_process; //要处理的点迹
|
QVector<PointRecv> point_process; //要处理的点迹
|
||||||
|
|
||||||
|
|
||||||
void point_temp_track_asso(QVector <QVector<Temp_track>> *temp_track,
|
void point_temp_track_asso(QVector <QVector<Temp_track>> *temp_track,
|
||||||
struct RadarPara Work_Parameter); //临时航迹与点迹关联
|
struct RadarPara Work_Parameter); //临时航迹与点迹关联
|
||||||
|
|
||||||
|
|
||||||
void point_track_head_asso( QVector <QVector<Temp_track>> *temp_track,
|
void point_track_head_asso( QVector <QVector<Temp_track>> *temp_track,
|
||||||
struct RadarPara Work_Parameter); //航迹头与点迹关联
|
struct RadarPara Work_Parameter); //航迹头与点迹关联
|
||||||
|
|
||||||
void tmp_track_to_trust_track( QVector<Trust_Track> *trust_track, //临时航迹转可靠航迹
|
void tmp_track_to_trust_track( QVector<Trust_Track> *trust_track, //临时航迹转可靠航迹
|
||||||
QVector <QVector<Temp_track>> *temp_track,
|
QVector <QVector<Temp_track>> *temp_track,
|
||||||
struct Track Trust_Track_Output[MAX_TRACK_NUM][10],
|
struct Track Trust_Track_Output[MAX_TRACK_NUM][10],
|
||||||
int *Trust_track_num_Output,
|
int *Trust_track_num_Output,
|
||||||
struct RadarPara Work_Parameter,
|
struct RadarPara Work_Parameter,
|
||||||
int track_ID
|
int track_ID
|
||||||
);
|
);
|
||||||
|
|
||||||
void tmp_track_die(QVector <QVector<Temp_track>> *temp_track);//临时航迹消亡
|
void tmp_track_die(QVector <QVector<Temp_track>> *temp_track);//临时航迹消亡
|
||||||
|
|
||||||
double alpha_cal_track_init(double x0,double y0,double x1,double y1,double x2,double y2); //计算夹角
|
double alpha_cal_track_init(double x0,double y0,double x1,double y1,double x2,double y2); //计算夹角
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user