small changes, just for backup

This commit is contained in:
marc-sales 2014-06-05 12:00:24 +02:00
parent 9b5c055bfd
commit 8c1adf8aad
17 changed files with 108 additions and 39 deletions

View File

@ -28,6 +28,7 @@ if(OPENCL_FOUND)
galileo_e1_pcps_cccwsr_ambiguous_acquisition.cc
galileo_e1_pcps_tong_ambiguous_acquisition.cc
galileo_e1_pcps_8ms_ambiguous_acquisition.cc
galileo_e5a_pcps_acquisition.cc
)
else(OPENCL_FOUND)
set(ACQ_ADAPTER_SOURCES
@ -40,6 +41,7 @@ else(OPENCL_FOUND)
galileo_e1_pcps_cccwsr_ambiguous_acquisition.cc
galileo_e1_pcps_tong_ambiguous_acquisition.cc
galileo_e1_pcps_8ms_ambiguous_acquisition.cc
galileo_e5a_pcps_acquisition.cc
)
endif(OPENCL_FOUND)

View File

@ -27,6 +27,7 @@ if(OPENCL_FOUND)
fft_execute.cc # Needs OpenCL
fft_setup.cc # Needs OpenCL
fft_kernelstring.cc # Needs OpenCL
galileo_e5_signal_processing.cc
)
else(OPENCL_FOUND)
set(GNSS_SPLIBS_SOURCES
@ -36,6 +37,7 @@ else(OPENCL_FOUND)
gps_sdr_signal_processing.cc
nco_lib.cc
pass_through.cc
galileo_e5_signal_processing.cc
)
endif(OPENCL_FOUND)

View File

