@@ -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
|
||||
if(Data_Input[0].point_type == 0) //tws数据
|
||||
{
|
||||
data_num=Data_Input[0].Point_Sum;
|
||||
TAS_track_idx = Data_Input[0].TAS_track_index;
|
||||
for (int i=0; i<data_num;i++)
|
||||
{
|
||||
PointRecv Data_buffer_temp;
|
||||
Data_buffer_temp.Amplitude=Data_Input[i].Amplitude;
|
||||
Data_buffer_temp.Azimuth=Data_Input[i].Azimuth/180*PI;
|
||||
Data_buffer_temp.snr = Data_Input[i].Snr;
|
||||
Data_buffer_temp.RCS = Data_Input[i].RCS;
|
||||
Data_buffer_temp.CPI_Time = Data_Input[i].CPI_time;
|
||||
Data_buffer_temp.Freq_index = Data_Input[i].Freq_index;
|
||||
Data_buffer_temp.PRF_index = Data_Input[i].PRI;
|
||||
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.Use_Flag = 0;
|
||||
Data_buffer_temp.Velocity = Data_Input[i].Velocity;
|
||||
//数据存入缓存区域 Data_buffer
|
||||
if(Data_Input[0].point_type == 0) //tws数据
|
||||
{
|
||||
data_num=Data_Input[0].Point_Sum;
|
||||
TAS_track_idx = Data_Input[0].TAS_track_index;
|
||||
for (int i=0; i<data_num;i++)
|
||||
{
|
||||
PointRecv Data_buffer_temp;
|
||||
Data_buffer_temp.Amplitude=Data_Input[i].Amplitude;
|
||||
Data_buffer_temp.Azimuth=Data_Input[i].Azimuth/180*PI;
|
||||
Data_buffer_temp.snr = Data_Input[i].Snr;
|
||||
Data_buffer_temp.RCS = Data_Input[i].RCS;
|
||||
Data_buffer_temp.CPI_Time = Data_Input[i].CPI_time;
|
||||
Data_buffer_temp.Freq_index = Data_Input[i].Freq_index;
|
||||
Data_buffer_temp.PRF_index = Data_Input[i].PRI;
|
||||
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.Use_Flag = 0;
|
||||
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.range_dim, Data_Input[i].range_dim, sizeof(Data_buffer_temp.range_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));
|
||||
|
||||
Data_buffer.push_back(Data_buffer_temp);
|
||||
}
|
||||
if(Data_Input[0].Beam_index_aiz == 16) //TWS
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
Data_buffer.push_back(Data_buffer_temp);
|
||||
}
|
||||
if(Data_Input[0].Beam_index_aiz == 16) //TWS
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
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 POINT :" <<Data_Input[0].Point_Sum;
|
||||
|
||||
data_num=Data_Input[0].Point_Sum;
|
||||
TAS_track_idx = Data_Input[0].TAS_track_index;
|
||||
for (int i=0; i<data_num;i++)
|
||||
{
|
||||
PointRecv Data_buffer_temp;
|
||||
Data_buffer_temp.Amplitude=Data_Input[i].Amplitude;
|
||||
Data_buffer_temp.Azimuth=Data_Input[i].Azimuth/180*PI;
|
||||
Data_buffer_temp.snr = Data_Input[i].Snr;
|
||||
Data_buffer_temp.RCS = Data_Input[i].RCS;
|
||||
Data_buffer_temp.CPI_Time = Data_Input[i].CPI_time;
|
||||
Data_buffer_temp.Freq_index = Data_Input[i].Freq_index;
|
||||
Data_buffer_temp.PRF_index = Data_Input[i].PRI;
|
||||
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.Use_Flag = 0;
|
||||
Data_buffer_temp.Velocity = Data_Input[i].Velocity;
|
||||
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.range_dim, Data_Input[i].range_dim, sizeof(Data_buffer_temp.range_dim));
|
||||
data_num=Data_Input[0].Point_Sum;
|
||||
TAS_track_idx = Data_Input[0].TAS_track_index;
|
||||
for (int i=0; i<data_num;i++)
|
||||
{
|
||||
PointRecv Data_buffer_temp;
|
||||
Data_buffer_temp.Amplitude=Data_Input[i].Amplitude;
|
||||
Data_buffer_temp.Azimuth=Data_Input[i].Azimuth/180*PI;
|
||||
Data_buffer_temp.snr = Data_Input[i].Snr;
|
||||
Data_buffer_temp.RCS = Data_Input[i].RCS;
|
||||
Data_buffer_temp.CPI_Time = Data_Input[i].CPI_time;
|
||||
Data_buffer_temp.Freq_index = Data_Input[i].Freq_index;
|
||||
Data_buffer_temp.PRF_index = Data_Input[i].PRI;
|
||||
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.Use_Flag = 0;
|
||||
Data_buffer_temp.Velocity = Data_Input[i].Velocity;
|
||||
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.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
|
||||
// << "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
|
||||
// << "data_num:" << data_num;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return 3;
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
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 *Trust_track_num_Output,
|
||||
int Track_die_Index_Output[],
|
||||
int *Track_die_num_Output,
|
||||
int model)
|
||||
int *Trust_track_num_Output,
|
||||
int Track_die_Index_Output[],
|
||||
int *Track_die_num_Output,
|
||||
int model)
|
||||
{
|
||||
|
||||
//TWS处理
|
||||
if(model==2)
|
||||
{
|
||||
//TWS处理
|
||||
if(model==2)
|
||||
{
|
||||
|
||||
dot_coh.dot_coh_process_buff(&Data_buffer,&point_recv,Work_Parameter);
|
||||
QVector<PointRecv>().swap(Data_buffer);
|
||||
}
|
||||
dot_coh.dot_coh_process_buff(&Data_buffer,&point_recv,Work_Parameter);
|
||||
QVector<PointRecv>().swap(Data_buffer);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(model==1)
|
||||
{
|
||||
*Trust_track_num_Output=0; //航迹更新数
|
||||
*Track_die_num_Output=0; //航迹消亡数目
|
||||
if(model==1)
|
||||
{
|
||||
*Trust_track_num_Output=0; //航迹更新数
|
||||
*Track_die_num_Output=0; //航迹消亡数目
|
||||
|
||||
track_asso.track_asso_process(&point_recv,
|
||||
&trust_track,
|
||||
Trust_Track_Output,
|
||||
Trust_track_num_Output,
|
||||
Work_Parameter
|
||||
);
|
||||
track_asso.track_asso_process(&point_recv,
|
||||
&trust_track,
|
||||
Trust_Track_Output,
|
||||
Trust_track_num_Output,
|
||||
Work_Parameter
|
||||
);
|
||||
|
||||
track_die.track_die_process( &trust_track,
|
||||
Track_die_Index_Output,
|
||||
Track_die_num_Output);
|
||||
track_die.track_die_process( &trust_track,
|
||||
Track_die_Index_Output,
|
||||
Track_die_num_Output);
|
||||
|
||||
track_init.track_init_process_logic( &point_recv,
|
||||
&trust_track,
|
||||
&temp_track,
|
||||
Trust_Track_Output,
|
||||
Trust_track_num_Output,
|
||||
Work_Parameter);
|
||||
track_init.track_init_process_logic( &point_recv,
|
||||
&trust_track,
|
||||
&temp_track,
|
||||
Trust_Track_Output,
|
||||
Trust_track_num_Output,
|
||||
Work_Parameter);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// TAS处理
|
||||
if(model==3)
|
||||
{
|
||||
*Trust_track_num_Output=0; //航迹更新数
|
||||
*Track_die_num_Output=0; //航迹消亡数目
|
||||
// TAS处理
|
||||
if(model==3)
|
||||
{
|
||||
*Trust_track_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)
|
||||
// {
|
||||
@@ -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, //点迹文件
|
||||
&trust_track, //航迹文件
|
||||
Trust_Track_Output, //更新航迹信息
|
||||
Trust_track_num_Output, //更新航迹数
|
||||
Work_Parameter, //工作参数
|
||||
TAS_track_idx);
|
||||
track_asso_tas.track_asso_process_tas(&point_recv_tas, //点迹文件
|
||||
&trust_track, //航迹文件
|
||||
Trust_Track_Output, //更新航迹信息
|
||||
Trust_track_num_Output, //更新航迹数
|
||||
Work_Parameter, //工作参数
|
||||
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_Index_Output,
|
||||
Track_die_num_Output);
|
||||
track_die_tas.track_die_process_tas( &trust_track,
|
||||
Track_die_Index_Output,
|
||||
Track_die_num_Output);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//波束控制
|
||||
void Data_Process::Beam_Ctrl(struct TrackingBeam *Tracking_beam,
|
||||
struct Track Trust_Track_Output[][10],
|
||||
int *Trust_track_num_Output)
|
||||
void Data_Process::Beam_Ctrl(struct TrackingBeam *Tracking_beam,
|
||||
struct Track Trust_Track_Output[][10],
|
||||
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)
|
||||
{
|
||||
|
||||
//工作参数设置
|
||||
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)
|
||||
{
|
||||
memcpy(&Work_Parameter, &Radar_Parameter, sizeof(RadarPara));
|
||||
return 0;
|
||||
memcpy(&Work_Parameter, &Radar_Parameter, sizeof(RadarPara));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//航迹清空函数
|
||||
int Data_Process::track_clear_all(void)
|
||||
{
|
||||
//清空可靠航迹
|
||||
//清空可靠航迹
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//手动航迹删除函数
|
||||
int Data_Process:: track_delete(int delete_track_num, //手动删除的航迹数目
|
||||
int delete_track_index[]) //手动删除的航迹号
|
||||
int Data_Process:: track_delete(int delete_track_num, //手动删除的航迹数目
|
||||
int delete_track_index[]) //手动删除的航迹号
|
||||
{
|
||||
for (int i=0;i<delete_track_num ;i++)
|
||||
{
|
||||
for (int j=0;j<trust_track.size();j++)
|
||||
{
|
||||
if(trust_track[j].Track_Index == delete_track_index[i])
|
||||
{
|
||||
for (int i=0;i<delete_track_num ;i++)
|
||||
{
|
||||
for (int j=0;j<trust_track.size();j++)
|
||||
{
|
||||
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跟踪函数
|
||||
int Data_Process:: tracking_start(int track_index) //需要手动转入TAS跟踪的航迹号
|
||||
//手动转TAS跟踪函数
|
||||
int Data_Process:: tracking_start(int track_index) //需要手动转入TAS跟踪的航迹号
|
||||
{
|
||||
|
||||
for ( int i=0; i<trust_track.size();i++)
|
||||
if(trust_track[i].Track_Index==track_index)
|
||||
{
|
||||
trust_track[i].manual_tracking_flag = 1;
|
||||
}
|
||||
for ( int i=0; i<trust_track.size();i++)
|
||||
if(trust_track[i].Track_Index==track_index)
|
||||
{
|
||||
trust_track[i].manual_tracking_flag = 1;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//手动打跟踪波束
|
||||
//手动打跟踪波束
|
||||
int Data_Process::tracking_point(float Azimuth)//方位角
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user