mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 01:13:34 +08:00
vehicle_local_position: rename yaw -> heading and add reset logic
- vehicle_global_position yaw removed (redundant)
This commit is contained in:
committed by
Mathieu Bresciani
parent
33fb9d0c62
commit
97fc1db768
@@ -1305,7 +1305,11 @@ void Ekf2::Run()
|
||||
// The rotation of the tangent plane vs. geographical north
|
||||
const matrix::Quatf q = _ekf.getQuaternion();
|
||||
|
||||
lpos.yaw = matrix::Eulerf(q).psi();
|
||||
matrix::Quatf delta_q_reset;
|
||||
_ekf.get_quat_reset(&delta_q_reset(0), &lpos.heading_reset_counter);
|
||||
|
||||
lpos.heading = matrix::Eulerf(q).psi();
|
||||
lpos.delta_heading = matrix::Eulerf(delta_q_reset).psi();
|
||||
|
||||
// Vehicle odometry quaternion
|
||||
q.copyTo(odom.q);
|
||||
@@ -1479,8 +1483,6 @@ void Ekf2::Run()
|
||||
// global altitude has opposite sign of local down position
|
||||
global_pos.delta_alt = -lpos.delta_z;
|
||||
|
||||
global_pos.yaw = lpos.yaw; // Yaw in radians -PI..+PI.
|
||||
|
||||
_ekf.get_ekf_gpos_accuracy(&global_pos.eph, &global_pos.epv);
|
||||
|
||||
global_pos.terrain_alt_valid = lpos.dist_bottom_valid;
|
||||
|
||||
Reference in New Issue
Block a user