summaryrefslogtreecommitdiffstats
path: root/src/OutputUHD.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-06-12 16:14:17 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-06-12 16:14:17 +0200
commit7ac0d2877fd4bccc3b28653e086849b49b655ace (patch)
tree219b38e53f3d2ef3ba4a1e874a7ec8b206df6b14 /src/OutputUHD.h
parentf73442eb24efa5842d625afa8715737c64863dc9 (diff)
downloaddabmod-7ac0d2877fd4bccc3b28653e086849b49b655ace.tar.gz
dabmod-7ac0d2877fd4bccc3b28653e086849b49b655ace.tar.bz2
dabmod-7ac0d2877fd4bccc3b28653e086849b49b655ace.zip
Add some sort of initial gps check
Diffstat (limited to 'src/OutputUHD.h')
-rw-r--r--src/OutputUHD.h17
1 files changed, 15 insertions, 2 deletions
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<bool> gps_fix_pt;
boost::unique_future<bool> 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;