mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-05-06 09:24:12 +00:00
Fixing documentation
This commit is contained in:
parent
392bb64ad9
commit
5d22d90cc0
@ -1,9 +1,8 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file nsr_file_signal_source.cc
|
* \file two_bit_cpx_file_signal_source.cc
|
||||||
* \brief Implementation of a class that reads signals samples from a NSR 2 bits sampler front-end file
|
* \brief Implementation of a class that reads signals samples from a 2 bit complex sampler front-end file
|
||||||
* and adapts it to a SignalSourceInterface. More information about the front-end here
|
* and adapts it to a SignalSourceInterface.
|
||||||
* http://www.ifen.com/products/sx-scientific-gnss-solutions/nsr-software-receiver.html
|
* \author Javier Arribas, 2015 jarribas(at)cttc.es
|
||||||
* \author Javier Arribas, 2013 jarribas(at)cttc.es
|
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file nsr_file_signal_source.h
|
* \file two_bit_cpx_file_signal_source.h
|
||||||
* \brief Implementation of a class that reads signals samples from a NSR 2 bits sampler front-end file
|
* \brief Interface of a class that reads signals samples from a 2 bit complex sampler front-end file
|
||||||
* and adapts it to a SignalSourceInterface. More information about the front-end here
|
* and adapts it to a SignalSourceInterface.
|
||||||
* http://www.ifen.com/products/sx-scientific-gnss-solutions/nsr-software-receiver.html
|
* \author Javier Arribas, 2015 jarribas(at)cttc.es
|
||||||
* \author Javier Arribas, 2013 jarribas(at)cttc.es
|
|
||||||
*
|
*
|
||||||
* This class represents a file signal source.
|
* This class represents a file signal source.
|
||||||
*
|
*
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file unpack_byte_2bit_cpx_samples.cc
|
* \file unpack_byte_2bit_cpx_samples.cc
|
||||||
*
|
*
|
||||||
* \brief Unpacks byte samples to NSR 2 bits samples
|
* \brief Unpacks byte samples to 2 bits complex samples.
|
||||||
|
* Packing Order
|
||||||
|
* Most Significant Nibble - Sample n
|
||||||
|
* Least Significant Nibble - Sample n+1
|
||||||
|
* Packing order in Nibble Q1 Q0 I1 I0
|
||||||
* \author Javier Arribas jarribas (at) cttc.es
|
* \author Javier Arribas jarribas (at) cttc.es
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
@ -54,8 +58,8 @@ unpack_byte_2bit_cpx_samples::~unpack_byte_2bit_cpx_samples()
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
int unpack_byte_2bit_cpx_samples::work(int noutput_items,
|
int unpack_byte_2bit_cpx_samples::work(int noutput_items,
|
||||||
gr_vector_const_void_star &input_items,
|
gr_vector_const_void_star &input_items,
|
||||||
gr_vector_void_star &output_items)
|
gr_vector_void_star &output_items)
|
||||||
{
|
{
|
||||||
const signed char *in = (const signed char *)input_items[0];
|
const signed char *in = (const signed char *)input_items[0];
|
||||||
short *out = (short*)output_items[0];
|
short *out = (short*)output_items[0];
|
||||||
@ -65,40 +69,39 @@ int unpack_byte_2bit_cpx_samples::work(int noutput_items,
|
|||||||
for(int i = 0; i < noutput_items/4; i++)
|
for(int i = 0; i < noutput_items/4; i++)
|
||||||
{
|
{
|
||||||
// Read packed input sample (1 byte = 2 complex samples)
|
// Read packed input sample (1 byte = 2 complex samples)
|
||||||
//* Packing Order
|
//* Packing Order
|
||||||
//* Most Significant Nibble - Sample n
|
//* Most Significant Nibble - Sample n
|
||||||
//* Least Significant Nibble - Sample n+1
|
//* Least Significant Nibble - Sample n+1
|
||||||
//* Packing order in Nibble Q1 Q0 I1 I0
|
//* Packing order in Nibble Q1 Q0 I1 I0
|
||||||
//normal
|
//normal
|
||||||
// signed char c = in[i];
|
// signed char c = in[i];
|
||||||
// //Q[n]
|
// //Q[n]
|
||||||
// sample.two_bit_sample = (c>>6) & 3;
|
// sample.two_bit_sample = (c>>6) & 3;
|
||||||
// out[n++] = (2*(short)sample.two_bit_sample+1);
|
// out[n++] = (2*(short)sample.two_bit_sample+1);
|
||||||
// //I[n]
|
// //I[n]
|
||||||
// sample.two_bit_sample = (c>>4) & 3;
|
// sample.two_bit_sample = (c>>4) & 3;
|
||||||
// out[n++] = (2*(short)sample.two_bit_sample+1);
|
// out[n++] = (2*(short)sample.two_bit_sample+1);
|
||||||
// //Q[n+1]
|
// //Q[n+1]
|
||||||
// sample.two_bit_sample = (c>>2) & 3;
|
// sample.two_bit_sample = (c>>2) & 3;
|
||||||
// out[n++] = (2*(short)sample.two_bit_sample+1);
|
// out[n++] = (2*(short)sample.two_bit_sample+1);
|
||||||
// //I[n+1]
|
// //I[n+1]
|
||||||
// sample.two_bit_sample = c & 3;
|
// sample.two_bit_sample = c & 3;
|
||||||
// out[n++] = (2*(short)sample.two_bit_sample+1);
|
// out[n++] = (2*(short)sample.two_bit_sample+1);
|
||||||
|
|
||||||
//I/Q swap
|
//I/Q swap
|
||||||
signed char c = in[i];
|
signed char c = in[i];
|
||||||
//I[n]
|
//I[n]
|
||||||
sample.two_bit_sample = (c>>4) & 3;
|
sample.two_bit_sample = (c >> 4) & 3;
|
||||||
out[n++] = (2*(short)sample.two_bit_sample+1);
|
out[n++] = (2*(short)sample.two_bit_sample + 1);
|
||||||
//Q[n]
|
//Q[n]
|
||||||
sample.two_bit_sample = (c>>6) & 3;
|
sample.two_bit_sample = (c >> 6) & 3;
|
||||||
out[n++] = (2*(short)sample.two_bit_sample+1);
|
out[n++] = (2*(short)sample.two_bit_sample + 1);
|
||||||
//I[n+1]
|
//I[n+1]
|
||||||
sample.two_bit_sample = c & 3;
|
sample.two_bit_sample = c & 3;
|
||||||
out[n++] = (2*(short)sample.two_bit_sample+1);
|
out[n++] = (2*(short)sample.two_bit_sample + 1);
|
||||||
//Q[n+1]
|
//Q[n+1]
|
||||||
sample.two_bit_sample = (c>>2) & 3;
|
sample.two_bit_sample = (c >> 2) & 3;
|
||||||
out[n++] = (2*(short)sample.two_bit_sample+1);
|
out[n++] = (2*(short)sample.two_bit_sample + 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
return noutput_items;
|
return noutput_items;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user