GNU Radio Manual and C++ API Reference 3.10.5.1
The Free & Open Software Radio Ecosystem
gr::digital::constellation_psk Class Reference

constellation_psk More...

#include <gnuradio/digital/constellation.h>

Public Types

typedef std::shared_ptr< constellation_psksptr
 
- Public Types inherited from gr::digital::constellation
enum  normalization_t { NO_NORMALIZATION , POWER_NORMALIZATION , AMPLITUDE_NORMALIZATION }
 

Public Member Functions

 ~constellation_psk () override
 
- Public Member Functions inherited from gr::digital::constellation_sector
 constellation_sector (std::vector< gr_complex > constell, std::vector< int > pre_diff_code, unsigned int rotational_symmetry, unsigned int dimensionality, unsigned int n_sectors, normalization_t normalization=AMPLITUDE_NORMALIZATION)
 
 ~constellation_sector () override
 
unsigned int decision_maker (const gr_complex *sample) override
 Returns the constellation point that matches best. More...
 
- Public Member Functions inherited from gr::digital::constellation
 constellation (std::vector< gr_complex > constell, std::vector< int > pre_diff_code, unsigned int rotational_symmetry, unsigned int dimensionality, normalization_t normalization=AMPLITUDE_NORMALIZATION)
 
 constellation ()
 
virtual ~constellation ()
 
void map_to_points (unsigned int value, gr_complex *points)
 Returns the constellation points for a symbol value. More...
 
std::vector< gr_complexmap_to_points_v (unsigned int value)
 
virtual unsigned int decision_maker (const gr_complex *sample)=0
 Returns the constellation point that matches best. More...
 
unsigned int decision_maker_v (std::vector< gr_complex > sample)
 Takes a vector rather than a pointer. Better for SWIG wrapping. More...
 
unsigned int decision_maker_pe (const gr_complex *sample, float *phase_error)
 Also calculates the phase error. More...
 
virtual void calc_metric (const gr_complex *sample, float *metric, gr::digital::trellis_metric_type_t type)
 Calculates distance. More...
 
virtual void calc_euclidean_metric (const gr_complex *sample, float *metric)
 
virtual void calc_hard_symbol_metric (const gr_complex *sample, float *metric)
 
std::vector< gr_complexpoints ()
 Returns the set of points in this constellation. More...
 
std::vector< gr_complexs_points ()
 Returns the vector of points in this constellation. Raise error if dimensionality is not one. More...
 
std::vector< std::vector< gr_complex > > v_points ()
 Returns a vector of vectors of points. More...
 
bool apply_pre_diff_code ()
 Whether to apply an encoding before doing differential encoding. (e.g. gray coding) More...
 
void set_pre_diff_code (bool a)
 Whether to apply an encoding before doing differential encoding. (e.g. gray coding) More...
 
std::vector< int > pre_diff_code ()
 Returns the encoding to apply before differential encoding. More...
 
unsigned int rotational_symmetry ()
 Returns the order of rotational symmetry. More...
 
unsigned int dimensionality ()
 Returns the number of complex numbers in a single symbol. More...
 
unsigned int bits_per_symbol ()
 
unsigned int arity ()
 
constellation_sptr base ()
 
pmt::pmt_t as_pmt ()
 
void gen_soft_dec_lut (int precision, float npwr=1.0)
 Generates the soft decision LUT based on constellation and symbol map. More...
 
virtual std::vector< float > calc_soft_dec (gr_complex sample, float npwr=1.0)
 Calculate soft decisions for the given sample. More...
 
void set_soft_dec_lut (const std::vector< std::vector< float > > &soft_dec_lut, int precision)
 Define a soft decision look-up table. More...
 
bool has_soft_dec_lut ()
 Returns True if the soft decision LUT has been defined, False otherwise. More...
 
std::vector< std::vector< float > > soft_dec_lut ()
 
std::vector< float > soft_decision_maker (gr_complex sample)
 Returns the soft decisions for the given sample. More...
 

Static Public Member Functions

static sptr make (std::vector< gr_complex > constell, std::vector< int > pre_diff_code, unsigned int n_sectors)
 

Protected Member Functions

unsigned int get_sector (const gr_complex *sample) override
 
unsigned int calc_sector_value (unsigned int sector) override
 
 constellation_psk (std::vector< gr_complex > constell, std::vector< int > pre_diff_code, unsigned int n_sectors)
 
- Protected Member Functions inherited from gr::digital::constellation_sector
virtual unsigned int get_sector (const gr_complex *sample)=0
 
virtual unsigned int calc_sector_value (unsigned int sector)=0
 
void find_sector_values ()
 
- Protected Member Functions inherited from gr::digital::constellation
float get_distance (unsigned int index, const gr_complex *sample)
 
unsigned int get_closest_point (const gr_complex *sample)
 
void calc_arity ()
 
void max_min_axes ()
 

Additional Inherited Members

- Protected Attributes inherited from gr::digital::constellation_sector
unsigned int n_sectors
 
- Protected Attributes inherited from gr::digital::constellation
std::vector< gr_complexd_constellation
 
std::vector< int > d_pre_diff_code
 
bool d_apply_pre_diff_code
 
unsigned int d_rotational_symmetry
 
unsigned int d_dimensionality
 
unsigned int d_arity
 
float d_scalefactor
 The factor by which the user given constellation points were scaled by to achieve an average amplitude of 1. More...
 
float d_re_min
 
float d_re_max
 
float d_im_min
 
float d_im_max
 
std::vector< std::vector< float > > d_soft_dec_lut
 
int d_lut_precision
 
float d_lut_scale
 

Detailed Description

constellation_psk

Constellation space is divided into pie slices sectors.

Each slice is associated with the nearest constellation point.

Works well for PSK but nothing else.

Assumes that there is a constellation point at 1.x

Member Typedef Documentation

◆ sptr

Constructor & Destructor Documentation

◆ ~constellation_psk()

gr::digital::constellation_psk::~constellation_psk ( )
override

◆ constellation_psk()

gr::digital::constellation_psk::constellation_psk ( std::vector< gr_complex constell,
std::vector< int >  pre_diff_code,
unsigned int  n_sectors 
)
protected

Member Function Documentation

◆ calc_sector_value()

unsigned int gr::digital::constellation_psk::calc_sector_value ( unsigned int  sector)
overrideprotectedvirtual

◆ get_sector()

unsigned int gr::digital::constellation_psk::get_sector ( const gr_complex sample)
overrideprotectedvirtual

◆ make()

static sptr gr::digital::constellation_psk::make ( std::vector< gr_complex constell,
std::vector< int >  pre_diff_code,
unsigned int  n_sectors 
)
static

The documentation for this class was generated from the following file: