summaryrefslogtreecommitdiff
path: root/gr-vrt/src/vrt_source_32fc.cc
diff options
context:
space:
mode:
authorJosh Blum2009-09-29 15:34:58 -0700
committerJosh Blum2009-09-29 15:34:58 -0700
commit57e810d3f07909947a9fb2daeb507b439d5f4f50 (patch)
tree3eac2f3de1a87e614ef7ac2df4f3d4df51aa803a /gr-vrt/src/vrt_source_32fc.cc
parent85a8e6cdb0fb05b12b071c81f9eb025b380fb155 (diff)
downloadgnuradio-57e810d3f07909947a9fb2daeb507b439d5f4f50.tar.gz
gnuradio-57e810d3f07909947a9fb2daeb507b439d5f4f50.tar.bz2
gnuradio-57e810d3f07909947a9fb2daeb507b439d5f4f50.zip
added access methods for gps stuff
Diffstat (limited to 'gr-vrt/src/vrt_source_32fc.cc')
-rw-r--r--gr-vrt/src/vrt_source_32fc.cc22
1 files changed, 14 insertions, 8 deletions
diff --git a/gr-vrt/src/vrt_source_32fc.cc b/gr-vrt/src/vrt_source_32fc.cc
index 0091619ab..3035813cc 100644
--- a/gr-vrt/src/vrt_source_32fc.cc
+++ b/gr-vrt/src/vrt_source_32fc.cc
@@ -171,14 +171,20 @@ vrt_source_32fc::work(int noutput_items,
//we have a context packet, grab its useful information...
//remember that things are in network byte order!
if (h.get_if_context()){
- d_lo_freq = vrt_freq_to_double(ntohll(h.get_if_context()->caldiv.lo_freq));
- d_cal_freq = vrt_freq_to_double(ntohll(h.get_if_context()->caldiv.cal_freq));
- d_lo_locked = bool(ntohl(h.get_if_context()->caldiv.lo_locked));
- d_cal_locked = bool(ntohl(h.get_if_context()->caldiv.cal_locked));
- d_cal_enabled = bool(ntohl(h.get_if_context()->caldiv.cal_enabled));
- d_caldiv_temp = vrt_temp_to_double(ntohl(h.get_if_context()->caldiv.temp));
- d_caldiv_ser = ntohl(h.get_if_context()->caldiv.ser);
- d_caldiv_rev = ntohl(h.get_if_context()->caldiv.rev);
+ //extract caldiv stuff
+ d_lo_freq = vrt_freq_to_double(ntohx(h.get_if_context()->caldiv.lo_freq));
+ d_cal_freq = vrt_freq_to_double(ntohx(h.get_if_context()->caldiv.cal_freq));
+ d_lo_locked = bool(ntohx(h.get_if_context()->caldiv.lo_locked));
+ d_cal_locked = bool(ntohx(h.get_if_context()->caldiv.cal_locked));
+ d_cal_enabled = bool(ntohx(h.get_if_context()->caldiv.cal_enabled));
+ d_caldiv_temp = vrt_temp_to_double(ntohx(h.get_if_context()->caldiv.temp));
+ d_caldiv_ser = ntohx(h.get_if_context()->caldiv.ser);
+ d_caldiv_rev = ntohx(h.get_if_context()->caldiv.rev);
+ //extract gps stuff
+ d_utc_time = ntohx(h.get_if_context()->gps.formatted_gps.integer_secs);
+ d_altitude = vrt_altitude_to_double(ntohx(h.get_if_context()->gps.formatted_gps.altitude));
+ d_longitude = vrt_geo_angle_to_double(ntohx(h.get_if_context()->gps.formatted_gps.longitude));
+ d_latitude = vrt_geo_angle_to_double(ntohx(h.get_if_context()->gps.formatted_gps.latitude));
}
return oo;