@ -85,13 +85,12 @@ void galileo_e5_a_code_gen_complex_sampled(std::complex<float>* _dest, char _Sig
{
// This function is based on the GNU software GPS for MATLAB in the Kay Borre book
std::complex<float> _code[Galileo_E5a_CODE_LENGTH_CHIPS];
std::string _galileo_signal = _Signal;
signed int _samplesPerCode, _codeValueIndex;
float _ts;
float _tc;
signed int _samplesPerCode;
const int _codeFreqBasis = Galileo_E5a_CODE_CHIP_RATE_HZ; //Hz
unsigned int _codeLength = Galileo_E5a_CODE_LENGTH_CHIPS;
std::complex<float>* _code;
_code=new std::complex<float>[_codeLength];
std::complex<float> primary_code_E5a_chips[(int)Galileo_E5a_CODE_LENGTH_CHIPS];
_samplesPerCode = round(_fs / (_codeFreqBasis / _codeLength));
const unsigned int delay = (((int)Galileo_E5a_CODE_LENGTH_CHIPS - _chip_shift)
@ -108,7 +107,7 @@ void galileo_e5_a_code_gen_complex_sampled(std::complex<float>* _dest, char _Sig
delete[] _code;
_code = _resampled_signal;
}
// TODO secundary code generated here??
// TODO secondary code generated here??
for (unsigned int i = 0; i < _samplesPerCode; i++)
{
_dest[(i+delay)%_samplesPerCode] = _code[i];

View File

@ -20,6 +20,7 @@ set(TELEMETRY_DECODER_ADAPTER_SOURCES
gps_l1_ca_telemetry_decoder.cc
galileo_e1b_telemetry_decoder.cc
sbas_l1_telemetry_decoder.cc
galileo_e5a_telemetry_decoder.cc
)
include_directories(

View File

@ -20,6 +20,7 @@ set(TELEMETRY_DECODER_GR_BLOCKS_SOURCES
gps_l1_ca_telemetry_decoder_cc.cc
galileo_e1b_telemetry_decoder_cc.cc
sbas_l1_telemetry_decoder_cc.cc
galileo_e5a_telemetry_decoder_cc
)
include_directories(

View File

@ -37,7 +37,8 @@
#include <gnuradio/io_signature.h>
#include <glog/logging.h>
#include "control_message_factory.h"
#include "galileo_navigation_message.h"
//#include "galileo_navigation_message.h"
#include "galileo_fnav_message.h"
#include "gnss_synchro.h"
#include "convolutional.h"
@ -110,7 +111,7 @@ void galileo_e5a_telemetry_decoder_cc::decode_word(double *page_symbols,int fram
{
double page_symbols_deint[frame_length];
// 1. De-interleave
deinterleaver(GALILEO_FNAV_INTERLEAVER_ROWS, GALILEO_FNAV_INTERLEAVER_COLS, page_symbols, page_symbols_deint);
galileo_e5a_telemetry_decoder_cc::deinterleaver(GALILEO_FNAV_INTERLEAVER_ROWS, GALILEO_FNAV_INTERLEAVER_COLS, page_symbols, page_symbols_deint);
// 2. Viterbi decoder
// 2.1 Take into account the NOT gate in G2 polynomial (Galileo ICD Figure 13, FEC encoder)
@ -123,7 +124,7 @@ void galileo_e5a_telemetry_decoder_cc::decode_word(double *page_symbols,int fram
}
}
int page_part_bits[frame_length];
viterbi_decoder(page_symbols_deint, page_part_bits);
galileo_e5a_telemetry_decoder_cc::viterbi_decoder(page_symbols_deint, page_part_bits);
// 3. Call the Galileo page decoder
std::string page_String;
@ -242,7 +243,6 @@ galileo_e5a_telemetry_decoder_cc::~galileo_e5a_telemetry_decoder_cc()
int galileo_e5a_telemetry_decoder_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{
int corr_value = 0;
int preamble_diff = 0;
int corr_sign=0;
bool corr_flag=true;

View File

@ -47,6 +47,8 @@
#include "galileo_iono.h"
#include "galileo_utc_model.h"
//#include "convolutional.h"
class galileo_e5a_telemetry_decoder_cc;
typedef boost::shared_ptr<galileo_e5a_telemetry_decoder_cc> galileo_e5a_telemetry_decoder_cc_sptr;

View File

@ -24,6 +24,7 @@ set(TRACKING_ADAPTER_SOURCES
gps_l1_ca_dll_pll_optim_tracking.cc
gps_l1_ca_dll_pll_tracking.cc
gps_l1_ca_tcp_connector_tracking.cc
galileo_e5a_dll_fll_pll_tracking.cc
)
include_directories(

View File

@ -37,10 +37,13 @@
#include "tracking_interface.h"
#include "galileo_e5a_dll_fll_pll_tracking_cc.h"
class ConfigurationInterface;
class GalileoE5aDllFllPllTracking: public TrackingInterface
{
public:
GalileoE5aDllFllPllTracking(ConfigurationInterface* configuration,
GalileoE5aDllFllPllTracking(ConfigurationInterface* configuration,
std::string role,
unsigned int in_streams,
unsigned int out_streams,

View File

@ -23,6 +23,7 @@ set(TRACKING_GR_BLOCKS_SOURCES
gps_l1_ca_dll_pll_optim_tracking_cc.cc
gps_l1_ca_dll_pll_tracking_cc.cc
gps_l1_ca_tcp_connector_tracking_cc.cc
galileo_e5a_dll_fll_pll_tracking_cc.cc
)
include_directories(

View File

@ -39,6 +39,7 @@
#include "gnss_synchro.h"
#include "galileo_e5_signal_processing.h"
#include "Galileo_E5a.h"
#include "Galileo_E1.h"
#include "tracking_discriminators.h"
#include "lock_detectors.h"
#include "tracking_FLL_PLL_filter.h"
@ -110,10 +111,11 @@ galileo_e5a_dll_fll_pll_tracking_cc::galileo_e5a_dll_fll_pll_tracking_cc(
d_early_late_spc_chips = (double)early_late_space_chips; // Define early-late offset (in chips)
d_dump_filename = dump_filename;
//d_sampled_codeLength = round(d_fs_in / (Galileo_E5a_CODE_CHIP_RATE_HZ / Galileo_E5a_CODE_LENGTH_CHIPS));
// Initialize tracking variables ==========================================
d_carrier_loop_filter.set_params(fll_bw_hz, pll_bw_hz,order);
d_code_loop_filter = Tracking_2nd_DLL_filter(Galileo_E5a_CODE_LENGTH_CHIPS/Galileo_E5a_CODE_CHIP_RATE_HZ);
d_code_loop_filter = Tracking_2nd_DLL_filter(GALILEO_E5a_CODE_PERIOD);
d_code_loop_filter.set_DLL_BW(dll_bw_hz);
// Get space for a vector with the C/A code replica sampled 1x/chip
@ -210,7 +212,7 @@ void galileo_e5a_dll_fll_pll_tracking_cc::start_tracking()
d_FLL_wait = 1;
// generate local reference ALWAYS starting at chip 1 (1 sample per chip)
galileo_e5_a_code_gen_complex(&d_ca_code[1], d_acquisition_gnss_synchro->PRN, d_acquisition_gnss_synchro->Signal);
galileo_e5_a_code_gen_complex_sampled(&d_ca_code[1], d_acquisition_gnss_synchro->Signal, d_acquisition_gnss_synchro->PRN, d_fs_in,0,false);
d_ca_code[0] = d_ca_code[(int)Galileo_E5a_CODE_LENGTH_CHIPS];
d_ca_code[(int)Galileo_E5a_CODE_LENGTH_CHIPS + 1] = d_ca_code[1];

View File

@ -136,6 +136,7 @@ private:
int d_last_seg;
double d_if_freq;
double d_fs_in;
//int d_sampled_codeLength;
gr_complex* d_ca_code;

View File

@ -65,14 +65,17 @@
#include "galileo_e1_pcps_8ms_ambiguous_acquisition.h"
#include "galileo_e1_pcps_tong_ambiguous_acquisition.h"
#include "galileo_e1_pcps_cccwsr_ambiguous_acquisition.h"
#include "galileo_e5a_pcps_acquisition.h" //
#include "gps_l1_ca_dll_pll_tracking.h"
#include "gps_l1_ca_dll_pll_optim_tracking.h"
#include "gps_l1_ca_dll_fll_pll_tracking.h"
#include "gps_l1_ca_tcp_connector_tracking.h"
#include "galileo_e1_dll_pll_veml_tracking.h"
#include "galileo_e1_tcp_connector_tracking.h"
#include "galileo_e5a_dll_fll_pll_tracking.h" //
#include "gps_l1_ca_telemetry_decoder.h"
#include "galileo_e1b_telemetry_decoder.h"
#include "galileo_e5a_telemetry_decoder.h" // problematic
#include "sbas_l1_telemetry_decoder.h"
#include "gps_l1_ca_observables.h"
#include "galileo_e1_observables.h"
@ -454,6 +457,13 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
block = std::move(block_);
}
else if (implementation.compare("Galileo_E5a_PCPS_Acquisition") == 0)
{
std::unique_ptr<GNSSBlockInterface> block_(new GalileoE5aPcpsAcquisition(configuration.get(), role, in_streams,
out_streams, queue));
block = std::move(block_);
}
// TRACKING BLOCKS -------------------------------------------------------------
else if (implementation.compare("GPS_L1_CA_DLL_PLL_Tracking") == 0)
{
@ -491,6 +501,12 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
out_streams, queue));
block = std::move(block_);
}
else if (implementation.compare("Galileo_E5a_DLL_FLL_PLL_Tracking") == 0)
{
std::unique_ptr<GNSSBlockInterface> block_(new GalileoE5aDllFllPllTracking(configuration.get(), role, in_streams,
out_streams, queue));
block = std::move(block_);
}
// TELEMETRY DECODERS ----------------------------------------------------------
else if (implementation.compare("GPS_L1_CA_Telemetry_Decoder") == 0)
@ -511,6 +527,12 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
out_streams, queue));
block = std::move(block_);
}
else if (implementation.compare("Galileo_E5a_Telemetry_Decoder") == 0)
{
std::unique_ptr<GNSSBlockInterface> block_(new GalileoE5aTelemetryDecoder(configuration.get(), role, in_streams,
out_streams, queue));
block = std::move(block_);
}
// OBSERVABLES -----------------------------------------------------------------
else if (implementation.compare("GPS_L1_CA_Observables") == 0)
@ -642,6 +664,12 @@ std::unique_ptr<AcquisitionInterface> GNSSBlockFactory::GetAcqBlock(
out_streams, queue));
block = std::move(block_);
}
else if (implementation.compare("Galileo_E5a_PCPS_Acquisition") == 0)
{
std::unique_ptr<AcquisitionInterface> block_(new GalileoE5aPcpsAcquisition(configuration.get(), role, in_streams,
out_streams, queue));
block = std::move(block_);
}
else
{
// Log fatal. This causes execution to stop.
@ -696,6 +724,12 @@ std::unique_ptr<TrackingInterface> GNSSBlockFactory::GetTrkBlock(
out_streams, queue));
block = std::move(block_);
}
else if (implementation.compare("Galileo_E5a_DLL_FLL_PLL_Tracking") == 0)
{
std::unique_ptr<TrackingInterface> block_(new GalileoE5aDllFllPllTracking(configuration.get(), role, in_streams,
out_streams, queue));
block = std::move(block_);
}
else
{
// Log fatal. This causes execution to stop.
@ -732,6 +766,12 @@ std::unique_ptr<TelemetryDecoderInterface> GNSSBlockFactory::GetTlmBlock(
out_streams, queue));
block = std::move(block_);
}
else if (implementation.compare("Galileo_E5a_Telemetry_Decoder") == 0)
{
std::unique_ptr<TelemetryDecoderInterface> block_(new GalileoE5aTelemetryDecoder(configuration.get(), role, in_streams,
out_streams, queue));
block = std::move(block_);
}
else
{
// Log fatal. This causes execution to stop.

View File

@ -36,6 +36,7 @@ set(SYSTEM_PARAMETERS_SOURCES
sbas_ionospheric_correction.cc
sbas_satellite_correction.cc
sbas_telemetry_data.cc
galileo_fnav_message.cc
)
include_directories(

View File

@ -38,24 +38,18 @@
#include <utility> // std::pair
#include "MATH_CONSTANTS.h"
// Physical constants
const double GALILEO_PI = 3.1415926535898; //!< Pi as defined in GALILEO ICD
const double GALILEO_GM = 3.986004418e14; //!< Geocentric gravitational constant[m^3/s^2]
const double GALILEO_OMEGA_EARTH_DOT = 7.2921151467e-5; //!< Mean angular velocity of the Earth [rad/s]
const double GALILEO_C_m_s = 299792458.0; //!< The speed of light, [m/s]
const double GALILEO_C_m_ms = 299792.4580; //!< The speed of light, [m/ms]
const double GALILEO_F = -4.442807633e-10; //!< Constant, [s/(m)^(1/2)]
// Physical constants already defined in E1
// Carrier and code frequencies
const double Galileo_E5a_FREQ_HZ = 1.176450e9; //!< Galileo E5a carrier frequency [Hz]
const double Galileo_E5a_CODE_CHIP_RATE_HZ = 1.023e7; //!< Galileo E5a code rate [chips/s]
const double Galileo_E5a_I_TIERED_CODE_PERIOD = 0.020; //!< Galileo E5a-I tiered code period [s]
const double Galileo_E5a_Q_TIERED_CODE_PERIOD = 0.100; //!< Galileo E5a-Q tiered code period [s]
const double Galileo_E5a_CODE_LENGTH_CHIPS = 10230.0; //!< Galileo E5a primary code length [chips]
const double Galileo_E5a_I_SECONDARY_CODE_LENGTH = 20.0; //!< Galileo E5a-I secondary code length [chips]
const double Galileo_E5a_Q_SECONDARY_CODE_LENGTH = 100.0; //!< Galileo E5a-Q secondary code length [chips]
const int Galileo_E5a_CODE_LENGTH_CHIPS = 10230; //!< Galileo E5a primary code length [chips]
const int Galileo_E5a_I_SECONDARY_CODE_LENGTH = 20; //!< Galileo E5a-I secondary code length [chips]
const int Galileo_E5a_Q_SECONDARY_CODE_LENGTH = 100; //!< Galileo E5a-Q secondary code length [chips]
const double GALILEO_E5a_CODE_PERIOD = 0.001;
const double Galileo_E5a_SYMBOL_RATE_BPS = 50.0; //!< Galileo E5a symbol rate [bits/second]
const int Galileo_E5a_SYMBOL_RATE_BPS = 50; //!< Galileo E5a symbol rate [bits/second]
const int Galileo_E5a_NUMBER_OF_CODES = 50;
// F/NAV message structure

View File

@ -30,6 +30,13 @@
*/
#include "galileo_fnav_message.h"
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/crc.hpp> // for boost::crc_basic, boost::crc_optimal
#include <boost/dynamic_bitset.hpp>
#include <glog/logging.h>
#include <iostream>
#include <cstring>
#include <string>
typedef boost::crc_optimal<24, 0x1864CFBu, 0x0, 0x0, false, false> CRC_Galileo_FNAV_type;
@ -186,7 +193,7 @@ void Galileo_Fnav_Message::split_page(std::string page_string)
std::string CRC_data = page_string.substr(214,24);
std::bitset<GALILEO_FNAV_DATA_FRAME_BITS> Word_for_CRC_bits(message_word);
std::bitset<24> checksum(CRC_data);
if (CRC_test(Word_for_CRC_bits, checksum.to_ulong()) == true)
if (_CRC_test(Word_for_CRC_bits, checksum.to_ulong()) == true)
{
flag_CRC_test = true;
// CRC correct: Decode word
@ -198,7 +205,7 @@ void Galileo_Fnav_Message::split_page(std::string page_string)
}
}
bool Galileo_Fnav_Message::CRC_test(std::bitset<GALILEO_FNAV_DATA_FRAME_BITS> bits,boost::uint32_t checksum)
bool Galileo_Fnav_Message::_CRC_test(std::bitset<GALILEO_FNAV_DATA_FRAME_BITS> bits,boost::uint32_t checksum)
{
CRC_Galileo_FNAV_type CRC_Galileo;

View File

@ -46,6 +46,7 @@
#include "galileo_iono.h"
#include "galileo_almanac.h"
#include "galileo_utc_model.h"
#include "Galileo_E5a.h"
/*!
* \brief This class handles the Galileo F/NAV Data message, as described in the
@ -55,16 +56,27 @@
class Galileo_Fnav_Message
{
public:
void Galileo_Fnav_Message::split_page(std::string page_string);
void Galileo_Fnav_Message::reset();
bool Galileo_Fnav_Message::have_new_ephemeris();
bool Galileo_Fnav_Message::have_new_iono_and_GST();
bool Galileo_Fnav_Message::have_new_utc_model();
bool Galileo_Fnav_Message::have_new_almanac();
Galileo_Ephemeris Galileo_Fnav_Message::get_ephemeris();
Galileo_Iono Galileo_Fnav_Message::get_iono();
Galileo_Utc_Model Galileo_Fnav_Message::get_utc_model();
Galileo_Almanac Galileo_Fnav_Message::get_almanac();
// void Galileo_Fnav_Message::split_page(std::string page_string);
// void Galileo_Fnav_Message::reset();
// bool Galileo_Fnav_Message::have_new_ephemeris();
// bool Galileo_Fnav_Message::have_new_iono_and_GST();
// bool Galileo_Fnav_Message::have_new_utc_model();
// bool Galileo_Fnav_Message::have_new_almanac();
// Galileo_Ephemeris Galileo_Fnav_Message::get_ephemeris();
// Galileo_Iono Galileo_Fnav_Message::get_iono();
// Galileo_Utc_Model Galileo_Fnav_Message::get_utc_model();
// Galileo_Almanac Galileo_Fnav_Message::get_almanac();
//
void split_page(std::string page_string);
void reset();
bool have_new_ephemeris();
bool have_new_iono_and_GST();
bool have_new_utc_model();
bool have_new_almanac();
Galileo_Ephemeris get_ephemeris();
Galileo_Iono get_iono();
Galileo_Utc_Model get_utc_model();
Galileo_Almanac get_almanac();
Galileo_Fnav_Message();
@ -199,10 +211,10 @@ public:
private:
bool Galileo_Fnav_Message::CRC_test(std::bitset<GALILEO_FNAV_DATA_FRAME_BITS> bits,boost::uint32_t checksum);
void Galileo_Fnav_Message::decode_page(std::string data);
unsigned long int Galileo_Fnav_Message::read_navigation_unsigned(std::bitset<GALILEO_FNAV_DATA_FRAME_BITS> bits, const std::vector<std::pair<int,int>> parameter);
signed long int Galileo_Fnav_Message::read_navigation_signed(std::bitset<GALILEO_FNAV_DATA_FRAME_BITS> bits, const std::vector<std::pair<int,int>> parameter);
bool _CRC_test(std::bitset<GALILEO_FNAV_DATA_FRAME_BITS> bits,boost::uint32_t checksum);
void decode_page(std::string data);
unsigned long int read_navigation_unsigned(std::bitset<GALILEO_FNAV_DATA_FRAME_BITS> bits, const std::vector<std::pair<int,int>> parameter);
signed long int read_navigation_signed(std::bitset<GALILEO_FNAV_DATA_FRAME_BITS> bits, const std::vector<std::pair<int,int>> parameter);
std::string omega0_1;
//std::string omega0_2;