mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-09-10 06:19:48 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next
This commit is contained in:
commit
aa3dc060b6
@ -183,6 +183,8 @@ find_library(GFORTRAN NAMES gfortran
|
|||||||
/usr/lib/gcc/sh4-linux-gnu/8
|
/usr/lib/gcc/sh4-linux-gnu/8
|
||||||
/usr/lib/gcc/sparc64-linux-gnu/8
|
/usr/lib/gcc/sparc64-linux-gnu/8
|
||||||
/usr/lib/gcc/x86_64-linux-gnux32/8
|
/usr/lib/gcc/x86_64-linux-gnux32/8
|
||||||
|
/usr/lib/gcc/x86_64-kfreebsd-gnu/8
|
||||||
|
/usr/lib/gcc/i686-kfreebsd-gnu/8
|
||||||
/usr/lib/gcc/alpha-linux-gnu/9 # libgfortran-9
|
/usr/lib/gcc/alpha-linux-gnu/9 # libgfortran-9
|
||||||
/usr/lib/gcc/x86_64-linux-gnu/9
|
/usr/lib/gcc/x86_64-linux-gnu/9
|
||||||
/usr/lib/gcc/aarch64-linux-gnu/9
|
/usr/lib/gcc/aarch64-linux-gnu/9
|
||||||
@ -201,6 +203,8 @@ find_library(GFORTRAN NAMES gfortran
|
|||||||
/usr/lib/gcc/sh4-linux-gnu/9
|
/usr/lib/gcc/sh4-linux-gnu/9
|
||||||
/usr/lib/gcc/sparc64-linux-gnu/9
|
/usr/lib/gcc/sparc64-linux-gnu/9
|
||||||
/usr/lib/gcc/x86_64-linux-gnux32/9
|
/usr/lib/gcc/x86_64-linux-gnux32/9
|
||||||
|
/usr/lib/gcc/x86_64-kfreebsd-gnu/9
|
||||||
|
/usr/lib/gcc/i686-kfreebsd-gnu/9
|
||||||
${GFORTRAN_ROOT}/lib
|
${GFORTRAN_ROOT}/lib
|
||||||
$ENV{GFORTRAN_ROOT}/lib
|
$ENV{GFORTRAN_ROOT}/lib
|
||||||
)
|
)
|
||||||
|
@ -102,6 +102,8 @@ find_library(MATIO_LIBRARY
|
|||||||
/usr/lib/sh4-linux-gnu
|
/usr/lib/sh4-linux-gnu
|
||||||
/usr/lib/sparc64-linux-gnu
|
/usr/lib/sparc64-linux-gnu
|
||||||
/usr/lib/x86_64-linux-gnux32
|
/usr/lib/x86_64-linux-gnux32
|
||||||
|
/usr/lib/x86_64-kfreebsd-gnu
|
||||||
|
/usr/lib/i386-kfreebsd-gnu
|
||||||
DOC "The MATIO library"
|
DOC "The MATIO library"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -115,6 +115,8 @@ else()
|
|||||||
/usr/lib/sh4-linux-gnu
|
/usr/lib/sh4-linux-gnu
|
||||||
/usr/lib/sparc64-linux-gnu
|
/usr/lib/sparc64-linux-gnu
|
||||||
/usr/lib/x86_64-linux-gnux32
|
/usr/lib/x86_64-linux-gnux32
|
||||||
|
/usr/lib/x86_64-kfreebsd-gnu
|
||||||
|
/usr/lib/i386-kfreebsd-gnu
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -40,15 +40,15 @@ find_path(PUGIXML_INCLUDE_DIR
|
|||||||
PATHS ${PUGIXML_HOME}/include
|
PATHS ${PUGIXML_HOME}/include
|
||||||
/usr/include
|
/usr/include
|
||||||
/usr/local/include
|
/usr/local/include
|
||||||
/usr/local/include/pugixml-1.9
|
|
||||||
/usr/local/include/pugixml-${PC_PUGIXML_VERSION}
|
/usr/local/include/pugixml-${PC_PUGIXML_VERSION}
|
||||||
|
/usr/local/include/pugixml-1.9
|
||||||
/opt/local/include
|
/opt/local/include
|
||||||
${PUGIXML_ROOT}/include
|
${PUGIXML_ROOT}/include
|
||||||
$ENV{PUGIXML_ROOT}/include
|
$ENV{PUGIXML_ROOT}/include
|
||||||
${PUGIXML_ROOT}/include/pugixml-1.9
|
|
||||||
$ENV{PUGIXML_ROOT}/include/pugixml-1.9
|
|
||||||
${PUGIXML_ROOT}/include/pugixml-${PC_PUGIXML_VERSION}
|
${PUGIXML_ROOT}/include/pugixml-${PC_PUGIXML_VERSION}
|
||||||
$ENV{PUGIXML_ROOT}/include/pugixml-${PC_PUGIXML_VERSION}
|
$ENV{PUGIXML_ROOT}/include/pugixml-${PC_PUGIXML_VERSION}
|
||||||
|
${PUGIXML_ROOT}/include/pugixml-1.9
|
||||||
|
$ENV{PUGIXML_ROOT}/include/pugixml-1.9
|
||||||
${PC_PUGIXML_INCLUDEDIR}
|
${PC_PUGIXML_INCLUDEDIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -75,9 +75,11 @@ find_library(PUGIXML_LIBRARY
|
|||||||
/usr/lib/sparc64-linux-gnu
|
/usr/lib/sparc64-linux-gnu
|
||||||
/usr/lib/x86_64-linux-gnux32
|
/usr/lib/x86_64-linux-gnux32
|
||||||
/usr/lib/riscv64-linux-gnu
|
/usr/lib/riscv64-linux-gnu
|
||||||
|
/usr/lib/x86_64-kfreebsd-gnu
|
||||||
|
/usr/lib/i386-kfreebsd-gnu
|
||||||
/usr/local/lib
|
/usr/local/lib
|
||||||
/usr/local/lib/pugixml-1.9
|
|
||||||
/usr/local/lib/pugixml-${PC_PUGIXML_VERSION}
|
/usr/local/lib/pugixml-${PC_PUGIXML_VERSION}
|
||||||
|
/usr/local/lib/pugixml-1.9
|
||||||
/opt/local/lib
|
/opt/local/lib
|
||||||
/usr/lib
|
/usr/lib
|
||||||
/usr/lib64
|
/usr/lib64
|
||||||
@ -86,14 +88,14 @@ find_library(PUGIXML_LIBRARY
|
|||||||
$ENV{PUGIXML_ROOT}/lib
|
$ENV{PUGIXML_ROOT}/lib
|
||||||
${PUGIXML_ROOT}/lib64
|
${PUGIXML_ROOT}/lib64
|
||||||
$ENV{PUGIXML_ROOT}/lib64
|
$ENV{PUGIXML_ROOT}/lib64
|
||||||
${PUGIXML_ROOT}/lib/pugixml-1.9
|
|
||||||
$ENV{PUGIXML_ROOT}/lib/pugixml-1.9
|
|
||||||
${PUGIXML_ROOT}/lib64/pugixml-1.9
|
|
||||||
$ENV{PUGIXML_ROOT}/lib64/pugixml-1.9
|
|
||||||
${PUGIXML_ROOT}/lib/pugixml-${PC_PUGIXML_VERSION}
|
${PUGIXML_ROOT}/lib/pugixml-${PC_PUGIXML_VERSION}
|
||||||
$ENV{PUGIXML_ROOT}/lib/pugixml-${PC_PUGIXML_VERSION}
|
$ENV{PUGIXML_ROOT}/lib/pugixml-${PC_PUGIXML_VERSION}
|
||||||
${PUGIXML_ROOT}/lib64/pugixml-${PC_PUGIXML_VERSION}
|
${PUGIXML_ROOT}/lib64/pugixml-${PC_PUGIXML_VERSION}
|
||||||
$ENV{PUGIXML_ROOT}/lib64/pugixml-${PC_PUGIXML_VERSION}
|
$ENV{PUGIXML_ROOT}/lib64/pugixml-${PC_PUGIXML_VERSION}
|
||||||
|
${PUGIXML_ROOT}/lib/pugixml-1.9
|
||||||
|
$ENV{PUGIXML_ROOT}/lib/pugixml-1.9
|
||||||
|
${PUGIXML_ROOT}/lib64/pugixml-1.9
|
||||||
|
$ENV{PUGIXML_ROOT}/lib64/pugixml-1.9
|
||||||
${PC_PUGIXML_LIBDIR}
|
${PC_PUGIXML_LIBDIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
## [Unreleased](https://github.com/gnss-sdr/gnss-sdr/tree/next)
|
## [Unreleased](https://github.com/gnss-sdr/gnss-sdr/tree/next)
|
||||||
|
|
||||||
|
### Improvements in Accuracy:
|
||||||
|
|
||||||
|
- Improved accuracy of the CN0 estimator.
|
||||||
|
|
||||||
|
|
||||||
### Improvements in Efficiency:
|
### Improvements in Efficiency:
|
||||||
|
|
||||||
- Improved implementation of the Viterbi decoder for Galileo navigation messages.
|
- Faster implementation of the Viterbi decoder for Galileo navigation messages.
|
||||||
|
|
||||||
|
|
||||||
### Improvements in Flexibility:
|
### Improvements in Flexibility:
|
||||||
@ -13,7 +18,9 @@
|
|||||||
|
|
||||||
### Improvements in Interoperability:
|
### Improvements in Interoperability:
|
||||||
|
|
||||||
- Added triple-band configurations RINEX outputs.
|
- Fixed PVT solution in receivers processing L1 plus L2C and/or L5 signals.
|
||||||
|
- Added RINEX files generation for triple-band configurations (L1 + L2C + L5 and L1 + E1 + L2C + L5 + E5a).
|
||||||
|
- Fixed a bug in the decoding of BeiDou navigation messages.
|
||||||
|
|
||||||
|
|
||||||
### Improvements in Maintainability:
|
### Improvements in Maintainability:
|
||||||
@ -42,7 +49,7 @@
|
|||||||
|
|
||||||
### Improvements in Usability:
|
### Improvements in Usability:
|
||||||
|
|
||||||
- A new parameter allows to process raw sample files containing signals dated before year 2009.
|
- A new parameter allows to process raw sample files containing GPS L1 C/A signals dated before July 14, 2009. If GNSS-SDR.
|
||||||
- Improved DLL-PLL binary dump MATLAB/Octave plot script. Old versions removed.
|
- Improved DLL-PLL binary dump MATLAB/Octave plot script. Old versions removed.
|
||||||
- Simplified RTKLIB error log.
|
- Simplified RTKLIB error log.
|
||||||
- Added a Python 3 plotting script to show relative performance of generic volk_gnsssdr kernels wrt SIMD fastest versions.
|
- Added a Python 3 plotting script to show relative performance of generic volk_gnsssdr kernels wrt SIMD fastest versions.
|
||||||
|
@ -68,8 +68,8 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration,
|
|||||||
pvt_output_parameters.dump_filename = configuration->property(role + ".dump_filename", default_dump_filename);
|
pvt_output_parameters.dump_filename = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||||
pvt_output_parameters.dump_mat = configuration->property(role + ".dump_mat", true);
|
pvt_output_parameters.dump_mat = configuration->property(role + ".dump_mat", true);
|
||||||
|
|
||||||
// OPTIONAL: specify a custom year to override the system time in order to postprocess old gnss records and avoid wrong week rollover
|
// Flag to postprocess old gnss records (older than 2009) and avoid wrong week rollover
|
||||||
pvt_output_parameters.custom_year = configuration->property("GNSS-SDR.custom_year", 0);
|
pvt_output_parameters.pre_2009_file = configuration->property("GNSS-SDR.pre_2009_file", false);
|
||||||
|
|
||||||
// output rate
|
// output rate
|
||||||
pvt_output_parameters.output_rate_ms = bc::lcm(20, configuration->property(role + ".output_rate_ms", 500));
|
pvt_output_parameters.output_rate_ms = bc::lcm(20, configuration->property(role + ".output_rate_ms", 500));
|
||||||
|
@ -347,7 +347,7 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
|
|||||||
if (b_rinex_output_enabled)
|
if (b_rinex_output_enabled)
|
||||||
{
|
{
|
||||||
rp = std::make_shared<Rinex_Printer>(d_rinex_version, conf_.rinex_output_path);
|
rp = std::make_shared<Rinex_Printer>(d_rinex_version, conf_.rinex_output_path);
|
||||||
rp->set_custom_year(conf_.custom_year);
|
rp->set_pre_2009_file(conf_.pre_2009_file);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -468,21 +468,21 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
|
|||||||
// user PVT solver
|
// user PVT solver
|
||||||
d_user_pvt_solver = std::make_shared<Rtklib_Solver>(static_cast<int32_t>(nchannels), dump_ls_pvt_filename, d_dump, d_dump_mat, rtk);
|
d_user_pvt_solver = std::make_shared<Rtklib_Solver>(static_cast<int32_t>(nchannels), dump_ls_pvt_filename, d_dump, d_dump_mat, rtk);
|
||||||
d_user_pvt_solver->set_averaging_depth(1);
|
d_user_pvt_solver->set_averaging_depth(1);
|
||||||
d_user_pvt_solver->set_custom_year(conf_.custom_year);
|
d_user_pvt_solver->set_pre_2009_file(conf_.pre_2009_file);
|
||||||
|
|
||||||
// internal PVT solver, mainly used to estimate the receiver clock
|
// internal PVT solver, mainly used to estimate the receiver clock
|
||||||
rtk_t internal_rtk = rtk;
|
rtk_t internal_rtk = rtk;
|
||||||
internal_rtk.opt.mode = PMODE_SINGLE; // use single positioning mode in internal PVT solver
|
internal_rtk.opt.mode = PMODE_SINGLE; // use single positioning mode in internal PVT solver
|
||||||
d_internal_pvt_solver = std::make_shared<Rtklib_Solver>(static_cast<int32_t>(nchannels), dump_ls_pvt_filename, false, false, internal_rtk);
|
d_internal_pvt_solver = std::make_shared<Rtklib_Solver>(static_cast<int32_t>(nchannels), dump_ls_pvt_filename, false, false, internal_rtk);
|
||||||
d_internal_pvt_solver->set_averaging_depth(1);
|
d_internal_pvt_solver->set_averaging_depth(1);
|
||||||
d_internal_pvt_solver->set_custom_year(conf_.custom_year);
|
d_internal_pvt_solver->set_pre_2009_file(conf_.pre_2009_file);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// only one solver, customized by the user options
|
// only one solver, customized by the user options
|
||||||
d_internal_pvt_solver = std::make_shared<Rtklib_Solver>(static_cast<int32_t>(nchannels), dump_ls_pvt_filename, d_dump, d_dump_mat, rtk);
|
d_internal_pvt_solver = std::make_shared<Rtklib_Solver>(static_cast<int32_t>(nchannels), dump_ls_pvt_filename, d_dump, d_dump_mat, rtk);
|
||||||
d_internal_pvt_solver->set_averaging_depth(1);
|
d_internal_pvt_solver->set_averaging_depth(1);
|
||||||
d_internal_pvt_solver->set_custom_year(conf_.custom_year);
|
d_internal_pvt_solver->set_pre_2009_file(conf_.pre_2009_file);
|
||||||
d_user_pvt_solver = d_internal_pvt_solver;
|
d_user_pvt_solver = d_internal_pvt_solver;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,6 +76,6 @@ Pvt_Conf::Pvt_Conf()
|
|||||||
monitor_enabled = false;
|
monitor_enabled = false;
|
||||||
protobuf_enabled = true;
|
protobuf_enabled = true;
|
||||||
udp_port = 0;
|
udp_port = 0;
|
||||||
custom_year = 0;
|
pre_2009_file = false;
|
||||||
show_local_time_zone = false;
|
show_local_time_zone = false;
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ public:
|
|||||||
|
|
||||||
bool enable_rx_clock_correction;
|
bool enable_rx_clock_correction;
|
||||||
bool show_local_time_zone;
|
bool show_local_time_zone;
|
||||||
int custom_year;
|
bool pre_2009_file;
|
||||||
|
|
||||||
Pvt_Conf();
|
Pvt_Conf();
|
||||||
};
|
};
|
||||||
|
@ -53,7 +53,7 @@ Pvt_Solution::Pvt_Solution()
|
|||||||
d_valid_observations = 0;
|
d_valid_observations = 0;
|
||||||
d_rx_pos = arma::zeros(3, 1);
|
d_rx_pos = arma::zeros(3, 1);
|
||||||
d_rx_dt_s = 0.0;
|
d_rx_dt_s = 0.0;
|
||||||
d_custom_year = 0; // disabled by default
|
d_pre_2009_file = false; // disabled by default
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -433,7 +433,8 @@ void Pvt_Solution::set_num_valid_observations(int num)
|
|||||||
d_valid_observations = num;
|
d_valid_observations = num;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Pvt_Solution::set_custom_year(int custom_year)
|
|
||||||
|
void Pvt_Solution::set_pre_2009_file(bool pre_2009_file)
|
||||||
{
|
{
|
||||||
d_custom_year = custom_year;
|
d_pre_2009_file = pre_2009_file;
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ class Pvt_Solution
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Pvt_Solution();
|
Pvt_Solution();
|
||||||
void set_custom_year(int custom_year); //!< Set a custom year for the week rollover computation instead of using the system clock, useful in post processing mode
|
void set_pre_2009_file(bool pre_2009_file); //!< Flag for the week rollover computation in post processing mode for signals older than 2009
|
||||||
double get_time_offset_s() const; //!< Get RX time offset [s]
|
double get_time_offset_s() const; //!< Get RX time offset [s]
|
||||||
void set_time_offset_s(double offset); //!< Set RX time offset [s]
|
void set_time_offset_s(double offset); //!< Set RX time offset [s]
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ public:
|
|||||||
int tropo(double *ddr_m, double sinel, double hsta_km, double p_mb, double t_kel, double hum, double hp_km, double htkel_km, double hhum_km);
|
int tropo(double *ddr_m, double sinel, double hsta_km, double p_mb, double t_kel, double hum, double hp_km, double htkel_km, double hhum_km);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int d_custom_year; // custom year to guess the correct week rollover in post processing mode
|
bool d_pre_2009_file; // Flag to correct week rollover in post processing mode for signals older than 2009
|
||||||
private:
|
private:
|
||||||
double d_rx_dt_s; // RX time offset [s]
|
double d_rx_dt_s; // RX time offset [s]
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ namespace errorlib = boost::system;
|
|||||||
|
|
||||||
Rinex_Printer::Rinex_Printer(int32_t conf_version, const std::string& base_path)
|
Rinex_Printer::Rinex_Printer(int32_t conf_version, const std::string& base_path)
|
||||||
{
|
{
|
||||||
custom_year_ = 0;
|
pre_2009_file_ = false;
|
||||||
std::string base_rinex_path = base_path;
|
std::string base_rinex_path = base_path;
|
||||||
fs::path full_path(fs::current_path());
|
fs::path full_path(fs::current_path());
|
||||||
const fs::path p(base_rinex_path);
|
const fs::path p(base_rinex_path);
|
||||||
@ -728,7 +728,7 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_Iono& gps_iono
|
|||||||
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_utc_model.d_A1, 15, 2), 16);
|
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_utc_model.d_A1, 15, 2), 16);
|
||||||
line += Rinex_Printer::rightJustify(std::to_string(gps_utc_model.d_t_OT), 7);
|
line += Rinex_Printer::rightJustify(std::to_string(gps_utc_model.d_t_OT), 7);
|
||||||
|
|
||||||
if (custom_year_ == 0 or custom_year_ >= 2009)
|
if (pre_2009_file_ == false)
|
||||||
{
|
{
|
||||||
if (eph.i_GPS_week < 512)
|
if (eph.i_GPS_week < 512)
|
||||||
{
|
{
|
||||||
@ -1503,7 +1503,7 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_Iono& iono, co
|
|||||||
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.d_A0, 18, 2), 19);
|
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.d_A0, 18, 2), 19);
|
||||||
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.d_A1, 18, 2), 19);
|
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.d_A1, 18, 2), 19);
|
||||||
line += Rinex_Printer::rightJustify(std::to_string(utc_model.d_t_OT), 9);
|
line += Rinex_Printer::rightJustify(std::to_string(utc_model.d_t_OT), 9);
|
||||||
if (custom_year_ == 0 or custom_year_ >= 2009)
|
if (pre_2009_file_ == false)
|
||||||
{
|
{
|
||||||
if (eph.i_GPS_week < 512)
|
if (eph.i_GPS_week < 512)
|
||||||
{
|
{
|
||||||
@ -1549,7 +1549,7 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_Iono& iono, co
|
|||||||
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.d_A0, 16, 2), 18);
|
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.d_A0, 16, 2), 18);
|
||||||
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.d_A1, 15, 2), 16);
|
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.d_A1, 15, 2), 16);
|
||||||
line += Rinex_Printer::rightJustify(std::to_string(utc_model.d_t_OT), 7);
|
line += Rinex_Printer::rightJustify(std::to_string(utc_model.d_t_OT), 7);
|
||||||
if (custom_year_ == 0 or custom_year_ >= 2009)
|
if (pre_2009_file_ == false)
|
||||||
{
|
{
|
||||||
if (eph.i_GPS_week < 512)
|
if (eph.i_GPS_week < 512)
|
||||||
{
|
{
|
||||||
@ -1733,7 +1733,7 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_Iono& gps_iono
|
|||||||
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_utc_model.d_A0, 16, 2), 18);
|
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_utc_model.d_A0, 16, 2), 18);
|
||||||
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_utc_model.d_A1, 15, 2), 16);
|
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_utc_model.d_A1, 15, 2), 16);
|
||||||
line += Rinex_Printer::rightJustify(std::to_string(gps_utc_model.d_t_OT), 7);
|
line += Rinex_Printer::rightJustify(std::to_string(gps_utc_model.d_t_OT), 7);
|
||||||
if (custom_year_ == 0 or custom_year_ >= 2009)
|
if (pre_2009_file_ == false)
|
||||||
{
|
{
|
||||||
if (eph.i_GPS_week < 512)
|
if (eph.i_GPS_week < 512)
|
||||||
{
|
{
|
||||||
@ -2775,7 +2775,7 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Gps_Utc_Model& ut
|
|||||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.d_A0, 18, 2), 19);
|
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.d_A0, 18, 2), 19);
|
||||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.d_A1, 18, 2), 19);
|
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.d_A1, 18, 2), 19);
|
||||||
line_aux += Rinex_Printer::rightJustify(std::to_string(utc_model.d_t_OT), 9);
|
line_aux += Rinex_Printer::rightJustify(std::to_string(utc_model.d_t_OT), 9);
|
||||||
if (custom_year_ == 0 or custom_year_ >= 2009)
|
if (pre_2009_file_ == false)
|
||||||
{
|
{
|
||||||
if (eph.i_GPS_week < 512)
|
if (eph.i_GPS_week < 512)
|
||||||
{
|
{
|
||||||
@ -2844,7 +2844,7 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Gps_Utc_Model& ut
|
|||||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.d_A0, 16, 2), 18);
|
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.d_A0, 16, 2), 18);
|
||||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.d_A1, 15, 2), 16);
|
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.d_A1, 15, 2), 16);
|
||||||
line_aux += Rinex_Printer::rightJustify(std::to_string(utc_model.d_t_OT), 7);
|
line_aux += Rinex_Printer::rightJustify(std::to_string(utc_model.d_t_OT), 7);
|
||||||
if (custom_year_ == 0 or custom_year_ >= 2009)
|
if (pre_2009_file_ == false)
|
||||||
{
|
{
|
||||||
if (eph.i_GPS_week < 512)
|
if (eph.i_GPS_week < 512)
|
||||||
{
|
{
|
||||||
@ -3191,7 +3191,7 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Gps_Iono& gps_ion
|
|||||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_utc_model.d_A0, 16, 2), 18);
|
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_utc_model.d_A0, 16, 2), 18);
|
||||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_utc_model.d_A1, 15, 2), 16);
|
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_utc_model.d_A1, 15, 2), 16);
|
||||||
line_aux += Rinex_Printer::rightJustify(std::to_string(gps_utc_model.d_t_OT), 7);
|
line_aux += Rinex_Printer::rightJustify(std::to_string(gps_utc_model.d_t_OT), 7);
|
||||||
if (custom_year_ == 0 or custom_year_ >= 2009)
|
if (pre_2009_file_ == false)
|
||||||
{
|
{
|
||||||
if (eph.i_GPS_week < 512)
|
if (eph.i_GPS_week < 512)
|
||||||
{
|
{
|
||||||
@ -3313,7 +3313,7 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Gps_Iono& gps_ion
|
|||||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_utc_model.d_A0, 16, 2), 18);
|
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_utc_model.d_A0, 16, 2), 18);
|
||||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_utc_model.d_A1, 15, 2), 16);
|
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_utc_model.d_A1, 15, 2), 16);
|
||||||
line_aux += Rinex_Printer::rightJustify(std::to_string(gps_utc_model.d_t_OT), 7);
|
line_aux += Rinex_Printer::rightJustify(std::to_string(gps_utc_model.d_t_OT), 7);
|
||||||
if (custom_year_ == 0 or custom_year_ >= 2009)
|
if (pre_2009_file_ == false)
|
||||||
{
|
{
|
||||||
if (eph.i_GPS_week < 512)
|
if (eph.i_GPS_week < 512)
|
||||||
{
|
{
|
||||||
@ -3936,7 +3936,7 @@ void Rinex_Printer::log_rinex_nav(std::fstream& out, const std::map<int32_t, Gps
|
|||||||
line += Rinex_Printer::doub2for(static_cast<double>(gps_ephemeris_iter->second.i_code_on_L2), 18, 2);
|
line += Rinex_Printer::doub2for(static_cast<double>(gps_ephemeris_iter->second.i_code_on_L2), 18, 2);
|
||||||
line += std::string(1, ' ');
|
line += std::string(1, ' ');
|
||||||
double GPS_week_continuous_number;
|
double GPS_week_continuous_number;
|
||||||
if (custom_year_ == 0 or custom_year_ >= 2009)
|
if (pre_2009_file_ == false)
|
||||||
{
|
{
|
||||||
if (gps_ephemeris_iter->second.i_GPS_week < 512)
|
if (gps_ephemeris_iter->second.i_GPS_week < 512)
|
||||||
{
|
{
|
||||||
@ -11896,7 +11896,7 @@ boost::posix_time::ptime Rinex_Printer::compute_UTC_time(const Gps_Navigation_Me
|
|||||||
const double utc_t = nav_msg.utc_time(nav_msg.d_TOW);
|
const double utc_t = nav_msg.utc_time(nav_msg.d_TOW);
|
||||||
boost::posix_time::time_duration t = boost::posix_time::milliseconds(static_cast<int64_t>((utc_t + 604800 * static_cast<double>(nav_msg.i_GPS_week)) * 1000));
|
boost::posix_time::time_duration t = boost::posix_time::milliseconds(static_cast<int64_t>((utc_t + 604800 * static_cast<double>(nav_msg.i_GPS_week)) * 1000));
|
||||||
// Handle week rollover
|
// Handle week rollover
|
||||||
if (custom_year_ == 0 or custom_year_ >= 2009)
|
if (pre_2009_file_ == false)
|
||||||
{
|
{
|
||||||
// Handle week rollover (valid from 2009 to 2029)
|
// Handle week rollover (valid from 2009 to 2029)
|
||||||
if (nav_msg.i_GPS_week < 512)
|
if (nav_msg.i_GPS_week < 512)
|
||||||
@ -11943,7 +11943,7 @@ boost::posix_time::ptime Rinex_Printer::compute_GPS_time(const Gps_Ephemeris& ep
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Handle week rollover
|
// Handle week rollover
|
||||||
if (custom_year_ == 0 or custom_year_ >= 2009)
|
if (pre_2009_file_ == false)
|
||||||
{
|
{
|
||||||
// Handle week rollover (valid from 2009 to 2029)
|
// Handle week rollover (valid from 2009 to 2029)
|
||||||
if (eph.i_GPS_week < 512)
|
if (eph.i_GPS_week < 512)
|
||||||
@ -12069,9 +12069,9 @@ double Rinex_Printer::get_leap_second(const Glonass_Gnav_Ephemeris& eph, const d
|
|||||||
return leap_second;
|
return leap_second;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Rinex_Printer::set_custom_year(int custom_year)
|
void Rinex_Printer::set_pre_2009_file(bool pre_2009_file)
|
||||||
{
|
{
|
||||||
custom_year_ = custom_year;
|
pre_2009_file_ = pre_2009_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -448,12 +448,13 @@ public:
|
|||||||
std::string navBdsfilename;
|
std::string navBdsfilename;
|
||||||
std::string navMixfilename;
|
std::string navMixfilename;
|
||||||
|
|
||||||
void set_custom_year(int custom_year);
|
void set_pre_2009_file(bool pre_2009_file);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int version; // RINEX version (2 for 2.10/2.11 and 3 for 3.01)
|
int version; // RINEX version (2 for 2.10/2.11 and 3 for 3.01)
|
||||||
int numberTypesObservations; // Number of available types of observable in the system. Should be public?
|
int numberTypesObservations; // Number of available types of observable in the system. Should be public?
|
||||||
int custom_year_;
|
bool pre_2009_file_;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Generation of RINEX signal strength indicators
|
* Generation of RINEX signal strength indicators
|
||||||
*/
|
*/
|
||||||
|
@ -496,14 +496,13 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
|||||||
if (galileo_ephemeris_iter != galileo_ephemeris_map.cend())
|
if (galileo_ephemeris_iter != galileo_ephemeris_map.cend())
|
||||||
{
|
{
|
||||||
// convert ephemeris from GNSS-SDR class to RTKLIB structure
|
// convert ephemeris from GNSS-SDR class to RTKLIB structure
|
||||||
eph_data[valid_obs] = eph_to_rtklib(galileo_ephemeris_iter->second, d_custom_year);
|
eph_data[valid_obs] = eph_to_rtklib(galileo_ephemeris_iter->second);
|
||||||
// convert observation from GNSS-SDR class to RTKLIB structure
|
// convert observation from GNSS-SDR class to RTKLIB structure
|
||||||
obsd_t newobs = {{0, 0}, '0', '0', {}, {}, {}, {}, {}, {}};
|
obsd_t newobs = {{0, 0}, '0', '0', {}, {}, {}, {}, {}, {}};
|
||||||
obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
|
obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
|
||||||
gnss_observables_iter->second,
|
gnss_observables_iter->second,
|
||||||
galileo_ephemeris_iter->second.WN_5,
|
galileo_ephemeris_iter->second.WN_5,
|
||||||
0,
|
0);
|
||||||
d_custom_year);
|
|
||||||
valid_obs++;
|
valid_obs++;
|
||||||
}
|
}
|
||||||
else // the ephemeris are not available for this SV
|
else // the ephemeris are not available for this SV
|
||||||
@ -527,8 +526,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
|||||||
obs_data[i + glo_valid_obs] = insert_obs_to_rtklib(obs_data[i + glo_valid_obs],
|
obs_data[i + glo_valid_obs] = insert_obs_to_rtklib(obs_data[i + glo_valid_obs],
|
||||||
gnss_observables_iter->second,
|
gnss_observables_iter->second,
|
||||||
galileo_ephemeris_iter->second.WN_5,
|
galileo_ephemeris_iter->second.WN_5,
|
||||||
2, // Band 3 (L5/E5)
|
2); // Band 3 (L5/E5)
|
||||||
d_custom_year);
|
|
||||||
found_E1_obs = true;
|
found_E1_obs = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -537,7 +535,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
|||||||
{
|
{
|
||||||
// insert Galileo E5 obs as new obs and also insert its ephemeris
|
// insert Galileo E5 obs as new obs and also insert its ephemeris
|
||||||
// convert ephemeris from GNSS-SDR class to RTKLIB structure
|
// convert ephemeris from GNSS-SDR class to RTKLIB structure
|
||||||
eph_data[valid_obs] = eph_to_rtklib(galileo_ephemeris_iter->second, d_custom_year);
|
eph_data[valid_obs] = eph_to_rtklib(galileo_ephemeris_iter->second);
|
||||||
// convert observation from GNSS-SDR class to RTKLIB structure
|
// convert observation from GNSS-SDR class to RTKLIB structure
|
||||||
auto default_code_ = static_cast<unsigned char>(CODE_NONE);
|
auto default_code_ = static_cast<unsigned char>(CODE_NONE);
|
||||||
obsd_t newobs = {{0, 0}, '0', '0', {}, {},
|
obsd_t newobs = {{0, 0}, '0', '0', {}, {},
|
||||||
@ -546,8 +544,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
|||||||
obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
|
obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
|
||||||
gnss_observables_iter->second,
|
gnss_observables_iter->second,
|
||||||
galileo_ephemeris_iter->second.WN_5,
|
galileo_ephemeris_iter->second.WN_5,
|
||||||
2, // Band 3 (L5/E5)
|
2); // Band 3 (L5/E5)
|
||||||
d_custom_year);
|
|
||||||
valid_obs++;
|
valid_obs++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -569,14 +566,14 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
|||||||
if (gps_ephemeris_iter != gps_ephemeris_map.cend())
|
if (gps_ephemeris_iter != gps_ephemeris_map.cend())
|
||||||
{
|
{
|
||||||
// convert ephemeris from GNSS-SDR class to RTKLIB structure
|
// convert ephemeris from GNSS-SDR class to RTKLIB structure
|
||||||
eph_data[valid_obs] = eph_to_rtklib(gps_ephemeris_iter->second, d_custom_year);
|
eph_data[valid_obs] = eph_to_rtklib(gps_ephemeris_iter->second, d_pre_2009_file);
|
||||||
// convert observation from GNSS-SDR class to RTKLIB structure
|
// convert observation from GNSS-SDR class to RTKLIB structure
|
||||||
obsd_t newobs = {{0, 0}, '0', '0', {}, {}, {}, {}, {}, {}};
|
obsd_t newobs = {{0, 0}, '0', '0', {}, {}, {}, {}, {}, {}};
|
||||||
obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
|
obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
|
||||||
gnss_observables_iter->second,
|
gnss_observables_iter->second,
|
||||||
gps_ephemeris_iter->second.i_GPS_week,
|
gps_ephemeris_iter->second.i_GPS_week,
|
||||||
0,
|
0,
|
||||||
d_custom_year);
|
d_pre_2009_file);
|
||||||
valid_obs++;
|
valid_obs++;
|
||||||
}
|
}
|
||||||
else // the ephemeris are not available for this SV
|
else // the ephemeris are not available for this SV
|
||||||
@ -615,7 +612,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
|||||||
{
|
{
|
||||||
// 3. If not found, insert the GPS L2 ephemeris and the observation
|
// 3. If not found, insert the GPS L2 ephemeris and the observation
|
||||||
// convert ephemeris from GNSS-SDR class to RTKLIB structure
|
// convert ephemeris from GNSS-SDR class to RTKLIB structure
|
||||||
eph_data[valid_obs] = eph_to_rtklib(gps_cnav_ephemeris_iter->second, d_custom_year);
|
eph_data[valid_obs] = eph_to_rtklib(gps_cnav_ephemeris_iter->second);
|
||||||
// convert observation from GNSS-SDR class to RTKLIB structure
|
// convert observation from GNSS-SDR class to RTKLIB structure
|
||||||
auto default_code_ = static_cast<unsigned char>(CODE_NONE);
|
auto default_code_ = static_cast<unsigned char>(CODE_NONE);
|
||||||
obsd_t newobs = {{0, 0}, '0', '0', {}, {},
|
obsd_t newobs = {{0, 0}, '0', '0', {}, {},
|
||||||
@ -624,8 +621,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
|||||||
obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
|
obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
|
||||||
gnss_observables_iter->second,
|
gnss_observables_iter->second,
|
||||||
gps_cnav_ephemeris_iter->second.i_GPS_week,
|
gps_cnav_ephemeris_iter->second.i_GPS_week,
|
||||||
1, // Band 2 (L2)
|
1); // Band 2 (L2)
|
||||||
d_custom_year);
|
|
||||||
valid_obs++;
|
valid_obs++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -650,12 +646,11 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
|||||||
{
|
{
|
||||||
if (eph_data[i].sat == static_cast<int>(gnss_observables_iter->second.PRN))
|
if (eph_data[i].sat == static_cast<int>(gnss_observables_iter->second.PRN))
|
||||||
{
|
{
|
||||||
eph_data[i] = eph_to_rtklib(gps_cnav_ephemeris_iter->second, d_custom_year);
|
eph_data[i] = eph_to_rtklib(gps_cnav_ephemeris_iter->second);
|
||||||
obs_data[i + glo_valid_obs] = insert_obs_to_rtklib(obs_data[i],
|
obs_data[i + glo_valid_obs] = insert_obs_to_rtklib(obs_data[i],
|
||||||
gnss_observables_iter->second,
|
gnss_observables_iter->second,
|
||||||
gps_cnav_ephemeris_iter->second.i_GPS_week,
|
gps_cnav_ephemeris_iter->second.i_GPS_week,
|
||||||
2, // Band 3 (L5)
|
2); // Band 3 (L5)
|
||||||
d_custom_year);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -664,7 +659,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
|||||||
{
|
{
|
||||||
// 3. If not found, insert the GPS L5 ephemeris and the observation
|
// 3. If not found, insert the GPS L5 ephemeris and the observation
|
||||||
// convert ephemeris from GNSS-SDR class to RTKLIB structure
|
// convert ephemeris from GNSS-SDR class to RTKLIB structure
|
||||||
eph_data[valid_obs] = eph_to_rtklib(gps_cnav_ephemeris_iter->second, d_custom_year);
|
eph_data[valid_obs] = eph_to_rtklib(gps_cnav_ephemeris_iter->second);
|
||||||
// convert observation from GNSS-SDR class to RTKLIB structure
|
// convert observation from GNSS-SDR class to RTKLIB structure
|
||||||
auto default_code_ = static_cast<unsigned char>(CODE_NONE);
|
auto default_code_ = static_cast<unsigned char>(CODE_NONE);
|
||||||
obsd_t newobs = {{0, 0}, '0', '0', {}, {},
|
obsd_t newobs = {{0, 0}, '0', '0', {}, {},
|
||||||
@ -673,8 +668,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
|||||||
obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
|
obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
|
||||||
gnss_observables_iter->second,
|
gnss_observables_iter->second,
|
||||||
gps_cnav_ephemeris_iter->second.i_GPS_week,
|
gps_cnav_ephemeris_iter->second.i_GPS_week,
|
||||||
2, // Band 3 (L5)
|
2); // Band 3 (L5)
|
||||||
d_custom_year);
|
|
||||||
valid_obs++;
|
valid_obs++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -702,8 +696,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
|||||||
obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
|
obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
|
||||||
gnss_observables_iter->second,
|
gnss_observables_iter->second,
|
||||||
glonass_gnav_ephemeris_iter->second.d_WN,
|
glonass_gnav_ephemeris_iter->second.d_WN,
|
||||||
0, // Band 0 (L1)
|
0); // Band 0 (L1)
|
||||||
d_custom_year);
|
|
||||||
glo_valid_obs++;
|
glo_valid_obs++;
|
||||||
}
|
}
|
||||||
else // the ephemeris are not available for this SV
|
else // the ephemeris are not available for this SV
|
||||||
@ -726,8 +719,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
|||||||
obs_data[i + valid_obs] = insert_obs_to_rtklib(obs_data[i + valid_obs],
|
obs_data[i + valid_obs] = insert_obs_to_rtklib(obs_data[i + valid_obs],
|
||||||
gnss_observables_iter->second,
|
gnss_observables_iter->second,
|
||||||
glonass_gnav_ephemeris_iter->second.d_WN,
|
glonass_gnav_ephemeris_iter->second.d_WN,
|
||||||
1, // Band 1 (L2)
|
1); // Band 1 (L2)
|
||||||
d_custom_year);
|
|
||||||
found_L1_obs = true;
|
found_L1_obs = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -742,8 +734,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
|||||||
obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
|
obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
|
||||||
gnss_observables_iter->second,
|
gnss_observables_iter->second,
|
||||||
glonass_gnav_ephemeris_iter->second.d_WN,
|
glonass_gnav_ephemeris_iter->second.d_WN,
|
||||||
1, // Band 1 (L2)
|
1); // Band 1 (L2)
|
||||||
d_custom_year);
|
|
||||||
glo_valid_obs++;
|
glo_valid_obs++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -771,8 +762,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
|||||||
obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
|
obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
|
||||||
gnss_observables_iter->second,
|
gnss_observables_iter->second,
|
||||||
beidou_ephemeris_iter->second.i_BEIDOU_week + BEIDOU_DNAV_BDT2GPST_WEEK_NUM_OFFSET,
|
beidou_ephemeris_iter->second.i_BEIDOU_week + BEIDOU_DNAV_BDT2GPST_WEEK_NUM_OFFSET,
|
||||||
0,
|
0);
|
||||||
d_custom_year);
|
|
||||||
valid_obs++;
|
valid_obs++;
|
||||||
}
|
}
|
||||||
else // the ephemeris are not available for this SV
|
else // the ephemeris are not available for this SV
|
||||||
@ -794,8 +784,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
|||||||
obs_data[i + glo_valid_obs] = insert_obs_to_rtklib(obs_data[i + glo_valid_obs],
|
obs_data[i + glo_valid_obs] = insert_obs_to_rtklib(obs_data[i + glo_valid_obs],
|
||||||
gnss_observables_iter->second,
|
gnss_observables_iter->second,
|
||||||
beidou_ephemeris_iter->second.i_BEIDOU_week + BEIDOU_DNAV_BDT2GPST_WEEK_NUM_OFFSET,
|
beidou_ephemeris_iter->second.i_BEIDOU_week + BEIDOU_DNAV_BDT2GPST_WEEK_NUM_OFFSET,
|
||||||
2, // Band 3 (L2/G2/B3)
|
2); // Band 3 (L2/G2/B3)
|
||||||
d_custom_year);
|
|
||||||
found_B1I_obs = true;
|
found_B1I_obs = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -813,8 +802,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
|||||||
obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
|
obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
|
||||||
gnss_observables_iter->second,
|
gnss_observables_iter->second,
|
||||||
beidou_ephemeris_iter->second.i_BEIDOU_week + BEIDOU_DNAV_BDT2GPST_WEEK_NUM_OFFSET,
|
beidou_ephemeris_iter->second.i_BEIDOU_week + BEIDOU_DNAV_BDT2GPST_WEEK_NUM_OFFSET,
|
||||||
2, // Band 2 (L2/G2)
|
2); // Band 2 (L2/G2)
|
||||||
d_custom_year);
|
|
||||||
valid_obs++;
|
valid_obs++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1038,7 +1026,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
|||||||
// TOW
|
// TOW
|
||||||
monitor_pvt.TOW_at_current_symbol_ms = gnss_observables_map.begin()->second.TOW_at_current_symbol_ms;
|
monitor_pvt.TOW_at_current_symbol_ms = gnss_observables_map.begin()->second.TOW_at_current_symbol_ms;
|
||||||
// WEEK
|
// WEEK
|
||||||
monitor_pvt.week = adjgpsweek(nav_data.eph[0].week, d_custom_year);
|
monitor_pvt.week = adjgpsweek(nav_data.eph[0].week, d_pre_2009_file);
|
||||||
// PVT GPS time
|
// PVT GPS time
|
||||||
monitor_pvt.RX_time = gnss_observables_map.begin()->second.RX_time;
|
monitor_pvt.RX_time = gnss_observables_map.begin()->second.RX_time;
|
||||||
// User clock offset [s]
|
// User clock offset [s]
|
||||||
@ -1096,7 +1084,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
|||||||
tmp_uint32 = gnss_observables_map.begin()->second.TOW_at_current_symbol_ms;
|
tmp_uint32 = gnss_observables_map.begin()->second.TOW_at_current_symbol_ms;
|
||||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_uint32), sizeof(uint32_t));
|
d_dump_file.write(reinterpret_cast<char *>(&tmp_uint32), sizeof(uint32_t));
|
||||||
// WEEK
|
// WEEK
|
||||||
tmp_uint32 = adjgpsweek(nav_data.eph[0].week, d_custom_year);
|
tmp_uint32 = adjgpsweek(nav_data.eph[0].week, d_pre_2009_file);
|
||||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_uint32), sizeof(uint32_t));
|
d_dump_file.write(reinterpret_cast<char *>(&tmp_uint32), sizeof(uint32_t));
|
||||||
// PVT GPS time
|
// PVT GPS time
|
||||||
tmp_double = gnss_observables_map.begin()->second.RX_time;
|
tmp_double = gnss_observables_map.begin()->second.RX_time;
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
obsd_t insert_obs_to_rtklib(obsd_t& rtklib_obs, const Gnss_Synchro& gnss_synchro, int week, int band, int custom_year)
|
obsd_t insert_obs_to_rtklib(obsd_t& rtklib_obs, const Gnss_Synchro& gnss_synchro, int week, int band, bool pre_2009_file)
|
||||||
{
|
{
|
||||||
// Get signal type info to adjust code type based on constellation
|
// Get signal type info to adjust code type based on constellation
|
||||||
std::string sig_ = gnss_synchro.Signal;
|
std::string sig_ = gnss_synchro.Signal;
|
||||||
@ -118,7 +118,7 @@ obsd_t insert_obs_to_rtklib(obsd_t& rtklib_obs, const Gnss_Synchro& gnss_synchro
|
|||||||
// rtklib_obs.time = gpst2time(adjgpsweek(week), gnss_synchro.RX_time);
|
// rtklib_obs.time = gpst2time(adjgpsweek(week), gnss_synchro.RX_time);
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
rtklib_obs.time = gpst2time(adjgpsweek(week, custom_year), gnss_synchro.RX_time);
|
rtklib_obs.time = gpst2time(adjgpsweek(week, pre_2009_file), gnss_synchro.RX_time);
|
||||||
// account for the TOW crossover transitory in the first 18 seconds where the week is not yet updated!
|
// account for the TOW crossover transitory in the first 18 seconds where the week is not yet updated!
|
||||||
if (gnss_synchro.RX_time < 18.0)
|
if (gnss_synchro.RX_time < 18.0)
|
||||||
{
|
{
|
||||||
@ -170,7 +170,7 @@ geph_t eph_to_rtklib(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const Glona
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
eph_t eph_to_rtklib(const Galileo_Ephemeris& gal_eph, int custom_year)
|
eph_t eph_to_rtklib(const Galileo_Ephemeris& gal_eph)
|
||||||
{
|
{
|
||||||
eph_t rtklib_sat = {0, 0, 0, 0, 0, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 0.0, 0.0, 0.0, 0.0, 0.0,
|
eph_t rtklib_sat = {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, 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, 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, 0.0, 0.0, 0.0, 0.0, 0.0, {}, {}, 0.0, 0.0};
|
||||||
@ -188,7 +188,7 @@ eph_t eph_to_rtklib(const Galileo_Ephemeris& gal_eph, int custom_year)
|
|||||||
rtklib_sat.Adot = 0; // only in CNAV;
|
rtklib_sat.Adot = 0; // only in CNAV;
|
||||||
rtklib_sat.ndot = 0; // only in CNAV;
|
rtklib_sat.ndot = 0; // only in CNAV;
|
||||||
|
|
||||||
rtklib_sat.week = adjgpsweek(gal_eph.WN_5, custom_year); /* week of tow */
|
rtklib_sat.week = adjgpsweek(gal_eph.WN_5); /* week of tow */
|
||||||
rtklib_sat.cic = gal_eph.C_ic_4;
|
rtklib_sat.cic = gal_eph.C_ic_4;
|
||||||
rtklib_sat.cis = gal_eph.C_is_4;
|
rtklib_sat.cis = gal_eph.C_is_4;
|
||||||
rtklib_sat.cuc = gal_eph.C_uc_3;
|
rtklib_sat.cuc = gal_eph.C_uc_3;
|
||||||
@ -229,7 +229,7 @@ eph_t eph_to_rtklib(const Galileo_Ephemeris& gal_eph, int custom_year)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
eph_t eph_to_rtklib(const Gps_Ephemeris& gps_eph, int custom_year)
|
eph_t eph_to_rtklib(const Gps_Ephemeris& gps_eph, bool pre_2009_file)
|
||||||
{
|
{
|
||||||
eph_t rtklib_sat = {0, 0, 0, 0, 0, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 0.0, 0.0, 0.0, 0.0, 0.0,
|
eph_t rtklib_sat = {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, 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, 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, 0.0, 0.0, 0.0, 0.0, 0.0, {}, {}, 0.0, 0.0};
|
||||||
@ -246,7 +246,7 @@ eph_t eph_to_rtklib(const Gps_Ephemeris& gps_eph, int custom_year)
|
|||||||
rtklib_sat.Adot = 0; // only in CNAV;
|
rtklib_sat.Adot = 0; // only in CNAV;
|
||||||
rtklib_sat.ndot = 0; // only in CNAV;
|
rtklib_sat.ndot = 0; // only in CNAV;
|
||||||
|
|
||||||
rtklib_sat.week = adjgpsweek(gps_eph.i_GPS_week, custom_year); /* week of tow */
|
rtklib_sat.week = adjgpsweek(gps_eph.i_GPS_week, pre_2009_file); /* week of tow */
|
||||||
rtklib_sat.cic = gps_eph.d_Cic;
|
rtklib_sat.cic = gps_eph.d_Cic;
|
||||||
rtklib_sat.cis = gps_eph.d_Cis;
|
rtklib_sat.cis = gps_eph.d_Cis;
|
||||||
rtklib_sat.cuc = gps_eph.d_Cuc;
|
rtklib_sat.cuc = gps_eph.d_Cuc;
|
||||||
@ -356,7 +356,7 @@ eph_t eph_to_rtklib(const Beidou_Dnav_Ephemeris& bei_eph)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
eph_t eph_to_rtklib(const Gps_CNAV_Ephemeris& gps_cnav_eph, int custom_year)
|
eph_t eph_to_rtklib(const Gps_CNAV_Ephemeris& gps_cnav_eph)
|
||||||
{
|
{
|
||||||
eph_t rtklib_sat = {0, 0, 0, 0, 0, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 0.0, 0.0, 0.0, 0.0, 0.0,
|
eph_t rtklib_sat = {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, 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, 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, 0.0, 0.0, 0.0, 0.0, 0.0, {}, {}, 0.0, 0.0};
|
||||||
@ -377,7 +377,7 @@ eph_t eph_to_rtklib(const Gps_CNAV_Ephemeris& gps_cnav_eph, int custom_year)
|
|||||||
rtklib_sat.Adot = gps_cnav_eph.d_A_DOT; // only in CNAV;
|
rtklib_sat.Adot = gps_cnav_eph.d_A_DOT; // only in CNAV;
|
||||||
rtklib_sat.ndot = gps_cnav_eph.d_DELTA_DOT_N; // only in CNAV;
|
rtklib_sat.ndot = gps_cnav_eph.d_DELTA_DOT_N; // only in CNAV;
|
||||||
|
|
||||||
rtklib_sat.week = adjgpsweek(gps_cnav_eph.i_GPS_week, custom_year); /* week of tow */
|
rtklib_sat.week = adjgpsweek(gps_cnav_eph.i_GPS_week); /* week of tow */
|
||||||
rtklib_sat.cic = gps_cnav_eph.d_Cic;
|
rtklib_sat.cic = gps_cnav_eph.d_Cic;
|
||||||
rtklib_sat.cis = gps_cnav_eph.d_Cis;
|
rtklib_sat.cis = gps_cnav_eph.d_Cis;
|
||||||
rtklib_sat.cuc = gps_cnav_eph.d_Cuc;
|
rtklib_sat.cuc = gps_cnav_eph.d_Cuc;
|
||||||
|
@ -43,9 +43,9 @@ class Gps_Almanac;
|
|||||||
class Gps_CNAV_Ephemeris;
|
class Gps_CNAV_Ephemeris;
|
||||||
class Gps_Ephemeris;
|
class Gps_Ephemeris;
|
||||||
|
|
||||||
eph_t eph_to_rtklib(const Galileo_Ephemeris& gal_eph, int custom_year);
|
eph_t eph_to_rtklib(const Galileo_Ephemeris& gal_eph);
|
||||||
eph_t eph_to_rtklib(const Gps_Ephemeris& gps_eph, int custom_year);
|
eph_t eph_to_rtklib(const Gps_Ephemeris& gps_eph, bool pre_2009_file);
|
||||||
eph_t eph_to_rtklib(const Gps_CNAV_Ephemeris& gps_cnav_eph, int custom_year);
|
eph_t eph_to_rtklib(const Gps_CNAV_Ephemeris& gps_cnav_eph);
|
||||||
eph_t eph_to_rtklib(const Beidou_Dnav_Ephemeris& bei_eph);
|
eph_t eph_to_rtklib(const Beidou_Dnav_Ephemeris& bei_eph);
|
||||||
|
|
||||||
alm_t alm_to_rtklib(const Gps_Almanac& gps_alm);
|
alm_t alm_to_rtklib(const Gps_Almanac& gps_alm);
|
||||||
@ -58,6 +58,6 @@ alm_t alm_to_rtklib(const Galileo_Almanac& gal_alm);
|
|||||||
*/
|
*/
|
||||||
geph_t eph_to_rtklib(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const Glonass_Gnav_Utc_Model& gnav_clock_model);
|
geph_t eph_to_rtklib(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const Glonass_Gnav_Utc_Model& gnav_clock_model);
|
||||||
|
|
||||||
obsd_t insert_obs_to_rtklib(obsd_t& rtklib_obs, const Gnss_Synchro& gnss_synchro, int week, int band, int custom_year);
|
obsd_t insert_obs_to_rtklib(obsd_t& rtklib_obs, const Gnss_Synchro& gnss_synchro, int week, int band, bool pre_2009_file = false);
|
||||||
|
|
||||||
#endif /* GNSS_SDR_RTKLIB_CONVERSIONS_H_ */
|
#endif /* GNSS_SDR_RTKLIB_CONVERSIONS_H_ */
|
||||||
|
@ -192,7 +192,7 @@ int decode_type3(rtcm_t *rtcm)
|
|||||||
|
|
||||||
|
|
||||||
/* decode type 14: gps time of week ------------------------------------------*/
|
/* decode type 14: gps time of week ------------------------------------------*/
|
||||||
int decode_type14(rtcm_t *rtcm, int custom_year)
|
int decode_type14(rtcm_t *rtcm, bool pre_2009_file)
|
||||||
{
|
{
|
||||||
double zcnt;
|
double zcnt;
|
||||||
int i = 48;
|
int i = 48;
|
||||||
@ -216,7 +216,7 @@ int decode_type14(rtcm_t *rtcm, int custom_year)
|
|||||||
trace(2, "rtcm2 14 length error: len=%d\n", rtcm->len);
|
trace(2, "rtcm2 14 length error: len=%d\n", rtcm->len);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
week = adjgpsweek(week, custom_year);
|
week = adjgpsweek(week, pre_2009_file);
|
||||||
rtcm->time = gpst2time(week, hour * 3600.0 + zcnt * 0.6);
|
rtcm->time = gpst2time(week, hour * 3600.0 + zcnt * 0.6);
|
||||||
rtcm->nav.leaps = leaps;
|
rtcm->nav.leaps = leaps;
|
||||||
return 6;
|
return 6;
|
||||||
@ -244,7 +244,7 @@ int decode_type16(rtcm_t *rtcm)
|
|||||||
|
|
||||||
|
|
||||||
/* decode type 17: gps ephemerides -------------------------------------------*/
|
/* decode type 17: gps ephemerides -------------------------------------------*/
|
||||||
int decode_type17(rtcm_t *rtcm, int custom_year)
|
int decode_type17(rtcm_t *rtcm, bool pre_2009_file)
|
||||||
{
|
{
|
||||||
eph_t eph = {0, -1, -1, 0, 0, 0, 0, 0, {0, 0.0}, {0, 0.0}, {0, 0.0},
|
eph_t eph = {0, -1, -1, 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, 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, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
|
||||||
@ -329,7 +329,7 @@ int decode_type17(rtcm_t *rtcm, int custom_year)
|
|||||||
}
|
}
|
||||||
sat = satno(SYS_GPS, prn);
|
sat = satno(SYS_GPS, prn);
|
||||||
eph.sat = sat;
|
eph.sat = sat;
|
||||||
eph.week = adjgpsweek(week, custom_year);
|
eph.week = adjgpsweek(week, pre_2009_file);
|
||||||
eph.toe = gpst2time(eph.week, eph.toes);
|
eph.toe = gpst2time(eph.week, eph.toes);
|
||||||
eph.toc = gpst2time(eph.week, toc);
|
eph.toc = gpst2time(eph.week, toc);
|
||||||
eph.ttr = rtcm->time;
|
eph.ttr = rtcm->time;
|
||||||
|
@ -61,9 +61,9 @@ void adjhour(rtcm_t *rtcm, double zcnt);
|
|||||||
int obsindex(obs_t *obs, gtime_t time, int sat);
|
int obsindex(obs_t *obs, gtime_t time, int sat);
|
||||||
int decode_type1(rtcm_t *rtcm);
|
int decode_type1(rtcm_t *rtcm);
|
||||||
int decode_type3(rtcm_t *rtcm);
|
int decode_type3(rtcm_t *rtcm);
|
||||||
int decode_type14(rtcm_t *rtcm);
|
int decode_type14(rtcm_t *rtcm, bool pre_2009_file = false);
|
||||||
int decode_type16(rtcm_t *rtcm);
|
int decode_type16(rtcm_t *rtcm);
|
||||||
int decode_type17(rtcm_t *rtcm);
|
int decode_type17(rtcm_t *rtcm, bool pre_2009_file = false);
|
||||||
int decode_type18(rtcm_t *rtcm);
|
int decode_type18(rtcm_t *rtcm);
|
||||||
int decode_type19(rtcm_t *rtcm);
|
int decode_type19(rtcm_t *rtcm);
|
||||||
int decode_type22(rtcm_t *rtcm);
|
int decode_type22(rtcm_t *rtcm);
|
||||||
|
@ -1036,7 +1036,7 @@ int decode_type1013(rtcm_t *rtcm __attribute__((unused)))
|
|||||||
|
|
||||||
|
|
||||||
/* decode type 1019: gps ephemerides -----------------------------------------*/
|
/* decode type 1019: gps ephemerides -----------------------------------------*/
|
||||||
int decode_type1019(rtcm_t *rtcm, int custom_year)
|
int decode_type1019(rtcm_t *rtcm, bool pre_2009_file)
|
||||||
{
|
{
|
||||||
eph_t eph = {0, -1, -1, 0, 0, 0, 0, 0, {0, 0.0}, {0, 0.0}, {0, 0.0},
|
eph_t eph = {0, -1, -1, 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, 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, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
|
||||||
@ -1136,7 +1136,7 @@ int decode_type1019(rtcm_t *rtcm, int custom_year)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
eph.sat = sat;
|
eph.sat = sat;
|
||||||
eph.week = adjgpsweek(week, custom_year);
|
eph.week = adjgpsweek(week, pre_2009_file);
|
||||||
eph.toe = gpst2time(eph.week, eph.toes);
|
eph.toe = gpst2time(eph.week, eph.toes);
|
||||||
eph.toc = gpst2time(eph.week, toc);
|
eph.toc = gpst2time(eph.week, toc);
|
||||||
eph.ttr = rtcm->time;
|
eph.ttr = rtcm->time;
|
||||||
@ -1535,7 +1535,7 @@ int decode_type1039(rtcm_t *rtcm __attribute__((unused)))
|
|||||||
|
|
||||||
|
|
||||||
/* decode type 1044: qzss ephemerides (ref [15]) -----------------------------*/
|
/* decode type 1044: qzss ephemerides (ref [15]) -----------------------------*/
|
||||||
int decode_type1044(rtcm_t *rtcm, int custom_year)
|
int decode_type1044(rtcm_t *rtcm, bool pre_2009_file)
|
||||||
{
|
{
|
||||||
eph_t eph = {0, -1, -1, 0, 0, 0, 0, 0, {0, 0.0}, {0, 0.0}, {0, 0.0},
|
eph_t eph = {0, -1, -1, 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, 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, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
|
||||||
@ -1628,7 +1628,7 @@ int decode_type1044(rtcm_t *rtcm, int custom_year)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
eph.sat = sat;
|
eph.sat = sat;
|
||||||
eph.week = adjgpsweek(week, custom_year);
|
eph.week = adjgpsweek(week, pre_2009_file);
|
||||||
eph.toe = gpst2time(eph.week, eph.toes);
|
eph.toe = gpst2time(eph.week, eph.toes);
|
||||||
eph.toc = gpst2time(eph.week, toc);
|
eph.toc = gpst2time(eph.week, toc);
|
||||||
eph.ttr = rtcm->time;
|
eph.ttr = rtcm->time;
|
||||||
|
@ -149,7 +149,7 @@ int decode_type1012(rtcm_t *rtcm);
|
|||||||
|
|
||||||
int decode_type1013(rtcm_t *rtcm);
|
int decode_type1013(rtcm_t *rtcm);
|
||||||
|
|
||||||
int decode_type1019(rtcm_t *rtcm);
|
int decode_type1019(rtcm_t *rtcm, bool pre_2009_file = false);
|
||||||
|
|
||||||
int decode_type1020(rtcm_t *rtcm);
|
int decode_type1020(rtcm_t *rtcm);
|
||||||
|
|
||||||
@ -187,7 +187,7 @@ int decode_type1038(rtcm_t *rtcm);
|
|||||||
|
|
||||||
int decode_type1039(rtcm_t *rtcm);
|
int decode_type1039(rtcm_t *rtcm);
|
||||||
|
|
||||||
int decode_type1044(rtcm_t *rtcm);
|
int decode_type1044(rtcm_t *rtcm, bool pre_2009_file = false);
|
||||||
|
|
||||||
int decode_type1045(rtcm_t *rtcm);
|
int decode_type1045(rtcm_t *rtcm);
|
||||||
|
|
||||||
|
@ -2114,7 +2114,7 @@ double time2doy(gtime_t t)
|
|||||||
* args : int week I not-adjusted gps week number
|
* args : int week I not-adjusted gps week number
|
||||||
* return : adjusted gps week number
|
* return : adjusted gps week number
|
||||||
*-----------------------------------------------------------------------------*/
|
*-----------------------------------------------------------------------------*/
|
||||||
int adjgpsweek(int week, int custom_year)
|
int adjgpsweek(int week, bool pre_2009_file)
|
||||||
{
|
{
|
||||||
// int w;
|
// int w;
|
||||||
// if (week < 512)
|
// if (week < 512)
|
||||||
@ -2133,7 +2133,7 @@ int adjgpsweek(int week, int custom_year)
|
|||||||
return week;
|
return week;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (custom_year == 0)
|
if (pre_2009_file == false)
|
||||||
{
|
{
|
||||||
(void)time2gpst(utc2gpst(timeget()), &w);
|
(void)time2gpst(utc2gpst(timeget()), &w);
|
||||||
if (w < 1560)
|
if (w < 1560)
|
||||||
@ -2143,19 +2143,8 @@ int adjgpsweek(int week, int custom_year)
|
|||||||
return week + (w - week + 512) / 1024 * 1024;
|
return week + (w - week + 512) / 1024 * 1024;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
if (custom_year >= 2019)
|
|
||||||
{
|
|
||||||
w = week + 2048; // add weeks from 6-january-1980 to week rollover in 6 april 2019
|
|
||||||
}
|
|
||||||
else if (custom_year < 2019 and custom_year >= 1999)
|
|
||||||
{
|
{
|
||||||
w = week + 1024; // add weeks from 6-january-1980 to week rollover in 21 august 1999
|
w = week + 1024; // add weeks from 6-january-1980 to week rollover in 21 august 1999
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
w = week; // no rollover
|
|
||||||
}
|
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,7 @@ double utc2gmst(gtime_t t, double ut1_utc);
|
|||||||
void time2str(gtime_t t, char *s, int n);
|
void time2str(gtime_t t, char *s, int n);
|
||||||
char *time_str(gtime_t t, int n);
|
char *time_str(gtime_t t, int n);
|
||||||
double time2doy(gtime_t t);
|
double time2doy(gtime_t t);
|
||||||
int adjgpsweek(int week, int custom_year);
|
int adjgpsweek(int week, bool pre_2009_file = false);
|
||||||
unsigned int tickget();
|
unsigned int tickget();
|
||||||
void sleepms(int ms);
|
void sleepms(int ms);
|
||||||
void deg2dms(double deg, double *dms, int ndec);
|
void deg2dms(double deg, double *dms, int ndec);
|
||||||
|
@ -132,7 +132,7 @@ void beidou_b1i_telemetry_decoder_gs::decode_bch15_11_01(const int32_t *bits, st
|
|||||||
{
|
{
|
||||||
int32_t bit;
|
int32_t bit;
|
||||||
int32_t err;
|
int32_t err;
|
||||||
std::array<int32_t, 4> reg{1, 1, 1, 1};
|
std::array<int32_t, 4> reg{-1, -1, -1, -1};
|
||||||
const std::array<int32_t, 15> errind{14, 13, 10, 12, 6, 9, 4, 11, 0, 5, 7, 8, 1, 3, 2};
|
const std::array<int32_t, 15> errind{14, 13, 10, 12, 6, 9, 4, 11, 0, 5, 7, 8, 1, 3, 2};
|
||||||
|
|
||||||
for (uint32_t i = 0; i < 15; i++)
|
for (uint32_t i = 0; i < 15; i++)
|
||||||
@ -150,11 +150,16 @@ void beidou_b1i_telemetry_decoder_gs::decode_bch15_11_01(const int32_t *bits, st
|
|||||||
reg[1] *= bit;
|
reg[1] *= bit;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = errind[reg[0] + reg[1] * 2 + reg[2] * 4 + reg[3] * 8];
|
for (uint32_t i = 0; i < 4; ++i)
|
||||||
|
{
|
||||||
|
reg[i] = (reg[i] + 1) / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
err = reg[0] + reg[1] * 2 + reg[2] * 4 + reg[3] * 8;
|
||||||
|
|
||||||
if (err > 0 and err < 16)
|
if (err > 0 and err < 16)
|
||||||
{
|
{
|
||||||
decbits[err - 1] *= -1;
|
decbits[errind[err - 1]] *= -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ void beidou_b3i_telemetry_decoder_gs::decode_bch15_11_01(const int32_t *bits,
|
|||||||
{
|
{
|
||||||
int32_t bit;
|
int32_t bit;
|
||||||
int32_t err;
|
int32_t err;
|
||||||
std::array<int32_t, 4> reg{1, 1, 1, 1};
|
std::array<int32_t, 4> reg{-1, -1, -1, -1};
|
||||||
const std::array<int32_t, 15> errind{14, 13, 10, 12, 6, 9, 4, 11, 0, 5, 7, 8, 1, 3, 2};
|
const std::array<int32_t, 15> errind{14, 13, 10, 12, 6, 9, 4, 11, 0, 5, 7, 8, 1, 3, 2};
|
||||||
|
|
||||||
for (uint32_t i = 0; i < 15; i++)
|
for (uint32_t i = 0; i < 15; i++)
|
||||||
@ -151,11 +151,16 @@ void beidou_b3i_telemetry_decoder_gs::decode_bch15_11_01(const int32_t *bits,
|
|||||||
reg[1] *= bit;
|
reg[1] *= bit;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = errind[reg[0] + reg[1] * 2 + reg[2] * 4 + reg[3] * 8];
|
for (uint32_t i = 0; i < 4; ++i)
|
||||||
|
{
|
||||||
|
reg[i] = (reg[i] + 1) / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
err = reg[0] + reg[1] * 2 + reg[2] * 4 + reg[3] * 8;
|
||||||
|
|
||||||
if (err > 0 and err < 16)
|
if (err > 0 and err < 16)
|
||||||
{
|
{
|
||||||
decbits[err - 1] *= -1;
|
decbits[errind[err - 1]] *= -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
5
src/core/libs/supl/asn-rrlp/.clang-format
Normal file
5
src/core/libs/supl/asn-rrlp/.clang-format
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
Language: Cpp
|
||||||
|
DisableFormat: true
|
||||||
|
...
|
||||||
|
|
5
src/core/libs/supl/asn-supl/.clang-format
Normal file
5
src/core/libs/supl/asn-supl/.clang-format
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
Language: Cpp
|
||||||
|
DisableFormat: true
|
||||||
|
...
|
||||||
|
|
@ -117,7 +117,7 @@ ControlThread::ControlThread(const std::shared_ptr<ConfigurationInterface> &conf
|
|||||||
void ControlThread::init()
|
void ControlThread::init()
|
||||||
{
|
{
|
||||||
// OPTIONAL: specify a custom year to override the system time in order to postprocess old gnss records and avoid wrong week rollover
|
// OPTIONAL: specify a custom year to override the system time in order to postprocess old gnss records and avoid wrong week rollover
|
||||||
custom_year_ = configuration_->property("GNSS-SDR.custom_year", 0);
|
pre_2009_file_ = configuration_->property("GNSS-SDR.pre_2009_file", false);
|
||||||
// Instantiates a control queue, a GNSS flowgraph, and a control message factory
|
// Instantiates a control queue, a GNSS flowgraph, and a control message factory
|
||||||
control_queue_ = std::make_shared<Concurrent_Queue<pmt::pmt_t>>();
|
control_queue_ = std::make_shared<Concurrent_Queue<pmt::pmt_t>>();
|
||||||
cmd_interface_.set_msg_queue(control_queue_); // set also the queue pointer for the telecommand thread
|
cmd_interface_.set_msg_queue(control_queue_); // set also the queue pointer for the telecommand thread
|
||||||
@ -944,7 +944,7 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
|
|||||||
std::map<int, Gps_Ephemeris> gps_eph_map = pvt_ptr->get_gps_ephemeris();
|
std::map<int, Gps_Ephemeris> gps_eph_map = pvt_ptr->get_gps_ephemeris();
|
||||||
for (auto &it : gps_eph_map)
|
for (auto &it : gps_eph_map)
|
||||||
{
|
{
|
||||||
eph_t rtklib_eph = eph_to_rtklib(it.second, custom_year_);
|
eph_t rtklib_eph = eph_to_rtklib(it.second, pre_2009_file_);
|
||||||
std::array<double, 3> r_sat{};
|
std::array<double, 3> r_sat{};
|
||||||
double clock_bias_s;
|
double clock_bias_s;
|
||||||
double sat_pos_variance_m2;
|
double sat_pos_variance_m2;
|
||||||
@ -969,7 +969,7 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
|
|||||||
std::map<int, Galileo_Ephemeris> gal_eph_map = pvt_ptr->get_galileo_ephemeris();
|
std::map<int, Galileo_Ephemeris> gal_eph_map = pvt_ptr->get_galileo_ephemeris();
|
||||||
for (auto &it : gal_eph_map)
|
for (auto &it : gal_eph_map)
|
||||||
{
|
{
|
||||||
eph_t rtklib_eph = eph_to_rtklib(it.second, custom_year_);
|
eph_t rtklib_eph = eph_to_rtklib(it.second);
|
||||||
std::array<double, 3> r_sat{};
|
std::array<double, 3> r_sat{};
|
||||||
double clock_bias_s;
|
double clock_bias_s;
|
||||||
double sat_pos_variance_m2;
|
double sat_pos_variance_m2;
|
||||||
|
@ -171,7 +171,7 @@ private:
|
|||||||
std::shared_ptr<GNSSFlowgraph> flowgraph_;
|
std::shared_ptr<GNSSFlowgraph> flowgraph_;
|
||||||
std::shared_ptr<ConfigurationInterface> configuration_;
|
std::shared_ptr<ConfigurationInterface> configuration_;
|
||||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> control_queue_;
|
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> control_queue_;
|
||||||
int custom_year_; // to override the system time to postprocess old gnss records and avoid wrong week rollover
|
bool pre_2009_file_; // to override the system time to postprocess old gnss records and avoid wrong week rollover
|
||||||
bool stop_;
|
bool stop_;
|
||||||
bool restart_;
|
bool restart_;
|
||||||
bool delete_configuration_;
|
bool delete_configuration_;
|
||||||
|
@ -133,7 +133,7 @@ void send_tracking_gps_input_samples(FILE *rx_signal_file,
|
|||||||
|
|
||||||
|
|
||||||
// thread that sends the samples to the FPGA
|
// thread that sends the samples to the FPGA
|
||||||
void sending_thread(const gr::top_block_sptr& top_block, const char *file_name)
|
void sending_thread(const gr::top_block_sptr &top_block, const char *file_name)
|
||||||
{
|
{
|
||||||
// file descriptor
|
// file descriptor
|
||||||
FILE *rx_signal_file; // file descriptor
|
FILE *rx_signal_file; // file descriptor
|
||||||
@ -171,7 +171,7 @@ class GpsL1CADllPllTrackingTestFpga_msg_rx : public gr::block
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
friend GpsL1CADllPllTrackingTestFpga_msg_rx_sptr GpsL1CADllPllTrackingTestFpga_msg_rx_make();
|
friend GpsL1CADllPllTrackingTestFpga_msg_rx_sptr GpsL1CADllPllTrackingTestFpga_msg_rx_make();
|
||||||
void msg_handler_events(const pmt::pmt_t& msg);
|
void msg_handler_events(const pmt::pmt_t &msg);
|
||||||
GpsL1CADllPllTrackingTestFpga_msg_rx();
|
GpsL1CADllPllTrackingTestFpga_msg_rx();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -187,7 +187,7 @@ GpsL1CADllPllTrackingTestFpga_msg_rx_sptr GpsL1CADllPllTrackingTestFpga_msg_rx_m
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GpsL1CADllPllTrackingTestFpga_msg_rx::msg_handler_events(const pmt::pmt_t& msg)
|
void GpsL1CADllPllTrackingTestFpga_msg_rx::msg_handler_events(const pmt::pmt_t &msg)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user