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

Move RTKLIB configuration options struct to the adapter

This commit is contained in:
Carles Fernandez 2017-04-26 15:20:15 +02:00
parent eedc9a4300
commit 7c6b18a00c
6 changed files with 44 additions and 36 deletions

View File

@ -166,8 +166,32 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration,
if( (gps_1C_count != 0) && (gps_2S_count != 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0)) type_of_receiver = 21;
//if( (gps_1C_count == 0) && (gps_2S_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count = 0)) type_of_receiver = 22;
//RTKLIB PVT solver options
/* defaults processing options */
rtklib_options={PMODE_SINGLE,0,2,SYS_GPS, /* mode,soltype,nf,navsys */
15.0*D2R, { {}, {{},{}} }, /* elmin,snrmask */
0,1,1,1, /* sateph,modear,glomodear,bdsmodear */
5,0,10,1, /* maxout,minlock,minfix,armaxiter */
0,0,0,0, /* estion,esttrop,dynamics,tidecorr */
1,0,0,0,0, /* niter,codesmooth,intpref,sbascorr,sbassatsel */
0,0, /* rovpos,refpos */
{100.0,100.0,100.0}, /* eratio[] */
{100.0,0.003,0.003,0.0,1.0}, /* err[] */
{30.0,0.03,0.3}, /* std[] */
{1e-4,1e-3,1e-4,1e-1,1e-2,0.0}, /* prn[] */
5e-12, /* sclkstab */
{3.0,0.9999,0.25,0.1,0.05}, /* thresar */
0.0,0.0,0.05, /* elmaskar,almaskhold,thresslip */
30.0,30.0,30.0, /* maxtdif,maxinno,maxgdop */
{},{},{}, /* baseline,ru,rb */
{"",""}, /* anttype */
{},{},{}, /* antdel,pcv,exsats */
0, 0, 0, {"",""}, {}, 0, {{},{}}, { {}, {{},{}}, {{},{}}, {}, {} }, 0, {}
};
// make PVT object
pvt_ = rtklib_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_tcp_port, rtcm_station_id, rtcm_msg_rate_ms, rtcm_dump_devname, type_of_receiver);
pvt_ = rtklib_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_tcp_port, rtcm_station_id, rtcm_msg_rate_ms, rtcm_dump_devname, type_of_receiver, rtklib_options);
DLOG(INFO) << "pvt(" << pvt_->unique_id() << ")";
}

View File

@ -82,12 +82,13 @@ public:
private:
rtklib_pvt_cc_sptr pvt_;
prcopt_t rtklib_options;
bool dump_;
std::string dump_filename_;
std::string role_;
unsigned int in_streams_;
unsigned int out_streams_;
std::string eph_xml_filename_;
bool save_assistance_to_XML();
};

View File

@ -60,7 +60,8 @@ rtklib_make_pvt_cc(unsigned int nchannels,
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 unsigned int type_of_receiver,
prcopt_t rtklib_opt)
{
return rtklib_pvt_cc_sptr(new rtklib_pvt_cc(nchannels,
dump,
@ -78,7 +79,8 @@ rtklib_make_pvt_cc(unsigned int nchannels,
rtcm_station_id,
rtcm_msg_rate_ms,
rtcm_dump_devname,
type_of_receiver));
type_of_receiver,
rtklib_opt));
}
@ -201,7 +203,7 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels, bool dump, std::string dump
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, 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) :
unsigned short rtcm_station_id, std::map<int,int> rtcm_msg_rate_ms, std::string rtcm_dump_devname, const unsigned int type_of_receiver, prcopt_t rtklib_opt) :
gr::block("rtklib_pvt_cc", gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)),
gr::io_signature::make(0, 0, sizeof(gr_complex)))
@ -278,7 +280,7 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels, bool dump, std::string dump
d_averaging_depth = averaging_depth;
d_flag_averaging = flag_averaging;
d_ls_pvt = std::make_shared<rtklib_solver>((int)nchannels, dump_ls_pvt_filename, d_dump);
d_ls_pvt = std::make_shared<rtklib_solver>((int)nchannels, dump_ls_pvt_filename, d_dump, rtklib_opt);
d_ls_pvt->set_averaging_depth(d_averaging_depth);
d_sample_counter = 0;

