From b00c93ac21b3978fbd049ae4b1d3ac72c1389758 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Tue, 19 Sep 2017 11:01:21 +0200 Subject: [PATCH] mc_pos_control_main: add clarification that we're in world frame --- src/modules/mc_pos_control/mc_pos_control_main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/mc_pos_control/mc_pos_control_main.cpp b/src/modules/mc_pos_control/mc_pos_control_main.cpp index cf95b11544..4c5da2ba2f 100644 --- a/src/modules/mc_pos_control/mc_pos_control_main.cpp +++ b/src/modules/mc_pos_control/mc_pos_control_main.cpp @@ -2854,7 +2854,8 @@ MulticopterPositionControl::generate_attitude_setpoint(float dt) } matrix::Quatf q_sp_rpy = matrix::AxisAnglef(v(0), v(1), 0.f); - // The axis angle can change the yaw as well (but only at higher tilt angles). + // The axis angle can change the yaw as well (but only at higher tilt angles. Note: we're talking + // about the world frame here, in terms of body frame the yaw rate will be unaffected). // This the the formula by how much the yaw changes: // let a := tilt angle, b := atan(y/x) (direction of maximum tilt) // yaw = atan(-2 * sin(b) * cos(b) * sin^2(a/2) / (1 - 2 * cos^2(b) * sin^2(a/2))).