mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +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:
parent
33ba041120
commit
2b6926fe9d
@ -110,9 +110,9 @@ bool FlightTaskOrbit::activate()
|
||||
|
||||
bool FlightTaskOrbit::update()
|
||||
{
|
||||
// stick input adjusts parameters
|
||||
const float r = _r + _sticks_expo(0) * _deltatime;
|
||||
const float v = _v - _sticks_expo(1) * _deltatime;
|
||||
// stick input adjusts parameters within a fixed time frame
|
||||
const float r = _r + _sticks_expo(0) * _deltatime * (radius_max / 8.f);
|
||||
const float v = _v - _sticks_expo(1) * _deltatime * (velocity_max / 4.f);
|
||||
_z += _sticks_expo(2) * _deltatime;
|
||||
|
||||
setRadius(r);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user