Add enable flag for clutter, detection and tracker

This commit is contained in:
30hours 2024-06-14 06:55:54 +00:00
parent b48179d957
commit 4ea9c33419
6 changed files with 57 additions and 17 deletions

View file

@ -25,9 +25,11 @@ process:
dopplerMin: -200 dopplerMin: -200
dopplerMax: 200 dopplerMax: 200
clutter: clutter:
enable: true
delayMin: -10 delayMin: -10
delayMax: 400 delayMax: 400
detection: detection:
enable: true
pfa: 0.00001 pfa: 0.00001
nGuard: 2 nGuard: 2
nTrain: 6 nTrain: 6
@ -35,6 +37,7 @@ process:
minDoppler: 15 minDoppler: 15
nCentroid: 6 nCentroid: 6
tracker: tracker:
enable: true
initiate: initiate:
M: 3 M: 3
N: 5 N: 5

View file

@ -25,9 +25,11 @@ process:
dopplerMin: -200 dopplerMin: -200
dopplerMax: 200 dopplerMax: 200
clutter: clutter:
enable: true
delayMin: -10 delayMin: -10
delayMax: 400 delayMax: 400
detection: detection:
enable: true
pfa: 0.00001 pfa: 0.00001
nGuard: 2 nGuard: 2
nTrain: 6 nTrain: 6
@ -35,6 +37,7 @@ process:
minDoppler: 15 minDoppler: 15
nCentroid: 6 nCentroid: 6
tracker: tracker:
enable: true
initiate: initiate:
M: 3 M: 3
N: 5 N: 5

View file

@ -23,9 +23,11 @@ process:
dopplerMin: -200 dopplerMin: -200
dopplerMax: 200 dopplerMax: 200
clutter: clutter:
enable: true
delayMin: -10 delayMin: -10
delayMax: 400 delayMax: 400
detection: detection:
enable: true
pfa: 0.00001 pfa: 0.00001
nGuard: 2 nGuard: 2
nTrain: 6 nTrain: 6
@ -33,6 +35,7 @@ process:
minDoppler: 15 minDoppler: 15
nCentroid: 6 nCentroid: 6
tracker: tracker:
enable: true
initiate: initiate:
M: 3 M: 3
N: 5 N: 5

View file

@ -19,9 +19,11 @@ process:
dopplerMin: -200 dopplerMin: -200
dopplerMax: 200 dopplerMax: 200
clutter: clutter:
enable: true
delayMin: -10 delayMin: -10
delayMax: 400 delayMax: 400
detection: detection:
enable: true
pfa: 0.00001 pfa: 0.00001
nGuard: 2 nGuard: 2
nTrain: 6 nTrain: 6
@ -29,6 +31,7 @@ process:
minDoppler: 15 minDoppler: 15
nCentroid: 6 nCentroid: 6
tracker: tracker:
enable: true
initiate: initiate:
M: 3 M: 3
N: 5 N: 5

View file

@ -19,9 +19,11 @@ process:
dopplerMin: -200 dopplerMin: -200
dopplerMax: 200 dopplerMax: 200
clutter: clutter:
enable: true
delayMin: -10 delayMin: -10
delayMax: 400 delayMax: 400
detection: detection:
enable: true
pfa: 0.00001 pfa: 0.00001
nGuard: 2 nGuard: 2
nTrain: 6 nTrain: 6
@ -29,6 +31,7 @@ process:
minDoppler: 15 minDoppler: 15
nCentroid: 6 nCentroid: 6
tracker: tracker:
enable: true
initiate: initiate:
M: 3 M: 3
N: 5 N: 5

View file

@ -184,6 +184,16 @@ int main(int argc, char **argv)
double spectrumBandwidth = 2000; double spectrumBandwidth = 2000;
SpectrumAnalyser *spectrumAnalyser = new SpectrumAnalyser(nSamples, spectrumBandwidth); SpectrumAnalyser *spectrumAnalyser = new SpectrumAnalyser(nSamples, spectrumBandwidth);
// process options
bool isClutter, isDetection, isTracker;
tree["process"]["clutter"]["enable"] >> isClutter;
tree["process"]["detection"]["enable"] >> isDetection;
tree["process"]["tracker"]["enable"] >> isTracker;
if (!isDetection)
{
isTracker = false;
}
// setup output data // setup output data
bool saveMap; bool saveMap;
tree["save"]["map"] >> saveMap; tree["save"]["map"] >> saveMap;
@ -237,11 +247,14 @@ int main(int argc, char **argv)
timing_helper(timing_name, timing_time, time, "spectrum"); timing_helper(timing_name, timing_time, time, "spectrum");
// clutter filter // clutter filter
if (isClutter)
{
if (!filter->process(x, y)) if (!filter->process(x, y))
{ {
continue; continue;
} }
timing_helper(timing_name, timing_time, time, "clutter_filter"); timing_helper(timing_name, timing_time, time, "clutter_filter");
}
// ambiguity process // ambiguity process
map = ambiguity->process(x, y); map = ambiguity->process(x, y);
@ -249,14 +262,20 @@ int main(int argc, char **argv)
timing_helper(timing_name, timing_time, time, "ambiguity_processing"); timing_helper(timing_name, timing_time, time, "ambiguity_processing");
// detection process // detection process
if (isDetection)
{
detection1 = cfarDetector1D->process(map); detection1 = cfarDetector1D->process(map);
detection2 = centroid->process(detection1); detection2 = centroid->process(detection1);
detection = interpolate->process(detection2, map); detection = interpolate->process(detection2, map);
timing_helper(timing_name, timing_time, time, "detector"); timing_helper(timing_name, timing_time, time, "detector");
}
// tracker process // tracker process
if (isTracker)
{
track = tracker->process(detection, time[0]/1000); track = tracker->process(detection, time[0]/1000);
timing_helper(timing_name, timing_time, time, "tracker"); timing_helper(timing_name, timing_time, time, "tracker");
}
// output IqData meta data // output IqData meta data
jsonIqData = x->to_json(time[0]/1000); jsonIqData = x->to_json(time[0]/1000);
@ -272,16 +291,22 @@ int main(int argc, char **argv)
socket_map.sendData(mapJson); socket_map.sendData(mapJson);
// output detection data // output detection data
if (isDetection)
{
detectionJson = detection->to_json(time[0]/1000); detectionJson = detection->to_json(time[0]/1000);
detectionJson = detection->delay_bin_to_km(detectionJson, fs); detectionJson = detection->delay_bin_to_km(detectionJson, fs);
socket_detection.sendData(detectionJson); socket_detection.sendData(detectionJson);
delete detection; delete detection;
delete detection1; delete detection1;
delete detection2; delete detection2;
}
// output tracker data // output tracker data
if (isTracker)
{
jsonTracker = track->to_json(time[0]/1000); jsonTracker = track->to_json(time[0]/1000);
socket_track.sendData(jsonTracker); socket_track.sendData(jsonTracker);
}
// output radar data timer // output radar data timer
timing_helper(timing_name, timing_time, time, "output_radar_data"); timing_helper(timing_name, timing_time, time, "output_radar_data");