Skip to content

Commit

Permalink
Merge branch 'next' of git+ssh://github.com/gnss-sdr/gnss-sdr into next
Browse files Browse the repository at this point in the history
  • Loading branch information
carlesfernandez committed Apr 13, 2016
2 parents 4a18121 + bd60379 commit 2b71750
Show file tree
Hide file tree
Showing 72 changed files with 418 additions and 702 deletions.
24 changes: 12 additions & 12 deletions conf/gnss-sdr_Hybrid_short.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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



Expand Down Expand Up @@ -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

Expand All @@ -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;
Expand Down Expand Up @@ -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

Expand Down
16 changes: 7 additions & 9 deletions src/algorithms/PVT/adapters/galileo_e1_pvt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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() << ")";
}

Expand All @@ -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()
Expand Down
5 changes: 1 addition & 4 deletions src/algorithms/PVT/adapters/galileo_e1_pvt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -51,8 +50,7 @@ class GalileoE1Pvt : public PvtInterface
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();

Expand Down Expand Up @@ -91,7 +89,6 @@ class GalileoE1Pvt : public PvtInterface
std::string role_;
unsigned int in_streams_;
unsigned int out_streams_;
boost::shared_ptr<gr::msg_queue> queue_;
};

#endif
17 changes: 8 additions & 9 deletions src/algorithms/PVT/adapters/gps_l1_ca_pvt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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() << ")";
}

Expand All @@ -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_;
Expand Down
5 changes: 1 addition & 4 deletions src/algorithms/PVT/adapters/gps_l1_ca_pvt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -53,8 +52,7 @@ class GpsL1CaPvt : public PvtInterface
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();

Expand Down Expand Up @@ -92,7 +90,6 @@ class GpsL1CaPvt : public PvtInterface
std::string role_;
unsigned int in_streams_;
unsigned int out_streams_;
boost::shared_ptr<gr::msg_queue> queue_;
};

#endif
17 changes: 8 additions & 9 deletions src/algorithms/PVT/adapters/hybrid_pvt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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() << ")";
}

Expand All @@ -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_;
Expand Down
5 changes: 1 addition & 4 deletions src/algorithms/PVT/adapters/hybrid_pvt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -51,8 +50,7 @@ class HybridPvt : public PvtInterface
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();

Expand Down Expand Up @@ -90,7 +88,6 @@ class HybridPvt : public PvtInterface
std::string role_;
unsigned int in_streams_;
unsigned int out_streams_;
boost::shared_ptr<gr::msg_queue> queue_;
};

#endif
36 changes: 20 additions & 16 deletions src/algorithms/PVT/gnuradio_blocks/galileo_e1_pvt_cc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down Expand Up @@ -90,33 +91,35 @@ 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)))
{

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;
std::string dump_ls_pvt_filename = dump_filename;

// 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;
Expand Down Expand Up @@ -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)))
{
Expand Down
Loading

0 comments on commit 2b71750

Please sign in to comment.