mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-30 10:54:50 +00:00
Remove warnings
This commit is contained in:
parent
f8f235f7dd
commit
df0021cfb0
@ -39,16 +39,21 @@ void TcpCmdInterface::set_pvt(std::shared_ptr<PvtInterface> PVT_sptr)
|
|||||||
{
|
{
|
||||||
PVT_sptr_ = PVT_sptr;
|
PVT_sptr_ = PVT_sptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
time_t TcpCmdInterface::get_utc_time()
|
time_t TcpCmdInterface::get_utc_time()
|
||||||
{
|
{
|
||||||
return receiver_utc_time_;
|
return receiver_utc_time_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
arma::vec TcpCmdInterface::get_LLH()
|
arma::vec TcpCmdInterface::get_LLH()
|
||||||
{
|
{
|
||||||
return arma::vec{rx_latitude_, rx_longitude_, rx_altitude_};
|
return arma::vec{rx_latitude_, rx_longitude_, rx_altitude_};
|
||||||
}
|
}
|
||||||
std::string TcpCmdInterface::reset(const std::vector<std::string> &commandLine)
|
|
||||||
|
|
||||||
|
std::string TcpCmdInterface::reset(const std::vector<std::string> &commandLine __attribute__((unused)))
|
||||||
{
|
{
|
||||||
std::string response;
|
std::string response;
|
||||||
std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory());
|
std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory());
|
||||||
@ -65,7 +70,8 @@ std::string TcpCmdInterface::reset(const std::vector<std::string> &commandLine)
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string TcpCmdInterface::standby(const std::vector<std::string> &commandLine)
|
|
||||||
|
std::string TcpCmdInterface::standby(const std::vector<std::string> &commandLine __attribute__((unused)))
|
||||||
{
|
{
|
||||||
std::string response;
|
std::string response;
|
||||||
std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory());
|
std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory());
|
||||||
@ -81,7 +87,8 @@ std::string TcpCmdInterface::standby(const std::vector<std::string> &commandLine
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string TcpCmdInterface::status(const std::vector<std::string> &commandLine)
|
|
||||||
|
std::string TcpCmdInterface::status(const std::vector<std::string> &commandLine __attribute__((unused)))
|
||||||
{
|
{
|
||||||
std::stringstream str_stream;
|
std::stringstream str_stream;
|
||||||
//todo: implement the receiver status report
|
//todo: implement the receiver status report
|
||||||
@ -130,18 +137,18 @@ std::string TcpCmdInterface::status(const std::vector<std::string> &commandLine)
|
|||||||
return str_stream.str();
|
return str_stream.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string TcpCmdInterface::hotstart(const std::vector<std::string> &commandLine)
|
std::string TcpCmdInterface::hotstart(const std::vector<std::string> &commandLine)
|
||||||
{
|
{
|
||||||
std::string response;
|
std::string response;
|
||||||
if (commandLine.size() > 5)
|
if (commandLine.size() > 5)
|
||||||
{
|
{
|
||||||
//read commandline time parameter
|
// Read commandline time parameter
|
||||||
struct tm tm;
|
struct tm tm;
|
||||||
strptime(commandLine.at(1).c_str(), "%d/%m/%Y %H:%M:%S", &tm);
|
strptime(commandLine.at(1).c_str(), "%d/%m/%Y %H:%M:%S", &tm);
|
||||||
receiver_utc_time_ = timegm(&tm);
|
receiver_utc_time_ = timegm(&tm);
|
||||||
|
|
||||||
|
// Read latitude, longitude, and height
|
||||||
//read latitude, longitude, and height
|
|
||||||
rx_latitude_ = std::stod(commandLine.at(3).c_str());
|
rx_latitude_ = std::stod(commandLine.at(3).c_str());
|
||||||
rx_longitude_ = std::stod(commandLine.at(4).c_str());
|
rx_longitude_ = std::stod(commandLine.at(4).c_str());
|
||||||
rx_altitude_ = std::stod(commandLine.at(5).c_str());
|
rx_altitude_ = std::stod(commandLine.at(5).c_str());
|
||||||
@ -166,24 +173,25 @@ std::string TcpCmdInterface::hotstart(const std::vector<std::string> &commandLin
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
response = "ERROR: time parameter not found, please use hotstart %d/%m/%Y %H:%M:%S\n";
|
response = "ERROR: time parameter not found, please use hotstart %d/%m/%Y %H:%M:%S Lat Long H\n";
|
||||||
}
|
}
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string TcpCmdInterface::warmstart(const std::vector<std::string> &commandLine)
|
std::string TcpCmdInterface::warmstart(const std::vector<std::string> &commandLine)
|
||||||
{
|
{
|
||||||
std::string response;
|
std::string response;
|
||||||
if (commandLine.size() > 5)
|
if (commandLine.size() > 5)
|
||||||
{
|
{
|
||||||
std::string tmp_str;
|
std::string tmp_str;
|
||||||
//read commandline time parameter
|
// Read commandline time parameter
|
||||||
struct tm tm;
|
struct tm tm;
|
||||||
tmp_str = commandLine.at(1) + commandLine.at(2);
|
tmp_str = commandLine.at(1) + commandLine.at(2);
|
||||||
strptime(tmp_str.c_str(), "%d/%m/%Y %H:%M:%S", &tm);
|
strptime(tmp_str.c_str(), "%d/%m/%Y %H:%M:%S", &tm);
|
||||||
receiver_utc_time_ = timegm(&tm);
|
receiver_utc_time_ = timegm(&tm);
|
||||||
|
|
||||||
//read latitude, longitude, and height
|
// Read latitude, longitude, and height
|
||||||
rx_latitude_ = std::stod(commandLine.at(3).c_str());
|
rx_latitude_ = std::stod(commandLine.at(3).c_str());
|
||||||
rx_longitude_ = std::stod(commandLine.at(4).c_str());
|
rx_longitude_ = std::stod(commandLine.at(4).c_str());
|
||||||
rx_altitude_ = std::stod(commandLine.at(5).c_str());
|
rx_altitude_ = std::stod(commandLine.at(5).c_str());
|
||||||
@ -196,7 +204,7 @@ std::string TcpCmdInterface::warmstart(const std::vector<std::string> &commandLi
|
|||||||
std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory());
|
std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory());
|
||||||
if (control_queue_ != nullptr)
|
if (control_queue_ != nullptr)
|
||||||
{
|
{
|
||||||
control_queue_->handle(cmf->GetQueueMessage(300, 13)); //send the standby message (who=300,what=13)
|
control_queue_->handle(cmf->GetQueueMessage(300, 13)); // send the warmstart message (who=300,what=13)
|
||||||
response = "OK\n";
|
response = "OK\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -213,13 +221,13 @@ std::string TcpCmdInterface::warmstart(const std::vector<std::string> &commandLi
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string TcpCmdInterface::coldstart(const std::vector<std::string> &commandLine)
|
std::string TcpCmdInterface::coldstart(const std::vector<std::string> &commandLine __attribute__((unused)))
|
||||||
{
|
{
|
||||||
std::string response;
|
std::string response;
|
||||||
std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory());
|
std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory());
|
||||||
if (control_queue_ != nullptr)
|
if (control_queue_ != nullptr)
|
||||||
{
|
{
|
||||||
control_queue_->handle(cmf->GetQueueMessage(300, 11)); //send the standby message (who=300,what=11)
|
control_queue_->handle(cmf->GetQueueMessage(300, 11)); // send the coldstart message (who=300,what=11)
|
||||||
response = "OK\n";
|
response = "OK\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -229,7 +237,8 @@ std::string TcpCmdInterface::coldstart(const std::vector<std::string> &commandLi
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string TcpCmdInterface::set_ch_satellite(const std::vector<std::string> &commandLine)
|
|
||||||
|
std::string TcpCmdInterface::set_ch_satellite(const std::vector<std::string> &commandLine __attribute__((unused)))
|
||||||
{
|
{
|
||||||
std::string response;
|
std::string response;
|
||||||
//todo: implement the set satellite command
|
//todo: implement the set satellite command
|
||||||
@ -266,6 +275,8 @@ void TcpCmdInterface::set_msg_queue(gr::msg_queue::sptr control_queue)
|
|||||||
{
|
{
|
||||||
control_queue_ = control_queue;
|
control_queue_ = control_queue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TcpCmdInterface::run_cmd_server(int tcp_port)
|
void TcpCmdInterface::run_cmd_server(int tcp_port)
|
||||||
{
|
{
|
||||||
// Get the port from the parameters
|
// Get the port from the parameters
|
||||||
|
Loading…
Reference in New Issue
Block a user