Detection display update and tuning

This commit is contained in:
30hours 2023-11-27 11:19:47 +00:00
parent 8555f51417
commit 0e89d773fc
3 changed files with 21 additions and 7 deletions

View file

@ -21,11 +21,11 @@ process:
delayMin: -10
delayMax: 300
detection:
pfa: 0.000001
nGuard: 10
nTrain: 20
pfa: 0.00001
nGuard: 2
nTrain: 6
minDelay: 5
minDoppler: 20
minDoppler: 15
network:
ip: 0.0.0.0

View file

@ -2,6 +2,8 @@ var timestamp = -1;
var nRows = 3;
var host = window.location.hostname;
var isLocalHost = (host === "localhost" || host === "127.0.0.1" || host === "192.168.0.112");
var range_x = [];
var range_y = [];
// setup API
var urlTimestamp = '';
@ -61,7 +63,7 @@ var layout = {
};
var config = {
displayModeBar: false,
responsive: true
scrollZoom: true
}
// setup plotly data
@ -98,6 +100,14 @@ var intervalId = window.setInterval(function () {
// case draw new plot
if (data.nRows != nRows) {
nRows = data.nRows;
// lock range before other trace
var layout_update = {
'xaxis.range': [data.delay[0], data.delay.slice(-1)[0]],
'yaxis.range': [data.doppler[0], data.doppler.slice(-1)[0]]
};
Plotly.relayout('ddmap', layout_update);
var trace1 = {
z: data.data,
x: data.delay,
@ -112,7 +122,11 @@ var intervalId = window.setInterval(function () {
x: detection.delay,
y: detection.doppler,
mode: 'markers',
type: 'scatter'
type: 'scatter',
marker: {
size: 16,
opacity: 0.6
}
};
var data_trace = [trace1, trace2];

View file

@ -84,7 +84,7 @@ Detection *CfarDetector1D::process(Map<std::complex<double>> *x)
// detection if over threshold
if (mapRowSquare[j] > threshold)
{
delay.push_back(j + x->delay[0] - 1);
delay.push_back(j + x->delay[0] + 1);
doppler.push_back(x->doppler[i]);
snr.push_back(mapRowSnr[j]);
}