diff options
author | andrea-nisti <andrea.nistic@gmail.com> | 2015-04-24 15:51:52 +0200 |
---|---|---|
committer | andrea-nisti <andrea.nistic@gmail.com> | 2015-04-24 15:51:52 +0200 |
commit | c5ce8f39ae6a25655fc7f85a0639458bb170b312 (patch) | |
tree | 70cb923a59156fb969743ffc821e217c3ad9fd08 /src/modules/sdlog2/sdlog2.c | |
parent | 3f961bf3c60c3ea380dc1dc62684a026667ec0e9 (diff) | |
download | px4-firmware-c5ce8f39ae6a25655fc7f85a0639458bb170b312.tar.gz px4-firmware-c5ce8f39ae6a25655fc7f85a0639458bb170b312.tar.bz2 px4-firmware-c5ce8f39ae6a25655fc7f85a0639458bb170b312.zip |
Order fixed for vision position quaternion
changed from [x y z w] to [w x y z]. In this way the notation is consistent and flightplot shows the real values.
Diffstat (limited to 'src/modules/sdlog2/sdlog2.c')
-rw-r--r-- | src/modules/sdlog2/sdlog2.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/sdlog2/sdlog2.c b/src/modules/sdlog2/sdlog2.c index 8193cf181..e2274342e 100644 --- a/src/modules/sdlog2/sdlog2.c +++ b/src/modules/sdlog2/sdlog2.c @@ -1648,10 +1648,10 @@ int sdlog2_thread_main(int argc, char *argv[]) log_msg.body.log_VISN.vx = buf.vision_pos.vx; log_msg.body.log_VISN.vy = buf.vision_pos.vy; log_msg.body.log_VISN.vz = buf.vision_pos.vz; - log_msg.body.log_VISN.qx = buf.vision_pos.q[0]; - log_msg.body.log_VISN.qy = buf.vision_pos.q[1]; - log_msg.body.log_VISN.qz = buf.vision_pos.q[2]; - log_msg.body.log_VISN.qw = buf.vision_pos.q[3]; + log_msg.body.log_VISN.qw = buf.vision_pos.q[0]; // vision_position_estimate uses [w,x,y,z] convention + log_msg.body.log_VISN.qx = buf.vision_pos.q[1]; + log_msg.body.log_VISN.qy = buf.vision_pos.q[2]; + log_msg.body.log_VISN.qz = buf.vision_pos.q[3]; LOGBUFFER_WRITE_AND_COUNT(VISN); } |