View File

@ -66,7 +66,8 @@ rtklib_pvt_cc_sptr rtklib_make_pvt_cc(unsigned int n_channels,
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 unsigned int type_of_receiver,
prcopt_t rtklib_opt);
/*!
* \brief This class implements a block that computes the PVT solution with Galileo E1 signals
@ -90,7 +91,8 @@ private:
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 unsigned int type_of_receiver,
prcopt_t rtklib_opt);
rtklib_pvt_cc(unsigned int nchannels,
bool dump, std::string dump_filename,
int averaging_depth,
@ -106,7 +108,8 @@ private:
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 unsigned int type_of_receiver,
prcopt_t rtklib_opt);
void msg_handler_telemetry(pmt::pmt_t msg);

View File

@ -58,7 +58,7 @@
using google::LogMessage;
rtklib_solver::rtklib_solver(int nchannels, std::string dump_filename, bool flag_dump_to_file)
rtklib_solver::rtklib_solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, prcopt_t rtklib_opt)
{
// init empty ephemeris for all the available GNSS channels
d_nchannels = nchannels;
@ -67,29 +67,7 @@ rtklib_solver::rtklib_solver(int nchannels, std::string dump_filename, bool flag
count_valid_position = 0;
d_flag_averaging = false;
//RTKLIB PVT solver options
/* defaults processing options */
prcopt_t default_opt={PMODE_SINGLE,0,2,SYS_GPS, /* mode,soltype,nf,navsys */
15.0*D2R, { {}, {{},{}} }, /* elmin,snrmask */
0,1,1,1, /* sateph,modear,glomodear,bdsmodear */
5,0,10,1, /* maxout,minlock,minfix,armaxiter */
0,0,0,0, /* estion,esttrop,dynamics,tidecorr */
1,0,0,0,0, /* niter,codesmooth,intpref,sbascorr,sbassatsel */
0,0, /* rovpos,refpos */
{100.0,100.0,100.0}, /* eratio[] */
{100.0,0.003,0.003,0.0,1.0}, /* err[] */
{30.0,0.03,0.3}, /* std[] */
{1E-4,1E-3,1E-4,1E-1,1E-2,0.0}, /* prn[] */
5E-12, /* sclkstab */
{3.0,0.9999,0.25,0.1,0.05}, /* thresar */
0.0,0.0,0.05, /* elmaskar,almaskhold,thresslip */
30.0,30.0,30.0, /* maxtdif,maxinno,maxgdop */
{},{},{}, /* baseline,ru,rb */
{"",""}, /* anttype */
{},{},{}, /* antdel,pcv,exsats */
0, 0, 0, {"",""}, {}, 0, {{},{}}, { {}, {{},{}}, {{},{}}, {}, {} }, 0, {}
};
rtklib_opt = default_opt;
rtklib_options = rtklib_opt;
old_pvt_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 };
@ -257,7 +235,7 @@ bool rtklib_solver::get_PVT(std::map<int,Gnss_Synchro> gnss_observables_map, dou
nav_data.lam[i][1]=SPEED_OF_LIGHT/FREQ2; /* L2 */
}
result=pntpos(obs_data, valid_obs, &nav_data, &rtklib_opt, &old_pvt_sol, NULL, NULL,rtklib_msg);
result=pntpos(obs_data, valid_obs, &nav_data, &rtklib_options, &old_pvt_sol, NULL, NULL,rtklib_msg);
if(result==0)
{
DLOG(INFO)<<"RTKLIB pntpos error message: "<<rtklib_msg;

View File

@ -70,7 +70,7 @@ class rtklib_solver : public Pvt_Solution
private:
public:
rtklib_solver(int nchannels,std::string dump_filename, bool flag_dump_to_file);
rtklib_solver(int nchannels,std::string dump_filename, bool flag_dump_to_file, prcopt_t rtklib_opt);
~rtklib_solver();
bool get_PVT(std::map<int,Gnss_Synchro> gnss_observables_map, double Rx_time, bool flag_averaging);
@ -94,7 +94,7 @@ public:
bool d_flag_dump_enabled;
prcopt_t rtklib_opt;
prcopt_t rtklib_options;
sol_t old_pvt_sol;
std::string d_dump_filename;