1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-12 11:10:33 +00:00

Merge branch 'next' of git+ssh://github.com/gnss-sdr/gnss-sdr into next

This commit is contained in:
Carles Fernandez 2016-04-13 18:26:19 +02:00
commit 2b7175083f
72 changed files with 418 additions and 702 deletions

View File

@ -31,7 +31,7 @@ GNSS-SDR.SUPL_CI=0x31b0
SignalSource.implementation=File_Signal_Source
;#filename: path to file with the captured GNSS signal samples to be processed
SignalSource.filename=/datalogger/signals/CTTC/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN.dat
SignalSource.filename=/Users/carlesfernandez/Documents/workspace/code2/trunk/data/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN.dat ;/datalogger/signals/CTTC/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN.dat
;#item_type: Type and resolution for each of the signal samples.
SignalSource.item_type=ishort
@ -172,9 +172,9 @@ Resampler.sample_freq_out=4000000
;######### CHANNELS GLOBAL CONFIG ############
;#count: Number of available GPS satellite channels.
Channels_1C.count=3
Channels_1C.count=2
;#count: Number of available Galileo satellite channels.
Channels_1B.count=3
Channels_1B.count=4
;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver
Channels.in_acquisition=1
@ -183,14 +183,14 @@ Channels.in_acquisition=1
;# "2S" GPS L2 L2C (M)
;# "1B" GALILEO E1 B (I/NAV OS/CS/SoL)
;# "5X" GALILEO E5a I+Q
Channel0.signal=1B
Channel0.signal=1C
Channel1.signal=1C
Channel2.signal=1B
Channel3.signal=1C
Channel3.signal=1B
Channel4.signal=1B
Channel5.signal=1C
;Channel6.signal=1B
;Channel7.signal=1C
Channel5.signal=1B
Channel6.signal=1B
Channel7.signal=1B
@ -244,7 +244,7 @@ Acquisition_1B.doppler_step=125
;######### TRACKING GPS CONFIG ############
;#implementation: Selected tracking algorithm: [GPS_L1_CA_DLL_PLL_Tracking] or [GPS_L1_CA_DLL_FLL_PLL_Tracking] or [GPS_L1_CA_TCP_CONNECTOR_Tracking] or [Galileo_E1_DLL_PLL_VEML_Tracking]
Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking
Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_C_Aid_Tracking
;#item_type: Type and resolution for each of the signal samples. Use only [gr_complex] in this version.
Tracking_1C.item_type=gr_complex
@ -258,10 +258,10 @@ Tracking_1C.dump=false
Tracking_1C.dump_filename=../data/epl_tracking_ch_
;#pll_bw_hz: PLL loop filter bandwidth [Hz]
Tracking_1C.pll_bw_hz=45.0;
Tracking_1C.pll_bw_hz=50.0;
;#dll_bw_hz: DLL loop filter bandwidth [Hz]
Tracking_1C.dll_bw_hz=4.0;
Tracking_1C.dll_bw_hz=5.0;
;#fll_bw_hz: FLL loop filter bandwidth [Hz]
Tracking_1C.fll_bw_hz=10.0;
@ -347,7 +347,7 @@ PVT.display_rate_ms=500;
;#dump: Enable or disable the PVT internal binary data file logging [true] or [false]
PVT.dump=false
PVT.flag_rtcm_server=false
PVT.flag_rtcm_server=true
PVT.flag_rtcm_tty_port=false
PVT.rtcm_dump_devname=/dev/pts/1

View File

@ -41,12 +41,10 @@ using google::LogMessage;
GalileoE1Pvt::GalileoE1Pvt(ConfigurationInterface* configuration,
std::string role,
unsigned int in_streams,
unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue) :
unsigned int out_streams) :
role_(role),
in_streams_(in_streams),
out_streams_(out_streams),
queue_(queue)
out_streams_(out_streams)
{
// dump parameters
std::string default_dump_filename = "./pvt.dat";
@ -82,7 +80,7 @@ GalileoE1Pvt::GalileoE1Pvt(ConfigurationInterface* configuration,
bool flag_rtcm_server;
flag_rtcm_server = configuration->property(role + ".flag_rtcm_server", false);
// make PVT object
pvt_ = galileo_e1_make_pvt_cc(in_streams_, queue_, dump_, dump_filename_, averaging_depth, flag_averaging, output_rate_ms, display_rate_ms, flag_nmea_tty_port, nmea_dump_filename, nmea_dump_devname, flag_rtcm_server, flag_rtcm_tty_port, rtcm_dump_devname);
pvt_ = galileo_e1_make_pvt_cc(in_streams_, dump_, dump_filename_, averaging_depth, flag_averaging, output_rate_ms, display_rate_ms, flag_nmea_tty_port, nmea_dump_filename, nmea_dump_devname, flag_rtcm_server, flag_rtcm_tty_port, rtcm_dump_devname);
DLOG(INFO) << "pvt(" << pvt_->unique_id() << ")";
}
@ -93,16 +91,16 @@ GalileoE1Pvt::~GalileoE1Pvt()
void GalileoE1Pvt::connect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to connect internally
if(top_block) { /* top_block is not null */};
// Nothing to connect internally
DLOG(INFO) << "nothing to connect internally";
}
void GalileoE1Pvt::disconnect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to disconnect
if(top_block) { /* top_block is not null */};
// Nothing to disconnect
}
gr::basic_block_sptr GalileoE1Pvt::get_left_block()

View File

@ -35,7 +35,6 @@
#define GNSS_SDR_GALILEO_E1_PVT_H_
#include <string>
#include <gnuradio/msg_queue.h>
#include "pvt_interface.h"
#include "galileo_e1_pvt_cc.h"
@ -51,8 +50,7 @@ public:
GalileoE1Pvt(ConfigurationInterface* configuration,
std::string role,
unsigned int in_streams,
unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue);
unsigned int out_streams);
virtual ~GalileoE1Pvt();
@ -91,7 +89,6 @@ private:
std::string role_;
unsigned int in_streams_;
unsigned int out_streams_;
boost::shared_ptr<gr::msg_queue> queue_;
};
#endif

View File

@ -40,12 +40,10 @@ using google::LogMessage;
GpsL1CaPvt::GpsL1CaPvt(ConfigurationInterface* configuration,
std::string role,
unsigned int in_streams,
unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue) :
unsigned int out_streams) :
role_(role),
in_streams_(in_streams),
out_streams_(out_streams),
queue_(queue)
out_streams_(out_streams)
{
// dump parameters
std::string default_dump_filename = "./pvt.dat";
@ -82,7 +80,7 @@ GpsL1CaPvt::GpsL1CaPvt(ConfigurationInterface* configuration,
flag_rtcm_server = configuration->property(role + ".flag_rtcm_server", false);
// make PVT object
pvt_ = gps_l1_ca_make_pvt_cc(in_streams_, queue_, dump_, dump_filename_, averaging_depth, flag_averaging, output_rate_ms, display_rate_ms, flag_nmea_tty_port, nmea_dump_filename, nmea_dump_devname, flag_rtcm_server, flag_rtcm_tty_port, rtcm_dump_devname );
pvt_ = gps_l1_ca_make_pvt_cc(in_streams_, dump_, dump_filename_, averaging_depth, flag_averaging, output_rate_ms, display_rate_ms, flag_nmea_tty_port, nmea_dump_filename, nmea_dump_devname, flag_rtcm_server, flag_rtcm_tty_port, rtcm_dump_devname );
DLOG(INFO) << "pvt(" << pvt_->unique_id() << ")";
}
@ -93,18 +91,19 @@ GpsL1CaPvt::~GpsL1CaPvt()
void GpsL1CaPvt::connect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to connect internally
if(top_block) { /* top_block is not null */};
// Nothing to connect internally
DLOG(INFO) << "nothing to connect internally";
}
void GpsL1CaPvt::disconnect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to disconnect
if(top_block) { /* top_block is not null */};
// Nothing to disconnect
}
gr::basic_block_sptr GpsL1CaPvt::get_left_block()
{
return pvt_;

View File

@ -37,7 +37,6 @@
#define GNSS_SDR_GPS_L1_CA_PVT_H_
#include <string>
#include <gnuradio/msg_queue.h>
#include "pvt_interface.h"
#include "gps_l1_ca_pvt_cc.h"
@ -53,8 +52,7 @@ public:
GpsL1CaPvt(ConfigurationInterface* configuration,
std::string role,
unsigned int in_streams,
unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue);
unsigned int out_streams);
virtual ~GpsL1CaPvt();
@ -92,7 +90,6 @@ private:
std::string role_;
unsigned int in_streams_;
unsigned int out_streams_;
boost::shared_ptr<gr::msg_queue> queue_;
};
#endif

View File

@ -41,12 +41,10 @@ using google::LogMessage;
HybridPvt::HybridPvt(ConfigurationInterface* configuration,
std::string role,
unsigned int in_streams,
unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue) :
unsigned int out_streams) :
role_(role),
in_streams_(in_streams),
out_streams_(out_streams),
queue_(queue)
out_streams_(out_streams)
{
// dump parameters
std::string default_dump_filename = "./pvt.dat";
@ -82,7 +80,7 @@ HybridPvt::HybridPvt(ConfigurationInterface* configuration,
bool flag_rtcm_server;
flag_rtcm_server = configuration->property(role + ".flag_rtcm_server", false);
// make PVT object
pvt_ = hybrid_make_pvt_cc(in_streams_, queue_, dump_, dump_filename_, averaging_depth, flag_averaging, output_rate_ms, display_rate_ms, flag_nmea_tty_port, nmea_dump_filename, nmea_dump_devname, flag_rtcm_server, flag_rtcm_tty_port, rtcm_dump_devname);
pvt_ = hybrid_make_pvt_cc(in_streams_, dump_, dump_filename_, averaging_depth, flag_averaging, output_rate_ms, display_rate_ms, flag_nmea_tty_port, nmea_dump_filename, nmea_dump_devname, flag_rtcm_server, flag_rtcm_tty_port, rtcm_dump_devname);
DLOG(INFO) << "pvt(" << pvt_->unique_id() << ")";
}
@ -93,18 +91,19 @@ HybridPvt::~HybridPvt()
void HybridPvt::connect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to connect internally
if(top_block) { /* top_block is not null */};
// Nothing to connect internally
DLOG(INFO) << "nothing to connect internally";
}
void HybridPvt::disconnect(gr::top_block_sptr top_block)
{
if(top_block) { /* top_block is not null */};
// Nothing to disconnect
if(top_block) { /* top_block is not null */};
// Nothing to disconnect
}
gr::basic_block_sptr HybridPvt::get_left_block()
{
return pvt_;

View File

@ -35,7 +35,6 @@
#define GNSS_SDR_HYBRID_PVT_H_
#include <string>
#include <gnuradio/msg_queue.h>
#include "pvt_interface.h"
#include "hybrid_pvt_cc.h"
@ -51,8 +50,7 @@ public:
HybridPvt(ConfigurationInterface* configuration,
std::string role,
unsigned int in_streams,
unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue);
unsigned int out_streams);
virtual ~HybridPvt();
@ -90,7 +88,6 @@ private:
std::string role_;
unsigned int in_streams_;
unsigned int out_streams_;
boost::shared_ptr<gr::msg_queue> queue_;
};
#endif

View File

@ -40,11 +40,12 @@
using google::LogMessage;
galileo_e1_pvt_cc_sptr galileo_e1_make_pvt_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename,
int averaging_depth, bool flag_averaging, int output_rate_ms, int display_rate_ms, bool flag_nmea_tty_port, std::string nmea_dump_filename,
galileo_e1_pvt_cc_sptr galileo_e1_make_pvt_cc(unsigned int nchannels, bool dump, std::string dump_filename, int averaging_depth,
bool flag_averaging, int output_rate_ms, int display_rate_ms, bool flag_nmea_tty_port, std::string nmea_dump_filename,
std::string nmea_dump_devname, bool flag_rtcm_server, bool flag_rtcm_tty_port, std::string rtcm_dump_devname)
{
return galileo_e1_pvt_cc_sptr(new galileo_e1_pvt_cc(nchannels, queue, dump, dump_filename, averaging_depth,
return galileo_e1_pvt_cc_sptr(new galileo_e1_pvt_cc(nchannels, dump, dump_filename, averaging_depth,
flag_averaging, output_rate_ms, display_rate_ms, flag_nmea_tty_port, nmea_dump_filename, nmea_dump_devname,
flag_rtcm_server, flag_rtcm_tty_port, rtcm_dump_devname));
}
@ -90,16 +91,20 @@ void galileo_e1_pvt_cc::msg_handler_telemetry(pmt::pmt_t msg)
d_ls_pvt->galileo_almanac = *galileo_almanac;
DLOG(INFO) << "New Galileo Almanac has arrived ";
}
else
{
LOG(WARNING) << "msg_handler_telemetry unknown object type!";
}
}
catch(boost::bad_any_cast& e)
{
DLOG(WARNING) << "msg_handler_telemetry Bad any cast!\n";
LOG(WARNING) << "msg_handler_telemetry Bad any cast!\n";
}
}
galileo_e1_pvt_cc::galileo_e1_pvt_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int averaging_depth,
galileo_e1_pvt_cc::galileo_e1_pvt_cc(unsigned int nchannels, bool dump, std::string dump_filename, int averaging_depth,
bool flag_averaging, int output_rate_ms, int display_rate_ms, bool flag_nmea_tty_port, std::string nmea_dump_filename, std::string nmea_dump_devname,
bool flag_rtcm_server, bool flag_rtcm_tty_port, std::string rtcm_dump_devname) :
gr::block("galileo_e1_pvt_cc", gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)), gr::io_signature::make(0, 0, sizeof(gr_complex)))
@ -107,7 +112,6 @@ galileo_e1_pvt_cc::galileo_e1_pvt_cc(unsigned int nchannels, boost::shared_ptr<g
d_output_rate_ms = output_rate_ms;
d_display_rate_ms = display_rate_ms;
d_queue = queue;
d_dump = dump;
d_nchannels = nchannels;
d_dump_filename = dump_filename;
@ -115,8 +119,7 @@ galileo_e1_pvt_cc::galileo_e1_pvt_cc(unsigned int nchannels, boost::shared_ptr<g
// GPS Ephemeris data message port in
this->message_port_register_in(pmt::mp("telemetry"));
this->set_msg_handler(pmt::mp("telemetry"),
boost::bind(&galileo_e1_pvt_cc::msg_handler_telemetry, this, _1));
this->set_msg_handler(pmt::mp("telemetry"), boost::bind(&galileo_e1_pvt_cc::msg_handler_telemetry, this, _1));
//initialize kml_printer
std::string kml_dump_filename;
@ -192,16 +195,17 @@ bool galileo_e1_pvt_cc::pseudoranges_pairCompare_min(const std::pair<int,Gnss_Sy
void galileo_e1_pvt_cc::print_receiver_status(Gnss_Synchro** channels_synchronization_data)
{
// Print the current receiver status using std::cout every second
int current_rx_seg=floor(channels_synchronization_data[0][0].Tracking_timestamp_secs);
if ( current_rx_seg!= d_last_status_print_seg)
{
d_last_status_print_seg = current_rx_seg;
std::cout << "Current input signal time = " << current_rx_seg << " [s]" << std::endl<< std::flush;
//DLOG(INFO) << "GPS L1 C/A Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN)
// << ", CN0 = " << d_CN0_SNV_dB_Hz << " [dB-Hz]" << std::endl;
}
int current_rx_seg = floor(channels_synchronization_data[0][0].Tracking_timestamp_secs);
if ( current_rx_seg != d_last_status_print_seg)
{
d_last_status_print_seg = current_rx_seg;
std::cout << "Current input signal time = " << current_rx_seg << " [s]" << std::endl << std::flush;
//DLOG(INFO) << "GPS L1 C/A Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN)
// << ", CN0 = " << d_CN0_SNV_dB_Hz << " [dB-Hz]" << std::endl;
}
}
int galileo_e1_pvt_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items __attribute__((unused)))
{

View File

@ -35,7 +35,6 @@
#include <string>
#include <utility>
#include <gnuradio/block.h>
#include <gnuradio/msg_queue.h>
#include "nmea_printer.h"
#include "kml_printer.h"
#include "rinex_printer.h"
@ -49,7 +48,6 @@ class galileo_e1_pvt_cc;
typedef boost::shared_ptr<galileo_e1_pvt_cc> galileo_e1_pvt_cc_sptr;
galileo_e1_pvt_cc_sptr galileo_e1_make_pvt_cc(unsigned int n_channels,
boost::shared_ptr<gr::msg_queue> queue,
bool dump,
std::string dump_filename,
int averaging_depth,
@ -70,7 +68,6 @@ class galileo_e1_pvt_cc : public gr::block
{
private:
friend galileo_e1_pvt_cc_sptr galileo_e1_make_pvt_cc(unsigned int nchannels,
boost::shared_ptr<gr::msg_queue> queue,
bool dump,
std::string dump_filename,
int averaging_depth,
@ -84,7 +81,6 @@ private:
bool flag_rtcm_tty_port,
std::string rtcm_dump_devname);
galileo_e1_pvt_cc(unsigned int nchannels,
boost::shared_ptr<gr::msg_queue> queue,
bool dump, std::string dump_filename,
int averaging_depth,
bool flag_averaging,
@ -99,7 +95,6 @@ private:
void msg_handler_telemetry(pmt::pmt_t msg);
boost::shared_ptr<gr::msg_queue> d_queue;
bool d_dump;
bool b_rinex_header_writen;
bool b_rinex_header_updated;

View File

@ -43,9 +43,9 @@
using google::LogMessage;
gps_l1_ca_pvt_cc_sptr
gps_l1_ca_make_pvt_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int averaging_depth, bool flag_averaging, int output_rate_ms, int display_rate_ms, bool flag_nmea_tty_port, std::string nmea_dump_filename, std::string nmea_dump_devname, bool flag_rtcm_server, bool flag_rtcm_tty_port, std::string rtcm_dump_devname)
gps_l1_ca_make_pvt_cc(unsigned int nchannels, bool dump, std::string dump_filename, int averaging_depth, bool flag_averaging, int output_rate_ms, int display_rate_ms, bool flag_nmea_tty_port, std::string nmea_dump_filename, std::string nmea_dump_devname, bool flag_rtcm_server, bool flag_rtcm_tty_port, std::string rtcm_dump_devname)
{
return gps_l1_ca_pvt_cc_sptr(new gps_l1_ca_pvt_cc(nchannels, queue, dump, dump_filename, averaging_depth, flag_averaging, output_rate_ms, display_rate_ms, flag_nmea_tty_port, nmea_dump_filename, nmea_dump_devname, flag_rtcm_server, flag_rtcm_tty_port, rtcm_dump_devname));
return gps_l1_ca_pvt_cc_sptr(new gps_l1_ca_pvt_cc(nchannels, dump, dump_filename, averaging_depth, flag_averaging, output_rate_ms, display_rate_ms, flag_nmea_tty_port, nmea_dump_filename, nmea_dump_devname, flag_rtcm_server, flag_rtcm_tty_port, rtcm_dump_devname));
}
@ -132,17 +132,19 @@ void gps_l1_ca_pvt_cc::msg_handler_telemetry(pmt::pmt_t msg)
rp->log_rinex_sbs(rp->sbsFile, sbas_raw_msg);
}
}
else
{
LOG(WARNING) << "msg_handler_telemetry unknown object type!";
}
}
catch(boost::bad_any_cast& e)
{
DLOG(WARNING) << "msg_handler_telemetry Bad any cast!\n";
LOG(WARNING) << "msg_handler_telemetry Bad any cast!\n";
}
}
gps_l1_ca_pvt_cc::gps_l1_ca_pvt_cc(unsigned int nchannels,
boost::shared_ptr<gr::msg_queue> queue,
bool dump, std::string dump_filename,
int averaging_depth,
bool flag_averaging,
@ -159,7 +161,6 @@ gps_l1_ca_pvt_cc::gps_l1_ca_pvt_cc(unsigned int nchannels,
{
d_output_rate_ms = output_rate_ms;
d_display_rate_ms = display_rate_ms;
d_queue = queue;
d_dump = dump;
d_nchannels = nchannels;
d_dump_filename = dump_filename;
@ -238,6 +239,7 @@ bool pseudoranges_pairCompare_min(const std::pair<int,Gnss_Synchro>& a, const st
return (a.second.Pseudorange_m) < (b.second.Pseudorange_m);
}
void gps_l1_ca_pvt_cc::print_receiver_status(Gnss_Synchro** channels_synchronization_data)
{
// Print the current receiver status using std::cout every second
@ -245,12 +247,13 @@ void gps_l1_ca_pvt_cc::print_receiver_status(Gnss_Synchro** channels_synchroniza
if ( current_rx_seg!= d_last_status_print_seg)
{
d_last_status_print_seg = current_rx_seg;
std::cout << "Current input signal time = " << current_rx_seg << " [s]" << std::endl<< std::flush;
std::cout << "Current input signal time = " << current_rx_seg << " [s]" << std::endl << std::flush;
//DLOG(INFO) << "GPS L1 C/A Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN)
// << ", CN0 = " << d_CN0_SNV_dB_Hz << " [dB-Hz]" << std::endl;
}
}
int gps_l1_ca_pvt_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items __attribute__((unused)))
{

View File

@ -33,7 +33,6 @@
#include <fstream>
#include <string>
#include <gnuradio/block.h>
#include <gnuradio/msg_queue.h>
#include "nmea_printer.h"
#include "kml_printer.h"
#include "rinex_printer.h"
@ -47,7 +46,6 @@ class gps_l1_ca_pvt_cc;
typedef boost::shared_ptr<gps_l1_ca_pvt_cc> gps_l1_ca_pvt_cc_sptr;
gps_l1_ca_pvt_cc_sptr gps_l1_ca_make_pvt_cc(unsigned int n_channels,
boost::shared_ptr<gr::msg_queue> queue,
bool dump,
std::string dump_filename,
int averaging_depth,
@ -69,7 +67,6 @@ class gps_l1_ca_pvt_cc : public gr::block
{
private:
friend gps_l1_ca_pvt_cc_sptr gps_l1_ca_make_pvt_cc(unsigned int nchannels,
boost::shared_ptr<gr::msg_queue> queue,
bool dump,
std::string dump_filename,
int averaging_depth,
@ -83,7 +80,6 @@ private:
bool flag_rtcm_tty_port,
std::string rtcm_dump_devname);
gps_l1_ca_pvt_cc(unsigned int nchannels,
boost::shared_ptr<gr::msg_queue> queue,
bool dump,
std::string dump_filename,
int averaging_depth,
@ -99,7 +95,6 @@ private:
void msg_handler_telemetry(pmt::pmt_t msg);
boost::shared_ptr<gr::msg_queue> d_queue;
bool d_dump;
bool b_rinex_header_writen;
bool b_rinex_sbs_header_writen;

View File

@ -41,13 +41,12 @@
using google::LogMessage;
hybrid_pvt_cc_sptr
hybrid_make_pvt_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int averaging_depth, bool flag_averaging, int output_rate_ms, int display_rate_ms, bool flag_nmea_tty_port, std::string nmea_dump_filename, std::string nmea_dump_devname, bool flag_rtcm_server, bool flag_rtcm_tty_port, std::string rtcm_dump_devname)
hybrid_make_pvt_cc(unsigned int nchannels, bool dump, std::string dump_filename, int averaging_depth, bool flag_averaging, int output_rate_ms, int display_rate_ms, bool flag_nmea_tty_port, std::string nmea_dump_filename, std::string nmea_dump_devname, bool flag_rtcm_server, bool flag_rtcm_tty_port, std::string rtcm_dump_devname)
{
return hybrid_pvt_cc_sptr(new hybrid_pvt_cc(nchannels, queue, dump, dump_filename, averaging_depth, flag_averaging, output_rate_ms, display_rate_ms, flag_nmea_tty_port, nmea_dump_filename, nmea_dump_devname, flag_rtcm_server, flag_rtcm_tty_port, rtcm_dump_devname));
return hybrid_pvt_cc_sptr(new hybrid_pvt_cc(nchannels, dump, dump_filename, averaging_depth, flag_averaging, output_rate_ms, display_rate_ms, flag_nmea_tty_port, nmea_dump_filename, nmea_dump_devname, flag_rtcm_server, flag_rtcm_tty_port, rtcm_dump_devname));
}
void hybrid_pvt_cc::msg_handler_telemetry(pmt::pmt_t msg)
{
try {
@ -55,88 +54,93 @@ void hybrid_pvt_cc::msg_handler_telemetry(pmt::pmt_t msg)
{
// ### GPS EPHEMERIS ###
std::shared_ptr<Gps_Ephemeris> gps_eph;
gps_eph = boost::any_cast<std::shared_ptr<Gps_Ephemeris>>(pmt::any_ref(msg));
gps_eph= boost::any_cast<std::shared_ptr<Gps_Ephemeris>>(pmt::any_ref(msg));
DLOG(INFO) << "Ephemeris record has arrived from SAT ID "
<< gps_eph->i_satellite_PRN << " (Block "
<< gps_eph->satelliteBlock[gps_eph->i_satellite_PRN] << ")"
<< "inserted with Toe="<< gps_eph->d_Toe<<" and GPS Week="
<< gps_eph->i_GPS_week;
// update/insert new ephemeris record to the global ephemeris map
d_ls_pvt->gps_ephemeris_map[gps_eph->i_satellite_PRN] = *gps_eph;
d_ls_pvt->gps_ephemeris_map[gps_eph->i_satellite_PRN]=*gps_eph;
}
else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Gps_Iono>) )
{
// ### GPS IONO ###
std::shared_ptr<Gps_Iono> gps_iono;
gps_iono = boost::any_cast<std::shared_ptr<Gps_Iono>>(pmt::any_ref(msg));
d_ls_pvt->gps_iono = *gps_iono;
gps_iono= boost::any_cast<std::shared_ptr<Gps_Iono>>(pmt::any_ref(msg));
d_ls_pvt->gps_iono=*gps_iono;
DLOG(INFO) << "New IONO record has arrived ";
}
else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Gps_Utc_Model>) )
{
// ### GPS UTC MODEL ###
std::shared_ptr<Gps_Utc_Model> gps_utc_model;
gps_utc_model = boost::any_cast<std::shared_ptr<Gps_Utc_Model>>(pmt::any_ref(msg));
d_ls_pvt->gps_utc_model = *gps_utc_model;
gps_utc_model= boost::any_cast<std::shared_ptr<Gps_Utc_Model>>(pmt::any_ref(msg));
d_ls_pvt->gps_utc_model=*gps_utc_model;
DLOG(INFO) << "New UTC record has arrived ";
}
if( pmt::any_ref(msg).type() == typeid(std::shared_ptr<Galileo_Ephemeris>) )
{
// ### Galileo EPHEMERIS ###
std::shared_ptr<Galileo_Ephemeris> galileo_eph;
galileo_eph = boost::any_cast<std::shared_ptr<Galileo_Ephemeris>>(pmt::any_ref(msg));
galileo_eph= boost::any_cast<std::shared_ptr<Galileo_Ephemeris>>(pmt::any_ref(msg));
// insert new ephemeris record
DLOG(INFO) << "Galileo New Ephemeris record inserted in global map with TOW =" << galileo_eph->TOW_5
<< ", GALILEO Week Number =" << galileo_eph->WN_5
<< " and Ephemeris IOD = " << galileo_eph->IOD_ephemeris;
// update/insert new ephemeris record to the global ephemeris map
d_ls_pvt->galileo_ephemeris_map[galileo_eph->i_satellite_PRN] = *galileo_eph;
d_ls_pvt->galileo_ephemeris_map[galileo_eph->i_satellite_PRN]=*galileo_eph;
}
else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Galileo_Iono>) )
{
// ### Galileo IONO ###
std::shared_ptr<Galileo_Iono> galileo_iono;
galileo_iono = boost::any_cast<std::shared_ptr<Galileo_Iono>>(pmt::any_ref(msg));
d_ls_pvt->galileo_iono = *galileo_iono;
galileo_iono= boost::any_cast<std::shared_ptr<Galileo_Iono>>(pmt::any_ref(msg));
d_ls_pvt->galileo_iono=*galileo_iono;
DLOG(INFO) << "New IONO record has arrived ";
}
else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Galileo_Utc_Model>) )
{
// ### Galileo UTC MODEL ###
std::shared_ptr<Galileo_Utc_Model> galileo_utc_model;
galileo_utc_model = boost::any_cast<std::shared_ptr<Galileo_Utc_Model>>(pmt::any_ref(msg));
d_ls_pvt->galileo_utc_model = *galileo_utc_model;
galileo_utc_model= boost::any_cast<std::shared_ptr<Galileo_Utc_Model>>(pmt::any_ref(msg));
d_ls_pvt->galileo_utc_model=*galileo_utc_model;
DLOG(INFO) << "New UTC record has arrived ";
}
else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Galileo_Almanac>) )
{
// ### Galileo Almanac ###
std::shared_ptr<Galileo_Almanac> galileo_almanac;
galileo_almanac = boost::any_cast<std::shared_ptr<Galileo_Almanac>>(pmt::any_ref(msg));
galileo_almanac= boost::any_cast<std::shared_ptr<Galileo_Almanac>>(pmt::any_ref(msg));
// update/insert new ephemeris record to the global ephemeris map
d_ls_pvt->galileo_almanac = *galileo_almanac;
d_ls_pvt->galileo_almanac=*galileo_almanac;
DLOG(INFO) << "New Galileo Almanac has arrived ";
}
else
{
LOG(WARNING) << "msg_handler_telemetry unknown object type!";
}
}
catch(boost::bad_any_cast& e)
{
DLOG(WARNING) << "msg_handler_telemetry Bad any cast!\n";
LOG(WARNING) << "msg_handler_telemetry Bad any cast!";
}
}
hybrid_pvt_cc::hybrid_pvt_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename,
hybrid_pvt_cc::hybrid_pvt_cc(unsigned int nchannels, bool dump, std::string dump_filename,
int averaging_depth, bool flag_averaging, int output_rate_ms, int display_rate_ms, bool flag_nmea_tty_port,
std::string nmea_dump_filename, std::string nmea_dump_devname,
bool flag_rtcm_server, bool flag_rtcm_tty_port, std::string rtcm_dump_devname) :
gr::block("hybrid_pvt_cc", gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)),
gr::io_signature::make(0, 0, sizeof(gr_complex)))
{
gr::io_signature::make(0, 0, sizeof(gr_complex)))
{
d_output_rate_ms = output_rate_ms;
d_display_rate_ms = display_rate_ms;
d_queue = queue;
d_dump = dump;
d_nchannels = nchannels;
d_dump_filename = dump_filename;
@ -144,8 +148,7 @@ hybrid_pvt_cc::hybrid_pvt_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_q
// GPS Ephemeris data message port in
this->message_port_register_in(pmt::mp("telemetry"));
this->set_msg_handler(pmt::mp("telemetry"),
boost::bind(&hybrid_pvt_cc::msg_handler_telemetry, this, _1));
this->set_msg_handler(pmt::mp("telemetry"), boost::bind(&hybrid_pvt_cc::msg_handler_telemetry, this, _1));
//initialize kml_printer
std::string kml_dump_filename;
@ -183,7 +186,7 @@ hybrid_pvt_cc::hybrid_pvt_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_q
b_rinex_header_updated = false;
rp = std::make_shared<Rinex_Printer>();
d_last_status_print_seg=0;
d_last_status_print_seg = 0;
// ############# ENABLE DATA FILE LOG #################
if (d_dump == true)
@ -220,16 +223,17 @@ bool hybrid_pvt_cc::pseudoranges_pairCompare_min(const std::pair<int,Gnss_Synchr
void hybrid_pvt_cc::print_receiver_status(Gnss_Synchro** channels_synchronization_data)
{
// Print the current receiver status using std::cout every second
int current_rx_seg=floor(channels_synchronization_data[0][0].Tracking_timestamp_secs);
if ( current_rx_seg!= d_last_status_print_seg)
{
d_last_status_print_seg = current_rx_seg;
std::cout << "Current input signal time = " << current_rx_seg << " [s]" << std::endl<< std::flush;
//DLOG(INFO) << "GPS L1 C/A Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN)
// << ", CN0 = " << d_CN0_SNV_dB_Hz << " [dB-Hz]" << std::endl;
}
int current_rx_seg = floor(channels_synchronization_data[0][0].Tracking_timestamp_secs);
if ( current_rx_seg != d_last_status_print_seg)
{
d_last_status_print_seg = current_rx_seg;
std::cout << "Current input signal time = " << current_rx_seg << " [s]" << std::endl << std::flush;
//DLOG(INFO) << "GPS L1 C/A Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN)
// << ", CN0 = " << d_CN0_SNV_dB_Hz << " [dB-Hz]" << std::endl;
}
}
int hybrid_pvt_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items __attribute__((unused)))
{

View File

@ -35,7 +35,6 @@
#include <utility>
#include <string>
#include <gnuradio/block.h>
#include <gnuradio/msg_queue.h>
#include "nmea_printer.h"
#include "kml_printer.h"
#include "geojson_printer.h"
@ -49,7 +48,6 @@ class hybrid_pvt_cc;
typedef boost::shared_ptr<hybrid_pvt_cc> hybrid_pvt_cc_sptr;
hybrid_pvt_cc_sptr hybrid_make_pvt_cc(unsigned int n_channels,
boost::shared_ptr<gr::msg_queue> queue,
bool dump,
std::string dump_filename,
int averaging_depth,
@ -70,7 +68,6 @@ class hybrid_pvt_cc : public gr::block
{
private:
friend hybrid_pvt_cc_sptr hybrid_make_pvt_cc(unsigned int nchannels,
boost::shared_ptr<gr::msg_queue> queue,
bool dump,
std::string dump_filename,
int averaging_depth,
@ -84,7 +81,6 @@ private:
bool flag_rtcm_tty_port,
std::string rtcm_dump_devname);
hybrid_pvt_cc(unsigned int nchannels,
boost::shared_ptr<gr::msg_queue> queue,
bool dump, std::string dump_filename,
int averaging_depth,
bool flag_averaging,
@ -99,7 +95,6 @@ private:
void msg_handler_telemetry(pmt::pmt_t msg);
boost::shared_ptr<gr::msg_queue> d_queue;
bool d_dump;
bool b_rinex_header_writen;
bool b_rinex_header_updated;

View File

@ -41,9 +41,8 @@ using google::LogMessage;
GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue) :
role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(queue)
unsigned int in_streams, unsigned int out_streams) :
role_(role), in_streams_(in_streams), out_streams_(out_streams)
{
configuration_ = configuration;
std::string default_item_type = "gr_complex";
@ -98,7 +97,7 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
item_size_ = sizeof(gr_complex);
acquisition_cc_ = pcps_make_acquisition_cc(sampled_ms_, max_dwells_,
shift_resolution_, if_, fs_in_, samples_per_ms, code_length_,
bit_transition_flag_, use_CFAR_algorithm_flag_, queue_, dump_, dump_filename_);
bit_transition_flag_, use_CFAR_algorithm_flag_, dump_, dump_filename_);
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
DLOG(INFO) << "stream_to_vector(" << stream_to_vector_->unique_id() << ")";
DLOG(INFO) << "acquisition(" << acquisition_cc_->unique_id() << ")";

View File

@ -33,7 +33,6 @@
#define GNSS_SDR_GALILEO_E1_PCPS_AMBIGUOUS_ACQUISITION_H_
#include <string>
#include <gnuradio/msg_queue.h>
#include <gnuradio/blocks/stream_to_vector.h>
#include "gnss_synchro.h"
#include "acquisition_interface.h"
@ -51,7 +50,7 @@ class GalileoE1PcpsAmbiguousAcquisition: public AcquisitionInterface
public:
GalileoE1PcpsAmbiguousAcquisition(ConfigurationInterface* configuration,
std::string role, unsigned int in_streams,
unsigned int out_streams, boost::shared_ptr<gr::msg_queue> queue);
unsigned int out_streams);
virtual ~GalileoE1PcpsAmbiguousAcquisition();
@ -160,7 +159,6 @@ private:
std::string role_;
unsigned int in_streams_;
unsigned int out_streams_;
boost::shared_ptr<gr::msg_queue> queue_;
concurrent_queue<int> *channel_internal_queue_;
float calculate_threshold(float pfa);
};

View File

@ -45,9 +45,8 @@ using google::LogMessage;
GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams,
gr::msg_queue::sptr queue) :
role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(queue)
unsigned int in_streams, unsigned int out_streams) :
role_(role), in_streams_(in_streams), out_streams_(out_streams)
{
configuration_ = configuration;
std::string default_item_type = "gr_complex";
@ -90,14 +89,14 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
item_size_ = sizeof(lv_16sc_t);
acquisition_sc_ = pcps_make_acquisition_sc(sampled_ms_, max_dwells_,
shift_resolution_, if_, fs_in_, code_length_, code_length_,
bit_transition_flag_, use_CFAR_algorithm_flag_, queue_, dump_, dump_filename_);
bit_transition_flag_, use_CFAR_algorithm_flag_, dump_, dump_filename_);
DLOG(INFO) << "acquisition(" << acquisition_cc_->unique_id() << ")";
}else{
item_size_ = sizeof(gr_complex);
acquisition_cc_ = pcps_make_acquisition_cc(sampled_ms_, max_dwells_,
shift_resolution_, if_, fs_in_, code_length_, code_length_,
bit_transition_flag_, use_CFAR_algorithm_flag_, queue_, dump_, dump_filename_);
bit_transition_flag_, use_CFAR_algorithm_flag_, dump_, dump_filename_);
DLOG(INFO) << "acquisition(" << acquisition_cc_->unique_id() << ")";
}

