Added sync score threshold to speed up decoding with few or no signals

oop-decoder
Karlis Goba 2019-11-12 15:36:32 +02:00
rodzic 68ec7856e3
commit b41916aebf
3 zmienionych plików z 8 dodań i 5 usunięć

Wyświetl plik

@ -15,6 +15,7 @@
#define LOG_LEVEL LOG_INFO
const int kMin_score = 40; // Minimum sync score threshold for candidates
const int kMax_candidates = 120;
const int kLDPC_iterations = 25;
@ -277,4 +278,4 @@ int main(int argc, char **argv) {
LOG(LOG_INFO, "Decoded %d messages\n", num_decoded);
return 0;
}
}

Wyświetl plik

@ -19,7 +19,7 @@ static int get_index(const MagArray *power, int block, int time_sub, int freq_su
// Localize top N candidates in frequency and time according to their sync strength (looking at Costas symbols)
// We treat and organize the candidate list as a min-heap (empty initially).
int find_sync(const MagArray *power, const uint8_t *sync_map, int num_candidates, Candidate *heap) {
int find_sync(const MagArray *power, const uint8_t *sync_map, int num_candidates, Candidate *heap, int min_score) {
int heap_size = 0;
int num_alt = power->time_osr * power->freq_osr;
@ -74,6 +74,8 @@ int find_sync(const MagArray *power, const uint8_t *sync_map, int num_candidates
}
score /= num_symbols;
if (score < min_score) continue;
// If the heap is full AND the current candidate is better than
// the worst in the heap, we remove the worst and make space
if (heap_size == num_candidates && score > heap[0].score) {
@ -268,4 +270,4 @@ static void decode_multi_symbols(const uint8_t *power, int num_bins, int n_syms,
}
}
} // namespace
} // namespace

Wyświetl plik

@ -23,11 +23,11 @@ struct Candidate {
// Localize top N candidates in frequency and time according to their sync strength (looking at Costas symbols)
// We treat and organize the candidate list as a min-heap (empty initially).
int find_sync(const MagArray * power, const uint8_t *sync_map, int num_candidates, Candidate *heap);
int find_sync(const MagArray * power, const uint8_t *sync_map, int num_candidates, Candidate *heap, int min_score = 0);
// Compute log likelihood log(p(1) / p(0)) of 174 message bits
// for later use in soft-decision LDPC decoding
void extract_likelihood(const MagArray *power, const Candidate & cand, const uint8_t *code_map, float *log174);
}
}