Skip to content

Commit

Permalink
fixed init gnss recv.
Browse files Browse the repository at this point in the history
  • Loading branch information
gcasadesus committed Dec 23, 2024
1 parent 15720f1 commit ee4418f
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions source/cpp/measurements/gnss_transmitter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,19 @@
namespace lupnt {

void GnssTransmitter::InitializeGnssTransmitter() {
if (gnss_type_ == "GPS") {
InitializeGPSTransmitter();
} else if (gnss_type_ == "GLONASS") {
InitializeGLONASSTransmitter();
} else if (gnss_type_ == "GALILEO") {
InitializeGALILEOTransmitter();
} else if (gnss_type_ == "BEIDOU") {
InitializeBEIDOUTransmitter();
} else {
std::runtime_error("Invalid GNSS type");
if (gnss_type_.find("GPS") != std::string::npos) {
InitializeGPSTransmitter();
} else if (gnss_type_.find("COSMOS") != std::string::npos) {
InitializeGLONASSTransmitter();
} else if (gnss_type_.find("GSAT") != std::string::npos) {
InitializeGALILEOTransmitter();
} else if (gnss_type_.find("BEIDOU") != std::string::npos) {
InitializeBEIDOUTransmitter();
} else {
throw std::runtime_error("Invalid GNSS type");
}
}
}


/**
* @brief Initialize the GPS transmitter
Expand Down

0 comments on commit ee4418f

Please sign in to comment.