View File

@ -61,7 +61,7 @@ class GpsL1CaPcpsAcquisition: public AcquisitionInterface
public:
GpsL1CaPcpsAcquisition(ConfigurationInterface* configuration,
std::string role, unsigned int in_streams,
unsigned int out_streams, boost::shared_ptr<gr::msg_queue> queue);
unsigned int out_streams);
virtual ~GpsL1CaPcpsAcquisition();

View File

@ -43,9 +43,8 @@ using google::LogMessage;
GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams,
gr::msg_queue::sptr queue) :
role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(queue)
unsigned int in_streams, unsigned int out_streams) :
role_(role), in_streams_(in_streams), out_streams_(out_streams)
{
configuration_ = configuration;
std::string default_item_type = "gr_complex";
@ -88,7 +87,7 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
item_size_ = sizeof(gr_complex);
acquisition_cc_ = pcps_make_acquisition_cc(1, max_dwells_,
shift_resolution_, if_, fs_in_, code_length_, code_length_,
bit_transition_flag_, use_CFAR_algorithm_flag_, queue_, dump_, dump_filename_);
bit_transition_flag_, use_CFAR_algorithm_flag_, dump_, dump_filename_);
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);

View File

@ -35,7 +35,6 @@
#define GNSS_SDR_GPS_L2_M_PCPS_ACQUISITION_H_
#include <string>
#include <gnuradio/msg_queue.h>
#include <gnuradio/blocks/stream_to_vector.h>
#include <gnuradio/blocks/float_to_complex.h>
#include "gnss_synchro.h"
@ -57,7 +56,7 @@ class GpsL2MPcpsAcquisition: public AcquisitionInterface
public:
GpsL2MPcpsAcquisition(ConfigurationInterface* configuration,
std::string role, unsigned int in_streams,
unsigned int out_streams, boost::shared_ptr<gr::msg_queue> queue);
unsigned int out_streams);
virtual ~GpsL2MPcpsAcquisition();
@ -168,7 +167,6 @@ private:
std::string role_;
unsigned int in_streams_;
unsigned int out_streams_;
boost::shared_ptr<gr::msg_queue> queue_;
concurrent_queue<int> *channel_internal_queue_;
float calculate_threshold(float pfa);

View File

@ -50,13 +50,13 @@ pcps_acquisition_cc_sptr pcps_make_acquisition_cc(
unsigned int doppler_max, long freq, long fs_in,
int samples_per_ms, int samples_per_code,
bool bit_transition_flag, bool use_CFAR_algorithm_flag,
gr::msg_queue::sptr queue, bool dump,
bool dump,
std::string dump_filename)
{
return pcps_acquisition_cc_sptr(
new pcps_acquisition_cc(sampled_ms, max_dwells, doppler_max, freq, fs_in, samples_per_ms,
samples_per_code, bit_transition_flag, use_CFAR_algorithm_flag, queue, dump, dump_filename));
samples_per_code, bit_transition_flag, use_CFAR_algorithm_flag, dump, dump_filename));
}
pcps_acquisition_cc::pcps_acquisition_cc(
@ -64,7 +64,7 @@ pcps_acquisition_cc::pcps_acquisition_cc(
unsigned int doppler_max, long freq, long fs_in,
int samples_per_ms, int samples_per_code,
bool bit_transition_flag, bool use_CFAR_algorithm_flag,
gr::msg_queue::sptr queue, bool dump,
bool dump,
std::string dump_filename) :
gr::block("pcps_acquisition_cc",
gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms * ( bit_transition_flag ? 2 : 1 )),
@ -73,7 +73,7 @@ pcps_acquisition_cc::pcps_acquisition_cc(
d_sample_counter = 0; // SAMPLE COUNTER
d_active = false;
d_state = 0;
d_queue = queue;
//d_queue = queue;
d_freq = freq;
d_fs_in = fs_in;
d_samples_per_ms = samples_per_ms;

View File

@ -53,7 +53,6 @@
#include <fstream>
#include <string>
#include <gnuradio/block.h>
#include <gnuradio/msg_queue.h>
#include <gnuradio/gr_complex.h>
#include <gnuradio/fft/fft.h>
#include "concurrent_queue.h"
@ -68,7 +67,7 @@ pcps_make_acquisition_cc(unsigned int sampled_ms, unsigned int max_dwells,
unsigned int doppler_max, long freq, long fs_in,
int samples_per_ms, int samples_per_code,
bool bit_transition_flag, bool use_CFAR_algorithm_flag,
gr::msg_queue::sptr queue, bool dump,
bool dump,
std::string dump_filename);
/*!
@ -85,14 +84,14 @@ private:
unsigned int doppler_max, long freq, long fs_in,
int samples_per_ms, int samples_per_code,
bool bit_transition_flag, bool use_CFAR_algorithm_flag,
gr::msg_queue::sptr queue, bool dump,
bool dump,
std::string dump_filename);
pcps_acquisition_cc(unsigned int sampled_ms, unsigned int max_dwells,
unsigned int doppler_max, long freq, long fs_in,
int samples_per_ms, int samples_per_code,
bool bit_transition_flag, bool use_CFAR_algorithm_flag,
gr::msg_queue::sptr queue, bool dump,
bool dump,
std::string dump_filename);
void update_local_carrier(gr_complex* carrier_vector, int correlator_length_samples, float freq);
@ -125,7 +124,6 @@ private:
float d_test_statistics;
bool d_bit_transition_flag;
bool d_use_CFAR_algorithm_flag;
gr::msg_queue::sptr d_queue;
concurrent_queue<int> *d_channel_internal_queue;
std::ofstream d_dump_file;
bool d_active;

View File

@ -49,13 +49,13 @@ pcps_acquisition_sc_sptr pcps_make_acquisition_sc(
unsigned int doppler_max, long freq, long fs_in,
int samples_per_ms, int samples_per_code,
bool bit_transition_flag, bool use_CFAR_algorithm_flag,
gr::msg_queue::sptr queue, bool dump,
bool dump,
std::string dump_filename)
{
return pcps_acquisition_sc_sptr(
new pcps_acquisition_sc(sampled_ms, max_dwells, doppler_max, freq, fs_in, samples_per_ms,
samples_per_code, bit_transition_flag, use_CFAR_algorithm_flag, queue, dump, dump_filename));
samples_per_code, bit_transition_flag, use_CFAR_algorithm_flag, dump, dump_filename));
}
pcps_acquisition_sc::pcps_acquisition_sc(
@ -63,7 +63,7 @@ pcps_acquisition_sc::pcps_acquisition_sc(
unsigned int doppler_max, long freq, long fs_in,
int samples_per_ms, int samples_per_code,
bool bit_transition_flag, bool use_CFAR_algorithm_flag,
gr::msg_queue::sptr queue, bool dump,
bool dump,
std::string dump_filename) :
gr::block("pcps_acquisition_sc",
gr::io_signature::make(1, 1, sizeof(lv_16sc_t) * sampled_ms * samples_per_ms * ( bit_transition_flag ? 2 : 1 )),
@ -72,7 +72,6 @@ pcps_acquisition_sc::pcps_acquisition_sc(
d_sample_counter = 0; // SAMPLE COUNTER
d_active = false;
d_state = 0;
d_queue = queue;
d_freq = freq;
d_fs_in = fs_in;
d_samples_per_ms = samples_per_ms;

View File

@ -53,7 +53,6 @@
#include <fstream>
#include <string>
#include <gnuradio/block.h>
#include <gnuradio/msg_queue.h>
#include <gnuradio/gr_complex.h>
#include <gnuradio/fft/fft.h>
#include "concurrent_queue.h"
@ -68,7 +67,7 @@ pcps_make_acquisition_sc(unsigned int sampled_ms, unsigned int max_dwells,
unsigned int doppler_max, long freq, long fs_in,
int samples_per_ms, int samples_per_code,
bool bit_transition_flag, bool use_CFAR_algorithm_flag,
gr::msg_queue::sptr queue, bool dump,
bool dump,
std::string dump_filename);
/*!
@ -85,14 +84,14 @@ private:
unsigned int doppler_max, long freq, long fs_in,
int samples_per_ms, int samples_per_code,
bool bit_transition_flag, bool use_CFAR_algorithm_flag,
gr::msg_queue::sptr queue, bool dump,
bool dump,
std::string dump_filename);
pcps_acquisition_sc(unsigned int sampled_ms, unsigned int max_dwells,
unsigned int doppler_max, long freq, long fs_in,
int samples_per_ms, int samples_per_code,
bool bit_transition_flag, bool use_CFAR_algorithm_flag,
gr::msg_queue::sptr queue, bool dump,
bool dump,
std::string dump_filename);
void update_local_carrier(gr_complex* carrier_vector,
@ -129,7 +128,6 @@ private:
float d_test_statistics;
bool d_bit_transition_flag;
bool d_use_CFAR_algorithm_flag;
gr::msg_queue::sptr d_queue;
concurrent_queue<int> *d_channel_internal_queue;
std::ofstream d_dump_file;
bool d_active;

View File

@ -44,7 +44,7 @@
#ifdef LV_HAVE_GENERIC
static inline void volk_gnsssdr_16ic_resamplerxnpuppet2_16ic_generic(lv_16sc_t* result, const lv_16sc_t* local_code, unsigned int num_points)
{
float code_phase_step_chips = 0.6;
float code_phase_step_chips = -0.6;
int code_length_chips = 2046;
int num_out_vectors = 3;
float rem_code_phase_chips = -0.234;
@ -74,7 +74,7 @@ static inline void volk_gnsssdr_16ic_resamplerxnpuppet2_16ic_generic(lv_16sc_t*
#ifdef LV_HAVE_SSE3
static inline void volk_gnsssdr_16ic_resamplerxnpuppet2_16ic_a_sse3(lv_16sc_t* result, const lv_16sc_t* local_code, unsigned int num_points)
{
float code_phase_step_chips = 0.6;
float code_phase_step_chips = -0.6;
int code_length_chips = 2046;
int num_out_vectors = 3;
float rem_code_phase_chips = -0.234;
@ -103,7 +103,7 @@ static inline void volk_gnsssdr_16ic_resamplerxnpuppet2_16ic_a_sse3(lv_16sc_t* r
#ifdef LV_HAVE_SSE3
static inline void volk_gnsssdr_16ic_resamplerxnpuppet2_16ic_u_sse3(lv_16sc_t* result, const lv_16sc_t* local_code, unsigned int num_points)
{
float code_phase_step_chips = 0.6;
float code_phase_step_chips = -0.6;
int code_length_chips = 2046;
int num_out_vectors = 3;
float rem_code_phase_chips = -0.234;
@ -133,7 +133,7 @@ static inline void volk_gnsssdr_16ic_resamplerxnpuppet2_16ic_u_sse3(lv_16sc_t* r
#ifdef LV_HAVE_SSE4_1
static inline void volk_gnsssdr_16ic_resamplerxnpuppet2_16ic_u_sse4_1(lv_16sc_t* result, const lv_16sc_t* local_code, unsigned int num_points)
{
float code_phase_step_chips = 0.6;
float code_phase_step_chips = -0.6;
int code_length_chips = 2046;
int num_out_vectors = 3;
float rem_code_phase_chips = -0.234;
@ -163,7 +163,7 @@ static inline void volk_gnsssdr_16ic_resamplerxnpuppet2_16ic_u_sse4_1(lv_16sc_t*
#ifdef LV_HAVE_SSE4_1
static inline void volk_gnsssdr_16ic_resamplerxnpuppet2_16ic_a_sse4_1(lv_16sc_t* result, const lv_16sc_t* local_code, unsigned int num_points)
{
float code_phase_step_chips = 0.6;
float code_phase_step_chips = -0.6;
int code_length_chips = 2046;
int num_out_vectors = 3;
float rem_code_phase_chips = -0.234;
@ -193,7 +193,7 @@ static inline void volk_gnsssdr_16ic_resamplerxnpuppet2_16ic_a_sse4_1(lv_16sc_t*
#ifdef LV_HAVE_AVX
static inline void volk_gnsssdr_16ic_resamplerxnpuppet2_16ic_u_avx(lv_16sc_t* result, const lv_16sc_t* local_code, unsigned int num_points)
{
float code_phase_step_chips = 0.6;
float code_phase_step_chips = -0.6;
int code_length_chips = 2046;
int num_out_vectors = 3;
float rem_code_phase_chips = -0.234;
@ -223,7 +223,7 @@ static inline void volk_gnsssdr_16ic_resamplerxnpuppet2_16ic_u_avx(lv_16sc_t* re
#ifdef LV_HAVE_AVX
static inline void volk_gnsssdr_16ic_resamplerxnpuppet2_16ic_a_avx(lv_16sc_t* result, const lv_16sc_t* local_code, unsigned int num_points)
{
float code_phase_step_chips = 0.6;
float code_phase_step_chips = -0.6;
int code_length_chips = 2046;
int num_out_vectors = 3;
float rem_code_phase_chips = -0.234;
@ -253,7 +253,7 @@ static inline void volk_gnsssdr_16ic_resamplerxnpuppet2_16ic_a_avx(lv_16sc_t* re
#ifdef LV_HAVE_NEON
static inline void volk_gnsssdr_16ic_resamplerxnpuppet2_16ic_neon(lv_16sc_t* result, const lv_16sc_t* local_code, unsigned int num_points)
{
float code_phase_step_chips = 0.6;
float code_phase_step_chips = -0.6;
int code_length_chips = 2046;
int num_out_vectors = 3;
float rem_code_phase_chips = -0.234;

View File

@ -41,11 +41,13 @@
#include <volk_gnsssdr/volk_gnsssdr.h>
#include <string.h>
#ifdef LV_HAVE_GENERIC
static inline void volk_gnsssdr_32fc_resamplerxnpuppet_32fc_generic(lv_32fc_t* result, const lv_32fc_t* local_code, unsigned int num_points)
{
float code_phase_step_chips = 0.6;
int code_length_chips = 2046;
float code_phase_step_chips = -0.6;
int code_length_chips = 1023;
int num_out_vectors = 3;
float rem_code_phase_chips = -0.234;
@ -74,8 +76,8 @@ static inline void volk_gnsssdr_32fc_resamplerxnpuppet_32fc_generic(lv_32fc_t* r
#ifdef LV_HAVE_SSE3
static inline void volk_gnsssdr_32fc_resamplerxnpuppet_32fc_a_sse3(lv_32fc_t* result, const lv_32fc_t* local_code, unsigned int num_points)
{
float code_phase_step_chips = 0.6;
int code_length_chips = 2046;
float code_phase_step_chips = -0.6;
int code_length_chips = 1023;
int num_out_vectors = 3;
float rem_code_phase_chips = -0.234;
@ -103,8 +105,8 @@ static inline void volk_gnsssdr_32fc_resamplerxnpuppet_32fc_a_sse3(lv_32fc_t* re
#ifdef LV_HAVE_SSE3
static inline void volk_gnsssdr_32fc_resamplerxnpuppet_32fc_u_sse3(lv_32fc_t* result, const lv_32fc_t* local_code, unsigned int num_points)
{
float code_phase_step_chips = 0.6;
int code_length_chips = 2046;
float code_phase_step_chips = -0.6;
int code_length_chips = 1023;
int num_out_vectors = 3;
float rem_code_phase_chips = -0.234;
@ -133,8 +135,8 @@ static inline void volk_gnsssdr_32fc_resamplerxnpuppet_32fc_u_sse3(lv_32fc_t* re
#ifdef LV_HAVE_SSE4_1
static inline void volk_gnsssdr_32fc_resamplerxnpuppet_32fc_u_sse4_1(lv_32fc_t* result, const lv_32fc_t* local_code, unsigned int num_points)
{
float code_phase_step_chips = 0.6;
int code_length_chips = 2046;
float code_phase_step_chips = -0.6;
int code_length_chips = 1023;
int num_out_vectors = 3;
float rem_code_phase_chips = -0.234;
@ -162,8 +164,8 @@ static inline void volk_gnsssdr_32fc_resamplerxnpuppet_32fc_u_sse4_1(lv_32fc_t*
#ifdef LV_HAVE_SSE4_1
static inline void volk_gnsssdr_32fc_resamplerxnpuppet_32fc_a_sse4_1(lv_32fc_t* result, const lv_32fc_t* local_code, unsigned int num_points)
{
float code_phase_step_chips = 0.6;
int code_length_chips = 2046;
float code_phase_step_chips = -0.6;
int code_length_chips = 1023;
int num_out_vectors = 3;
float rem_code_phase_chips = -0.234;
@ -191,8 +193,8 @@ static inline void volk_gnsssdr_32fc_resamplerxnpuppet_32fc_a_sse4_1(lv_32fc_t*
#ifdef LV_HAVE_AVX
static inline void volk_gnsssdr_32fc_resamplerxnpuppet_32fc_a_avx(lv_32fc_t* result, const lv_32fc_t* local_code, unsigned int num_points)
{
float code_phase_step_chips = 0.6;
int code_length_chips = 2046;
float code_phase_step_chips = -0.6;
int code_length_chips = 1023;
int num_out_vectors = 3;
float rem_code_phase_chips = -0.234;
@ -220,8 +222,8 @@ static inline void volk_gnsssdr_32fc_resamplerxnpuppet_32fc_a_avx(lv_32fc_t* res
#ifdef LV_HAVE_AVX
static inline void volk_gnsssdr_32fc_resamplerxnpuppet_32fc_u_avx(lv_32fc_t* result, const lv_32fc_t* local_code, unsigned int num_points)
{
float code_phase_step_chips = 0.6;
int code_length_chips = 2046;
float code_phase_step_chips = -0.6;
int code_length_chips = 1023;
int num_out_vectors = 3;
float rem_code_phase_chips = -0.234;
@ -249,8 +251,8 @@ static inline void volk_gnsssdr_32fc_resamplerxnpuppet_32fc_u_avx(lv_32fc_t* res
#ifdef LV_HAVE_NEON
static inline void volk_gnsssdr_32fc_resamplerxnpuppet_32fc_neon(lv_32fc_t* result, const lv_32fc_t* local_code, unsigned int num_points)
{
float code_phase_step_chips = 0.6;
int code_length_chips = 2046;
float code_phase_step_chips = -0.6;
int code_length_chips = 1023;
int num_out_vectors = 3;
float rem_code_phase_chips = -0.234;

View File

@ -39,12 +39,10 @@ using google::LogMessage;
GalileoE1Observables::GalileoE1Observables(ConfigurationInterface* configuration,
std::string role,
unsigned int in_streams,
unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue) :
unsigned int out_streams) :
role_(role),
in_streams_(in_streams),
out_streams_(out_streams),
queue_(queue)
out_streams_(out_streams)
{
int output_rate_ms;
output_rate_ms = configuration->property(role + ".output_rate_ms", 500);
@ -54,7 +52,7 @@ GalileoE1Observables::GalileoE1Observables(ConfigurationInterface* configuration
flag_averaging = configuration->property(role + ".flag_averaging", false);
dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
observables_ = galileo_e1_make_observables_cc(in_streams_, queue_, dump_, dump_filename_, output_rate_ms, flag_averaging);
observables_ = galileo_e1_make_observables_cc(in_streams_, dump_, dump_filename_, output_rate_ms, flag_averaging);
DLOG(INFO) << "pseudorange(" << observables_->unique_id() << ")";
}

View File

@ -35,7 +35,6 @@
#define GNSS_SDR_GALILEO_E1_OBSERVABLES_H_
#include <string>
#include <gnuradio/msg_queue.h>
#include "observables_interface.h"
#include "galileo_e1_observables_cc.h"
@ -51,8 +50,7 @@ public:
GalileoE1Observables(ConfigurationInterface* configuration,
std::string role,
unsigned int in_streams,
unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue);
unsigned int out_streams);
virtual ~GalileoE1Observables();
std::string role()
{
@ -86,7 +84,6 @@ private:
std::string role_;
unsigned int in_streams_;
unsigned int out_streams_;
boost::shared_ptr<gr::msg_queue> queue_;
};
#endif

View File

@ -39,12 +39,10 @@ using google::LogMessage;
GpsL1CaObservables::GpsL1CaObservables(ConfigurationInterface* configuration,
std::string role,
unsigned int in_streams,
unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue) :
unsigned int out_streams) :
role_(role),
in_streams_(in_streams),
out_streams_(out_streams),
queue_(queue)
out_streams_(out_streams)
{
int output_rate_ms;
output_rate_ms = configuration->property(role + ".output_rate_ms", 500);
@ -54,7 +52,7 @@ GpsL1CaObservables::GpsL1CaObservables(ConfigurationInterface* configuration,
flag_averaging = configuration->property(role + ".flag_averaging", false);
dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
observables_ = gps_l1_ca_make_observables_cc(in_streams_, queue_, dump_, dump_filename_, output_rate_ms, flag_averaging);
observables_ = gps_l1_ca_make_observables_cc(in_streams_, dump_, dump_filename_, output_rate_ms, flag_averaging);
DLOG(INFO) << "pseudorange(" << observables_->unique_id() << ")";
}

View File

@ -34,7 +34,6 @@
#define GNSS_SDR_GPS_L1_CA_OBSERVABLES_H_
#include <string>
#include <gnuradio/msg_queue.h>
#include "observables_interface.h"
#include "gps_l1_ca_observables_cc.h"
@ -50,8 +49,7 @@ public:
GpsL1CaObservables(ConfigurationInterface* configuration,
std::string role,
unsigned int in_streams,
unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue);
unsigned int out_streams);
virtual ~GpsL1CaObservables();
std::string role()
{
@ -86,7 +84,6 @@ private:
std::string role_;
unsigned int in_streams_;
unsigned int out_streams_;
boost::shared_ptr<gr::msg_queue> queue_;
};
#endif

View File

@ -39,12 +39,10 @@ using google::LogMessage;
HybridObservables::HybridObservables(ConfigurationInterface* configuration,
std::string role,
unsigned int in_streams,
unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue) :
unsigned int out_streams) :
role_(role),
in_streams_(in_streams),
out_streams_(out_streams),
queue_(queue)
out_streams_(out_streams)
{
int output_rate_ms;
output_rate_ms = configuration->property(role + ".output_rate_ms", 500);
@ -54,7 +52,7 @@ HybridObservables::HybridObservables(ConfigurationInterface* configuration,
flag_averaging = configuration->property(role + ".flag_averaging", false);
dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
observables_ = hybrid_make_observables_cc(in_streams_, queue_, dump_, dump_filename_, output_rate_ms, flag_averaging);
observables_ = hybrid_make_observables_cc(in_streams_, dump_, dump_filename_, output_rate_ms, flag_averaging);
DLOG(INFO) << "pseudorange(" << observables_->unique_id() << ")";
}

View File

@ -35,7 +35,6 @@
#define GNSS_SDR_hybrid_observables_H_
#include <string>
#include <gnuradio/msg_queue.h>
#include "observables_interface.h"
#include "hybrid_observables_cc.h"
@ -51,8 +50,7 @@ public:
HybridObservables(ConfigurationInterface* configuration,
std::string role,
unsigned int in_streams,
unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue);
unsigned int out_streams);
virtual ~HybridObservables();
std::string role()
{
@ -86,7 +84,6 @@ private:
std::string role_;
unsigned int in_streams_;
unsigned int out_streams_;
boost::shared_ptr<gr::msg_queue> queue_;
};
#endif

View File

@ -39,12 +39,10 @@ using google::LogMessage;
MixedObservables::MixedObservables(ConfigurationInterface* configuration,
std::string role,
unsigned int in_streams,
unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue) :
unsigned int out_streams) :
role_(role),
in_streams_(in_streams),
out_streams_(out_streams),
queue_(queue)
out_streams_(out_streams)
{
int output_rate_ms;
output_rate_ms = configuration->property(role + ".output_rate_ms", 500);
@ -54,7 +52,7 @@ MixedObservables::MixedObservables(ConfigurationInterface* configuration,
flag_averaging = configuration->property(role + ".flag_averaging", false);
dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
observables_ = mixed_make_observables_cc(in_streams_, queue_, dump_, dump_filename_, output_rate_ms, flag_averaging);
observables_ = mixed_make_observables_cc(in_streams_, dump_, dump_filename_, output_rate_ms, flag_averaging);
DLOG(INFO) << "pseudorange(" << observables_->unique_id() << ")";
}

View File

@ -33,7 +33,6 @@
#define GNSS_SDR_MIXED_OBSERVABLES_H_
#include <string>
#include <gnuradio/msg_queue.h>
#include "observables_interface.h"
#include "mixed_observables_cc.h"
@ -49,8 +48,7 @@ public:
MixedObservables(ConfigurationInterface* configuration,
std::string role,
unsigned int in_streams,
unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue);
unsigned int out_streams);
virtual ~MixedObservables();
std::string role()
{
@ -85,7 +83,6 @@ private:
std::string role_;
unsigned int in_streams_;
unsigned int out_streams_;
boost::shared_ptr<gr::msg_queue> queue_;
};
#endif

View File

@ -50,18 +50,17 @@ using google::LogMessage;
galileo_e1_observables_cc_sptr
galileo_e1_make_observables_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging)
galileo_e1_make_observables_cc(unsigned int nchannels, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging)
{
return galileo_e1_observables_cc_sptr(new galileo_e1_observables_cc(nchannels, queue, dump, dump_filename, output_rate_ms, flag_averaging));
return galileo_e1_observables_cc_sptr(new galileo_e1_observables_cc(nchannels, dump, dump_filename, output_rate_ms, flag_averaging));
}
galileo_e1_observables_cc::galileo_e1_observables_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging) :
galileo_e1_observables_cc::galileo_e1_observables_cc(unsigned int nchannels, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging) :
gr::block("galileo_e1_observables_cc", gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)),
gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)))
{
// initialize internal vars
d_queue = queue;
d_dump = dump;
d_nchannels = nchannels;
d_output_rate_ms = output_rate_ms;
@ -86,7 +85,7 @@ galileo_e1_observables_cc::galileo_e1_observables_cc(unsigned int nchannels, boo
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
LOG(INFO) << "Observables dump enabled Log file: " << d_dump_filename.c_str();
}
catch (std::ifstream::failure e)
catch (const std::ifstream::failure & e)
{
LOG(WARNING) << "Exception opening observables dump file " << e.what();
}

View File

@ -37,7 +37,6 @@
#include <fstream>
#include <string>
#include <gnuradio/block.h>
#include <gnuradio/msg_queue.h>
class galileo_e1_observables_cc;
@ -45,7 +44,7 @@ class galileo_e1_observables_cc;
typedef boost::shared_ptr<galileo_e1_observables_cc> galileo_e1_observables_cc_sptr;
galileo_e1_observables_cc_sptr
galileo_e1_make_observables_cc(unsigned int n_channels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging);
galileo_e1_make_observables_cc(unsigned int n_channels, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging);
/*!
* \brief This class implements a block that computes Galileo observables
@ -60,8 +59,8 @@ public:
private:
friend galileo_e1_observables_cc_sptr
galileo_e1_make_observables_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging);
galileo_e1_observables_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging);
galileo_e1_make_observables_cc(unsigned int nchannels, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging);
galileo_e1_observables_cc(unsigned int nchannels, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging);
//Tracking observable history
std::vector<std::deque<double>> d_acc_carrier_phase_queue_rads;
@ -69,7 +68,6 @@ private:
std::vector<std::deque<double>> d_symbol_TOW_queue_s;
// class private vars
boost::shared_ptr<gr::msg_queue> d_queue;
bool d_dump;
bool d_flag_averaging;
unsigned int d_nchannels;

View File

@ -47,18 +47,17 @@ using google::LogMessage;
gps_l1_ca_observables_cc_sptr
gps_l1_ca_make_observables_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging)
gps_l1_ca_make_observables_cc(unsigned int nchannels, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging)
{
return gps_l1_ca_observables_cc_sptr(new gps_l1_ca_observables_cc(nchannels, queue, dump, dump_filename, output_rate_ms, flag_averaging));
return gps_l1_ca_observables_cc_sptr(new gps_l1_ca_observables_cc(nchannels, dump, dump_filename, output_rate_ms, flag_averaging));
}
gps_l1_ca_observables_cc::gps_l1_ca_observables_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging) :
gps_l1_ca_observables_cc::gps_l1_ca_observables_cc(unsigned int nchannels, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging) :
gr::block("gps_l1_ca_observables_cc", gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)),
gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)))
{
// initialize internal vars
d_queue = queue;
d_dump = dump;
d_nchannels = nchannels;
d_output_rate_ms = output_rate_ms;
@ -83,7 +82,7 @@ gps_l1_ca_observables_cc::gps_l1_ca_observables_cc(unsigned int nchannels, boost
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
LOG(INFO) << "Observables dump enabled Log file: " << d_dump_filename.c_str() << std::endl;
}
catch (std::ifstream::failure e)
catch (const std::ifstream::failure & e)
{
LOG(WARNING) << "Exception opening observables dump file " << e.what() << std::endl;
}

View File

@ -37,7 +37,6 @@
#include <vector>
#include <boost/shared_ptr.hpp>
#include <gnuradio/block.h>
#include <gnuradio/msg_queue.h>
class gps_l1_ca_observables_cc;
@ -45,7 +44,7 @@ class gps_l1_ca_observables_cc;
typedef boost::shared_ptr<gps_l1_ca_observables_cc> gps_l1_ca_observables_cc_sptr;
gps_l1_ca_observables_cc_sptr
gps_l1_ca_make_observables_cc(unsigned int n_channels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging);
gps_l1_ca_make_observables_cc(unsigned int n_channels, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging);
/*!
* \brief This class implements a block that computes GPS L1 C/A observables
@ -60,8 +59,8 @@ public:
private:
friend gps_l1_ca_observables_cc_sptr
gps_l1_ca_make_observables_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging);
gps_l1_ca_observables_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging);
gps_l1_ca_make_observables_cc(unsigned int nchannels, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging);
gps_l1_ca_observables_cc(unsigned int nchannels, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging);
//Tracking observable history
@ -70,7 +69,6 @@ private:
std::vector<std::deque<double>> d_symbol_TOW_queue_s;
// class private vars
boost::shared_ptr<gr::msg_queue> d_queue;
bool d_dump;
bool d_flag_averaging;
unsigned int d_nchannels;

View File

@ -48,18 +48,17 @@ using google::LogMessage;
hybrid_observables_cc_sptr
hybrid_make_observables_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging)
hybrid_make_observables_cc(unsigned int nchannels, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging)
{
return hybrid_observables_cc_sptr(new hybrid_observables_cc(nchannels, queue, dump, dump_filename, output_rate_ms, flag_averaging));
return hybrid_observables_cc_sptr(new hybrid_observables_cc(nchannels, dump, dump_filename, output_rate_ms, flag_averaging));
}
hybrid_observables_cc::hybrid_observables_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging) :
hybrid_observables_cc::hybrid_observables_cc(unsigned int nchannels, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging) :
gr::block("hybrid_observables_cc", gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)),
gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)))
{
// initialize internal vars
d_queue = queue;
d_dump = dump;
d_nchannels = nchannels;
d_output_rate_ms = output_rate_ms;
@ -77,7 +76,7 @@ hybrid_observables_cc::hybrid_observables_cc(unsigned int nchannels, boost::shar
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
LOG(INFO) << "Observables dump enabled Log file: " << d_dump_filename.c_str();
}
catch (std::ifstream::failure e)
catch (const std::ifstream::failure & e)
{
LOG(WARNING) << "Exception opening observables dump file " << e.what();
}

View File

@ -36,7 +36,6 @@
#include <fstream>
#include <string>
#include <gnuradio/block.h>
#include <gnuradio/msg_queue.h>
class hybrid_observables_cc;
@ -44,7 +43,7 @@ class hybrid_observables_cc;
typedef boost::shared_ptr<hybrid_observables_cc> hybrid_observables_cc_sptr;
hybrid_observables_cc_sptr
hybrid_make_observables_cc(unsigned int n_channels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging);
hybrid_make_observables_cc(unsigned int n_channels, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging);
/*!
* \brief This class implements a block that computes Galileo observables
@ -53,17 +52,15 @@ class hybrid_observables_cc : public gr::block
{
public:
~hybrid_observables_cc ();
//void set_fs_in(unsigned long int fs_in) {d_fs_in = fs_in;};
int general_work (int noutput_items, gr_vector_int &ninput_items,
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items);
private:
friend hybrid_observables_cc_sptr
hybrid_make_observables_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging);
hybrid_observables_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging);
hybrid_make_observables_cc(unsigned int nchannels, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging);
hybrid_observables_cc(unsigned int nchannels, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging);
// class private vars
boost::shared_ptr<gr::msg_queue> d_queue;
bool d_dump;
bool d_flag_averaging;
unsigned int d_nchannels;

View File

@ -46,18 +46,17 @@ using google::LogMessage;
mixed_observables_cc_sptr
mixed_make_observables_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging)
mixed_make_observables_cc(unsigned int nchannels, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging)
{
return mixed_observables_cc_sptr(new mixed_observables_cc(nchannels, queue, dump, dump_filename, output_rate_ms, flag_averaging));
return mixed_observables_cc_sptr(new mixed_observables_cc(nchannels, dump, dump_filename, output_rate_ms, flag_averaging));
}
mixed_observables_cc::mixed_observables_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging) :
mixed_observables_cc::mixed_observables_cc(unsigned int nchannels, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging) :
gr::block("mixed_observables_cc", gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)),
gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)))
{
// initialize internal vars
d_queue = queue;
d_dump = dump;
d_nchannels = nchannels;
d_output_rate_ms = output_rate_ms;

View File

@ -34,7 +34,6 @@
#include <fstream>
#include <string>
#include <gnuradio/block.h>
#include <gnuradio/msg_queue.h>
class mixed_observables_cc;
@ -42,7 +41,7 @@ class mixed_observables_cc;
typedef boost::shared_ptr<mixed_observables_cc> mixed_observables_cc_sptr;
mixed_observables_cc_sptr
mixed_make_observables_cc(unsigned int n_channels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging);
mixed_make_observables_cc(unsigned int n_channels, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging);
/*!
* \brief This class implements a block that computes MIXED observables (Multi-frequency and Multi-system)
@ -56,11 +55,10 @@ public:
private:
friend mixed_observables_cc_sptr
mixed_make_observables_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging);
mixed_observables_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_queue> queue, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging);
mixed_make_observables_cc(unsigned int nchannels, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging);
mixed_observables_cc(unsigned int nchannels, bool dump, std::string dump_filename, int output_rate_ms, bool flag_averaging);
// class private vars
boost::shared_ptr<gr::msg_queue> d_queue;
bool d_dump;
bool d_flag_averaging;
unsigned int d_nchannels;

View File

@ -46,12 +46,10 @@ using google::LogMessage;
GalileoE1BTelemetryDecoder::GalileoE1BTelemetryDecoder(ConfigurationInterface* configuration,
std::string role,
unsigned int in_streams,
unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue) :
unsigned int out_streams) :
role_(role),
in_streams_(in_streams),
out_streams_(out_streams),
queue_(queue)
out_streams_(out_streams)
{
std::string default_item_type = "gr_complex";
std::string default_dump_filename = "./navigation.dat";
@ -59,7 +57,7 @@ GalileoE1BTelemetryDecoder::GalileoE1BTelemetryDecoder(ConfigurationInterface* c
dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
// make telemetry decoder object
telemetry_decoder_ = galileo_e1b_make_telemetry_decoder_cc(satellite_, queue_, dump_); // TODO fix me
telemetry_decoder_ = galileo_e1b_make_telemetry_decoder_cc(satellite_, dump_); // TODO fix me
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
//decimation factor

View File

@ -35,7 +35,6 @@
#define GNSS_SDR_GALILEO_E1B_TELEMETRY_DECODER_H_
#include <string>
#include <gnuradio/msg_queue.h>
#include "telemetry_decoder_interface.h"
#include "galileo_e1b_telemetry_decoder_cc.h"
#include "gnss_satellite.h"
@ -53,8 +52,7 @@ public:
GalileoE1BTelemetryDecoder(ConfigurationInterface* configuration,
std::string role,
unsigned int in_streams,
unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue);
unsigned int out_streams);
virtual ~GalileoE1BTelemetryDecoder();
std::string role()
@ -94,7 +92,6 @@ private:
std::string role_;
unsigned int in_streams_;
unsigned int out_streams_;
boost::shared_ptr<gr::msg_queue> queue_;
};
#endif

View File

@ -50,12 +50,10 @@ using google::LogMessage;
GalileoE5aTelemetryDecoder::GalileoE5aTelemetryDecoder(ConfigurationInterface* configuration,
std::string role,
unsigned int in_streams,
unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue) :
unsigned int out_streams) :
role_(role),
in_streams_(in_streams),
out_streams_(out_streams),
queue_(queue)
out_streams_(out_streams)
{
std::string default_item_type = "gr_complex";
std::string default_dump_filename = "./navigation.dat";
@ -63,7 +61,7 @@ GalileoE5aTelemetryDecoder::GalileoE5aTelemetryDecoder(ConfigurationInterface* c
dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
// make telemetry decoder object
telemetry_decoder_ = galileo_e5a_make_telemetry_decoder_cc(satellite_, queue_, dump_); // TODO fix me
telemetry_decoder_ = galileo_e5a_make_telemetry_decoder_cc(satellite_, dump_); // TODO fix me
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
DLOG(INFO) << "global navigation message queue assigned to telemetry_decoder ("<< telemetry_decoder_->unique_id() << ")";
channel_ = 0;

View File

@ -38,7 +38,6 @@
#define GNSS_SDR_GALILEO_E5A_TELEMETRY_DECODER_H_
#include <string>
#include <gnuradio/msg_queue.h>
#include "telemetry_decoder_interface.h"
#include "galileo_e5a_telemetry_decoder_cc.h"
@ -54,8 +53,7 @@ public:
GalileoE5aTelemetryDecoder(ConfigurationInterface* configuration,
std::string role,
unsigned int in_streams,
unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue);
unsigned int out_streams);
virtual ~GalileoE5aTelemetryDecoder();
std::string role()
@ -95,7 +93,6 @@ private:
std::string role_;
unsigned int in_streams_;
unsigned int out_streams_;
boost::shared_ptr<gr::msg_queue> queue_;
};
#endif /* GNSS_SDR_GALILEO_E5A_TELEMETRY_DECODER_H_ */

View File

@ -45,12 +45,10 @@ using google::LogMessage;
GpsL1CaTelemetryDecoder::GpsL1CaTelemetryDecoder(ConfigurationInterface* configuration,
std::string role,
unsigned int in_streams,
unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue) :
unsigned int out_streams) :
role_(role),
in_streams_(in_streams),
out_streams_(out_streams),
queue_(queue)
out_streams_(out_streams)
{
std::string default_item_type = "gr_complex";
std::string default_dump_filename = "./navigation.dat";
@ -58,7 +56,7 @@ GpsL1CaTelemetryDecoder::GpsL1CaTelemetryDecoder(ConfigurationInterface* configu
dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
// make telemetry decoder object
telemetry_decoder_ = gps_l1_ca_make_telemetry_decoder_cc(satellite_, queue_, dump_); // TODO fix me
telemetry_decoder_ = gps_l1_ca_make_telemetry_decoder_cc(satellite_, dump_); // TODO fix me
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
//decimation factor

View File

@ -34,7 +34,6 @@
#define GNSS_SDR_GPS_L1_CA_TELEMETRY_DECODER_H_
#include <string>
#include <gnuradio/msg_queue.h>
#include "telemetry_decoder_interface.h"
#include "gps_l1_ca_telemetry_decoder_cc.h"
@ -50,8 +49,7 @@ public:
GpsL1CaTelemetryDecoder(ConfigurationInterface* configuration,
std::string role,
unsigned int in_streams,
unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue);
unsigned int out_streams);
virtual ~GpsL1CaTelemetryDecoder();
std::string role()
@ -89,7 +87,6 @@ private:
std::string role_;
unsigned int in_streams_;
unsigned int out_streams_;
boost::shared_ptr<gr::msg_queue> queue_;
};
#endif

View File

@ -46,12 +46,10 @@ using google::LogMessage;
GpsL2MTelemetryDecoder::GpsL2MTelemetryDecoder(ConfigurationInterface* configuration,
std::string role,
unsigned int in_streams,
unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue) :
unsigned int out_streams) :
role_(role),
in_streams_(in_streams),
out_streams_(out_streams),
queue_(queue)
out_streams_(out_streams)
{
std::string default_item_type = "gr_complex";
std::string default_dump_filename = "./navigation.dat";
@ -59,7 +57,7 @@ GpsL2MTelemetryDecoder::GpsL2MTelemetryDecoder(ConfigurationInterface* configura
dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
// make telemetry decoder object
telemetry_decoder_ = gps_l2_m_make_telemetry_decoder_cc(satellite_, queue_, dump_); // TODO fix me
telemetry_decoder_ = gps_l2_m_make_telemetry_decoder_cc(satellite_, dump_); // TODO fix me
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
//decimation factor

View File

@ -34,7 +34,6 @@
#define GNSS_SDR_GPS_L2_M_TELEMETRY_DECODER_H_
#include <string>
#include <gnuradio/msg_queue.h>
#include "telemetry_decoder_interface.h"
#include "gps_l2_m_telemetry_decoder_cc.h"
@ -50,8 +49,7 @@ public:
GpsL2MTelemetryDecoder(ConfigurationInterface* configuration,
std::string role,
unsigned int in_streams,
unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue);
unsigned int out_streams);
virtual ~GpsL2MTelemetryDecoder();
std::string role()
@ -89,7 +87,6 @@ private:
std::string role_;
unsigned int in_streams_;
unsigned int out_streams_;
boost::shared_ptr<gr::msg_queue> queue_;
};
#endif

