mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-15 12:51:35 +08:00
new airframe for sih, HIL_STATE_QUATERION sent through MAVLink
This commit is contained in:
@@ -4666,12 +4666,13 @@ protected:
|
||||
msg.yawspeed = att.yawspeed;
|
||||
|
||||
// vehicle_global_position -> hil_state_quaternion
|
||||
msg.lat = gpos.lat;
|
||||
msg.lon = gpos.lon;
|
||||
msg.alt = gpos.alt;
|
||||
msg.vx = gpos.vel_n;
|
||||
msg.vy = gpos.vel_e;
|
||||
msg.vz = gpos.vel_d;
|
||||
// same units as defined in mavlink/common.xml
|
||||
msg.lat = gpos.lat * 1e7;
|
||||
msg.lon = gpos.lon * 1e7;
|
||||
msg.alt = gpos.alt * 1e3f;
|
||||
msg.vx = gpos.vel_n * 1e2f;
|
||||
msg.vy = gpos.vel_e * 1e2f;
|
||||
msg.vz = gpos.vel_d * 1e2f;
|
||||
msg.ind_airspeed = 0;
|
||||
msg.true_airspeed = 0;
|
||||
msg.xacc = 0;
|
||||
|
||||
Reference in New Issue
Block a user