mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 12:03:33 +08:00
mc_pos_control: migrate MPC_*_VEL_* parameter to acceleration scaling
Before #14212 the velocity control gains used in the multicopter position controller were defined as a scale between velocity error in one axis (or it's integral and derivative respectively) and the unit thrust vector. The problem with this is that the normalization of the unit thrust vector changes per vehicle or even vehicle configuration as 0 and 100% thrust get a different physical response. That's why the gains are now defined as scale between velocity error (integral/derivative) and the output acceleration in m/s².
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <Takeoff.hpp>
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <lib/ecl/geo/geo.h>
|
||||
|
||||
TEST(TakeoffTest, Initialization)
|
||||
{
|
||||
@@ -46,7 +47,7 @@ TEST(TakeoffTest, RegularTakeoffRamp)
|
||||
Takeoff takeoff;
|
||||
takeoff.setSpoolupTime(1.f);
|
||||
takeoff.setTakeoffRampTime(2.0);
|
||||
takeoff.generateInitialRampValue(.5f, 1.f);
|
||||
takeoff.generateInitialRampValue(CONSTANTS_ONE_G / 0.5f);
|
||||
|
||||
// disarmed, landed, don't want takeoff
|
||||
takeoff.updateTakeoffState(false, true, false, 1.f, false, 0);
|
||||
|
||||
Reference in New Issue
Block a user