mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
docs(fw_att_ctrl): update quat turn coordination
fix(fw_att_control): use correct formula
This commit is contained in:
@@ -32,6 +32,8 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "FixedwingAttitudeControl.hpp"
|
||||
#include <lib/geo/geo.h>
|
||||
|
||||
|
||||
using namespace time_literals;
|
||||
using namespace matrix;
|
||||
@@ -309,7 +311,7 @@ void FixedwingAttitudeControl::Run()
|
||||
const float V = math::max(get_airspeed_constrained(), 0.1f);
|
||||
const float q1 = 2.f * (q_current(0) * q_current(1) + q_current(2) * q_current(3));
|
||||
const float r_tc_ff = CONSTANTS_ONE_G * q1 / V;
|
||||
const float p_tc_ff = q1 * r_tc_ff / (1.f - 2.f * q_current(1) * q_current(1) - 2.f * q_current(2) * q_current(2));
|
||||
const float p_tc_ff = 2.f * q1 * r_tc_ff / (1.f - 2.f * q_current(1) * q_current(1) - 2.f * q_current(2) * q_current(2));
|
||||
|
||||
body_rates_setpoint(1) += p_tc_ff;
|
||||
body_rates_setpoint(2) += r_tc_ff;
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include "fw_wheel_controller.h"
|
||||
#include <lib/geo/geo.h>
|
||||
#include <lib/mathlib/mathlib.h>
|
||||
#include <lib/parameters/param.h>
|
||||
#include <lib/perf/perf_counter.h>
|
||||
|
||||
Reference in New Issue
Block a user