#include <signal_detector.h>
|
static sptr | make (uint8_t sf, uint8_t os_factor, double threshold, int margin, int fft_symb, int transp_len) |
| This block becomes transparent after detecting a LoRa preamble at his input.
|
|
◆ sptr
◆ make()
static sptr gr::lora_sdr::signal_detector::make |
( |
uint8_t |
sf, |
|
|
uint8_t |
os_factor, |
|
|
double |
threshold, |
|
|
int |
margin, |
|
|
int |
fft_symb, |
|
|
int |
transp_len |
|
) |
| |
|
static |
This block becomes transparent after detecting a LoRa preamble at his input.
It's main purpose is to prevent the rest of the receiver to run continuously as the matched filtering steps are computationally intensive. The detection of a LoRa preamble is based on the FFT of 'fft_symb' dechirped symbols. If 'fft_symb' upchirps are in the FFT, a bin should have significantly more energy than others. The decision is taken based on the ratio between the amplitude of the main bin and the median amplitude of all bins. Once a detection is triggered, the block will become transparent for the previous 'margin' symbols and the next 'transp_len' symbols. The transparency duration is reset if a new trigger occurs before the end of the previous tranparency duration.
- Parameters
-
sf | Spreading factor |
os_factor | Oversampling factor |
threshold | Minimal ratio between the max FFT bin and the median of the bins.(a value of 10 has proven to be effective) |
margin | Number of symbols preceding the detection that will be output at the detection time. (margin in case of detection triggering late on the preamble) |
fft_symb | Number of symbols used in the FFT (should be less than the number of preamble upchirps, 4 is an efficient value for the FFT complexity) |
transp_len | minimal duration in symbols after a triggered detection (englobing the preamble and payload symbol is a good idea) |
The documentation for this class was generated from the following file: