GNSS-SDR  0.0.14
An Open Source GNSS Software Defined Receiver
Classes | Functions | Variables
telemetry_decoder_libs

Classes

class  Tlm_Conf
 
class  Viterbi_Decoder
 Class that implements a Viterbi decoder. More...
 

Functions

int parity_counter (int symbol, int length)
 Determines if a symbol has odd (1) or even (0) parity Output parameters: More...
 
int nsc_enc_bit (int state_out_p[], int input, int state_in, const int g[], int KK, int nn)
 Convolutionally encodes a single bit using a rate 1/n encoder. Takes in one input bit at a time, and produces a n-bit output. More...
 
void nsc_transit (int output_p[], int trans_p[], int input, int g[], int KK, int nn)
 Function that creates the transit and output vectors. More...
 
float Gamma (const float rec_array[], int symbol, int nn)
 Computes the branch metric used for decoding. More...
 
void Viterbi (int output_u_int[], const int out0[], const int state0[], const int out1[], const int state1[], const float input_c[], int KK, int nn, int LL)
 Uses the Viterbi algorithm to perform hard-decision decoding of a convolutional code. More...
 
int save_tlm_matfile (const std::string &dumpfile)
 
bool tlm_remove_file (const std::string &file_to_remove)
 

Variables

const float MAXLOG = 1e7
 

Detailed Description

Utilities for the decoding of GNSS navigation messages.

Function Documentation

◆ Gamma()

float Gamma ( const float  rec_array[],
int  symbol,
int  nn 
)
inline

Computes the branch metric used for decoding.

Returns
(returned float) The metric between the hypothetical symbol and the received vector
Parameters
[in]rec_arrayThe received vector, of length nn
[in]symbolThe hypothetical symbol
[in]nnThe length of the received vector

Definition at line 149 of file convolutional.h.

◆ nsc_enc_bit()

int nsc_enc_bit ( int  state_out_p[],
int  input,
int  state_in,
const int  g[],
int  KK,
int  nn 
)
inline

Convolutionally encodes a single bit using a rate 1/n encoder. Takes in one input bit at a time, and produces a n-bit output.

Parameters
[in]inputThe input data bit (i.e. a 0 or 1).
[in]state_inThe starting state of the encoder (an int from 0 to 2^m-1).
[in]g[]An n-element vector containing the code generators in binary form.
[in]KKThe constraint length of the convolutional code.
[out]output_p[]An n-element vector containing the encoded bits.
[out]state_out_p[]An integer containing the final state of the encoder (i.e. the state after encoding this bit)

This function is used by nsc_transit()

Definition at line 90 of file convolutional.h.

References parity_counter().

Referenced by nsc_transit().

◆ nsc_transit()

void nsc_transit ( int  output_p[],
int  trans_p[],
int  input,
int  g[],
int  KK,
int  nn 
)
inline

Function that creates the transit and output vectors.

Definition at line 120 of file convolutional.h.

References nsc_enc_bit().

◆ parity_counter()

int parity_counter ( int  symbol,
int  length 
)
inline

Determines if a symbol has odd (1) or even (0) parity Output parameters:

Returns
(returned int): The symbol's parity = 1 for odd and 0 for even
Parameters
[in]symbolThe integer-valued symbol
[in]lengthThe highest bit position in the symbol

This function is used by nsc_enc_bit(), rsc_enc_bit(), and rsc_tail()

Definition at line 62 of file convolutional.h.

Referenced by nsc_enc_bit().

◆ Viterbi()

void Viterbi ( int  output_u_int[],
const int  out0[],
const int  state0[],
const int  out1[],
const int  state1[],
const float  input_c[],
int  KK,
int  nn,
int  LL 
)
inline

Uses the Viterbi algorithm to perform hard-decision decoding of a convolutional code.

Parameters
[in]out0[]The output bits for each state if input is a 0.
[in]state0[]The next state if input is a 0.
[in]out1[]The output bits for each state if input is a 1.
[in]state1[]The next state if input is a 1.
[in]r[]The received signal in LLR-form. For BPSK, must be in form r = 2*a*y/(sigma^2).
[in]KKThe constraint length of the convolutional code.
[in]LLThe number of data bits.
[out]output_u_int[]Hard decisions on the data bits

Definition at line 181 of file convolutional.h.