mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-11-16 06:44:57 +00:00
Make clang-format happy
This commit is contained in:
parent
dd7b1f9f6a
commit
accd9f7c34
@ -42,25 +42,27 @@ void Pvt_Kf::init_Kf(const arma::vec& p,
|
||||
d_H = arma::eye(6, 6);
|
||||
|
||||
// measurement matrix static covariances
|
||||
if(estatic_measures_sd){
|
||||
d_R = {{pow(measures_ecef_pos_sd_m, 2.0), 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||
{0.0, pow(measures_ecef_pos_sd_m, 2.0), 0.0, 0.0, 0.0, 0.0},
|
||||
{0.0, 0.0, pow(measures_ecef_pos_sd_m, 2.0), 0.0, 0.0, 0.0},
|
||||
{0.0, 0.0, 0.0, pow(measures_ecef_vel_sd_ms, 2.0), 0.0, 0.0},
|
||||
{0.0, 0.0, 0.0, 0.0, pow(measures_ecef_vel_sd_ms, 2.0), 0.0},
|
||||
{0.0, 0.0, 0.0, 0.0, 0.0, pow(measures_ecef_vel_sd_ms, 2.0)}};
|
||||
if (estatic_measures_sd)
|
||||
{
|
||||
d_R = {{pow(measures_ecef_pos_sd_m, 2.0), 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||
{0.0, pow(measures_ecef_pos_sd_m, 2.0), 0.0, 0.0, 0.0, 0.0},
|
||||
{0.0, 0.0, pow(measures_ecef_pos_sd_m, 2.0), 0.0, 0.0, 0.0},
|
||||
{0.0, 0.0, 0.0, pow(measures_ecef_vel_sd_ms, 2.0), 0.0, 0.0},
|
||||
{0.0, 0.0, 0.0, 0.0, pow(measures_ecef_vel_sd_ms, 2.0), 0.0},
|
||||
{0.0, 0.0, 0.0, 0.0, 0.0, pow(measures_ecef_vel_sd_ms, 2.0)}};
|
||||
|
||||
d_static = true;
|
||||
|
||||
}else{
|
||||
d_static = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
d_R = {{res_p[0], res_p[3], res_p[5], 0.0, 0.0, 0.0},
|
||||
{res_p[3], res_p[1], res_p[4], 0.0, 0.0, 0.0},
|
||||
{res_p[4], res_p[5], res_p[2], 0.0, 0.0, 0.0},
|
||||
{0.0, 0.0, 0.0, pow(measures_ecef_vel_sd_ms, 2.0), 0.0, 0.0},
|
||||
{0.0, 0.0, 0.0, 0.0, pow(measures_ecef_vel_sd_ms, 2.0), 0.0},
|
||||
{0.0, 0.0, 0.0, 0.0, 0.0, pow(measures_ecef_vel_sd_ms, 2.0)}};
|
||||
{res_p[3], res_p[1], res_p[4], 0.0, 0.0, 0.0},
|
||||
{res_p[4], res_p[5], res_p[2], 0.0, 0.0, 0.0},
|
||||
{0.0, 0.0, 0.0, pow(measures_ecef_vel_sd_ms, 2.0), 0.0, 0.0},
|
||||
{0.0, 0.0, 0.0, 0.0, pow(measures_ecef_vel_sd_ms, 2.0), 0.0},
|
||||
{0.0, 0.0, 0.0, 0.0, 0.0, pow(measures_ecef_vel_sd_ms, 2.0)}};
|
||||
|
||||
d_static = false;
|
||||
d_static = false;
|
||||
}
|
||||
// system covariance matrix (static)
|
||||
d_Q = {{pow(system_ecef_pos_sd_m, 2.0), 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||
@ -119,18 +121,19 @@ void Pvt_Kf::run_Kf(const arma::vec& p, const arma::vec& v, const arma::vec& res
|
||||
// Measurement update
|
||||
try
|
||||
{
|
||||
if(!d_static){
|
||||
// Measurement residuals update
|
||||
d_R(0, 0) = res_p[0];
|
||||
d_R(0, 1) = res_p[3];
|
||||
d_R(0, 2) = res_p[5];
|
||||
d_R(1, 0) = res_p[3];
|
||||
d_R(1, 1) = res_p[1];
|
||||
d_R(1, 2) = res_p[4];
|
||||
d_R(2, 0) = res_p[5];
|
||||
d_R(2, 1) = res_p[4];
|
||||
d_R(2, 2) = res_p[2];
|
||||
}
|
||||
if (!d_static)
|
||||
{
|
||||
// Measurement residuals update
|
||||
d_R(0, 0) = res_p[0];
|
||||
d_R(0, 1) = res_p[3];
|
||||
d_R(0, 2) = res_p[5];
|
||||
d_R(1, 0) = res_p[3];
|
||||
d_R(1, 1) = res_p[1];
|
||||
d_R(1, 2) = res_p[4];
|
||||
d_R(2, 0) = res_p[5];
|
||||
d_R(2, 1) = res_p[4];
|
||||
d_R(2, 2) = res_p[2];
|
||||
}
|
||||
// Measurement update
|
||||
arma::vec z = arma::join_cols(p, v);
|
||||
arma::mat K = d_P_new_old * d_H.t() * arma::inv(d_H * d_P_new_old * d_H.t() + d_R); // Kalman gain
|
||||
|
Loading…
Reference in New Issue
Block a user