aboutsummaryrefslogtreecommitdiff
path: root/src/modules/att_pos_estimator_ekf
diff options
context:
space:
mode:
authorAnton Babushkin <anton.babushkin@me.com>2013-12-24 23:56:28 +0400
committerAnton Babushkin <anton.babushkin@me.com>2013-12-24 23:56:28 +0400
commit9dfe366e908ce0100875996c3ea0d4cfdfcc24bf (patch)
tree8d465ad2afbd51406284c7d5a43dbc9c8753c196 /src/modules/att_pos_estimator_ekf
parenta26e46bede186c36b475e0b5a9cf3ef758cc1c9b (diff)
downloadpx4-firmware-9dfe366e908ce0100875996c3ea0d4cfdfcc24bf.tar.gz
px4-firmware-9dfe366e908ce0100875996c3ea0d4cfdfcc24bf.tar.bz2
px4-firmware-9dfe366e908ce0100875996c3ea0d4cfdfcc24bf.zip
mathlib: Vector class major cleanup
Diffstat (limited to 'src/modules/att_pos_estimator_ekf')
-rw-r--r--src/modules/att_pos_estimator_ekf/KalmanNav.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/att_pos_estimator_ekf/KalmanNav.cpp b/src/modules/att_pos_estimator_ekf/KalmanNav.cpp
index 9d3ef07f2..aca3fe7b6 100644
--- a/src/modules/att_pos_estimator_ekf/KalmanNav.cpp
+++ b/src/modules/att_pos_estimator_ekf/KalmanNav.cpp
@@ -132,7 +132,7 @@ KalmanNav::KalmanNav(SuperBlock *parent, const char *name) :
_sensors.magnetometer_ga[2]);
// initialize dcm
- C_nb.from_quaternion(q);
+ C_nb = q.to_dcm();
// HPos is constant
HPos(0, 3) = 1.0f;
@@ -409,7 +409,7 @@ int KalmanNav::predictState(float dt)
}
// C_nb update
- C_nb.from_quaternion(q);
+ C_nb = q.to_dcm();
// euler update
Vector<3> euler = C_nb.to_euler();
@@ -628,7 +628,7 @@ int KalmanNav::correctAtt()
Vector<9> xCorrect = K * y;
// check correciton is sane
- for (size_t i = 0; i < xCorrect.getRows(); i++) {
+ for (size_t i = 0; i < xCorrect.get_size(); i++) {
float val = xCorrect(i);
if (isnan(val) || isinf(val)) {
@@ -694,7 +694,7 @@ int KalmanNav::correctPos()
Vector<9> xCorrect = K * y;
// check correction is sane
- for (size_t i = 0; i < xCorrect.getRows(); i++) {
+ for (size_t i = 0; i < xCorrect.get_size(); i++) {
float val = xCorrect(i);
if (!isfinite(val)) {