|
| constellation (std::vector< gr_complex > constell, std::vector< int > pre_diff_code, unsigned int rotational_symmetry, unsigned int dimensionality) |
|
| 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_complex > | map_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_complex > | points () |
| Returns the set of points in this constellation. More...
|
|
std::vector< gr_complex > | s_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...
|
|
An abstracted constellation object.
The constellation objects hold the necessary information to pass around constellation information for modulators and demodulators. These objects contain the mapping between the bits and the constellation points used to represent them as well as methods for slicing the symbol space. Various implementations are possible for efficiency and ease of use.
Standard constellations (BPSK, QPSK, QAM, etc) can be inherited from this class and overloaded to perform optimized slicing and constellation mappings.
virtual std::vector<float> gr::digital::constellation::calc_soft_dec |
( |
gr_complex |
sample, |
|
|
float |
npwr = 1.0 |
|
) |
| |
|
virtual |
Calculate soft decisions for the given sample
.
Calculate the soft decisions from the given sample
at the given noise power npwr
.
This is a very costly algorithm (especially for higher order modulations) and should be used sparingly. It uses the gen_soft_dec_lut function to generate the LUT, which should be done once or if a large change in the noise floor is detected.
Instead of using this function, generate the LUT using the gen_soft_dec_lut after creating the constellation object and then use the soft_decision_maker function to return the answer from the LUT.
- Parameters
-
sample | The complex sample to get the soft decisions. |
npwr | Estimate of the noise power (if known). |
void gr::digital::constellation::set_soft_dec_lut |
( |
const std::vector< std::vector< float > > & |
soft_dec_lut, |
|
|
int |
precision |
|
) |
| |
Define a soft decision look-up table.
Define a soft decision look-up table (LUT). Because soft decisions can be calculated in various ways with various levels of accuracy and complexity, this function allows users to create a LUT in their own way.
Setting the LUT here means that has_soft_dec_lut will return true. Decision vectors returned by soft_decision_maker will be calculated using this LUT.
- Parameters
-
soft_dec_lut | The soft decision LUT as a vector of tuples (vectors in C++) of soft decisions. Each element of the LUT is a vector of k-bit floats (where there are k bits/sample in the constellation). |
precision | The number of bits of precision used when generating the LUT. |