mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-03-28 14:27:03 +00:00
merging: Starts merge procedure for glonass branch from upstream
Starts merging process of the acquisition and tracking code for GLONASS processing developed by Gabriel Araujo. Fixes compile warnings and errors introduced during rebase operation
This commit is contained in:
parent
bf9345ebd2
commit
19f4da0aa6
@ -2,7 +2,7 @@
|
||||
#include <boost/math/distributions/exponential.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include "glonass_l1_signal_processing.h"
|
||||
#include "Glonass_L1_CA.h"
|
||||
#include "GLONASS_L1_CA.h"
|
||||
#include "configuration_interface.h"
|
||||
|
||||
|
||||
@ -63,7 +63,7 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition(
|
||||
|
||||
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
|
||||
DLOG(INFO) << "stream_to_vector(" << stream_to_vector_->unique_id() << ")";
|
||||
|
||||
|
||||
if (item_type_.compare("cbyte") == 0)
|
||||
{
|
||||
cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
|
||||
@ -357,4 +357,3 @@ gr::basic_block_sptr GlonassL1CaPcpsAcquisition::get_right_block()
|
||||
return acquisition_cc_;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include "control_message_factory.h"
|
||||
#include "GPS_L1_CA.h" //GPS_TWO_PI
|
||||
#include "Glonass_L1_CA.h" //GLONASS_TWO_PI
|
||||
#include "GLONASS_L1_CA.h" //GLONASS_TWO_PI
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
@ -178,12 +178,12 @@ void pcps_acquisition_cc::set_local_code(std::complex<float> * code)
|
||||
int offset = d_fft_size/2;
|
||||
std::fill_n( d_fft_if->get_inbuf(), offset, gr_complex( 0.0, 0.0 ) );
|
||||
memcpy(d_fft_if->get_inbuf() + offset, code, sizeof(gr_complex) * offset);
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy(d_fft_if->get_inbuf(), code, sizeof(gr_complex) * d_fft_size);
|
||||
}
|
||||
|
||||
|
||||
d_fft_if->execute(); // We need the FFT of local code
|
||||
volk_32fc_conjugate_32fc(d_fft_codes, d_fft_if->get_outbuf(), d_fft_size);
|
||||
}
|
||||
|
@ -56,7 +56,7 @@
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
#include "gnss_synchro.h"
|
||||
#include "Glonass_L1_CA.h" //GLONASS_TWO_PI
|
||||
#include "GLONASS_L1_CA.h" //GLONASS_TWO_PI
|
||||
|
||||
class pcps_acquisition_cc;
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include "control_message_factory.h"
|
||||
#include "GPS_L1_CA.h" //GPS_TWO_PI
|
||||
#include "Glonass_L1_CA.h" //GLONASS_TWO_PI
|
||||
#include "GLONASS_L1_CA.h" //GLONASS_TWO_PI
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include "Galileo_E1.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "Galileo_E5a.h"
|
||||
#include "Glonass_L1_CA.h"
|
||||
#include "GLONASS_L1_CA.h"
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include "Galileo_E1.h"
|
||||
#include "Galileo_E5a.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "Glonass_L1_CA.h"
|
||||
#include "GLONASS_L1_CA.h"
|
||||
|
||||
/*
|
||||
* Create a new instance of signal_generator_c and return
|
||||
|
@ -16,14 +16,15 @@
|
||||
# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
set(TELEMETRY_DECODER_GR_BLOCKS_SOURCES
|
||||
set(TELEMETRY_DECODER_GR_BLOCKS_SOURCES
|
||||
gps_l1_ca_telemetry_decoder_cc.cc
|
||||
gps_l2c_telemetry_decoder_cc.cc
|
||||
galileo_e1b_telemetry_decoder_cc.cc
|
||||
sbas_l1_telemetry_decoder_cc.cc
|
||||
galileo_e5a_telemetry_decoder_cc.cc
|
||||
glonass_l1_ca_telemetry_decoder_cc.cc
|
||||
)
|
||||
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src/core/system_parameters
|
||||
@ -40,4 +41,4 @@ file(GLOB TELEMETRY_DECODER_GR_BLOCKS_HEADERS "*.h")
|
||||
list(SORT TELEMETRY_DECODER_GR_BLOCKS_HEADERS)
|
||||
add_library(telemetry_decoder_gr_blocks ${TELEMETRY_DECODER_GR_BLOCKS_SOURCES} ${TELEMETRY_DECODER_GR_BLOCKS_HEADERS})
|
||||
source_group(Headers FILES ${TELEMETRY_DECODER_GR_BLOCKS_HEADERS})
|
||||
target_link_libraries(telemetry_decoder_gr_blocks telemetry_decoder_libswiftcnav telemetry_decoder_lib gnss_system_parameters ${GNURADIO_RUNTIME_LIBRARIES})
|
||||
target_link_libraries(telemetry_decoder_gr_blocks telemetry_decoder_libswiftcnav telemetry_decoder_lib gnss_system_parameters ${GNURADIO_RUNTIME_LIBRARIES})
|
||||
|
@ -71,7 +71,7 @@ glonass_l1_ca_telemetry_decoder_cc::glonass_l1_ca_telemetry_decoder_cc(
|
||||
LOG(INFO) << "Initializing GLONASS L1 CA TELEMETRY PROCESSING";
|
||||
// Define the number of sampes per symbol. Notice that GLONASS has to rates,
|
||||
//one for the navigation data and the other for the preamble information
|
||||
d_samples_per_symbol = ( GLONASS_L1_CODE_CHIP_RATE_HZ / GLONASS_L1_CA_CODE_LENGTH_CHIPS ) / GLONASS_L1_CA_SYMBOL_RATE_BPS;
|
||||
d_samples_per_symbol = ( GLONASS_L1_CA_CODE_RATE_HZ / GLONASS_L1_CA_CODE_LENGTH_CHIPS ) / GLONASS_L1_CA_SYMBOL_RATE_BPS;
|
||||
|
||||
// Set the preamble information
|
||||
unsigned short int preambles_bits[GLONASS_GNAV_PREAMBLE_LENGTH_BITS] = GLONASS_GNAV_PREAMBLE;
|
||||
@ -108,7 +108,6 @@ glonass_l1_ca_telemetry_decoder_cc::glonass_l1_ca_telemetry_decoder_cc(
|
||||
d_TOW_at_current_symbol = 0;
|
||||
delta_t = 0;
|
||||
d_CRC_error_counter = 0;
|
||||
flag_even_word_arrived = 0;
|
||||
d_flag_preamble = false;
|
||||
d_channel = 0;
|
||||
flag_TOW_set = false;
|
||||
@ -149,7 +148,7 @@ void glonass_l1_ca_telemetry_decoder_cc::decode_string(double *frame_symbols,int
|
||||
}
|
||||
|
||||
// 2. Call the GLONASS GNAV string decoder
|
||||
d_nav.decode_string(page_String);
|
||||
d_nav.string_decoder(frame_string);
|
||||
|
||||
// 3. Check operation executed correctly
|
||||
if(d_nav.flag_CRC_test == true)
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "glonass_l1_ca_dll_pll_c_aid_tracking.h"
|
||||
#include <glog/logging.h>
|
||||
#include "Glonass_L1_CA.h"
|
||||
#include "GLONASS_L1_CA.h"
|
||||
#include "configuration_interface.h"
|
||||
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include "glonass_l1_ca_dll_pll_tracking.h"
|
||||
#include <glog/logging.h>
|
||||
#include "Glonass_L1_CA.h"
|
||||
#include "GLONASS_L1_CA.h"
|
||||
#include "configuration_interface.h"
|
||||
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "glonass_l1_signal_processing.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "Glonass_L1_CA.h"
|
||||
#include "GLONASS_L1_CA.h"
|
||||
#include "control_message_factory.h"
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "glonass_l1_signal_processing.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "Glonass_L1_CA.h"
|
||||
#include "GLONASS_L1_CA.h"
|
||||
#include "control_message_factory.h"
|
||||
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "glonass_l1_signal_processing.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "Glonass_L1_CA.h"
|
||||
#include "GLONASS_L1_CA.h"
|
||||
#include "control_message_factory.h"
|
||||
|
||||
|
||||
|
@ -529,7 +529,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_1G(
|
||||
stream << channel;
|
||||
std::string id = stream.str();
|
||||
LOG(INFO) << "Instantiating Channel " << channel << " with Acquisition Implementation: "
|
||||
<< acq << ", Tracking Implementation: " << trk << ", Telemetry Decoder implementation: " << tlm;
|
||||
<< acq << ", Tracking Implementation: " << trk << ", Telemetry Decoder Implementation: " << tlm;
|
||||
|
||||
std::string aux = configuration->property("Acquisition_1G" + boost::lexical_cast<std::string>(channel) + ".implementation", std::string("W"));
|
||||
std::string appendix1;
|
||||
@ -1354,12 +1354,6 @@ std::unique_ptr<AcquisitionInterface> GNSSBlockFactory::GetAcqBlock(
|
||||
out_streams));
|
||||
block = std::move(block_);
|
||||
}
|
||||
else if (implementation.compare("GLONASS_L1_CA_Telemetry_Decoder") == 0)
|
||||
{
|
||||
std::unique_ptr<TelemetryDecoderInterface> block_(new GlonassL1CaTelemetryDecoder(configuration.get(), role, in_streams,
|
||||
out_streams));
|
||||
block = std::move(block_);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Log fatal. This causes execution to stop.
|
||||
@ -1496,6 +1490,12 @@ std::unique_ptr<TelemetryDecoderInterface> GNSSBlockFactory::GetTlmBlock(
|
||||
out_streams));
|
||||
block = std::move(block_);
|
||||
}
|
||||
else if (implementation.compare("GLONASS_L1_CA_Telemetry_Decoder") == 0)
|
||||
{
|
||||
std::unique_ptr<TelemetryDecoderInterface> block_(new GlonassL1CaTelemetryDecoder(configuration.get(), role, in_streams,
|
||||
out_streams));
|
||||
block = std::move(block_);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Log fatal. This causes execution to stop.
|
||||
|
@ -88,6 +88,38 @@ const double GLONASS_L1_CA_CODE_PERIOD = 0.001; //!< GLONASS L1 C/
|
||||
const double GLONASS_L1_CA_CHIP_PERIOD = 1.9569e-06; //!< GLONASS L1 C/A chip period [seconds]
|
||||
const double GLONASS_L1_CA_SYMBOL_RATE_BPS = 1000;
|
||||
|
||||
// GLONASS SV's orbital slots PRN = (orbital_slot - 1)
|
||||
const std::map<unsigned int, int> GLONASS_PRN =
|
||||
{{ 0, 8,}, //For test
|
||||
{ 1, 1,}, //Plane 1
|
||||
{ 2,-4,}, //Plane 1
|
||||
{ 3, 5,}, //Plane 1
|
||||
{ 4, 6,}, //Plane 1
|
||||
{ 5, 1,}, //Plane 1
|
||||
{ 6,-4,}, //Plane 1
|
||||
{ 7, 5,}, //Plane 1
|
||||
{ 8, 6,}, //Plane 1
|
||||
{ 9,-2,}, //Plane 2
|
||||
{10,-7,}, //Plane 2
|
||||
{11, 0,}, //Plane 2
|
||||
{12,-1,}, //Plane 2
|
||||
{13,-2,}, //Plane 2
|
||||
{14,-7,}, //Plane 2
|
||||
{15, 0,}, //Plane 2
|
||||
{16,-1,}, //Plane 2
|
||||
{17, 4,}, //Plane 3
|
||||
{18,-3,}, //Plane 3
|
||||
{19, 3,}, //Plane 3
|
||||
{20, 2,}, //Plane 3
|
||||
{21, 4,}, //Plane 3
|
||||
{22,-3,}, //Plane 3
|
||||
{23, 3,}, //Plane 3
|
||||
{24, 2}}; //Plane 3
|
||||
|
||||
|
||||
const int GLONASS_CA_TELEMETRY_RATE_BITS_SECOND = 50; //!< NAV message bit rate [bits/s]
|
||||
|
||||
|
||||
const double GLONASS_STARTOFFSET_ms = 68.802; //[ms] Initial sign. travel time (this cannot go here)
|
||||
|
||||
// OBSERVABLE HISTORY DEEP FOR INTERPOLATION
|
||||
|
@ -1,69 +0,0 @@
|
||||
#ifndef GNSS_SDR_GLONASS_L1_CA_H_
|
||||
#define GNSS_SDR_GLONASS_L1_CA_H_
|
||||
|
||||
#include <vector>
|
||||
#include <map> // std::map
|
||||
#include "MATH_CONSTANTS.h"
|
||||
#include "gnss_frequencies.h"
|
||||
|
||||
// Physical constants
|
||||
const double GLONASS_C_m_s = 299792458.0; //!< The speed of light, [m/s]
|
||||
const double GLONASS_C_m_ms = 299792.4580; //!< The speed of light, [m/ms]
|
||||
const double GLONASS_PI = 3.1415926535898; //!< Pi as (NOT) defined in ICD-GLONASS-2008
|
||||
const double GLONASS_TWO_PI = 6.283185307179586;//!< 2Pi as (NOT) defined in ICD-GLONASS-2008
|
||||
const double GLONASS_OMEGA_EARTH_DOT = 7.292115e-5; //!< Earth rotation rate, [rad/s]
|
||||
const double GLONASS_GM = 3.986004418e14; //!< Universal gravitational constant times the mass of the Earth, [m^3/s^2]
|
||||
// const double F = -4.442807633e-10; //!< Constant, [s/(m)^(1/2)]
|
||||
|
||||
// Geodesic constants and parameters
|
||||
const double fMa = 0.35e9; //!< The Gravitational constant of atmosphere, [m^3/s^2]
|
||||
const double SEMI_MAJOR_AXIS = 6378136; //!< The Semi-major axis, [m]
|
||||
const double FLATTENING = 1/298.25784; //!< The Orbital Flattening
|
||||
const double EQUATORIAL_GRAVITY = 978032.84; //!< The Equatorial acceleration of gravity, [mGal]
|
||||
const double GRAVITY_CORRECTION = 0.87; //!< The Correction to acceleration of gravity at sea-level due to Atmosphere, [mGal]
|
||||
const double SECOND_HARMONIC = 1082625.75e-9; //!< Second zonal harmonic of the geopotential (J_2^0)
|
||||
const double FOURTH_HARMONIC = -2370.89e-9; //!< Fourth zonal harmonic of the geopotential (J_4^0)
|
||||
const double SIXTH_HARMONIC = 6.08e-9; //!< Sixth zonal harmonic of the geopotential (J_6^0)
|
||||
const double EIGHTH_HARMONIC = 1.40e-11; //!< Eighth zonal harmonic of the geopotential (J_8^0)
|
||||
const double NORMAL_POTENCIAL = 62636861.4; //!< The Normal potential at surface of common terrestrial ellipsoid (U_0), [m^2/s^2]
|
||||
|
||||
|
||||
// carrier and code frequencies
|
||||
const double GLONASS_L1_FREQ_HZ = FREQ1_GLO; //!< L1 [Hz]
|
||||
const double GLONASS_L1_CA_CODE_RATE_HZ = 0.511e6; //!< GLONASS L1 C/A code rate [chips/s]
|
||||
const double GLONASS_L1_CA_CODE_LENGTH_CHIPS = 511.0; //!< GLONASS L1 C/A code length [chips]
|
||||
const double GLONASS_L1_CA_CODE_PERIOD = 0.001; //!< GLONASS L1 C/A code period [seconds]
|
||||
const double GLONASS_L1_CA_CHIP_PERIOD = 1.9569e-06; //!< GLONASS L1 C/A chip period [seconds]
|
||||
|
||||
// GLONASS SV's orbital slots PRN = (orbital_slot - 1)
|
||||
const std::map<unsigned int, int> GLONASS_PRN =
|
||||
{{ 0, 8,}, //For test
|
||||
{ 1, 1,}, //Plane 1
|
||||
{ 2,-4,}, //Plane 1
|
||||
{ 3, 5,}, //Plane 1
|
||||
{ 4, 6,}, //Plane 1
|
||||
{ 5, 1,}, //Plane 1
|
||||
{ 6,-4,}, //Plane 1
|
||||
{ 7, 5,}, //Plane 1
|
||||
{ 8, 6,}, //Plane 1
|
||||
{ 9,-2,}, //Plane 2
|
||||
{10,-7,}, //Plane 2
|
||||
{11, 0,}, //Plane 2
|
||||
{12,-1,}, //Plane 2
|
||||
{13,-2,}, //Plane 2
|
||||
{14,-7,}, //Plane 2
|
||||
{15, 0,}, //Plane 2
|
||||
{16,-1,}, //Plane 2
|
||||
{17, 4,}, //Plane 3
|
||||
{18,-3,}, //Plane 3
|
||||
{19, 3,}, //Plane 3
|
||||
{20, 2,}, //Plane 3
|
||||
{21, 4,}, //Plane 3
|
||||
{22,-3,}, //Plane 3
|
||||
{23, 3,}, //Plane 3
|
||||
{24, 2}}; //Plane 3
|
||||
|
||||
|
||||
const int GLONASS_CA_TELEMETRY_RATE_BITS_SECOND = 50; //!< NAV message bit rate [bits/s]
|
||||
|
||||
#endif /* GNSS_SDR_GLONASS_L1_CA_H_ */
|
Loading…
x
Reference in New Issue
Block a user