View File

@ -46,12 +46,10 @@ using google::LogMessage;
SbasL1TelemetryDecoder::SbasL1TelemetryDecoder(ConfigurationInterface* configuration,
std::string role,
unsigned int in_streams,
unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue) :
unsigned int out_streams) :
role_(role),
in_streams_(in_streams),
out_streams_(out_streams),
queue_(queue)
out_streams_(out_streams)
{
std::string default_item_type = "gr_complex";
std::string default_dump_filename = "./navigation.dat";
@ -59,7 +57,7 @@ SbasL1TelemetryDecoder::SbasL1TelemetryDecoder(ConfigurationInterface* configura
dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
// make telemetry decoder object
telemetry_decoder_ = sbas_l1_make_telemetry_decoder_cc(satellite_, queue_, dump_); // TODO fix me
telemetry_decoder_ = sbas_l1_make_telemetry_decoder_cc(satellite_, dump_); // TODO fix me
channel_ = 0;
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
}

View File

@ -34,7 +34,6 @@
#define GNSS_SDR_SBAS_L1_TELEMETRY_DECODER_H_
#include <string>
#include <gnuradio/msg_queue.h>
#include "telemetry_decoder_interface.h"
#include "sbas_l1_telemetry_decoder_cc.h"
@ -51,8 +50,7 @@ public:
SbasL1TelemetryDecoder(ConfigurationInterface* configuration,
std::string role,
unsigned int in_streams,
unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue);
unsigned int out_streams);
virtual ~SbasL1TelemetryDecoder();
std::string role()
@ -92,7 +90,6 @@ private:
std::string role_;
unsigned int in_streams_;
unsigned int out_streams_;
boost::shared_ptr<gr::msg_queue> queue_;
};
#endif

View File

@ -48,9 +48,9 @@ using google::LogMessage;
galileo_e1b_telemetry_decoder_cc_sptr
galileo_e1b_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump)
galileo_e1b_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump)
{
return galileo_e1b_telemetry_decoder_cc_sptr(new galileo_e1b_telemetry_decoder_cc(satellite, queue, dump));
return galileo_e1b_telemetry_decoder_cc_sptr(new galileo_e1b_telemetry_decoder_cc(satellite, dump));
}
@ -115,7 +115,6 @@ void galileo_e1b_telemetry_decoder_cc::deinterleaver(int rows, int cols, double
galileo_e1b_telemetry_decoder_cc::galileo_e1b_telemetry_decoder_cc(
Gnss_Satellite satellite,
boost::shared_ptr<gr::msg_queue> queue,
bool dump) :
gr::block("galileo_e1b_telemetry_decoder_cc", gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
@ -125,7 +124,6 @@ galileo_e1b_telemetry_decoder_cc::galileo_e1b_telemetry_decoder_cc(
// Ephemeris data port out
this->message_port_register_out(pmt::mp("telemetry"));
// initialize internal vars
d_queue = queue;
d_dump = dump;
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
LOG(INFO) << "Initializing GALILEO E1B TELEMETRY PROCESSING";
@ -250,28 +248,26 @@ void galileo_e1b_telemetry_decoder_cc::decode_word(double *page_part_symbols,int
if (d_nav.have_new_ephemeris() == true)
{
// get object for this SV (mandatory)
std::shared_ptr<Galileo_Ephemeris> tmp_obj= std::make_shared<Galileo_Ephemeris>(d_nav.get_ephemeris());
//*tmp_obj = d_nav.get_ephemeris();//notice that the read operation will clear the valid flag
std::shared_ptr<Galileo_Ephemeris> tmp_obj = std::make_shared<Galileo_Ephemeris>(d_nav.get_ephemeris());
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
}
if (d_nav.have_new_iono_and_GST() == true)
{
// get object for this SV (mandatory)
std::shared_ptr<Galileo_Iono> tmp_obj= std::make_shared<Galileo_Iono>(d_nav.get_iono());
//*tmp_obj = d_nav.get_iono(); //notice that the read operation will clear the valid flag
std::shared_ptr<Galileo_Iono> tmp_obj = std::make_shared<Galileo_Iono>(d_nav.get_iono());
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
}
if (d_nav.have_new_utc_model() == true)
{
// get object for this SV (mandatory)
std::shared_ptr<Galileo_Utc_Model> tmp_obj= std::make_shared<Galileo_Utc_Model>(d_nav.get_utc_model());
//*tmp_obj = d_nav.get_utc_model(); //notice that the read operation will clear the valid flag
std::shared_ptr<Galileo_Utc_Model> tmp_obj = std::make_shared<Galileo_Utc_Model>(d_nav.get_utc_model());
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
}
if (d_nav.have_new_almanac() == true)
{
std::shared_ptr<Galileo_Almanac> tmp_obj= std::make_shared<Galileo_Almanac>(d_nav.get_almanac());
//*tmp_obj = d_nav.get_almanac();
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
//debug
std::cout << "Galileo almanac received!" << std::endl;
@ -399,7 +395,9 @@ int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items __attribut
}
}
}
consume_each(1); //one by one
// UPDATE GNSS SYNCHRO DATA
Gnss_Synchro current_synchro_data; //structure to save the synchronization information and send the output object to the next block
//1. Copy the current tracking output
@ -443,7 +441,6 @@ int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items __attribut
d_TOW_at_current_symbol = d_TOW_at_current_symbol + GALILEO_E1_CODE_PERIOD;// + GALILEO_INAV_PAGE_PART_SYMBOLS*GALILEO_E1_CODE_PERIOD;
}
}
else //if there is not a new preamble, we define the TOW of the current symbol
{

View File

@ -35,7 +35,6 @@
#include <fstream>
#include <string>
#include <gnuradio/block.h>
#include <gnuradio/msg_queue.h>
#include "Galileo_E1.h"
#include "concurrent_queue.h"
#include "gnss_satellite.h"
@ -51,7 +50,7 @@ class galileo_e1b_telemetry_decoder_cc;
typedef boost::shared_ptr<galileo_e1b_telemetry_decoder_cc> galileo_e1b_telemetry_decoder_cc_sptr;
galileo_e1b_telemetry_decoder_cc_sptr galileo_e1b_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
galileo_e1b_telemetry_decoder_cc_sptr galileo_e1b_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump);
/*!
* \brief This class implements a block that decodes the INAV data defined in Galileo ICD
@ -64,11 +63,6 @@ public:
void set_satellite(Gnss_Satellite satellite); //!< Set satellite PRN
void set_channel(int channel); //!< Set receiver's channel
int flag_even_word_arrived;
void set_ephemeris_queue(concurrent_queue<Galileo_Ephemeris> *ephemeris_queue); //!< Set the satellite data queue
void set_iono_queue(concurrent_queue<Galileo_Iono> *iono_queue); //!< Set the iono data queue
void set_almanac_queue(concurrent_queue<Galileo_Almanac> *almanac_queue); //!< Set the almanac data queue
void set_utc_model_queue(concurrent_queue<Galileo_Utc_Model> *utc_model_queue); //!< Set the UTC model queue
/*!
* \brief Set decimation factor to average the GPS synchronization estimation output from the tracking module.
*/
@ -88,8 +82,8 @@ public:
private:
friend galileo_e1b_telemetry_decoder_cc_sptr
galileo_e1b_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
galileo_e1b_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
galileo_e1b_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump);
galileo_e1b_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump);
void viterbi_decoder(double *page_part_symbols, int *page_part_bits);
@ -115,7 +109,6 @@ private:
// navigation message vars
Galileo_Navigation_Message d_nav;
boost::shared_ptr<gr::msg_queue> d_queue;
bool d_dump;
Gnss_Satellite d_satellite;
int d_channel;

View File

@ -51,9 +51,9 @@ using google::LogMessage;
galileo_e5a_telemetry_decoder_cc_sptr
galileo_e5a_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump)
galileo_e5a_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump)
{
return galileo_e5a_telemetry_decoder_cc_sptr(new galileo_e5a_telemetry_decoder_cc(satellite, queue, dump));
return galileo_e5a_telemetry_decoder_cc_sptr(new galileo_e5a_telemetry_decoder_cc(satellite, dump));
}
@ -170,29 +170,24 @@ void galileo_e5a_telemetry_decoder_cc::decode_word(double *page_symbols,int fram
// 4. Push the new navigation data to the queues
if (d_nav.have_new_ephemeris() == true)
{
// get ephemeris object for this SV
Galileo_Ephemeris ephemeris = d_nav.get_ephemeris();//notice that the read operation will clear the valid flag
//std::cout<<"New Galileo Ephemeris received for SV "<<d_satellite.get_PRN()<<std::endl;
d_ephemeris_queue->push(ephemeris);
std::shared_ptr<Galileo_Ephemeris> tmp_obj= std::make_shared<Galileo_Ephemeris>(d_nav.get_ephemeris());
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
}
if (d_nav.have_new_iono_and_GST() == true)
{
Galileo_Iono iono = d_nav.get_iono(); //notice that the read operation will clear the valid flag
//std::cout<<"New Galileo IONO model (and UTC) received for SV "<<d_satellite.get_PRN()<<std::endl;
d_iono_queue->push(iono);
std::shared_ptr<Galileo_Iono> tmp_obj= std::make_shared<Galileo_Iono>(d_nav.get_iono());
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
}
if (d_nav.have_new_utc_model() == true)
{
Galileo_Utc_Model utc_model = d_nav.get_utc_model(); //notice that the read operation will clear the valid flag
//std::cout<<"New Galileo UTC model received for SV "<<d_satellite.get_PRN()<<std::endl;
d_utc_model_queue->push(utc_model);
std::shared_ptr<Galileo_Utc_Model> tmp_obj= std::make_shared<Galileo_Utc_Model>(d_nav.get_utc_model());
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
}
}
galileo_e5a_telemetry_decoder_cc::galileo_e5a_telemetry_decoder_cc(
Gnss_Satellite satellite,
boost::shared_ptr<gr::msg_queue> queue,
bool dump) :
gr::block("galileo_e5a_telemetry_decoder_cc", gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
@ -202,7 +197,6 @@ galileo_e5a_telemetry_decoder_cc::galileo_e5a_telemetry_decoder_cc(
// Ephemeris data port out
this->message_port_register_out(pmt::mp("telemetry"));
// initialize internal vars
d_queue = queue;
d_dump = dump;
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
LOG(INFO) << "GALILEO E5A TELEMETRY PROCESSING: satellite " << d_satellite;
@ -260,10 +254,6 @@ galileo_e5a_telemetry_decoder_cc::galileo_e5a_telemetry_decoder_cc(
d_sign_init = 0;
d_flag_preamble = false;
d_ephemeris_queue = 0;
d_iono_queue = 0;
d_utc_model_queue = 0;
d_almanac_queue = 0;
d_channel = 0;
Prn_timestamp_at_preamble_ms = 0;
flag_TOW_set = false;
@ -612,27 +602,3 @@ void galileo_e5a_telemetry_decoder_cc::set_channel(int channel)
}
}
}
void galileo_e5a_telemetry_decoder_cc::set_ephemeris_queue(concurrent_queue<Galileo_Ephemeris> *ephemeris_queue)
{
d_ephemeris_queue = ephemeris_queue;
}
void galileo_e5a_telemetry_decoder_cc::set_iono_queue(concurrent_queue<Galileo_Iono> *iono_queue)
{
d_iono_queue = iono_queue;
}
void galileo_e5a_telemetry_decoder_cc::set_almanac_queue(concurrent_queue<Galileo_Almanac> *almanac_queue)
{
d_almanac_queue = almanac_queue;
}
void galileo_e5a_telemetry_decoder_cc::set_utc_model_queue(concurrent_queue<Galileo_Utc_Model> *utc_model_queue)
{
d_utc_model_queue = utc_model_queue;
}

