1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 04:30:33 +00:00

Pass rtk struct to PVT block instead of opt_t

This commit is contained in:
Carles Fernandez 2017-04-30 16:06:01 +02:00
parent b5d3f626f4
commit d127f6adb8
4 changed files with 78 additions and 11 deletions

View File

@ -308,10 +308,51 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration,
{} /* char pppopt[256] ppp option */ {} /* char pppopt[256] ppp option */
}; };
rtklib_options = rtklib_configuration_options; sol_t sol_ = {{0,0}, {0,0,0,0,0,0}, {0,0,0,0,0,0}, {0,0,0,0,0,0}, '0', '0', '0', 0, 0, 0 };
ambc_t ambc_ = { {{0,0}, {0,0}, {0,0}, {0,0}}, {0, 0, 0, 0}, {}, {}, 0, {'0'}};
ssat_t ssat_ = { '0', /* navigation system */
'0', /* valid satellite flag single */
{0.0}, /* azel[2] azimuth/elevation angles {az,el} (rad) */
{0.0}, /* residuals of pseudorange (m) */
{0.0}, /* residuals of carrier-phase (m) */
{'0'}, /* valid satellite flag */
{'0'}, /* signal strength (0.25 dBHz) */
{'0'}, /* ambiguity fix flag (1:fix,2:float,3:hold) */
{'0'}, /* cycle-slip flag */
{'0'}, /* half-cycle valid flag */
{}, /* lock counter of phase */
{}, /* obs outage counter of phase */
{}, /* cycle-slip counter */
{}, /* reject counter */
0.0, /* geometry-free phase L1-L2 (m) */
0.0, /* geometry-free phase L1-L5 (m) */
0.0, /* MW-LC (m) */
0.0, /* phase windup (cycle) */
{{{0,0}},{{0,0}}}, /* previous carrier-phase time */
{{},{}} /* previous carrier-phase observable (cycle) */
};
rtk = { sol_, /* RTK solution */
{}, /* base position/velocity (ecef) (m|m/s) */
0, /* number of float states */
0, /* number of fixed states */
output_rate_ms / 1000.0, /* time difference between current and previous (s) */
{}, /* float states */
{}, /* float states covariance */
{}, /* fixed states */
{}, /* fixed states covariance */
3, /* number of continuous fixes of ambiguity */
{ambc_}, /* ambiguity control */
{ssat_}, /* satellite status */
0, /* bytes in error message buffer */
{'0'}, /* error message buffer */
rtklib_configuration_options /* processing options */
};
// make PVT object // 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, 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); 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, rtk);
DLOG(INFO) << "pvt(" << pvt_->unique_id() << ")"; DLOG(INFO) << "pvt(" << pvt_->unique_id() << ")";
} }

View File

