mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-11-15 06:14:58 +00:00
Telecommand status: show pretty signal names
This commit is contained in:
parent
e8a03c4855
commit
6a16813483
@ -44,6 +44,17 @@ TcpCmdInterface::TcpCmdInterface()
|
|||||||
rx_longitude_ = 0.0;
|
rx_longitude_ = 0.0;
|
||||||
rx_altitude_ = 0.0;
|
rx_altitude_ = 0.0;
|
||||||
receiver_utc_time_ = 0;
|
receiver_utc_time_ = 0;
|
||||||
|
|
||||||
|
map_signal_pretty_name_["1C"] = "L1 C/A";
|
||||||
|
map_signal_pretty_name_["1B"] = "E1";
|
||||||
|
map_signal_pretty_name_["1G"] = "L1 C/A";
|
||||||
|
map_signal_pretty_name_["2S"] = "L2C";
|
||||||
|
map_signal_pretty_name_["2G"] = "L2 C/A";
|
||||||
|
map_signal_pretty_name_["5X"] = "E5a";
|
||||||
|
map_signal_pretty_name_["7X"] = "E5b";
|
||||||
|
map_signal_pretty_name_["L5"] = "L5";
|
||||||
|
map_signal_pretty_name_["B1"] = "B1I";
|
||||||
|
map_signal_pretty_name_["B3"] = "B3I";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -131,10 +142,10 @@ std::string TcpCmdInterface::status(const std::vector<std::string> &commandLine
|
|||||||
{
|
{
|
||||||
std::stringstream str_stream;
|
std::stringstream str_stream;
|
||||||
|
|
||||||
str_stream << "----------------------------------------------------------------------------\n";
|
str_stream << "-------------------------------------------------------------------------\n";
|
||||||
str_stream << "| Ch | System | Signal | PRN | Mode | Tlm | Eph | Doppler | CN0 |\n";
|
str_stream << "| Ch | System | Signal | PRN | Mode | Tlm | Eph | Doppler | CN0 |\n";
|
||||||
str_stream << "| | | | | | | | [Hz] | [dB-Hz] |\n";
|
str_stream << "| | | | | | | | [Hz] | [dB-Hz] |\n";
|
||||||
str_stream << "----------------------------------------------------------------------------\n";
|
str_stream << "-------------------------------------------------------------------------\n";
|
||||||
|
|
||||||
int n_ch = static_cast<int>(channels_sptr_->size());
|
int n_ch = static_cast<int>(channels_sptr_->size());
|
||||||
for (int n = 0; n < n_ch; n++)
|
for (int n = 0; n < n_ch; n++)
|
||||||
@ -142,17 +153,21 @@ std::string TcpCmdInterface::status(const std::vector<std::string> &commandLine
|
|||||||
std::shared_ptr<Channel>
|
std::shared_ptr<Channel>
|
||||||
ch_sptr = std::dynamic_pointer_cast<Channel>(channels_sptr_->at(n));
|
ch_sptr = std::dynamic_pointer_cast<Channel>(channels_sptr_->at(n));
|
||||||
|
|
||||||
|
std::string sys = ch_sptr->get_signal().get_satellite().get_system();
|
||||||
|
std::string sig = map_signal_pretty_name_.at(ch_sptr->get_signal().get_signal_str());
|
||||||
|
uint32_t prn = ch_sptr->get_signal().get_satellite().get_PRN();
|
||||||
|
|
||||||
str_stream << std::fixed << std::setprecision(1)
|
str_stream << std::fixed << std::setprecision(1)
|
||||||
<< "| "
|
<< "| "
|
||||||
<< std::right << std::setw(3) << n
|
<< std::right << std::setw(3) << n
|
||||||
<< " | "
|
<< " | "
|
||||||
<< std::left << std::setw(7) << ch_sptr->get_signal().get_satellite().get_system()
|
<< std::left << std::setw(7) << sys
|
||||||
<< " | "
|
<< " | "
|
||||||
<< std::left << std::setw(9) << ch_sptr->get_signal().get_signal_str()
|
<< std::left << std::setw(6) << sig
|
||||||
<< " | "
|
<< " | "
|
||||||
<< std::right << std::setw(3) << ch_sptr->get_signal().get_satellite().get_PRN()
|
<< std::right << std::setw(3) << prn
|
||||||
<< " | "
|
<< " | "
|
||||||
<< std::left << std::setw(4) << "---"
|
<< std::left << std::setw(4) << "----"
|
||||||
<< " | "
|
<< " | "
|
||||||
<< std::left << std::setw(3) << "---"
|
<< std::left << std::setw(3) << "---"
|
||||||
<< " | "
|
<< " | "
|
||||||
@ -164,7 +179,7 @@ std::string TcpCmdInterface::status(const std::vector<std::string> &commandLine
|
|||||||
<< " |"
|
<< " |"
|
||||||
<< "\n";
|
<< "\n";
|
||||||
}
|
}
|
||||||
str_stream << "----------------------------------------------------------------------------\n";
|
str_stream << "-------------------------------------------------------------------------\n";
|
||||||
|
|
||||||
double longitude_deg;
|
double longitude_deg;
|
||||||
double latitude_deg;
|
double latitude_deg;
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
#include <map>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
@ -73,6 +74,8 @@ private:
|
|||||||
std::shared_ptr<PvtInterface> PVT_sptr_;
|
std::shared_ptr<PvtInterface> PVT_sptr_;
|
||||||
std::shared_ptr<std::vector<std::shared_ptr<ChannelInterface>>> channels_sptr_;
|
std::shared_ptr<std::vector<std::shared_ptr<ChannelInterface>>> channels_sptr_;
|
||||||
|
|
||||||
|
std::map<std::string, std::string> map_signal_pretty_name_;
|
||||||
|
|
||||||
float rx_latitude_;
|
float rx_latitude_;
|
||||||
float rx_longitude_;
|
float rx_longitude_;
|
||||||
float rx_altitude_;
|
float rx_altitude_;
|
||||||
|
Loading…
Reference in New Issue
Block a user