View File

@ -39,7 +39,6 @@
#include <fstream>
#include <string>
#include <gnuradio/block.h>
#include <gnuradio/msg_queue.h>
#include "Galileo_E5a.h"
#include "concurrent_queue.h"
#include "gnss_satellite.h"
@ -55,7 +54,7 @@ class galileo_e5a_telemetry_decoder_cc;
typedef boost::shared_ptr<galileo_e5a_telemetry_decoder_cc> galileo_e5a_telemetry_decoder_cc_sptr;
galileo_e5a_telemetry_decoder_cc_sptr galileo_e5a_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
galileo_e5a_telemetry_decoder_cc_sptr galileo_e5a_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump);
/*!
@ -68,10 +67,6 @@ public:
~galileo_e5a_telemetry_decoder_cc();
void set_satellite(Gnss_Satellite satellite); //!< Set satellite PRN
void set_channel(int channel); //!< Set receiver's channel
void set_ephemeris_queue(concurrent_queue<Galileo_Ephemeris> *ephemeris_queue); //!< Set the satellite data queue
void set_iono_queue(concurrent_queue<Galileo_Iono> *iono_queue); //!< Set the iono data queue
void set_almanac_queue(concurrent_queue<Galileo_Almanac> *almanac_queue); //!< Set the almanac data queue
void set_utc_model_queue(concurrent_queue<Galileo_Utc_Model> *utc_model_queue); //!< Set the UTC model queue
/*!
* \brief This is where all signal processing takes place
*/
@ -86,8 +81,8 @@ public:
private:
friend galileo_e5a_telemetry_decoder_cc_sptr
galileo_e5a_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
galileo_e5a_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
galileo_e5a_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump);
galileo_e5a_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump);
void viterbi_decoder(double *page_part_symbols, int *page_part_bits);
@ -117,16 +112,6 @@ private:
// navigation message vars
Galileo_Fnav_Message d_nav;
// Galileo ephemeris queue
concurrent_queue<Galileo_Ephemeris> *d_ephemeris_queue;
// ionospheric parameters queue
concurrent_queue<Galileo_Iono> *d_iono_queue;
// UTC model parameters queue
concurrent_queue<Galileo_Utc_Model> *d_utc_model_queue;
// Almanac queue
concurrent_queue<Galileo_Almanac> *d_almanac_queue;
boost::shared_ptr<gr::msg_queue> d_queue;
bool d_dump;
Gnss_Satellite d_satellite;
int d_channel;

View File

@ -44,9 +44,9 @@
using google::LogMessage;
gps_l1_ca_telemetry_decoder_cc_sptr
gps_l1_ca_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump)
gps_l1_ca_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump)
{
return gps_l1_ca_telemetry_decoder_cc_sptr(new gps_l1_ca_telemetry_decoder_cc(satellite, queue, dump));
return gps_l1_ca_telemetry_decoder_cc_sptr(new gps_l1_ca_telemetry_decoder_cc(satellite, dump));
}
void gps_l1_ca_telemetry_decoder_cc::forecast (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items_required)
@ -56,7 +56,6 @@ void gps_l1_ca_telemetry_decoder_cc::forecast (int noutput_items __attribute__((
gps_l1_ca_telemetry_decoder_cc::gps_l1_ca_telemetry_decoder_cc(
Gnss_Satellite satellite,
boost::shared_ptr<gr::msg_queue> queue,
bool dump) :
gr::block("gps_navigation_cc", gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
@ -66,7 +65,6 @@ gps_l1_ca_telemetry_decoder_cc::gps_l1_ca_telemetry_decoder_cc(
// Ephemeris data port out
this->message_port_register_out(pmt::mp("telemetry"));
// initialize internal vars
d_queue = queue;
d_dump = dump;
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
@ -282,7 +280,6 @@ int gps_l1_ca_telemetry_decoder_cc::general_work (int noutput_items __attribute_
{
// get ephemeris object for this SV (mandatory)
std::shared_ptr<Gps_Ephemeris> tmp_obj = std::make_shared<Gps_Ephemeris>(d_GPS_FSM.d_nav.get_ephemeris());
// *tmp_obj = d_GPS_FSM.d_nav.get_ephemeris();
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
}
break;
@ -290,13 +287,11 @@ int gps_l1_ca_telemetry_decoder_cc::general_work (int noutput_items __attribute_
if (d_GPS_FSM.d_nav.flag_iono_valid == true)
{
std::shared_ptr<Gps_Iono> tmp_obj = std::make_shared<Gps_Iono>( d_GPS_FSM.d_nav.get_iono());
// *tmp_obj = d_GPS_FSM.d_nav.get_iono(); //notice that the read operation will clear the valid flag
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
}
if (d_GPS_FSM.d_nav.flag_utc_model_valid == true)
{
std::shared_ptr<Gps_Utc_Model> tmp_obj = std::make_shared<Gps_Utc_Model>(d_GPS_FSM.d_nav.get_utc_model());
//*tmp_obj = d_GPS_FSM.d_nav.get_utc_model(); //notice that the read operation will clear the valid flag
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
}
break;

View File

@ -34,7 +34,6 @@
#include <fstream>
#include <string>
#include <gnuradio/block.h>
#include <gnuradio/msg_queue.h>
#include <deque>
#include "GPS_L1_CA.h"
#include "gps_l1_ca_subframe_fsm.h"
@ -48,7 +47,7 @@ class gps_l1_ca_telemetry_decoder_cc;
typedef boost::shared_ptr<gps_l1_ca_telemetry_decoder_cc> gps_l1_ca_telemetry_decoder_cc_sptr;
gps_l1_ca_telemetry_decoder_cc_sptr
gps_l1_ca_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
gps_l1_ca_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump);
/*!
* \brief This class implements a block that decodes the NAV data defined in IS-GPS-200E
@ -60,18 +59,11 @@ public:
~gps_l1_ca_telemetry_decoder_cc();
void set_satellite(Gnss_Satellite satellite); //!< Set satellite PRN
void set_channel(int channel); //!< Set receiver's channel
/*!
* \brief Set decimation factor to average the GPS synchronization estimation output from the tracking module.
*/
void set_decimation(int decimation);
/*!
* \brief Set the satellite data queue
*/
void set_almanac_queue(concurrent_queue<Gps_Almanac> *almanac_queue){d_GPS_FSM.d_almanac_queue = almanac_queue;} //!< Set the almanac data queue
/*!
* \brief This is where all signal processing takes place
*/
@ -86,9 +78,9 @@ public:
private:
friend gps_l1_ca_telemetry_decoder_cc_sptr
gps_l1_ca_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
gps_l1_ca_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump);
gps_l1_ca_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
gps_l1_ca_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump);
bool gps_word_parityCheck(unsigned int gpsword);
@ -123,7 +115,6 @@ private:
Gps_Navigation_Message d_nav;
GpsL1CaSubframeFsm d_GPS_FSM;
boost::shared_ptr<gr::msg_queue> d_queue;
bool d_dump;
Gnss_Satellite d_satellite;
int d_channel;

View File

@ -48,16 +48,15 @@ using google::LogMessage;
gps_l2_m_telemetry_decoder_cc_sptr
gps_l2_m_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump)
gps_l2_m_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump)
{
return gps_l2_m_telemetry_decoder_cc_sptr(new gps_l2_m_telemetry_decoder_cc(satellite, queue, dump));
return gps_l2_m_telemetry_decoder_cc_sptr(new gps_l2_m_telemetry_decoder_cc(satellite, dump));
}
gps_l2_m_telemetry_decoder_cc::gps_l2_m_telemetry_decoder_cc(
Gnss_Satellite satellite,
boost::shared_ptr<gr::msg_queue> queue __attribute__((unused)),
bool dump) :
gr::block("gps_l2_m_telemetry_decoder_cc",
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
@ -78,8 +77,6 @@ gps_l2_m_telemetry_decoder_cc::gps_l2_m_telemetry_decoder_cc(
d_flag_invert_buffer_symbols = false;
d_flag_invert_input_symbols = false;
d_channel = 0;
d_iono_queue = 0;
d_ephemeris_queue = 0;
d_flag_valid_word = false;
d_TOW_at_current_symbol = 0;
d_TOW_at_Preamble = 0;
@ -203,15 +200,16 @@ int gps_l2_m_telemetry_decoder_cc::general_work (int noutput_items __attribute__
if (d_CNAV_Message.have_new_ephemeris() == true)
{
// get ephemeris object for this SV
Gps_CNAV_Ephemeris ephemeris = d_CNAV_Message.get_ephemeris(); //notice that the read operation will clear the valid flag
std::cout << "New GPS CNAV Ephemeris received for SV " << ephemeris.i_satellite_PRN << std::endl;
d_ephemeris_queue->push(ephemeris);
std::shared_ptr<Gps_CNAV_Ephemeris> tmp_obj= std::make_shared<Gps_CNAV_Ephemeris>(d_CNAV_Message.get_ephemeris());
std::cout << "New GPS CNAV Ephemeris received for SV " << tmp_obj->i_satellite_PRN << std::endl;
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
}
if (d_CNAV_Message.have_new_iono() == true)
{
Gps_CNAV_Iono iono = d_CNAV_Message.get_iono(); //notice that the read operation will clear the valid flag
std::shared_ptr<Gps_CNAV_Iono> tmp_obj= std::make_shared<Gps_CNAV_Iono>(d_CNAV_Message.get_iono());
std::cout << "New GPS CNAV IONO model received for SV " << d_satellite.get_PRN() << std::endl;
d_iono_queue->push(iono);
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
}
}
break;
@ -434,7 +432,6 @@ void gps_l2_m_telemetry_decoder_cc::crc_verifier::reset()
}
void gps_l2_m_telemetry_decoder_cc::crc_verifier::get_valid_frames(const std::vector<msg_candiate_int_t> & msg_candidates, std::vector<msg_candiate_int_t> & valid_msgs)
{
std::vector <unsigned char> tmp_msg;
@ -461,7 +458,6 @@ void gps_l2_m_telemetry_decoder_cc::crc_verifier::get_valid_frames(const std::ve
}
void gps_l2_m_telemetry_decoder_cc::crc_verifier::zerropad_back_and_convert_to_bytes(const std::vector<int> & msg_candidate, std::vector<unsigned char> & bytes)
{
//std::stringstream ss;
@ -487,8 +483,6 @@ void gps_l2_m_telemetry_decoder_cc::crc_verifier::zerropad_back_and_convert_to_b
// << std::setfill(' ') << std::resetiosflags(std::ios::hex);
}
void gps_l2_m_telemetry_decoder_cc::crc_verifier::zerropad_front_and_convert_to_bytes(const std::vector<int> & msg_candidate, std::vector<unsigned char> & bytes)
{
//std::stringstream ss;
@ -515,14 +509,3 @@ void gps_l2_m_telemetry_decoder_cc::crc_verifier::zerropad_front_and_convert_to_
// << std::setfill(' ') << std::resetiosflags(std::ios::hex);
}
void gps_l2_m_telemetry_decoder_cc::set_iono_queue(concurrent_queue<Gps_CNAV_Iono> *iono_queue)
{
d_iono_queue = iono_queue;
}
void gps_l2_m_telemetry_decoder_cc::set_ephemeris_queue(concurrent_queue<Gps_CNAV_Ephemeris> *ephemeris_queue)
{
d_ephemeris_queue = ephemeris_queue;
}

View File

@ -39,7 +39,6 @@
#include <vector>
#include <boost/crc.hpp>
#include <gnuradio/block.h>
#include <gnuradio/msg_queue.h>
#include "gnss_satellite.h"
#include "viterbi_decoder.h"
#include "gps_cnav_navigation_message.h"
@ -53,7 +52,7 @@ class gps_l2_m_telemetry_decoder_cc;
typedef boost::shared_ptr<gps_l2_m_telemetry_decoder_cc> gps_l2_m_telemetry_decoder_cc_sptr;
gps_l2_m_telemetry_decoder_cc_sptr
gps_l2_m_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
gps_l2_m_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump);
/*!
* \brief This class implements a block that decodes the SBAS integrity and corrections data defined in RTCA MOPS DO-229
@ -65,11 +64,6 @@ public:
~gps_l2_m_telemetry_decoder_cc();
void set_satellite(Gnss_Satellite satellite); //!< Set satellite PRN
void set_channel(int channel); //!< Set receiver's channel
// queues to communicate broadcasted CNAV data to other blocks of GNSS-SDR
void set_iono_queue(concurrent_queue<Gps_CNAV_Iono> *iono_queue); //!< Set iono queue
void set_ephemeris_queue(concurrent_queue<Gps_CNAV_Ephemeris> *ephemeris_queue); //!< Set ephemeris queue
void set_decimation(int decimation);
/*!
@ -86,15 +80,12 @@ public:
private:
friend gps_l2_m_telemetry_decoder_cc_sptr
gps_l2_m_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
gps_l2_m_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
gps_l2_m_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump);
gps_l2_m_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump);
void viterbi_decoder(double *page_part_symbols, int *page_part_bits);
void align_samples();
concurrent_queue<Gps_CNAV_Iono> *d_iono_queue;
concurrent_queue<Gps_CNAV_Ephemeris> *d_ephemeris_queue;
bool d_dump;
Gnss_Satellite d_satellite;
int d_channel;

View File

@ -48,16 +48,15 @@ using google::LogMessage;
sbas_l1_telemetry_decoder_cc_sptr
sbas_l1_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump)
sbas_l1_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump)
{
return sbas_l1_telemetry_decoder_cc_sptr(new sbas_l1_telemetry_decoder_cc(satellite, queue, dump));
return sbas_l1_telemetry_decoder_cc_sptr(new sbas_l1_telemetry_decoder_cc(satellite, dump));
}
sbas_l1_telemetry_decoder_cc::sbas_l1_telemetry_decoder_cc(
Gnss_Satellite satellite,
boost::shared_ptr<gr::msg_queue> queue __attribute__((unused)),
bool dump) :
gr::block("sbas_l1_telemetry_decoder_cc",
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),

View File

@ -39,7 +39,6 @@
#include <vector>
#include <boost/crc.hpp>
#include <gnuradio/block.h>
#include <gnuradio/msg_queue.h>
#include "gnss_satellite.h"
#include "viterbi_decoder.h"
#include "sbas_telemetry_data.h"
@ -49,7 +48,7 @@ class sbas_l1_telemetry_decoder_cc;
typedef boost::shared_ptr<sbas_l1_telemetry_decoder_cc> sbas_l1_telemetry_decoder_cc_sptr;
sbas_l1_telemetry_decoder_cc_sptr
sbas_l1_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
sbas_l1_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump);
/*!
* \brief This class implements a block that decodes the SBAS integrity and corrections data defined in RTCA MOPS DO-229
@ -76,8 +75,8 @@ public:
private:
friend sbas_l1_telemetry_decoder_cc_sptr
sbas_l1_make_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
sbas_l1_telemetry_decoder_cc(Gnss_Satellite satellite, boost::shared_ptr<gr::msg_queue> queue, bool dump);
sbas_l1_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump);
sbas_l1_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump);
void viterbi_decoder(double *page_part_symbols, int *page_part_bits);
void align_samples();

View File

@ -57,13 +57,7 @@
#include "control_message_factory.h"
extern concurrent_map<Gps_Acq_Assist> global_gps_acq_assist_map;
extern concurrent_map<Gps_Ref_Time> global_gps_ref_time_map;
extern concurrent_map<Gps_Ref_Location> global_gps_ref_location_map;
extern concurrent_queue<Gps_Acq_Assist> global_gps_acq_assist_queue;
extern concurrent_queue<Gps_Ref_Location> global_gps_ref_location_queue;
extern concurrent_queue<Gps_Ref_Time> global_gps_ref_time_queue;
using google::LogMessage;
@ -94,7 +88,6 @@ ControlThread::~ControlThread()
}
/*
* Runs the control thread that manages the receiver control plane
*
@ -131,12 +124,6 @@ void ControlThread::run()
// start the keyboard_listener thread
keyboard_thread_ = boost::thread(&ControlThread::keyboard_listener, this);
//start the GNSS SV data collector thread
gps_acq_assist_data_collector_thread_= boost::thread(&ControlThread::gps_acq_assist_data_collector, this);
gps_ref_location_data_collector_thread_ = boost::thread(&ControlThread::gps_ref_location_data_collector, this);
gps_ref_time_data_collector_thread_ = boost::thread(&ControlThread::gps_ref_time_data_collector, this);
// Main loop to read and process the control messages
while (flowgraph_->running() && !stop_)
{
@ -147,15 +134,6 @@ void ControlThread::run()
std::cout << "Stopping GNSS-SDR, please wait!" << std::endl;
flowgraph_->stop();
stop_ = true;
// sending empty data to terminate the threads
global_gps_acq_assist_queue.push(Gps_Acq_Assist());
global_gps_ref_location_queue.push(Gps_Ref_Location());
global_gps_ref_time_queue.push(Gps_Ref_Time());
// Join GPS threads
gps_acq_assist_data_collector_thread_.join();
gps_ref_location_data_collector_thread_.join();
gps_ref_time_data_collector_thread_.join();
//Join keyboard thread
#ifdef OLD_BOOST
@ -183,89 +161,94 @@ void ControlThread::set_control_queue(boost::shared_ptr<gr::msg_queue> control_q
/*
* Returns true if reading was successful
*/
//bool ControlThread::read_assistance_from_XML()
//{
// // return variable (true == succeeded)
// bool ret = false;
// // getting names from the config file, if available
// std::string eph_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_ephemeris_xml", eph_default_xml_filename);
// std::string utc_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_utc_model.xml", utc_default_xml_filename);
// std::string iono_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_iono_xml", iono_default_xml_filename);
// std::string ref_time_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_ref_time_xml", ref_time_default_xml_filename);
// std::string ref_location_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_ref_location_xml", ref_location_default_xml_filename);
//
// std::cout << "SUPL: Try read GPS ephemeris from XML file " << eph_xml_filename << std::endl;
// if (supl_client_ephemeris_.load_ephemeris_xml(eph_xml_filename) == true)
// {
// std::map<int,Gps_Ephemeris>::iterator gps_eph_iter;
// for(gps_eph_iter = supl_client_ephemeris_.gps_ephemeris_map.begin();
// gps_eph_iter != supl_client_ephemeris_.gps_ephemeris_map.end();
// gps_eph_iter++)
// {
// std::cout << "SUPL: Read XML Ephemeris for GPS SV " << gps_eph_iter->first << std::endl;
// global_gps_ephemeris_queue.push(gps_eph_iter->second);
// }
// ret = true;
// }
// else
// {
// std::cout << "ERROR: SUPL client error reading XML" << std::endl;
// std::cout << "Disabling SUPL assistance..." << std::endl;
// }
// // Only look for {utc, iono, ref time, ref location} if SUPL is enabled
// bool enable_gps_supl_assistance = configuration_->property("GNSS-SDR.SUPL_gps_enabled", false);
// if (enable_gps_supl_assistance == true)
// {
// // Try to read UTC model from XML
// if (supl_client_acquisition_.load_utc_xml(utc_xml_filename) == true)
// {
// LOG(INFO) << "SUPL: Read XML UTC model";
// global_gps_utc_model_queue.push(supl_client_acquisition_.gps_utc);
// }
// else
// {
// LOG(INFO) << "SUPL: couldn't read UTC model XML";
// }
//
// // Try to read Iono model from XML
// if (supl_client_acquisition_.load_iono_xml(iono_xml_filename) == true)
// {
// LOG(INFO) << "SUPL: Read XML IONO model";
// global_gps_iono_queue.push(supl_client_acquisition_.gps_iono);
// }
// else
// {
// LOG(INFO) << "SUPL: couldn't read IONO model XML";
// }
//
// // Try to read Ref Time from XML
// if (supl_client_acquisition_.load_ref_time_xml(ref_time_xml_filename) == true)
// {
// LOG(INFO) << "SUPL: Read XML Ref Time";
// global_gps_ref_time_queue.push(supl_client_acquisition_.gps_time);
// }
// else
// {
// LOG(INFO) << "SUPL: couldn't read Ref Time XML";
// }
//
// // Try to read Ref Location from XML
// if (supl_client_acquisition_.load_ref_location_xml(ref_location_xml_filename) == true)
// {
// LOG(INFO) << "SUPL: Read XML Ref Location";
// global_gps_ref_location_queue.push(supl_client_acquisition_.gps_ref_loc);
// }
// else
// {
// LOG(INFO) << "SUPL: couldn't read Ref Location XML";
// }
// }
//
// return ret;
//}
bool ControlThread::read_assistance_from_XML()
{
// return variable (true == succeeded)
bool ret = false;
// getting names from the config file, if available
std::string eph_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_ephemeris_xml", eph_default_xml_filename);
std::string utc_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_utc_model.xml", utc_default_xml_filename);
std::string iono_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_iono_xml", iono_default_xml_filename);
std::string ref_time_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_ref_time_xml", ref_time_default_xml_filename);
std::string ref_location_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_ref_location_xml", ref_location_default_xml_filename);
std::cout << "SUPL: Try read GPS ephemeris from XML file " << eph_xml_filename << std::endl;
if (supl_client_ephemeris_.load_ephemeris_xml(eph_xml_filename) == true)
{
std::map<int,Gps_Ephemeris>::iterator gps_eph_iter;
for(gps_eph_iter = supl_client_ephemeris_.gps_ephemeris_map.begin();
gps_eph_iter != supl_client_ephemeris_.gps_ephemeris_map.end();
gps_eph_iter++)
{
std::cout << "SUPL: Read XML Ephemeris for GPS SV " << gps_eph_iter->first << std::endl;
std::shared_ptr<Gps_Ephemeris> tmp_obj= std::make_shared<Gps_Ephemeris>(gps_eph_iter->second);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
}
ret = true;
}
else
{
std::cout << "ERROR: SUPL client error reading XML" << std::endl;
std::cout << "Disabling SUPL assistance..." << std::endl;
}
// Only look for {utc, iono, ref time, ref location} if SUPL is enabled
bool enable_gps_supl_assistance = configuration_->property("GNSS-SDR.SUPL_gps_enabled", false);
if (enable_gps_supl_assistance == true)
{
// Try to read UTC model from XML
if (supl_client_acquisition_.load_utc_xml(utc_xml_filename) == true)
{
LOG(INFO) << "SUPL: Read XML UTC model";
std::shared_ptr<Gps_Utc_Model> tmp_obj= std::make_shared<Gps_Utc_Model>(supl_client_acquisition_.gps_utc);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
}
else
{
LOG(INFO) << "SUPL: couldn't read UTC model XML";
}
// Try to read Iono model from XML
if (supl_client_acquisition_.load_iono_xml(iono_xml_filename) == true)
{
LOG(INFO) << "SUPL: Read XML IONO model";
std::shared_ptr<Gps_Iono> tmp_obj= std::make_shared<Gps_Iono>(supl_client_acquisition_.gps_iono);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
}
else
{
LOG(INFO) << "SUPL: couldn't read IONO model XML";
}
// Try to read Ref Time from XML
if (supl_client_acquisition_.load_ref_time_xml(ref_time_xml_filename) == true)
{
LOG(INFO) << "SUPL: Read XML Ref Time";
std::shared_ptr<Gps_Ref_Time> tmp_obj= std::make_shared<Gps_Ref_Time>(supl_client_acquisition_.gps_time);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
}
else
{
LOG(INFO) << "SUPL: couldn't read Ref Time XML";
}
// Try to read Ref Location from XML
if (supl_client_acquisition_.load_ref_location_xml(ref_location_xml_filename) == true)
{
LOG(INFO) << "SUPL: Read XML Ref Location";
std::shared_ptr<Gps_Ref_Location> tmp_obj= std::make_shared<Gps_Ref_Location>(supl_client_acquisition_.gps_ref_loc);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
}
else
{
LOG(INFO) << "SUPL: couldn't read Ref Location XML";
}
}
return ret;
}
// Returns true if reading was successful
//todo: The save assistance function needs to be moved to the PVT block because now the global maps are deprecated, and PVT is the only block that have all the information
//bool ControlThread::save_assistance_to_XML()
//{
// // return variable (true == succeeded)
@ -413,10 +396,8 @@ void ControlThread::init()
gps_eph_iter++)
{
std::cout << "SUPL: Received Ephemeris for GPS SV " << gps_eph_iter->first << std::endl;
//TODO: Now the ephemeris are transported from telemetry decoder to PVT using msg queues.
// in order to assist the receiver, it is needed to produce a GNURadio message from this thread to the PVT message queue
// global queues or maps are deprecated in this version
//global_gps_ephemeris_map.write(gps_eph_iter->second.i_satellite_PRN, gps_eph_iter->second);
std::shared_ptr<Gps_Ephemeris> tmp_obj= std::make_shared<Gps_Ephemeris>(gps_eph_iter->second);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
}
//Save ephemeris to XML file
std::string eph_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_ephemeris_xml", eph_default_xml_filename);
@ -452,20 +433,20 @@ void ControlThread::init()
gps_alm_iter++)
{
std::cout << "SUPL: Received Almanac for GPS SV " << gps_alm_iter->first << std::endl;
//TODO: use msg queues
//global_gps_almanac_queue.push(gps_alm_iter->second);
std::shared_ptr<Gps_Almanac> tmp_obj= std::make_shared<Gps_Almanac>(gps_alm_iter->second);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
}
if (supl_client_ephemeris_.gps_iono.valid == true)
{
std::cout << "SUPL: Received GPS Iono" << std::endl;
//TODO: use msg queues
//global_gps_iono_map.write(0, supl_client_ephemeris_.gps_iono);
std::shared_ptr<Gps_Iono> tmp_obj= std::make_shared<Gps_Iono>(supl_client_ephemeris_.gps_iono);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
}
if (supl_client_ephemeris_.gps_utc.valid == true)
{
std::cout << "SUPL: Received GPS UTC Model" << std::endl;
//TODO: use msg queues
//global_gps_utc_model_map.write(0, supl_client_ephemeris_.gps_utc);
std::shared_ptr<Gps_Utc_Model> tmp_obj= std::make_shared<Gps_Utc_Model>(supl_client_ephemeris_.gps_utc);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
}
}
else
@ -492,12 +473,14 @@ void ControlThread::init()
if (supl_client_acquisition_.gps_ref_loc.valid == true)
{
std::cout << "SUPL: Received Ref Location (Acquisition Assistance)" << std::endl;
global_gps_ref_location_map.write(0, supl_client_acquisition_.gps_ref_loc);
std::shared_ptr<Gps_Ref_Location> tmp_obj= std::make_shared<Gps_Ref_Location>(supl_client_acquisition_.gps_ref_loc);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
}
if (supl_client_acquisition_.gps_time.valid == true)
{
std::cout << "SUPL: Received Ref Time (Acquisition Assistance)" << std::endl;
global_gps_ref_time_map.write(0, supl_client_acquisition_.gps_time);
std::shared_ptr<Gps_Ref_Time> tmp_obj= std::make_shared<Gps_Ref_Time>(supl_client_acquisition_.gps_time);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
}
}
else
@ -596,52 +579,6 @@ void ControlThread::gps_acq_assist_data_collector()
}
}
void ControlThread::gps_ref_location_data_collector()
{
// ############ READ REF LOCATION ####################
Gps_Ref_Location gps_ref_location;
while(stop_ == false)
{
global_gps_ref_location_queue.wait_and_pop(gps_ref_location);
LOG(INFO) << "New ref location record has arrived with lat=" << gps_ref_location.lat << " lon=" << gps_ref_location.lon;
// insert new ref location record to the global ref location map
global_gps_ref_location_map.write(0, gps_ref_location);
}
}
void ControlThread::gps_ref_time_data_collector()
{
// ############ READ REF TIME ####################
Gps_Ref_Time gps_ref_time;
Gps_Ref_Time gps_ref_time_old;
while(stop_ == false)
{
global_gps_ref_time_queue.wait_and_pop(gps_ref_time);
LOG(INFO) << "New ref time record has arrived with TOW=" << gps_ref_time.d_TOW << " Week=" << gps_ref_time.d_Week;
// insert new ref time record to the global ref time map
if (global_gps_ref_time_map.read(0, gps_ref_time_old))
{
if (gps_ref_time.d_Week > gps_ref_time_old.d_Week)
{
global_gps_ref_time_map.write(0, gps_ref_time);
}
else if ((gps_ref_time.d_Week == gps_ref_time_old.d_Week) and (gps_ref_time.d_TOW > gps_ref_time_old.d_TOW))
{
global_gps_ref_time_map.write(0, gps_ref_time);
}
else
{
LOG(INFO) << "Not updating the existing ref time";
}
}
else
{
// insert new ref time record
global_gps_ref_time_map.write(0, gps_ref_time);
}
}
}
void ControlThread::keyboard_listener()
{

View File

@ -124,7 +124,7 @@ private:
void init();
// Read {ephemeris, iono, utc, ref loc, ref time} assistance from a local XML file previously recorded
//bool read_assistance_from_XML();
bool read_assistance_from_XML();
// Save {ephemeris, iono, utc, ref loc, ref time} assistance to a local XML file
//bool save_assistance_to_XML();
@ -133,41 +133,11 @@ private:
void process_control_messages();
/*
* \brief Blocking function that reads the ref location queue and updates the shared map
*/
void gps_ref_location_data_collector();
/*
* \brief Blocking function that reads the ref time queue and updates the shared map
*/
void gps_ref_time_data_collector();
/*
* Blocking function that reads the GPS assistance queue
*/
void gps_acq_assist_data_collector();
/*
* Blocking function that reads the Galileo ephemeris queue and updates the shared ephemeris map, accessible from the PVT block
*/
void galileo_ephemeris_data_collector();
/*
* Blocking function that reads the UTC model queue and updates the shared map, accessible from the PVT block
*/
void galileo_utc_model_data_collector();
/*
* Blocking function that reads the iono data queue and updates the shared map, accessible from the PVT block
*/
void galileo_iono_data_collector();
/*
* Blocking function that reads the galileo_almanac queue and updates the shared map, accessible from the PVT block
*/
void galileo_almanac_data_collector();
void apply_action(unsigned int what);
std::shared_ptr<GNSSFlowgraph> flowgraph_;
std::shared_ptr<ConfigurationInterface> configuration_;
@ -179,15 +149,8 @@ private:
unsigned int processed_control_messages_;
unsigned int applied_actions_;
boost::thread keyboard_thread_;
boost::thread gps_acq_assist_data_collector_thread_;
boost::thread gps_ref_location_data_collector_thread_;
boost::thread gps_ref_time_data_collector_thread_;
boost::thread galileo_ephemeris_data_collector_thread_;
boost::thread galileo_utc_model_data_collector_thread_;
boost::thread galileo_iono_data_collector_thread_;
boost::thread galileo_almanac_data_collector_thread_;
void keyboard_listener();
// default filename for assistance data

View File

@ -310,7 +310,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_GPS(
std::unique_ptr<GNSSBlockInterface> pass_through_ = GetBlock(configuration, "Channel", "Pass_Through", 1, 1, queue);
std::unique_ptr<AcquisitionInterface> acq_ = GetAcqBlock(configuration, "Acquisition_GPS" + appendix1, acq, 1, 0, queue);
std::unique_ptr<TrackingInterface> trk_ = GetTrkBlock(configuration, "Tracking_GPS" + appendix2, trk, 1, 1, queue);
std::unique_ptr<TelemetryDecoderInterface> tlm_ = GetTlmBlock(configuration, "TelemetryDecoder_GPS" + appendix3, tlm, 1, 1, queue);
std::unique_ptr<TelemetryDecoderInterface> tlm_ = GetTlmBlock(configuration, "TelemetryDecoder_GPS" + appendix3, tlm, 1, 1);
std::unique_ptr<GNSSBlockInterface> channel_(new Channel(configuration.get(), channel, pass_through_.release(),
acq_.release(),
@ -365,7 +365,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_1C(
std::unique_ptr<GNSSBlockInterface> pass_through_ = GetBlock(configuration, "Channel", "Pass_Through", 1, 1, queue);
std::unique_ptr<AcquisitionInterface> acq_ = GetAcqBlock(configuration, "Acquisition_1C" + appendix1, acq, 1, 0, queue);
std::unique_ptr<TrackingInterface> trk_ = GetTrkBlock(configuration, "Tracking_1C"+ appendix2, trk, 1, 1, queue);
std::unique_ptr<TelemetryDecoderInterface> tlm_ = GetTlmBlock(configuration, "TelemetryDecoder_1C" + appendix3, tlm, 1, 1, queue);
std::unique_ptr<TelemetryDecoderInterface> tlm_ = GetTlmBlock(configuration, "TelemetryDecoder_1C" + appendix3, tlm, 1, 1);
std::unique_ptr<GNSSBlockInterface> channel_(new Channel(configuration.get(), channel, pass_through_.release(),
acq_.release(),
@ -420,7 +420,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_2S(
std::unique_ptr<AcquisitionInterface> acq_ = GetAcqBlock(configuration, "Acquisition_2S" + appendix1 , acq, 1, 0, queue);
std::unique_ptr<TrackingInterface> trk_ = GetTrkBlock(configuration, "Tracking_2S" + appendix2, trk, 1, 1, queue);
std::unique_ptr<TelemetryDecoderInterface> tlm_ = GetTlmBlock(configuration, "TelemetryDecoder_2S" + appendix3, tlm, 1, 1, queue);
std::unique_ptr<TelemetryDecoderInterface> tlm_ = GetTlmBlock(configuration, "TelemetryDecoder_2S" + appendix3, tlm, 1, 1);
std::unique_ptr<GNSSBlockInterface> channel_(new Channel(configuration.get(), channel, pass_through_.release(),
acq_.release(),
@ -476,7 +476,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_Galileo(
std::unique_ptr<GNSSBlockInterface> pass_through_ = GetBlock(configuration, "Channel", "Pass_Through", 1, 1, queue);
std::unique_ptr<AcquisitionInterface> acq_ = GetAcqBlock(configuration, "Acquisition_Galileo" + appendix1, acq, 1, 0, queue);
std::unique_ptr<TrackingInterface> trk_ = GetTrkBlock(configuration, "Tracking_Galileo" + appendix2, trk, 1, 1, queue);
std::unique_ptr<TelemetryDecoderInterface> tlm_ = GetTlmBlock(configuration, "TelemetryDecoder_Galileo" + appendix3, tlm, 1, 1, queue);
std::unique_ptr<TelemetryDecoderInterface> tlm_ = GetTlmBlock(configuration, "TelemetryDecoder_Galileo" + appendix3, tlm, 1, 1);
std::unique_ptr<GNSSBlockInterface> channel_(new Channel(configuration.get(), channel, pass_through_.release(),
acq_.release(),
@ -532,7 +532,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_1B(
std::unique_ptr<GNSSBlockInterface> pass_through_ = GetBlock(configuration, "Channel", "Pass_Through", 1, 1, queue);
std::unique_ptr<AcquisitionInterface> acq_ = GetAcqBlock(configuration, "Acquisition_1B" + appendix1, acq, 1, 0, queue);
std::unique_ptr<TrackingInterface> trk_ = GetTrkBlock(configuration, "Tracking_1B" + appendix2, trk, 1, 1, queue);
std::unique_ptr<TelemetryDecoderInterface> tlm_ = GetTlmBlock(configuration, "TelemetryDecoder_1B" + appendix3, tlm, 1, 1, queue);
std::unique_ptr<TelemetryDecoderInterface> tlm_ = GetTlmBlock(configuration, "TelemetryDecoder_1B" + appendix3, tlm, 1, 1);
std::unique_ptr<GNSSBlockInterface> channel_(new Channel(configuration.get(), channel, pass_through_.release(),
acq_.release(),
@ -588,7 +588,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_5X(
std::unique_ptr<GNSSBlockInterface> pass_through_ = GetBlock(configuration, "Channel", "Pass_Through", 1, 1, queue);
std::unique_ptr<AcquisitionInterface> acq_ = GetAcqBlock(configuration, "Acquisition_5X" + appendix1, acq, 1, 0, queue);
std::unique_ptr<TrackingInterface> trk_ = GetTrkBlock(configuration, "Tracking_5X" + appendix2, trk, 1, 1, queue);
std::unique_ptr<TelemetryDecoderInterface> tlm_ = GetTlmBlock(configuration, "TelemetryDecoder_5X" + appendix3, tlm, 1, 1, queue);
std::unique_ptr<TelemetryDecoderInterface> tlm_ = GetTlmBlock(configuration, "TelemetryDecoder_5X" + appendix3, tlm, 1, 1);
std::unique_ptr<GNSSBlockInterface> channel_(new Channel(configuration.get(), channel, pass_through_.release(),
acq_.release(),
@ -1213,7 +1213,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
else if (implementation.compare("GPS_L1_CA_PCPS_Acquisition") == 0)
{
std::unique_ptr<GNSSBlockInterface> block_(new GpsL1CaPcpsAcquisition(configuration.get(), role, in_streams,
out_streams, queue));
out_streams));
block = std::move(block_);
}
else if (implementation.compare("GPS_L1_CA_PCPS_Assisted_Acquisition") == 0)
@ -1259,7 +1259,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
else if (implementation.compare("Galileo_E1_PCPS_Ambiguous_Acquisition") == 0)
{
std::unique_ptr<GNSSBlockInterface> block_(new GalileoE1PcpsAmbiguousAcquisition(configuration.get(), role, in_streams,
out_streams, queue));
out_streams));
block = std::move(block_);
}
else if (implementation.compare("Galileo_E1_PCPS_8ms_Ambiguous_Acquisition") == 0)
@ -1340,25 +1340,25 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
else if (implementation.compare("GPS_L1_CA_Telemetry_Decoder") == 0)
{
std::unique_ptr<GNSSBlockInterface> block_(new GpsL1CaTelemetryDecoder(configuration.get(), role, in_streams,
out_streams, queue));
out_streams));
block = std::move(block_);
}
else if (implementation.compare("Galileo_E1B_Telemetry_Decoder") == 0)
{
std::unique_ptr<GNSSBlockInterface> block_(new GalileoE1BTelemetryDecoder(configuration.get(), role, in_streams,
out_streams, queue));
out_streams));
block = std::move(block_);
}
else if (implementation.compare("SBAS_L1_Telemetry_Decoder") == 0)
{
std::unique_ptr<GNSSBlockInterface> block_(new SbasL1TelemetryDecoder(configuration.get(), role, in_streams,
out_streams, queue));
out_streams));
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));
out_streams));
block = std::move(block_);
}
@ -1366,45 +1366,45 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
else if (implementation.compare("GPS_L1_CA_Observables") == 0)
{
std::unique_ptr<GNSSBlockInterface> block_(new GpsL1CaObservables(configuration.get(), role, in_streams,
out_streams, queue));
out_streams));
block = std::move(block_);
}
else if (implementation.compare("Galileo_E1B_Observables") == 0)
{
std::unique_ptr<GNSSBlockInterface> block_(new GalileoE1Observables(configuration.get(), role, in_streams,
out_streams, queue));
out_streams));
block = std::move(block_);
}
else if (implementation.compare("Hybrid_Observables") == 0)
{
std::unique_ptr<GNSSBlockInterface> block_(new HybridObservables(configuration.get(), role, in_streams,
out_streams, queue));
out_streams));
block = std::move(block_);
}
else if (implementation.compare("Mixed_Observables") == 0)
{
std::unique_ptr<GNSSBlockInterface> block_(new MixedObservables(configuration.get(), role, in_streams,
out_streams, queue));
out_streams));
block = std::move(block_);
}
// PVT -------------------------------------------------------------------------
else if (implementation.compare("GPS_L1_CA_PVT") == 0)
{
std::unique_ptr<GNSSBlockInterface> block_(new GpsL1CaPvt(configuration.get(), role, in_streams,
out_streams, queue));
out_streams));
block = std::move(block_);
}
else if (implementation.compare("GALILEO_E1_PVT") == 0)
{
std::unique_ptr<GNSSBlockInterface> block_(new GalileoE1Pvt(configuration.get(), role, in_streams,
out_streams, queue));
out_streams));
block = std::move(block_);
}
else if (implementation.compare("Hybrid_PVT") == 0)
{
std::unique_ptr<GNSSBlockInterface> block_(new HybridPvt(configuration.get(), role, in_streams,
out_streams, queue));
out_streams));
block = std::move(block_);
}
else
@ -1435,7 +1435,7 @@ std::unique_ptr<AcquisitionInterface> GNSSBlockFactory::GetAcqBlock(
if (implementation.compare("GPS_L1_CA_PCPS_Acquisition") == 0)
{
std::unique_ptr<AcquisitionInterface> block_(new GpsL1CaPcpsAcquisition(configuration.get(), role, in_streams,
out_streams, queue));
out_streams));
block = std::move(block_);
}
else if (implementation.compare("GPS_L1_CA_PCPS_Assisted_Acquisition") == 0)
@ -1481,13 +1481,13 @@ std::unique_ptr<AcquisitionInterface> GNSSBlockFactory::GetAcqBlock(
else if (implementation.compare("GPS_L2_M_PCPS_Acquisition") == 0)
{
std::unique_ptr<AcquisitionInterface> block_(new GpsL2MPcpsAcquisition(configuration.get(), role, in_streams,
out_streams, queue));
out_streams));
block = std::move(block_);
}
else if (implementation.compare("Galileo_E1_PCPS_Ambiguous_Acquisition") == 0)
{
std::unique_ptr<AcquisitionInterface> block_(new GalileoE1PcpsAmbiguousAcquisition(configuration.get(), role, in_streams,
out_streams, queue));
out_streams));
block = std::move(block_);
}
else if (implementation.compare("Galileo_E1_PCPS_8ms_Ambiguous_Acquisition") == 0)
@ -1602,7 +1602,7 @@ std::unique_ptr<TelemetryDecoderInterface> GNSSBlockFactory::GetTlmBlock(
std::shared_ptr<ConfigurationInterface> configuration,
std::string role,
std::string implementation, unsigned int in_streams,
unsigned int out_streams, boost::shared_ptr<gr::msg_queue> queue)
unsigned int out_streams)
{
std::unique_ptr<TelemetryDecoderInterface> block;
@ -1610,31 +1610,31 @@ std::unique_ptr<TelemetryDecoderInterface> GNSSBlockFactory::GetTlmBlock(
if (implementation.compare("GPS_L1_CA_Telemetry_Decoder") == 0)
{
std::unique_ptr<TelemetryDecoderInterface> block_(new GpsL1CaTelemetryDecoder(configuration.get(), role, in_streams,
out_streams, queue));
out_streams));
block = std::move(block_);
}
else if (implementation.compare("Galileo_E1B_Telemetry_Decoder") == 0)
{
std::unique_ptr<TelemetryDecoderInterface> block_(new GalileoE1BTelemetryDecoder(configuration.get(), role, in_streams,
out_streams, queue));
out_streams));
block = std::move(block_);
}
else if (implementation.compare("SBAS_L1_Telemetry_Decoder") == 0)
{
std::unique_ptr<TelemetryDecoderInterface> block_(new SbasL1TelemetryDecoder(configuration.get(), role, in_streams,
out_streams, queue));
out_streams));
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));
out_streams));
block = std::move(block_);
}
else if (implementation.compare("GPS_L2_M_Telemetry_Decoder") == 0)
{
std::unique_ptr<TelemetryDecoderInterface> block_(new GpsL2MTelemetryDecoder(configuration.get(), role, in_streams,
out_streams, queue));
out_streams));
block = std::move(block_);
}
else

View File

@ -125,7 +125,7 @@ private:
std::shared_ptr<ConfigurationInterface> configuration,
std::string role,
std::string implementation, unsigned int in_streams,
unsigned int out_streams, boost::shared_ptr<gr::msg_queue> queue);
unsigned int out_streams);
};
#endif /*GNSS_SDR_BLOCK_FACTORY_H_*/

View File

@ -357,6 +357,14 @@ void GNSSFlowgraph::wait()
}
bool GNSSFlowgraph::send_telemetry_msg(pmt::pmt_t msg)
{
//push ephemeris to PVT telemetry msg in port using a channel out port
// it uses the first channel as a message produces (it is already connected to PVT)
channels_.at(0)->get_right_block()->message_port_pub(pmt::mp("telemetry"), msg);
return true;
}
/*
* Applies an action to the flowgraph
*

View File

@ -107,7 +107,12 @@ public:
{
return running_;
}
/*!
* \brief Sends a GNURadio asyncronous message from telemetry to PVT
*
* It is used to assist the receiver with external ephemeris data
*/
bool send_telemetry_msg(pmt::pmt_t msg);
private:
void init(); // Populates the SV PRN list available for acquisition and tracking
void set_signals_list();

View File

@ -85,12 +85,7 @@ DECLARE_string(log_dir);
// For GPS NAVIGATION (L1)
concurrent_queue<Gps_Acq_Assist> global_gps_acq_assist_queue;
concurrent_queue<Gps_Ref_Location> global_gps_ref_location_queue;
concurrent_queue<Gps_Ref_Time> global_gps_ref_time_queue;
concurrent_map<Gps_Acq_Assist> global_gps_acq_assist_map;
concurrent_map<Gps_Ref_Time> global_gps_ref_time_map;
concurrent_map<Gps_Ref_Location> global_gps_ref_location_map;
int main(int argc, char** argv)
{

View File

@ -361,7 +361,7 @@ void GpsL1CaPcpsAcquisitionGSoC2013Test::stop_queue()
TEST_F(GpsL1CaPcpsAcquisitionGSoC2013Test, Instantiate)
{
config_1();
acquisition = new GpsL1CaPcpsAcquisition(config.get(), "Acquisition", 1, 1, queue);
acquisition = new GpsL1CaPcpsAcquisition(config.get(), "Acquisition", 1, 1);
delete acquisition;
}
@ -375,7 +375,7 @@ TEST_F(GpsL1CaPcpsAcquisitionGSoC2013Test, ConnectAndRun)
top_block = gr::make_top_block("Acquisition test");
config_1();
acquisition = new GpsL1CaPcpsAcquisition(config.get(), "Acquisition", 1, 1, queue);
acquisition = new GpsL1CaPcpsAcquisition(config.get(), "Acquisition", 1, 1);
ASSERT_NO_THROW( {
acquisition->connect(top_block);
@ -404,7 +404,7 @@ TEST_F(GpsL1CaPcpsAcquisitionGSoC2013Test, ValidationOfResults)
queue = gr::msg_queue::make(0);
top_block = gr::make_top_block("Acquisition test");
acquisition = new GpsL1CaPcpsAcquisition(config.get(), "Acquisition", 1, 1, queue);
acquisition = new GpsL1CaPcpsAcquisition(config.get(), "Acquisition", 1, 1);
ASSERT_NO_THROW( {
acquisition->set_channel(1);
@ -501,7 +501,7 @@ TEST_F(GpsL1CaPcpsAcquisitionGSoC2013Test, ValidationOfResultsProbabilities)
config_2();
queue = gr::msg_queue::make(0);
top_block = gr::make_top_block("Acquisition test");
acquisition = new GpsL1CaPcpsAcquisition(config.get(), "Acquisition", 1, 1, queue);
acquisition = new GpsL1CaPcpsAcquisition(config.get(), "Acquisition", 1, 1);
ASSERT_NO_THROW( {
acquisition->set_channel(1);

View File

@ -136,7 +136,7 @@ TEST_F(GpsL1CaPcpsAcquisitionTest, Instantiate)
{
init();
queue = gr::msg_queue::make(0);
std::shared_ptr<GpsL1CaPcpsAcquisition> acquisition = std::make_shared<GpsL1CaPcpsAcquisition>(config.get(), "Acquisition", 1, 1, queue);
std::shared_ptr<GpsL1CaPcpsAcquisition> acquisition = std::make_shared<GpsL1CaPcpsAcquisition>(config.get(), "Acquisition", 1, 1);
}
TEST_F(GpsL1CaPcpsAcquisitionTest, ConnectAndRun)
@ -150,7 +150,7 @@ TEST_F(GpsL1CaPcpsAcquisitionTest, ConnectAndRun)
queue = gr::msg_queue::make(0);
init();
std::shared_ptr<GpsL1CaPcpsAcquisition> acquisition = std::make_shared<GpsL1CaPcpsAcquisition>(config.get(), "Acquisition", 1, 1, queue);
std::shared_ptr<GpsL1CaPcpsAcquisition> acquisition = std::make_shared<GpsL1CaPcpsAcquisition>(config.get(), "Acquisition", 1, 1);
ASSERT_NO_THROW( {
acquisition->connect(top_block);
@ -183,7 +183,7 @@ TEST_F(GpsL1CaPcpsAcquisitionTest, ValidationOfResults)
double expected_doppler_hz = 1680;
init();
start_queue();
std::shared_ptr<GpsL1CaPcpsAcquisition> acquisition = std::make_shared<GpsL1CaPcpsAcquisition>(config.get(), "Acquisition", 1, 1, queue);
std::shared_ptr<GpsL1CaPcpsAcquisition> acquisition = std::make_shared<GpsL1CaPcpsAcquisition>(config.get(), "Acquisition", 1, 1);
ASSERT_NO_THROW( {

View File

@ -148,7 +148,7 @@ TEST_F(GpsL2MPcpsAcquisitionTest, Instantiate)
{
init();
queue = gr::msg_queue::make(0);
std::shared_ptr<GpsL2MPcpsAcquisition> acquisition = std::make_shared<GpsL2MPcpsAcquisition>(config.get(), "Acquisition", 1, 1, queue);
std::shared_ptr<GpsL2MPcpsAcquisition> acquisition = std::make_shared<GpsL2MPcpsAcquisition>(config.get(), "Acquisition", 1, 1);
}
TEST_F(GpsL2MPcpsAcquisitionTest, ConnectAndRun)
@ -160,7 +160,7 @@ TEST_F(GpsL2MPcpsAcquisitionTest, ConnectAndRun)
queue = gr::msg_queue::make(0);
init();
std::shared_ptr<GpsL2MPcpsAcquisition> acquisition = std::make_shared<GpsL2MPcpsAcquisition>(config.get(), "Acquisition", 1, 1, queue);
std::shared_ptr<GpsL2MPcpsAcquisition> acquisition = std::make_shared<GpsL2MPcpsAcquisition>(config.get(), "Acquisition", 1, 1);
ASSERT_NO_THROW( {
acquisition->connect(top_block);
@ -194,7 +194,7 @@ TEST_F(GpsL2MPcpsAcquisitionTest, ValidationOfResults)
double expected_doppler_hz = 1200;//3000;
init();
start_queue();
std::shared_ptr<GpsL2MPcpsAcquisition> acquisition = std::make_shared<GpsL2MPcpsAcquisition>(config.get(), "Acquisition", 1, 1, queue);
std::shared_ptr<GpsL2MPcpsAcquisition> acquisition = std::make_shared<GpsL2MPcpsAcquisition>(config.get(), "Acquisition", 1, 1);
ASSERT_NO_THROW( {

View File

@ -88,12 +88,6 @@ std::string s3_ = s1_ + s2_;
DEFINE_string(config_file, s3_,
"Path to the file containing the configuration parameters");
concurrent_queue<Gps_Ephemeris> global_gps_ephemeris_queue;
concurrent_queue<Gps_Iono> global_gps_iono_queue;
concurrent_queue<Gps_Utc_Model> global_gps_utc_model_queue;
concurrent_queue<Gps_Almanac> global_gps_almanac_queue;
concurrent_queue<Gps_Acq_Assist> global_gps_acq_assist_queue;
concurrent_map<Gps_Ephemeris> global_gps_ephemeris_map;
concurrent_map<Gps_Iono> global_gps_iono_map;
concurrent_map<Gps_Utc_Model> global_gps_utc_model_map;