usrp-users@lists.ettus.com

Discussion and technical support related to USRP, UHD, RFNoC

View all threads

Broken support of generic NMEA compatible GPSes

PK
Piotr Krysik
Tue, Dec 4, 2012 2:29 PM

Hi,

At the beginning of method update_cached_sensors(...) of class
gps_ctrl_impl there is a condition:

if(not gps_detected() || (gps_type != GPS_TYPE_JACKSON_LABS)) {
UHD_MSG(error) << "get_stat(): unsupported GPS or no GPS detected";
return std::string();
}

Even if constructor of the class detects that the gps_type is a
GPS_TYPE_GENERIC_NMEA it's impossible that the device will be supported
properly because of this single condition.

I would suggest following correction:

diff --git a/host/lib/usrp/gps_ctrl.cpp b/host/lib/usrp/gps_ctrl.cpp
index 917f115..8f7731f 100644
--- a/host/lib/usrp/gps_ctrl.cpp
+++ b/host/lib/usrp/gps_ctrl.cpp
@@ -63,7 +64,7 @@ private:
}

std::string update_cached_sensors(const std::string sensor) {

  • if(not gps_detected() || (gps_type != GPS_TYPE_JACKSON_LABS)) {
  • if(not gps_detected()) {
    UHD_MSG(error) << "get_stat(): unsupported GPS or no GPS detected";
    return std::string();
    }

--
Piotr Krysik
pkrysik@elka.pw.edu.pl

Hi, At the beginning of method update_cached_sensors(...) of class gps_ctrl_impl there is a condition: if(not gps_detected() || (gps_type != GPS_TYPE_JACKSON_LABS)) { UHD_MSG(error) << "get_stat(): unsupported GPS or no GPS detected"; return std::string(); } Even if constructor of the class detects that the gps_type is a GPS_TYPE_GENERIC_NMEA it's impossible that the device will be supported properly because of this single condition. I would suggest following correction: diff --git a/host/lib/usrp/gps_ctrl.cpp b/host/lib/usrp/gps_ctrl.cpp index 917f115..8f7731f 100644 --- a/host/lib/usrp/gps_ctrl.cpp +++ b/host/lib/usrp/gps_ctrl.cpp @@ -63,7 +64,7 @@ private: } std::string update_cached_sensors(const std::string sensor) { - if(not gps_detected() || (gps_type != GPS_TYPE_JACKSON_LABS)) { + if(not gps_detected()) { UHD_MSG(error) << "get_stat(): unsupported GPS or no GPS detected"; return std::string(); } -- Piotr Krysik pkrysik@elka.pw.edu.pl