mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 12:40:35 +00:00
Handle boost/math/common_factor_rt.hpp header deprecation in Boost 1.67, replaced by boost/integer/common_factor_rt.hpp which is available since Boost 1.58. The boost/math/common_factor_rt.hpp is kept for older versions of boost, so it can still build in old distributions such as Debian 8.10
This commit is contained in:
parent
3404ea1662
commit
826e51ef13
@ -16,6 +16,11 @@
|
||||
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
|
||||
if(Boost_VERSION LESS 105800)
|
||||
add_definitions(-DOLD_BOOST=1)
|
||||
endif(Boost_VERSION LESS 105800)
|
||||
|
||||
set(PVT_ADAPTER_SOURCES
|
||||
rtklib_pvt.cc
|
||||
)
|
||||
|
@ -34,7 +34,13 @@
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <boost/archive/xml_oarchive.hpp>
|
||||
#include <boost/archive/xml_iarchive.hpp>
|
||||
#if OLD_BOOST
|
||||
#include <boost/math/common_factor_rt.hpp>
|
||||
namespace bc = boost::math;
|
||||
#else
|
||||
#include <boost/integer/common_factor_rt.hpp>
|
||||
namespace bc = boost::integer;
|
||||
#endif
|
||||
#include <boost/serialization/map.hpp>
|
||||
#include <glog/logging.h>
|
||||
|
||||
@ -94,8 +100,8 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration,
|
||||
{
|
||||
rinex_version = 2;
|
||||
}
|
||||
int rinexobs_rate_ms = boost::math::lcm(configuration->property(role + ".rinexobs_rate_ms", 1000), output_rate_ms);
|
||||
int rinexnav_rate_ms = boost::math::lcm(configuration->property(role + ".rinexnav_rate_ms", 6000), output_rate_ms);
|
||||
int rinexobs_rate_ms = bc::lcm(configuration->property(role + ".rinexobs_rate_ms", 1000), output_rate_ms);
|
||||
int rinexnav_rate_ms = bc::lcm(configuration->property(role + ".rinexnav_rate_ms", 6000), output_rate_ms);
|
||||
|
||||
// RTCM Printer settings
|
||||
bool flag_rtcm_tty_port = configuration->property(role + ".flag_rtcm_tty_port", false);
|
||||
@ -104,13 +110,13 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration,
|
||||
unsigned short rtcm_tcp_port = configuration->property(role + ".rtcm_tcp_port", 2101);
|
||||
unsigned short rtcm_station_id = configuration->property(role + ".rtcm_station_id", 1234);
|
||||
// RTCM message rates: least common multiple with output_rate_ms
|
||||
int rtcm_MT1019_rate_ms = boost::math::lcm(configuration->property(role + ".rtcm_MT1019_rate_ms", 5000), output_rate_ms);
|
||||
int rtcm_MT1020_rate_ms = boost::math::lcm(configuration->property(role + ".rtcm_MT1020_rate_ms", 5000), output_rate_ms);
|
||||
int rtcm_MT1045_rate_ms = boost::math::lcm(configuration->property(role + ".rtcm_MT1045_rate_ms", 5000), output_rate_ms);
|
||||
int rtcm_MSM_rate_ms = boost::math::lcm(configuration->property(role + ".rtcm_MSM_rate_ms", 1000), output_rate_ms);
|
||||
int rtcm_MT1077_rate_ms = boost::math::lcm(configuration->property(role + ".rtcm_MT1077_rate_ms", rtcm_MSM_rate_ms), output_rate_ms);
|
||||
int rtcm_MT1087_rate_ms = boost::math::lcm(configuration->property(role + ".rtcm_MT1087_rate_ms", rtcm_MSM_rate_ms), output_rate_ms);
|
||||
int rtcm_MT1097_rate_ms = boost::math::lcm(configuration->property(role + ".rtcm_MT1097_rate_ms", rtcm_MSM_rate_ms), output_rate_ms);
|
||||
int rtcm_MT1019_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1019_rate_ms", 5000), output_rate_ms);
|
||||
int rtcm_MT1020_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1020_rate_ms", 5000), output_rate_ms);
|
||||
int rtcm_MT1045_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1045_rate_ms", 5000), output_rate_ms);
|
||||
int rtcm_MSM_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MSM_rate_ms", 1000), output_rate_ms);
|
||||
int rtcm_MT1077_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1077_rate_ms", rtcm_MSM_rate_ms), output_rate_ms);
|
||||
int rtcm_MT1087_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1087_rate_ms", rtcm_MSM_rate_ms), output_rate_ms);
|
||||
int rtcm_MT1097_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1097_rate_ms", rtcm_MSM_rate_ms), output_rate_ms);
|
||||
std::map<int, int> rtcm_msg_rate_ms;
|
||||
rtcm_msg_rate_ms[1019] = rtcm_MT1019_rate_ms;
|
||||
rtcm_msg_rate_ms[1020] = rtcm_MT1020_rate_ms;
|
||||
|
@ -16,6 +16,11 @@
|
||||
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
|
||||
if(Boost_VERSION LESS 105800)
|
||||
add_definitions(-DOLD_BOOST=1)
|
||||
endif(Boost_VERSION LESS 105800)
|
||||
|
||||
set(PVT_GR_BLOCKS_SOURCES
|
||||
rtklib_pvt_cc.cc
|
||||
)
|
||||
|
@ -29,12 +29,18 @@
|
||||
*/
|
||||
|
||||
#include "rtklib_pvt_cc.h"
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <boost/math/common_factor_rt.hpp>
|
||||
#include <boost/archive/xml_oarchive.hpp>
|
||||
#include <boost/archive/xml_iarchive.hpp>
|
||||
#include <boost/serialization/map.hpp>
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <boost/exception/all.hpp>
|
||||
#if OLD_BOOST
|
||||
#include <boost/math/common_factor_rt.hpp>
|
||||
namespace bc = boost::math;
|
||||
#else
|
||||
#include <boost/integer/common_factor_rt.hpp>
|
||||
namespace bc = boost::integer;
|
||||
#endif
|
||||
#include <boost/serialization/map.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
@ -304,7 +310,7 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels,
|
||||
}
|
||||
else
|
||||
{
|
||||
d_rtcm_MT1019_rate_ms = boost::math::lcm(5000, d_output_rate_ms); // default value if not set
|
||||
d_rtcm_MT1019_rate_ms = bc::lcm(5000, d_output_rate_ms); // default value if not set
|
||||
}
|
||||
if (rtcm_msg_rate_ms.find(1020) != rtcm_msg_rate_ms.end())
|
||||
{
|
||||
@ -312,7 +318,7 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels,
|
||||
}
|
||||
else
|
||||
{
|
||||
d_rtcm_MT1020_rate_ms = boost::math::lcm(5000, d_output_rate_ms); // default value if not set
|
||||
d_rtcm_MT1020_rate_ms = bc::lcm(5000, d_output_rate_ms); // default value if not set
|
||||
}
|
||||
if (rtcm_msg_rate_ms.find(1045) != rtcm_msg_rate_ms.end())
|
||||
{
|
||||
@ -320,7 +326,7 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels,
|
||||
}
|
||||
else
|
||||
{
|
||||
d_rtcm_MT1045_rate_ms = boost::math::lcm(5000, d_output_rate_ms); // default value if not set
|
||||
d_rtcm_MT1045_rate_ms = bc::lcm(5000, d_output_rate_ms); // default value if not set
|
||||
}
|
||||
if (rtcm_msg_rate_ms.find(1077) != rtcm_msg_rate_ms.end()) // whatever between 1071 and 1077
|
||||
{
|
||||
@ -328,7 +334,7 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels,
|
||||
}
|
||||
else
|
||||
{
|
||||
d_rtcm_MT1077_rate_ms = boost::math::lcm(1000, d_output_rate_ms); // default value if not set
|
||||
d_rtcm_MT1077_rate_ms = bc::lcm(1000, d_output_rate_ms); // default value if not set
|
||||
}
|
||||
if (rtcm_msg_rate_ms.find(1087) != rtcm_msg_rate_ms.end()) // whatever between 1081 and 1087
|
||||
{
|
||||
@ -336,7 +342,7 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels,
|
||||
}
|
||||
else
|
||||
{
|
||||
d_rtcm_MT1087_rate_ms = boost::math::lcm(1000, d_output_rate_ms); // default value if not set
|
||||
d_rtcm_MT1087_rate_ms = bc::lcm(1000, d_output_rate_ms); // default value if not set
|
||||
}
|
||||
if (rtcm_msg_rate_ms.find(1097) != rtcm_msg_rate_ms.end()) // whatever between 1091 and 1097
|
||||
{
|
||||
@ -345,8 +351,8 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels,
|
||||
}
|
||||
else
|
||||
{
|
||||
d_rtcm_MT1097_rate_ms = boost::math::lcm(1000, d_output_rate_ms); // default value if not set
|
||||
d_rtcm_MSM_rate_ms = boost::math::lcm(1000, d_output_rate_ms); // default value if not set
|
||||
d_rtcm_MT1097_rate_ms = bc::lcm(1000, d_output_rate_ms); // default value if not set
|
||||
d_rtcm_MSM_rate_ms = bc::lcm(1000, d_output_rate_ms); // default value if not set
|
||||
}
|
||||
b_rtcm_writing_started = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user