SO(3) estimator and quaternion receive by mavlink implemented

This commit is contained in:
Hyon Lim
2013-11-29 02:05:15 +09:00
parent f1fece2bb6
commit bcd745fb0d
4 changed files with 136 additions and 314 deletions
+14 -1
View File
@@ -242,7 +242,7 @@ l_vehicle_attitude(const struct listener *l)
att.rollspeed,
att.pitchspeed,
att.yawspeed);
/* limit VFR message rate to 10Hz */
hrt_abstime t = hrt_absolute_time();
if (t >= last_sent_vfr + 100000) {
@@ -252,6 +252,19 @@ l_vehicle_attitude(const struct listener *l)
float throttle = actuators_effective_0.control_effective[3] * (UINT16_MAX - 1);
mavlink_msg_vfr_hud_send(MAVLINK_COMM_0, airspeed.true_airspeed_m_s, groundspeed, heading, throttle, global_pos.alt, -global_pos.vz);
}
/* send quaternion values if it exists */
if(att.q_valid) {
mavlink_msg_attitude_quaternion_send(MAVLINK_COMM_0,
last_sensor_timestamp / 1000,
att.q[0],
att.q[1],
att.q[2],
att.q[3],
att.rollspeed,
att.pitchspeed,
att.yawspeed);
}
}
attitude_counter++;