@ -58,7 +58,7 @@ public:
return role_; return role_;
} }
//! Returns "Hybrid_Pvt" //! Returns "RTKLIB_Pvt"
std::string implementation() std::string implementation()
{ {
return "RTKLIB_PVT"; return "RTKLIB_PVT";
@ -82,7 +82,33 @@ public:
private: private:
rtklib_pvt_cc_sptr pvt_; rtklib_pvt_cc_sptr pvt_;
prcopt_t rtklib_options;
sol_t sol_ = {{0,0}, {0,0,0,0,0,0}, {0,0,0,0,0,0}, {0,0,0,0,0,0}, '0', '0', '0', 0, 0, 0 };
ambc_t ambc_ = { {{0,0}, {0,0}, {0,0}, {0,0}}, {0, 0, 0, 0}, {}, {}, 0, {'0'}};
ssat_t ssat_ = { '0', /* navigation system */
'0', /* valid satellite flag single */
{0.0}, /* azel[2] azimuth/elevation angles {az,el} (rad) */
{0.0}, /* residuals of pseudorange (m) */
{0.0}, /* residuals of carrier-phase (m) */
{'0'}, /* valid satellite flag */
{'0'}, /* signal strength (0.25 dBHz) */
{'0'}, /* ambiguity fix flag (1:fix,2:float,3:hold) */
{'0'}, /* cycle-slip flag */
{'0'}, /* half-cycle valid flag */
{}, /* lock counter of phase */
{}, /* obs outage counter of phase */
{}, /* cycle-slip counter */
{}, /* reject counter */
0.0, /* geometry-free phase L1-L2 (m) */
0.0, /* geometry-free phase L1-L5 (m) */
0.0, /* MW-LC (m) */
0.0, /* phase windup (cycle) */
{{{0,0}},{{0,0}}}, /* previous carrier-phase time */
{{},{}} /* previous carrier-phase observable (cycle) */
};
rtk_t rtk;
bool dump_; bool dump_;
std::string dump_filename_; std::string dump_filename_;
std::string role_; std::string role_;

View File

@ -60,7 +60,7 @@ rtklib_pvt_cc_sptr rtklib_make_pvt_cc(unsigned int nchannels,
std::map<int,int> rtcm_msg_rate_ms, std::map<int,int> rtcm_msg_rate_ms,
std::string rtcm_dump_devname, std::string rtcm_dump_devname,
const unsigned int type_of_receiver, const unsigned int type_of_receiver,
const prcopt_t rtklib_opt) rtk_t & rtk)
{ {
return rtklib_pvt_cc_sptr(new rtklib_pvt_cc(nchannels, return rtklib_pvt_cc_sptr(new rtklib_pvt_cc(nchannels,
dump, dump,
@ -78,7 +78,7 @@ rtklib_pvt_cc_sptr rtklib_make_pvt_cc(unsigned int nchannels,
rtcm_msg_rate_ms, rtcm_msg_rate_ms,
rtcm_dump_devname, rtcm_dump_devname,
type_of_receiver, type_of_receiver,
rtklib_opt)); rtk));
} }
@ -202,7 +202,7 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels, bool dump, std::string dump
int output_rate_ms, int display_rate_ms, bool flag_nmea_tty_port, 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, 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, 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) : unsigned short rtcm_station_id, std::map<int,int> rtcm_msg_rate_ms, std::string rtcm_dump_devname, const unsigned int type_of_receiver, rtk_t & rtk) :
gr::sync_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)) gr::io_signature::make(0, 0, 0))
{ {
@ -214,7 +214,7 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels, bool dump, std::string dump
std::string dump_ls_pvt_filename = dump_filename; std::string dump_ls_pvt_filename = dump_filename;
type_of_rx = type_of_receiver; type_of_rx = type_of_receiver;
rtklib_options = rtklib_opt; rtklib_options = rtk.opt;
// GPS Ephemeris data message port in // GPS Ephemeris data message port in
this->message_port_register_in(pmt::mp("telemetry")); this->message_port_register_in(pmt::mp("telemetry"));

View File

@ -67,7 +67,7 @@ rtklib_pvt_cc_sptr rtklib_make_pvt_cc(unsigned int n_channels,
std::map<int,int> rtcm_msg_rate_ms, std::map<int,int> rtcm_msg_rate_ms,
std::string rtcm_dump_devname, std::string rtcm_dump_devname,
const unsigned int type_of_receiver, const unsigned int type_of_receiver,
prcopt_t rtklib_opt); rtk_t & rtk);
/*! /*!
* \brief This class implements a block that computes the PVT solution with Galileo E1 signals * \brief This class implements a block that computes the PVT solution with Galileo E1 signals
@ -91,7 +91,7 @@ private:
std::map<int,int> rtcm_msg_rate_ms, std::map<int,int> rtcm_msg_rate_ms,
std::string rtcm_dump_devname, std::string rtcm_dump_devname,
const unsigned int type_of_receiver, const unsigned int type_of_receiver,
const prcopt_t rtklib_opt); rtk_t & rtk);
void msg_handler_telemetry(pmt::pmt_t msg); void msg_handler_telemetry(pmt::pmt_t msg);
@ -162,7 +162,7 @@ public:
std::map<int,int> rtcm_msg_rate_ms, std::map<int,int> rtcm_msg_rate_ms,
std::string rtcm_dump_devname, std::string rtcm_dump_devname,
const unsigned int type_of_receiver, const unsigned int type_of_receiver,
const prcopt_t rtklib_opt); rtk_t & rtk);
/*! /*!
* \brief Get latest set of GPS L1 ephemeris from PVT block * \brief Get latest set of GPS L1 ephemeris from PVT block