aboutsummaryrefslogtreecommitdiff
path: root/src/modules/fw_att_control/fw_att_control_main.cpp
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2013-10-20 19:22:08 +0200
committerThomas Gubler <thomasgubler@gmail.com>2013-10-24 18:09:10 +0200
commit273bc52acc73cb43f31acf5869d0e536def0eec8 (patch)
tree4897a57a77798ff0f18303ac1b2572da54365b45 /src/modules/fw_att_control/fw_att_control_main.cpp
parentb9ef3636f5210588d0aa219a163d3ef5edd6a204 (diff)
downloadpx4-firmware-273bc52acc73cb43f31acf5869d0e536def0eec8.tar.gz
px4-firmware-273bc52acc73cb43f31acf5869d0e536def0eec8.tar.bz2
px4-firmware-273bc52acc73cb43f31acf5869d0e536def0eec8.zip
fw att ctrl: transpose R
Diffstat (limited to 'src/modules/fw_att_control/fw_att_control_main.cpp')
-rw-r--r--src/modules/fw_att_control/fw_att_control_main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/fw_att_control/fw_att_control_main.cpp b/src/modules/fw_att_control/fw_att_control_main.cpp
index 7f3e7893e..b59a97136 100644
--- a/src/modules/fw_att_control/fw_att_control_main.cpp
+++ b/src/modules/fw_att_control/fw_att_control_main.cpp
@@ -664,9 +664,9 @@ FixedwingAttitudeControl::task_main()
float speed_body_u = 0.0f;
float speed_body_w = 0.0f;
if(_att.R_valid) {
- speed_body_u = _att.R[0][0] * _global_pos.vx + _att.R[0][1] * _global_pos.vy + _att.R[0][2] * _global_pos.vz;
-// speed_body_v = _att.R[1][0] * _global_pos.vx + _att.R[1][1] * _global_pos.vy + _att.R[1][2] * _global_pos.vz;
- speed_body_w = _att.R[2][0] * _global_pos.vx + _att.R[2][1] * _global_pos.vy + _att.R[2][2] * _global_pos.vz;
+ speed_body_u = _att.R[0][0] * _global_pos.vx + _att.R[1][0] * _global_pos.vy + _att.R[2][0] * _global_pos.vz;
+// speed_body_v = _att.R[0][1] * _global_pos.vx + _att.R[1][1] * _global_pos.vy + _att.R[2][1] * _global_pos.vz;
+ speed_body_w = _att.R[0][2] * _global_pos.vx + _att.R[1][2] * _global_pos.vy + _att.R[2][2] * _global_pos.vz;
} else {
warnx("Did not get a valid R\n");
}