diff options
Diffstat (limited to 'gr-vrt/src')
-rw-r--r-- | gr-vrt/src/vrt_quadradio_source_32fc.h | 10 | ||||
-rw-r--r-- | gr-vrt/src/vrt_source_32fc.cc | 22 | ||||
-rw-r--r-- | gr-vrt/src/vrt_source_32fc.h | 6 |
3 files changed, 28 insertions, 10 deletions
diff --git a/gr-vrt/src/vrt_quadradio_source_32fc.h b/gr-vrt/src/vrt_quadradio_source_32fc.h index 799b07e86..45dad1f89 100644 --- a/gr-vrt/src/vrt_quadradio_source_32fc.h +++ b/gr-vrt/src/vrt_quadradio_source_32fc.h @@ -120,8 +120,14 @@ public: double get_lo_freq(void){return d_lo_freq;} bool get_lo_locked(void){return d_lo_locked;} double get_caldiv_temp(void){return d_caldiv_temp;} - int get_caldiv_ser_no(void){return d_caldiv_rev;} - int get_caldiv_rev_no(void){return d_caldiv_ser;} + int get_caldiv_serial(void){return d_caldiv_rev;} + int get_caldiv_revision(void){return d_caldiv_ser;} + + //gps public access methods + int get_utc_time(void){return d_utc_time;} + double get_altitude(void){return d_altitude;} + double get_longitude(void){return d_longitude;} + double get_latitude(void){return d_latitude;} }; 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; diff --git a/gr-vrt/src/vrt_source_32fc.h b/gr-vrt/src/vrt_source_32fc.h index 9d53fae33..46d80f442 100644 --- a/gr-vrt/src/vrt_source_32fc.h +++ b/gr-vrt/src/vrt_source_32fc.h @@ -43,6 +43,12 @@ protected: double d_caldiv_temp; int d_caldiv_rev; int d_caldiv_ser; + + //gps settings parsed from if context + int d_utc_time; + double d_altitude; + double d_longitude; + double d_latitude; public: ~vrt_source_32fc(); |