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 (!filter->process(x, y)) if (isClutter)
{ {
continue; if (!filter->process(x, y))
{
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
detection1 = cfarDetector1D->process(map); if (isDetection)
detection2 = centroid->process(detection1); {
detection = interpolate->process(detection2, map); detection1 = cfarDetector1D->process(map);
timing_helper(timing_name, timing_time, time, "detector"); detection2 = centroid->process(detection1);
detection = interpolate->process(detection2, map);
timing_helper(timing_name, timing_time, time, "detector");
}
// tracker process // tracker process
track = tracker->process(detection, time[0]/1000); if (isTracker)
timing_helper(timing_name, timing_time, time, "tracker"); {
track = tracker->process(detection, time[0]/1000);
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
detectionJson = detection->to_json(time[0]/1000); if (isDetection)
detectionJson = detection->delay_bin_to_km(detectionJson, fs); {
socket_detection.sendData(detectionJson); detectionJson = detection->to_json(time[0]/1000);
delete detection; detectionJson = detection->delay_bin_to_km(detectionJson, fs);
delete detection1; socket_detection.sendData(detectionJson);
delete detection2; delete detection;
delete detection1;
delete detection2;
}
// output tracker data // output tracker data
jsonTracker = track->to_json(time[0]/1000); if (isTracker)
socket_track.sendData(jsonTracker); {
jsonTracker = track->to_json(time[0]/1000);
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");