mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 04:30:33 +00:00
Add local definition of to_time_t to be compatible with Boost < 1.58
This commit is contained in:
parent
234c770f66
commit
3477f41198
@ -36,7 +36,6 @@
|
|||||||
#include "gnss_sdr_create_directory.h"
|
#include "gnss_sdr_create_directory.h"
|
||||||
#include <boost/archive/xml_oarchive.hpp>
|
#include <boost/archive/xml_oarchive.hpp>
|
||||||
#include <boost/archive/xml_iarchive.hpp>
|
#include <boost/archive/xml_iarchive.hpp>
|
||||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
|
||||||
#include <boost/exception/all.hpp>
|
#include <boost/exception/all.hpp>
|
||||||
#include <boost/filesystem/path.hpp>
|
#include <boost/filesystem/path.hpp>
|
||||||
#include <boost/serialization/map.hpp>
|
#include <boost/serialization/map.hpp>
|
||||||
@ -47,7 +46,6 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <boost/date_time/posix_time/conversion.hpp>
|
|
||||||
#if OLD_BOOST
|
#if OLD_BOOST
|
||||||
#include <boost/math/common_factor_rt.hpp>
|
#include <boost/math/common_factor_rt.hpp>
|
||||||
namespace bc = boost::math;
|
namespace bc = boost::math;
|
||||||
@ -909,7 +907,7 @@ bool rtklib_pvt_cc::get_latest_PVT(double* longitude_deg,
|
|||||||
*height_m = d_ls_pvt->get_height();
|
*height_m = d_ls_pvt->get_height();
|
||||||
*ground_speed_kmh = d_ls_pvt->get_speed_over_ground() * 3600.0 / 1000.0;
|
*ground_speed_kmh = d_ls_pvt->get_speed_over_ground() * 3600.0 / 1000.0;
|
||||||
*course_over_ground_deg = d_ls_pvt->get_course_over_ground();
|
*course_over_ground_deg = d_ls_pvt->get_course_over_ground();
|
||||||
*UTC_time = boost::posix_time::to_time_t(d_ls_pvt->get_position_UTC_time());
|
*UTC_time = to_time_t(d_ls_pvt->get_position_UTC_time());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -919,6 +917,7 @@ bool rtklib_pvt_cc::get_latest_PVT(double* longitude_deg,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_items,
|
int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_items,
|
||||||
gr_vector_void_star& output_items __attribute__((unused)))
|
gr_vector_void_star& output_items __attribute__((unused)))
|
||||||
{
|
{
|
||||||
|
@ -40,6 +40,8 @@
|
|||||||
#include "rtcm_printer.h"
|
#include "rtcm_printer.h"
|
||||||
#include "pvt_conf.h"
|
#include "pvt_conf.h"
|
||||||
#include "rtklib_solver.h"
|
#include "rtklib_solver.h"
|
||||||
|
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||||
|
#include <boost/date_time/gregorian/gregorian.hpp>
|
||||||
#include <gnuradio/sync_block.h>
|
#include <gnuradio/sync_block.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/ipc.h>
|
#include <sys/ipc.h>
|
||||||
@ -135,6 +137,11 @@ private:
|
|||||||
bool d_xml_storage;
|
bool d_xml_storage;
|
||||||
std::string xml_base_path;
|
std::string xml_base_path;
|
||||||
|
|
||||||
|
inline std::time_t to_time_t(boost::posix_time::ptime pt)
|
||||||
|
{
|
||||||
|
return (pt - boost::posix_time::ptime(boost::gregorian::date(1970, 1, 1))).total_seconds();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
rtklib_pvt_cc(uint32_t nchannels,
|
rtklib_pvt_cc(uint32_t nchannels,
|
||||||
|
Loading…
Reference in New Issue
Block a user