1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-10-30 14:53:03 +00:00

Remove tabs from the source code

This commit is contained in:
Carles Fernandez
2016-05-02 23:46:30 +02:00
parent fbfc4a28ba
commit 831cc75153
141 changed files with 2154 additions and 2164 deletions

View File

@@ -49,7 +49,7 @@ const float MAXLOG = 1e7; /* Define infinity */
/*!
* \brief Determines if a symbol has odd (1) or even (0) parity
* Output parameters:
* Output parameters:
* \return (returned int): The symbol's parity = 1 for odd and 0 for even
*
* \param[in] symbol The integer-valued symbol
@@ -82,7 +82,7 @@ static int parity_counter(int symbol, int length)
* \param[in] KK The constraint length of the convolutional code.
* \param[out] output_p[] An n-element vector containing the encoded bits.
* \param[out] state_out_p[] An integer containing the final state of the encoder
* (i.e. the state after encoding this bit)
* (i.e. the state after encoding this bit)
*
* This function is used by nsc_transit()
*/
@@ -193,7 +193,7 @@ static void Viterbi(int output_u_int[],
float *prev_section, *next_section;
int *prev_bit;
int *prev_state;
float *metric_c; /* Set of all possible branch metrics */
float *metric_c; /* Set of all possible branch metrics */
float *rec_array; /* Received values for one trellis section */
float max_val;
@@ -222,7 +222,7 @@ static void Viterbi(int output_u_int[],
for (t = 0; t < LL + mm; t++)
{
for (i = 0; i < nn; i++)
rec_array[i] = static_cast<float>(input_c[nn*t + i]);
rec_array[i] = static_cast<float>(input_c[nn*t + i]);
/* precompute all possible branch metrics */
for (i = 0; i < number_symbols; i++)

View File

@@ -34,11 +34,11 @@
#include <glog/logging.h>
// logging
#define EVENT 2 // logs important events which don't occur every block
#define FLOW 3 // logs the function calls of block processing functions
#define BLOCK 4 // once per block
#define SAMPLE 5 // about one log entry per sample
#define LMORE 6 // many entries per sample / very specific stuff
#define EVENT 2 // logs important events which don't occur every block
#define FLOW 3 // logs the function calls of block processing functions
#define BLOCK 4 // once per block
#define SAMPLE 5 // about one log entry per sample
#define LMORE 6 // many entries per sample / very specific stuff
const float MAXLOG = 1e7; /* Define infinity */
@@ -95,10 +95,10 @@ void Viterbi_Decoder::reset()
/* Function decode_block()
Description: Uses the Viterbi algorithm to perform hard-decision decoding of a convolutional code.
Input parameters:
r[] The received signal in LLR-form. For BPSK, must be in form r = 2*a*y/(sigma^2).
LL The number of data bits to be decoded (doesn't include the mm zero-tail-bits)
r[] The received signal in LLR-form. For BPSK, must be in form r = 2*a*y/(sigma^2).
LL The number of data bits to be decoded (doesn't include the mm zero-tail-bits)
Output parameters:
output_u_int[] Hard decisions on the data bits (without the mm zero-tail-bits)
output_u_int[] Hard decisions on the data bits (without the mm zero-tail-bits)
*/
float Viterbi_Decoder::decode_block(const double input_c[], int output_u_int[], const int LL)
{
@@ -359,12 +359,12 @@ int Viterbi_Decoder::do_tb_and_decode(int traceback_length, int requested_decodi
Description: Computes the branch metric used for decoding.
Output parameters:
(returned float) The metric between the hypothetical symbol and the recevieved vector
(returned float) The metric between the hypothetical symbol and the recevieved vector
Input parameters:
rec_array The received vector, of length nn
symbol The hypothetical symbol
nn The length of the received vector
rec_array The received vector, of length nn
symbol The hypothetical symbol
nn The length of the received vector
This function is used by siso() */
float
@@ -412,15 +412,15 @@ Viterbi_Decoder::nsc_transit(int output_p[], int trans_p[], int input, const int
Takes in one input bit at a time, and produces a n-bit output.
Input parameters:
input The input data bit (i.e. a 0 or 1).
state_in The starting state of the encoder (an int from 0 to 2^m-1).
g[] An n-element vector containing the code generators in binary form.
KK The constraint length of the convolutional code.
nn number of symbols bits per input bits (rate 1/nn)
input The input data bit (i.e. a 0 or 1).
state_in The starting state of the encoder (an int from 0 to 2^m-1).
g[] An n-element vector containing the code generators in binary form.
KK The constraint length of the convolutional code.
nn number of symbols bits per input bits (rate 1/nn)
Output parameters:
output_p[] An n-element vector containing the encoded bits.
state_out_p[] An integer containing the final state of the encoder
output_p[] An n-element vector containing the encoded bits.
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 rsc_encode(), nsc_transit(), rsc_transit(), and nsc_transit() */