1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-06-11 11:04:09 +00:00

Pass parameters by reference instead of by value

This commit is contained in:
Carles Fernandez 2017-08-17 17:21:45 +02:00
parent a23733e716
commit 481c6c44c6
2 changed files with 6 additions and 6 deletions

View File

@ -616,7 +616,7 @@ void Pvt_Solution::set_valid_position(bool is_valid)
} }
void Pvt_Solution::set_rx_pos(arma::vec pos) void Pvt_Solution::set_rx_pos(const arma::vec & pos)
{ {
d_rx_pos = pos; d_rx_pos = pos;
} }
@ -634,7 +634,7 @@ boost::posix_time::ptime Pvt_Solution::get_position_UTC_time() const
} }
void Pvt_Solution::set_position_UTC_time(const boost::posix_time::ptime pt) void Pvt_Solution::set_position_UTC_time(const boost::posix_time::ptime & pt)
{ {
d_position_UTC_time = pt; d_position_UTC_time = pt;
} }
@ -821,7 +821,7 @@ double Pvt_Solution::get_visible_satellites_CN0_dB(size_t index) const
} }
void Pvt_Solution::set_Q(arma::mat Q) void Pvt_Solution::set_Q(const arma::mat & Q)
{ {
d_Q = Q; d_Q = Q;
} }

View File

@ -97,14 +97,14 @@ public:
double get_avg_longitude() const; //!< Get RX position averaged Longitude WGS84 [deg] double get_avg_longitude() const; //!< Get RX position averaged Longitude WGS84 [deg]
double get_avg_height() const; //!< Get RX position averaged height WGS84 [m] double get_avg_height() const; //!< Get RX position averaged height WGS84 [m]
void set_rx_pos(arma::vec pos); void set_rx_pos(const arma::vec & pos);
arma::vec get_rx_pos() const; arma::vec get_rx_pos() const;
bool is_valid_position() const; bool is_valid_position() const;
void set_valid_position(bool is_valid); void set_valid_position(bool is_valid);
boost::posix_time::ptime get_position_UTC_time() const; boost::posix_time::ptime get_position_UTC_time() const;
void set_position_UTC_time(const boost::posix_time::ptime pt); void set_position_UTC_time(const boost::posix_time::ptime & pt);
int get_num_valid_observations() const; //!< Get the number of valid pseudorange observations (valid satellites) int get_num_valid_observations() const; //!< Get the number of valid pseudorange observations (valid satellites)
void set_num_valid_observations(int num); //!< Set the number of valid pseudorange observations (valid satellites) void set_num_valid_observations(int num); //!< Set the number of valid pseudorange observations (valid satellites)
@ -131,7 +131,7 @@ public:
void set_averaging_flag(bool flag); void set_averaging_flag(bool flag);
// DOP estimations // DOP estimations
void set_Q(arma::mat Q); void set_Q(const arma::mat & Q);
int compute_DOP(); //!< Compute Dilution Of Precision parameters int compute_DOP(); //!< Compute Dilution Of Precision parameters
double get_GDOP() const; double get_GDOP() const;