42 * \brief This block becomes transparent after detecting a LoRa preamble at his input.
43 *
44 * It's main purpose is to prevent the rest of the receiver to run continuously as the matched filtering steps are computationally intensive.
45 * 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.
46 * The decision is taken based on the ratio between the amplitude of the main bin and the median amplitude of all bins.
47 * Once a detection is triggered, the block will become transparent for the previous 'margin' symbols and the next 'transp_len' symbols.
48 * The transparency duration is reset if a new trigger occurs before the end of the previous tranparency duration.
49 *
50 * \param sf Spreading factor
51 * \param os_factor Oversampling factor
52 * \param threshold Minimal ratio between the max FFT bin and the median of the bins.(a value of 10 has proven to be effective)
53 * \param 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)
54 * \param 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)
55 * \param transp_len minimal duration in symbols after a triggered detection (englobing the preamble and payload symbol is a good idea)
56 */
57staticsptr make(uint8_t sf, uint8_t os_factor, double threshold, int margin, int fft_symb, int transp_len);