From 7ac0d2877fd4bccc3b28653e086849b49b655ace Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 12 Jun 2015 16:14:17 +0200 Subject: Add some sort of initial gps check --- src/OutputUHD.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/OutputUHD.h') diff --git a/src/OutputUHD.h b/src/OutputUHD.h index 49489e3..bc01223 100644 --- a/src/OutputUHD.h +++ b/src/OutputUHD.h @@ -172,16 +172,24 @@ class UHDWorker { double last_pps; // GPS Fix check variables - double last_gps_fix_check; int num_checks_without_gps_fix; + struct timespec first_gps_fix_check; + struct timespec last_gps_fix_check; + struct timespec time_last_frame; boost::packaged_task gps_fix_pt; boost::unique_future gps_fix_future; boost::thread gps_fix_task; - // Transmit timeout static const double tx_timeout = 20.0; + // Wait time in seconds to get fix + static const int initial_gps_fix_wait = 60; + + // Interval for checking the GPS at runtime + static const double gps_fix_check_interval = 10.0; // seconds + + void process(); void process_errhandler(); @@ -189,6 +197,11 @@ class UHDWorker { void handle_frame(const struct UHDWorkerFrameData *frame); void tx_frame(const struct UHDWorkerFrameData *frame); + void check_gps(); + + void set_usrp_time_gps(); + + void initial_gps_check(); struct UHDWorkerData *uwd; boost::thread uhd_thread; -- cgit v1.2.3