Added sync score threshold to speed up decoding with few or no signals
This commit is contained in:
parent
68ec7856e3
commit
b41916aebf
3 changed files with 8 additions and 5 deletions
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
#define LOG_LEVEL LOG_INFO
|
#define LOG_LEVEL LOG_INFO
|
||||||
|
|
||||||
|
const int kMin_score = 40; // Minimum sync score threshold for candidates
|
||||||
const int kMax_candidates = 120;
|
const int kMax_candidates = 120;
|
||||||
const int kLDPC_iterations = 25;
|
const int kLDPC_iterations = 25;
|
||||||
|
|
||||||
|
|
|
@ -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)
|
// 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).
|
// 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 heap_size = 0;
|
||||||
int num_alt = power->time_osr * power->freq_osr;
|
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;
|
score /= num_symbols;
|
||||||
|
|
||||||
|
if (score < min_score) continue;
|
||||||
|
|
||||||
// If the heap is full AND the current candidate is better than
|
// If the heap is full AND the current candidate is better than
|
||||||
// the worst in the heap, we remove the worst and make space
|
// the worst in the heap, we remove the worst and make space
|
||||||
if (heap_size == num_candidates && score > heap[0].score) {
|
if (heap_size == num_candidates && score > heap[0].score) {
|
||||||
|
|
|
@ -23,7 +23,7 @@ struct Candidate {
|
||||||
|
|
||||||
// Localize top N candidates in frequency and time according to their sync strength (looking at Costas symbols)
|
// 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).
|
// 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
|
// Compute log likelihood log(p(1) / p(0)) of 174 message bits
|
||||||
|
|
Loading…
Reference in a new issue