Updates to put the multiple aircraft on the map

Also manage the CPU in on the one second tick to keep GUI responsive
Some other small edits that fix minor problems from my previous checkins
This commit is contained in:
heurist1
2023-02-28 19:17:57 +00:00
parent 00b75eacda
commit 778111d466
4 changed files with 142 additions and 88 deletions

View File

@@ -45,8 +45,8 @@ void ADSBRXProcessor::execute(const buffer_c8_t& buffer) {
for (size_t i = 0; i < buffer.count; i++) {
// Compute sample's magnitude
re = (int32_t)buffer.p[i].real(); // make re float and scale it
im = (int32_t)buffer.p[i].imag(); // make re float and scale it
re = (int32_t)buffer.p[i].real();
im = (int32_t)buffer.p[i].imag();
mag = ((uint32_t)(re*re) + (uint32_t)(im*im));
if (decoding) {
@@ -63,7 +63,6 @@ void ADSBRXProcessor::execute(const buffer_c8_t& buffer) {
}
else
{
//confidence = true;
bit = (prev_mag > mag) ? 1 : 0;
}
@@ -94,7 +93,7 @@ void ADSBRXProcessor::execute(const buffer_c8_t& buffer) {
}
// Continue looking for preamble even if in a packet
// switch is new preamble id higher magnitude
// switch if new preamble is higher magnitude
// Shift the preamble
for (c = 0; c < (ADSB_PREAMBLE_LENGTH ); c++) { shifter[c] = shifter[c + 1]; }