mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-31 11:19:18 +00:00
Improve const correctness
This commit is contained in:
parent
3ddcfc786e
commit
0cb1ed0764
@ -354,19 +354,19 @@ void galileo_telemetry_decoder_gs::decode_FNAV_word(float *page_symbols, int32_t
|
|||||||
// 4. Push the new navigation data to the queues
|
// 4. Push the new navigation data to the queues
|
||||||
if (d_fnav_nav.have_new_ephemeris() == true)
|
if (d_fnav_nav.have_new_ephemeris() == true)
|
||||||
{
|
{
|
||||||
std::shared_ptr<Galileo_Ephemeris> tmp_obj = std::make_shared<Galileo_Ephemeris>(d_fnav_nav.get_ephemeris());
|
const std::shared_ptr<Galileo_Ephemeris> tmp_obj = std::make_shared<Galileo_Ephemeris>(d_fnav_nav.get_ephemeris());
|
||||||
std::cout << TEXT_MAGENTA << "New Galileo E5a F/NAV message received in channel " << d_channel << ": ephemeris from satellite " << d_satellite << TEXT_RESET << '\n';
|
std::cout << TEXT_MAGENTA << "New Galileo E5a F/NAV message received in channel " << d_channel << ": ephemeris from satellite " << d_satellite << TEXT_RESET << '\n';
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
}
|
}
|
||||||
if (d_fnav_nav.have_new_iono_and_GST() == true)
|
if (d_fnav_nav.have_new_iono_and_GST() == true)
|
||||||
{
|
{
|
||||||
std::shared_ptr<Galileo_Iono> tmp_obj = std::make_shared<Galileo_Iono>(d_fnav_nav.get_iono());
|
const std::shared_ptr<Galileo_Iono> tmp_obj = std::make_shared<Galileo_Iono>(d_fnav_nav.get_iono());
|
||||||
std::cout << TEXT_MAGENTA << "New Galileo E5a F/NAV message received in channel " << d_channel << ": iono/GST model parameters from satellite " << d_satellite << TEXT_RESET << '\n';
|
std::cout << TEXT_MAGENTA << "New Galileo E5a F/NAV message received in channel " << d_channel << ": iono/GST model parameters from satellite " << d_satellite << TEXT_RESET << '\n';
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
}
|
}
|
||||||
if (d_fnav_nav.have_new_utc_model() == true)
|
if (d_fnav_nav.have_new_utc_model() == true)
|
||||||
{
|
{
|
||||||
std::shared_ptr<Galileo_Utc_Model> tmp_obj = std::make_shared<Galileo_Utc_Model>(d_fnav_nav.get_utc_model());
|
const std::shared_ptr<Galileo_Utc_Model> tmp_obj = std::make_shared<Galileo_Utc_Model>(d_fnav_nav.get_utc_model());
|
||||||
std::cout << TEXT_MAGENTA << "New Galileo E5a F/NAV message received in channel " << d_channel << ": UTC model parameters from satellite " << d_satellite << TEXT_RESET << '\n';
|
std::cout << TEXT_MAGENTA << "New Galileo E5a F/NAV message received in channel " << d_channel << ": UTC model parameters from satellite " << d_satellite << TEXT_RESET << '\n';
|
||||||
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
|
||||||
}
|
}
|
||||||
|
@ -514,7 +514,7 @@ Viterbi_Decoder::Prev::~Prev()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int Viterbi_Decoder::Prev::get_anchestor_state_of_current_state(int current_state)
|
int Viterbi_Decoder::Prev::get_anchestor_state_of_current_state(int current_state) const
|
||||||
{
|
{
|
||||||
// std::cout << "get prev state: for state " << current_state << " at time " << t << ", the prev state at time " << t - 1 << " is " << state[current_state] << '\n';
|
// std::cout << "get prev state: for state " << current_state << " at time " << t << ", the prev state at time " << t - 1 << " is " << state[current_state] << '\n';
|
||||||
if (num_states > current_state)
|
if (num_states > current_state)
|
||||||
@ -527,7 +527,7 @@ int Viterbi_Decoder::Prev::get_anchestor_state_of_current_state(int current_stat
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int Viterbi_Decoder::Prev::get_bit_of_current_state(int current_state)
|
int Viterbi_Decoder::Prev::get_bit_of_current_state(int current_state) const
|
||||||
{
|
{
|
||||||
// std::cout << "get prev bit : for state " << current_state << " at time " << t << ", the send bit is " << bit[current_state] << '\n';
|
// std::cout << "get prev bit : for state " << current_state << " at time " << t << ", the send bit is " << bit[current_state] << '\n';
|
||||||
if (num_states > current_state)
|
if (num_states > current_state)
|
||||||
@ -538,7 +538,7 @@ int Viterbi_Decoder::Prev::get_bit_of_current_state(int current_state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
float Viterbi_Decoder::Prev::get_metric_of_current_state(int current_state)
|
float Viterbi_Decoder::Prev::get_metric_of_current_state(int current_state) const
|
||||||
{
|
{
|
||||||
if (num_states > current_state)
|
if (num_states > current_state)
|
||||||
{
|
{
|
||||||
@ -548,7 +548,7 @@ float Viterbi_Decoder::Prev::get_metric_of_current_state(int current_state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int Viterbi_Decoder::Prev::get_t()
|
int Viterbi_Decoder::Prev::get_t() const
|
||||||
{
|
{
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
@ -58,10 +58,10 @@ private:
|
|||||||
Prev& operator=(const Prev& other);
|
Prev& operator=(const Prev& other);
|
||||||
~Prev();
|
~Prev();
|
||||||
|
|
||||||
int get_anchestor_state_of_current_state(int current_state);
|
int get_anchestor_state_of_current_state(int current_state) const;
|
||||||
int get_bit_of_current_state(int current_state);
|
int get_bit_of_current_state(int current_state) const;
|
||||||
float get_metric_of_current_state(int current_state);
|
float get_metric_of_current_state(int current_state) const;
|
||||||
int get_t();
|
int get_t() const;
|
||||||
void set_current_state_as_ancestor_of_next_state(int next_state, int current_state);
|
void set_current_state_as_ancestor_of_next_state(int next_state, int current_state);
|
||||||
void set_decoded_bit_for_next_state(int next_state, int bit);
|
void set_decoded_bit_for_next_state(int next_state, int bit);
|
||||||
void set_survivor_branch_metric_of_next_state(int next_state, float metric);
|
void set_survivor_branch_metric_of_next_state(int next_state, float metric);
|
||||||
|
Loading…
Reference in New Issue
Block a user