Commit finished attitude estim cleanup

This commit is contained in:
Lorenz Meier 2012-10-03 14:00:04 +02:00
parent affa3af4e6
commit 921c391db4
2 changed files with 8 additions and 0 deletions

View File

@ -427,6 +427,13 @@ int attitude_estimator_ekf_thread_main(int argc, char *argv[])
att.pitchspeed = x_aposteriori[1];
att.yawspeed = x_aposteriori[2];
/* copy offsets */
memcpy(&att.rate_offsets, &(x_aposteriori[3]), sizeof(att.rate_offsets));
/* copy rotation matrix */
memcpy(&att.R, Rot_matrix, sizeof(Rot_matrix));
att.R_valid = true;
// Broadcast
orb_publish(ORB_ID(vehicle_attitude), pub_att, &att);
}

View File

@ -74,6 +74,7 @@ struct vehicle_attitude_s {
float rollspeed; /**< Roll angular speed (rad/s, Tait-Bryan, NED) LOGME */
float pitchspeed; /**< Pitch angular speed (rad/s, Tait-Bryan, NED) LOGME */
float yawspeed; /**< Yaw angular speed (rad/s, Tait-Bryan, NED) LOGME */
float rate_offsets[3];/**< Offsets of the body angular rates from zero */
float R[3][3]; /**< Rotation matrix body to world, (Tait-Bryan, NED) */
float q[4]; /**< Quaternion (NED) */
bool R_valid; /**< Rotation matrix valid */