mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-04 19:51:35 +08:00
FlightTaskOrbit: speed up stick input to a fixed time frame
Maximum velocity achievable in 4 seconds, maximum radius achievable in 8 seconds for futher testing. These should be parameters as soon as it works fine.
This commit is contained in:
committed by
ChristophTobler
parent
33ba041120
commit
2b6926fe9d
@@ -110,9 +110,9 @@ bool FlightTaskOrbit::activate()
|
|||||||
|
|
||||||
bool FlightTaskOrbit::update()
|
bool FlightTaskOrbit::update()
|
||||||
{
|
{
|
||||||
// stick input adjusts parameters
|
// stick input adjusts parameters within a fixed time frame
|
||||||
const float r = _r + _sticks_expo(0) * _deltatime;
|
const float r = _r + _sticks_expo(0) * _deltatime * (radius_max / 8.f);
|
||||||
const float v = _v - _sticks_expo(1) * _deltatime;
|
const float v = _v - _sticks_expo(1) * _deltatime * (velocity_max / 4.f);
|
||||||
_z += _sticks_expo(2) * _deltatime;
|
_z += _sticks_expo(2) * _deltatime;
|
||||||
|
|
||||||
setRadius(r);
|
setRadius(r);
|
||||||
|
|||||||
Reference in New Issue
Block a user