GNU Radio's LORA_SDR Package
helpers.h File Reference
#include <cstdint>
#include <gnuradio/expj.h>
#include <gnuradio/io_signature.h>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <string.h>
#include <volk/volk.h>
#include "kiss_fft.h"
Include dependency graph for helpers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  gr
 
namespace  gr::lora_sdr
 

Macros

#define RESET   "\033[0m"
 
#define RED   "\033[31m" /* Red */
 

Functions

long gr::lora_sdr::mod (long a, long b)
 Simple modulo the modulus ab between 0 and (b-1)
 
double gr::lora_sdr::double_mod (double a, long b)
 Simple modulo the modulus ab between 0 and (b-1) for doubles.
 
std::vector< bool > gr::lora_sdr::int2bool (uint8_t integer, uint8_t n_bits)
 Convert an integer into a MSB first vector of bool.
 
std::string gr::lora_sdr::random_string (int Nbytes)
 Generates a random string of given length.
 
uint32_t gr::lora_sdr::get_symbol_val (const gr_complex *samples, gr_complex *ref_chirp, uint32_t m_number_of_bins, uint32_t m_samples_per_symbol, kiss_fft_cpx *cx_in, kiss_fft_cpx *cx_out)
 Function that gets the symbol from the received samples.
 
float gr::lora_sdr::determine_energy (const gr_complex *samples, uint32_t m_samples_per_symbol)
 Determine the energy of a symbol.
 
uint32_t gr::lora_sdr::bool2int (std::vector< bool > b)
 Convert a MSB first vector of bool to a integer.
 
void gr::lora_sdr::build_ref_chirps (gr_complex *upchirp, gr_complex *downchirp, uint8_t sf)
 Return the reference chirps using s_f=bw.
 
void gr::lora_sdr::build_upchirp (gr_complex *chirp, uint32_t id, uint8_t sf)
 Return an modulated upchirp using s_f=bw.
 
void gr::lora_sdr::build_upchirp_os_factor (gr_complex *chirp, uint32_t id, uint8_t sf, uint8_t os_factor)
 Return an modulated upchirp using s_f=bw with over sampling factor.
 

Detailed Description

Author
Martyn van Dijke (marti.nosp@m.jnvd.nosp@m.ijke6.nosp@m.00@g.nosp@m.mail..nosp@m.com)
Version
0.1
Date
2021-03-23 Header file for helper functions that make life a little bit easier :)

Macro Definition Documentation

◆ RED

#define RED   "\033[31m" /* Red */

◆ RESET

#define RESET   "\033[0m"