|
4 | 4 | using namespace EKFS; |
5 | 5 | using namespace Eigen; |
6 | 6 |
|
7 | | -EKFSym::EKFSym(std::string name, Map<MatrixXdr> Q, Map<VectorXd> x_initial, Map<MatrixXdr> P_initial, int dim_main, |
8 | | - int dim_main_err, int N, int dim_augment, int dim_augment_err, std::vector<int> maha_test_kinds, |
9 | | - std::vector<int> quaternion_idxs, std::vector<std::string> global_vars, double max_rewind_age) |
| 7 | +EKFSym::EKFSym(std::string name_, Map<MatrixXdr> Q_, Map<VectorXd> x_initial, Map<MatrixXdr> P_initial, int dim_main_, |
| 8 | + int dim_main_err_, int N_, int dim_augment_, int dim_augment_err_, std::vector<int> maha_test_kinds_, |
| 9 | + std::vector<int> quaternion_idxs_, std::vector<std::string> global_vars_, double max_rewind_age_) |
10 | 10 | { |
11 | 11 | // TODO: add logger |
12 | | - this->ekf = ekf_lookup(name); |
| 12 | + this->ekf = ekf_lookup(name_); |
13 | 13 | assert(this->ekf); |
14 | 14 |
|
15 | | - this->msckf = N > 0; |
16 | | - this->N = N; |
17 | | - this->dim_augment = dim_augment; |
18 | | - this->dim_augment_err = dim_augment_err; |
19 | | - this->dim_main = dim_main; |
20 | | - this->dim_main_err = dim_main_err; |
| 15 | + this->msckf = N_ > 0; |
| 16 | + this->N = N_; |
| 17 | + this->dim_augment = dim_augment_; |
| 18 | + this->dim_augment_err = dim_augment_err_; |
| 19 | + this->dim_main = dim_main_; |
| 20 | + this->dim_main_err = dim_main_err_; |
21 | 21 |
|
22 | 22 | this->dim_x = x_initial.rows(); |
23 | 23 | this->dim_err = P_initial.rows(); |
24 | 24 |
|
25 | 25 | assert(dim_main + dim_augment * N == dim_x); |
26 | 26 | assert(dim_main_err + dim_augment_err * N == this->dim_err); |
27 | | - assert(Q.rows() == P_initial.rows() && Q.cols() == P_initial.cols()); |
| 27 | + assert(Q_.rows() == P_initial.rows() && Q_.cols() == P_initial.cols()); |
28 | 28 |
|
29 | 29 | // kinds that should get mahalanobis distance |
30 | 30 | // tested for outlier rejection |
31 | | - this->maha_test_kinds = maha_test_kinds; |
| 31 | + this->maha_test_kinds = maha_test_kinds_; |
32 | 32 |
|
33 | 33 | // quaternions need normalization |
34 | | - this->quaternion_idxs = quaternion_idxs; |
| 34 | + this->quaternion_idxs = quaternion_idxs_; |
35 | 35 |
|
36 | | - this->global_vars = global_vars; |
| 36 | + this->global_vars = global_vars_; |
37 | 37 |
|
38 | 38 | // Process noise |
39 | | - this->Q = Q; |
| 39 | + this->Q = Q_; |
40 | 40 |
|
41 | | - this->max_rewind_age = max_rewind_age; |
| 41 | + this->max_rewind_age = max_rewind_age_; |
42 | 42 | this->init_state(x_initial, P_initial, NAN); |
43 | 43 | } |
44 | 44 |
|
|
0 commit comments