mirror of
https://github.com/30hours/blah2.git
synced 2024-11-18 12:33:58 +00:00
Detection display update and tuning
This commit is contained in:
parent
8555f51417
commit
0e89d773fc
3 changed files with 21 additions and 7 deletions
|
@ -21,11 +21,11 @@ process:
|
||||||
delayMin: -10
|
delayMin: -10
|
||||||
delayMax: 300
|
delayMax: 300
|
||||||
detection:
|
detection:
|
||||||
pfa: 0.000001
|
pfa: 0.00001
|
||||||
nGuard: 10
|
nGuard: 2
|
||||||
nTrain: 20
|
nTrain: 6
|
||||||
minDelay: 5
|
minDelay: 5
|
||||||
minDoppler: 20
|
minDoppler: 15
|
||||||
|
|
||||||
network:
|
network:
|
||||||
ip: 0.0.0.0
|
ip: 0.0.0.0
|
||||||
|
|
|
@ -2,6 +2,8 @@ var timestamp = -1;
|
||||||
var nRows = 3;
|
var nRows = 3;
|
||||||
var host = window.location.hostname;
|
var host = window.location.hostname;
|
||||||
var isLocalHost = (host === "localhost" || host === "127.0.0.1" || host === "192.168.0.112");
|
var isLocalHost = (host === "localhost" || host === "127.0.0.1" || host === "192.168.0.112");
|
||||||
|
var range_x = [];
|
||||||
|
var range_y = [];
|
||||||
|
|
||||||
// setup API
|
// setup API
|
||||||
var urlTimestamp = '';
|
var urlTimestamp = '';
|
||||||
|
@ -61,7 +63,7 @@ var layout = {
|
||||||
};
|
};
|
||||||
var config = {
|
var config = {
|
||||||
displayModeBar: false,
|
displayModeBar: false,
|
||||||
responsive: true
|
scrollZoom: true
|
||||||
}
|
}
|
||||||
|
|
||||||
// setup plotly data
|
// setup plotly data
|
||||||
|
@ -98,6 +100,14 @@ var intervalId = window.setInterval(function () {
|
||||||
// case draw new plot
|
// case draw new plot
|
||||||
if (data.nRows != nRows) {
|
if (data.nRows != nRows) {
|
||||||
nRows = data.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 = {
|
var trace1 = {
|
||||||
z: data.data,
|
z: data.data,
|
||||||
x: data.delay,
|
x: data.delay,
|
||||||
|
@ -112,7 +122,11 @@ var intervalId = window.setInterval(function () {
|
||||||
x: detection.delay,
|
x: detection.delay,
|
||||||
y: detection.doppler,
|
y: detection.doppler,
|
||||||
mode: 'markers',
|
mode: 'markers',
|
||||||
type: 'scatter'
|
type: 'scatter',
|
||||||
|
marker: {
|
||||||
|
size: 16,
|
||||||
|
opacity: 0.6
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var data_trace = [trace1, trace2];
|
var data_trace = [trace1, trace2];
|
||||||
|
|
|
@ -84,7 +84,7 @@ Detection *CfarDetector1D::process(Map<std::complex<double>> *x)
|
||||||
// detection if over threshold
|
// detection if over threshold
|
||||||
if (mapRowSquare[j] > 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]);
|
doppler.push_back(x->doppler[i]);
|
||||||
snr.push_back(mapRowSnr[j]);
|
snr.push_back(mapRowSnr[j]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue