mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-13 19:50:34 +00:00
Make PVT a sink block and add RINEX printer configuration
This commit is contained in:
parent
0b6affe38b
commit
6f89f89bf2
@ -68,6 +68,14 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration,
|
||||
std::string nmea_dump_filename = configuration->property(role + ".nmea_dump_filename", default_nmea_dump_filename);
|
||||
std::string nmea_dump_devname = configuration->property(role + ".nmea_dump_devname", default_nmea_dump_devname);
|
||||
|
||||
// RINEX version
|
||||
int rinex_version = configuration->property(role + ".rinex_version", 3);
|
||||
if( (rinex_version < 2) || (rinex_version > 3) )
|
||||
{
|
||||
//warn user and set the default
|
||||
rinex_version = 3;
|
||||
}
|
||||
|
||||
// RTCM Printer settings
|
||||
bool flag_rtcm_tty_port = configuration->property(role + ".flag_rtcm_tty_port", false);
|
||||
std::string rtcm_dump_devname = configuration->property(role + ".rtcm_dump_devname", default_rtcm_dump_devname);
|
||||
@ -303,7 +311,7 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration,
|
||||
rtklib_options = rtklib_configuration_options;
|
||||
|
||||
// make PVT object
|
||||
pvt_ = rtklib_make_pvt_cc(in_streams_, dump_, dump_filename_, output_rate_ms, display_rate_ms, flag_nmea_tty_port, nmea_dump_filename, nmea_dump_devname, flag_rtcm_server, flag_rtcm_tty_port, rtcm_tcp_port, rtcm_station_id, rtcm_msg_rate_ms, rtcm_dump_devname, type_of_receiver, rtklib_options);
|
||||
pvt_ = rtklib_make_pvt_cc(in_streams_, dump_, dump_filename_, output_rate_ms, display_rate_ms, flag_nmea_tty_port, nmea_dump_filename, nmea_dump_devname, rinex_version, flag_rtcm_server, flag_rtcm_tty_port, rtcm_tcp_port, rtcm_station_id, rtcm_msg_rate_ms, rtcm_dump_devname, type_of_receiver, rtklib_options);
|
||||
DLOG(INFO) << "pvt(" << pvt_->unique_id() << ")";
|
||||
}
|
||||
|
||||
|
@ -43,8 +43,8 @@
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
rtklib_pvt_cc_sptr
|
||||
rtklib_make_pvt_cc(unsigned int nchannels,
|
||||
|
||||
rtklib_pvt_cc_sptr rtklib_make_pvt_cc(unsigned int nchannels,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
int output_rate_ms,
|
||||
@ -52,6 +52,7 @@ rtklib_make_pvt_cc(unsigned int nchannels,
|
||||
bool flag_nmea_tty_port,
|
||||
std::string nmea_dump_filename,
|
||||
std::string nmea_dump_devname,
|
||||
int rinex_version,
|
||||
bool flag_rtcm_server,
|
||||
bool flag_rtcm_tty_port,
|
||||
unsigned short rtcm_tcp_port,
|
||||
@ -69,6 +70,7 @@ rtklib_make_pvt_cc(unsigned int nchannels,
|
||||
flag_nmea_tty_port,
|
||||
nmea_dump_filename,
|
||||
nmea_dump_devname,
|
||||
rinex_version,
|
||||
flag_rtcm_server,
|
||||
flag_rtcm_tty_port,
|
||||
rtcm_tcp_port,
|
||||
@ -198,10 +200,10 @@ std::map<int,Gps_Ephemeris> rtklib_pvt_cc::get_GPS_L1_ephemeris_map()
|
||||
|
||||
rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels, bool dump, std::string dump_filename,
|
||||
int output_rate_ms, int display_rate_ms, bool flag_nmea_tty_port,
|
||||
std::string nmea_dump_filename, std::string nmea_dump_devname,
|
||||
std::string nmea_dump_filename, std::string nmea_dump_devname, int rinex_version,
|
||||
bool flag_rtcm_server, bool flag_rtcm_tty_port, unsigned short rtcm_tcp_port,
|
||||
unsigned short rtcm_station_id, std::map<int,int> rtcm_msg_rate_ms, std::string rtcm_dump_devname, const unsigned int type_of_receiver, const prcopt_t rtklib_opt) :
|
||||
gr::block("rtklib_pvt_cc", gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)),
|
||||
gr::sync_block("rtklib_pvt_cc", gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)),
|
||||
gr::io_signature::make(0, 0, 0))
|
||||
{
|
||||
d_output_rate_ms = output_rate_ms;
|
||||
@ -291,7 +293,7 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels, bool dump, std::string dump
|
||||
|
||||
b_rinex_header_written = false;
|
||||
b_rinex_header_updated = false;
|
||||
rp = std::make_shared<Rinex_Printer>();
|
||||
rp = std::make_shared<Rinex_Printer>(rinex_version);
|
||||
|
||||
d_last_status_print_seg = 0;
|
||||
|
||||
@ -325,7 +327,6 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels, bool dump, std::string dump
|
||||
}
|
||||
|
||||
|
||||
|
||||
rtklib_pvt_cc::~rtklib_pvt_cc()
|
||||
{
|
||||
msgctl(sysv_msqid, IPC_RMID, NULL);
|
||||
@ -424,10 +425,10 @@ bool rtklib_pvt_cc::send_sys_v_ttff_msg(ttff_msgbuf ttff)
|
||||
}
|
||||
|
||||
|
||||
int rtklib_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items __attribute__((unused)))
|
||||
int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items __attribute__((unused)))
|
||||
{
|
||||
for(int epoch = 0; epoch < ninput_items[0]; epoch++)
|
||||
for(int epoch = 0; epoch < noutput_items; epoch++)
|
||||
{
|
||||
bool flag_display_pvt = false;
|
||||
bool flag_compute_pvt_output = false;
|
||||
@ -1150,6 +1151,5 @@ int rtklib_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
|
||||
}
|
||||
}
|
||||
|
||||
consume_each(ninput_items[0]);
|
||||
return noutput_items;
|
||||
}
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/msg.h>
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/sync_block.h>
|
||||
#include "nmea_printer.h"
|
||||
#include "kml_printer.h"
|
||||
#include "geojson_printer.h"
|
||||
@ -58,6 +58,7 @@ rtklib_pvt_cc_sptr rtklib_make_pvt_cc(unsigned int n_channels,
|
||||
bool flag_nmea_tty_port,
|
||||
std::string nmea_dump_filename,
|
||||
std::string nmea_dump_devname,
|
||||
int rinex_version,
|
||||
bool flag_rtcm_server,
|
||||
bool flag_rtcm_tty_port,
|
||||
unsigned short rtcm_tcp_port,
|
||||
@ -70,7 +71,7 @@ rtklib_pvt_cc_sptr rtklib_make_pvt_cc(unsigned int n_channels,
|
||||
/*!
|
||||
* \brief This class implements a block that computes the PVT solution with Galileo E1 signals
|
||||
*/
|
||||
class rtklib_pvt_cc : public gr::block
|
||||
class rtklib_pvt_cc : public gr::sync_block
|
||||
{
|
||||
private:
|
||||
friend rtklib_pvt_cc_sptr rtklib_make_pvt_cc(unsigned int nchannels,
|
||||
@ -81,21 +82,7 @@ private:
|
||||
bool flag_nmea_tty_port,
|
||||
std::string nmea_dump_filename,
|
||||
std::string nmea_dump_devname,
|
||||
bool flag_rtcm_server,
|
||||
bool flag_rtcm_tty_port,
|
||||
unsigned short rtcm_tcp_port,
|
||||
unsigned short rtcm_station_id,
|
||||
std::map<int,int> rtcm_msg_rate_ms,
|
||||
std::string rtcm_dump_devname,
|
||||
const unsigned int type_of_receiver,
|
||||
const prcopt_t rtklib_opt);
|
||||
rtklib_pvt_cc(unsigned int nchannels,
|
||||
bool dump, std::string dump_filename,
|
||||
int output_rate_ms,
|
||||
int display_rate_ms,
|
||||
bool flag_nmea_tty_port,
|
||||
std::string nmea_dump_filename,
|
||||
std::string nmea_dump_devname,
|
||||
int rinex_version,
|
||||
bool flag_rtcm_server,
|
||||
bool flag_rtcm_tty_port,
|
||||
unsigned short rtcm_tcp_port,
|
||||
@ -125,8 +112,6 @@ private:
|
||||
|
||||
int d_output_rate_ms;
|
||||
int d_display_rate_ms;
|
||||
//long unsigned int d_sample_counter;
|
||||
//long unsigned int d_last_sample_nav_output;
|
||||
|
||||
std::shared_ptr<Rinex_Printer> rp;
|
||||
std::shared_ptr<Kml_Printer> d_kml_dump;
|
||||
@ -159,6 +144,23 @@ private:
|
||||
bool send_sys_v_ttff_msg(ttff_msgbuf ttff);
|
||||
|
||||
public:
|
||||
rtklib_pvt_cc(unsigned int nchannels,
|
||||
bool dump, std::string dump_filename,
|
||||
int output_rate_ms,
|
||||
int display_rate_ms,
|
||||
bool flag_nmea_tty_port,
|
||||
std::string nmea_dump_filename,
|
||||
std::string nmea_dump_devname,
|
||||
int rinex_version,
|
||||
bool flag_rtcm_server,
|
||||
bool flag_rtcm_tty_port,
|
||||
unsigned short rtcm_tcp_port,
|
||||
unsigned short rtcm_station_id,
|
||||
std::map<int,int> rtcm_msg_rate_ms,
|
||||
std::string rtcm_dump_devname,
|
||||
const unsigned int type_of_receiver,
|
||||
const prcopt_t rtklib_opt);
|
||||
|
||||
/*!
|
||||
* \brief Get latest set of GPS L1 ephemeris from PVT block
|
||||
*
|
||||
@ -166,10 +168,10 @@ public:
|
||||
*/
|
||||
std::map<int,Gps_Ephemeris> get_GPS_L1_ephemeris_map();
|
||||
|
||||
~rtklib_pvt_cc (); //!< Default destructor
|
||||
~rtklib_pvt_cc(); //!< Default destructor
|
||||
|
||||
int general_work (int noutput_items, gr_vector_int &ninput_items,
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); //!< PVT Signal Processing
|
||||
int work (int noutput_items, gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items); //!< PVT Signal Processing
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user