mirror of
https://github.com/30hours/blah2.git
synced 2024-11-18 12:33:58 +00:00
Min delay/doppler detections and js cleanup
This commit is contained in:
parent
bba352ba78
commit
6eddada856
4 changed files with 40 additions and 17 deletions
|
@ -94,7 +94,18 @@
|
|||
|
||||
</body>
|
||||
|
||||
<script src="plot.js"></script>
|
||||
<script>
|
||||
var host = window.location.hostname;
|
||||
var isLocalHost = (host === "localhost" || host === "127.0.0.1" || host === "192.168.0.112");
|
||||
var urlMap = ''
|
||||
if (isLocalHost) {
|
||||
urlMap = '//' + host + ':3000/map?timestamp=' + Date.now();
|
||||
} else {
|
||||
urlMap = '//' + host + '/api/map?timestamp=' + Date.now();
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="js/plot_map.js"></script>
|
||||
<script src="control.js"></script>
|
||||
|
||||
</html>
|
||||
|
|
|
@ -2,24 +2,9 @@ var timestamp = -1;
|
|||
var nRows = 3;
|
||||
var nCols = 3;
|
||||
var host = window.location.hostname;
|
||||
var timestamp = '';
|
||||
|
||||
var isLocalHost = (host === "localhost" || host === "127.0.0.1" || host === "192.168.0.112");
|
||||
|
||||
var urlMap = ''
|
||||
if (isLocalHost) {
|
||||
urlMap = '//' + host + ':3000/map?timestamp=' + Date.now();
|
||||
} else {
|
||||
urlMap = '//' + host + '/api/map?timestamp=' + Date.now();
|
||||
}
|
||||
|
||||
var urlTimestamp = '';
|
||||
if (isLocalHost) {
|
||||
urlTimestamp = '//' + host + ':3000/timestamp?timestamp=' + Date.now();
|
||||
} else {
|
||||
urlTimestamp = '//' + host + '/api/timestamp?timestamp=' + Date.now();
|
||||
}
|
||||
|
||||
var data = [
|
||||
{
|
||||
z: [[0, 0, 0], [0, 0, 0], [0, 0, 0]],
|
||||
|
@ -28,6 +13,13 @@ var data = [
|
|||
}
|
||||
];
|
||||
|
||||
var urlTimestamp = '';
|
||||
if (isLocalHost) {
|
||||
urlTimestamp = '//' + host + ':3000/timestamp?timestamp=' + Date.now();
|
||||
} else {
|
||||
urlTimestamp = '//' + host + '/api/timestamp?timestamp=' + Date.now();
|
||||
}
|
||||
|
||||
var layout = {
|
||||
autosize: false,
|
||||
margin: {
|
|
@ -94,6 +94,16 @@
|
|||
|
||||
</body>
|
||||
|
||||
<script src="plot_maxhold.js"></script>
|
||||
<script>
|
||||
var host = window.location.hostname;
|
||||
var isLocalHost = (host === "localhost" || host === "127.0.0.1" || host === "192.168.0.112");
|
||||
var urlMap = ''
|
||||
if (isLocalHost) {
|
||||
urlMap = '//' + host + ':3000/maxhold?timestamp=' + Date.now();
|
||||
} else {
|
||||
urlMap = '//' + host + '/api/maxhold?timestamp=' + Date.now();
|
||||
}
|
||||
</script>
|
||||
<script src="../js/plot_map.js"></script>
|
||||
|
||||
</html>
|
||||
|
|
|
@ -35,6 +35,11 @@ Detection *CfarDetector1D::process(Map<std::complex<double>> *x)
|
|||
// loop over every cell
|
||||
for (int i = 0; i < nDopplerBins; i++)
|
||||
{
|
||||
// skip if less than min Doppler
|
||||
if (std::abs(x->doppler[i]) < minDoppler)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
mapRow = x->get_row(i);
|
||||
for (int j = 0; j < nDelayBins; j++)
|
||||
{
|
||||
|
@ -43,6 +48,11 @@ Detection *CfarDetector1D::process(Map<std::complex<double>> *x)
|
|||
}
|
||||
for (int j = 0; j < nDelayBins; j++)
|
||||
{
|
||||
// skip if less than min delay
|
||||
if (x->delay[j] < minDelay)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// get train cell indices
|
||||
std::vector<int> iTrain;
|
||||
for (int k = j-nGuard-nTrain; k < j-nGuard; k++)
|
||||
|
|
Loading…
Reference in a new issue