mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 03:53:35 +08:00
FlightTaskOrbit: replace sticks (which are now linear) with expo
This commit is contained in:
committed by
Beat Küng
parent
e076825d78
commit
4dfd9ce8ed
@@ -78,11 +78,11 @@ bool FlightTaskOrbit::activate()
|
|||||||
|
|
||||||
bool FlightTaskOrbit::update()
|
bool FlightTaskOrbit::update()
|
||||||
{
|
{
|
||||||
_r += _sticks(0) * _deltatime;
|
_r += _sticks_expo(0) * _deltatime;
|
||||||
_r = math::constrain(_r, 1.f, 20.f);
|
_r = math::constrain(_r, 1.f, 20.f);
|
||||||
_v -= _sticks(1) * _deltatime;
|
_v -= _sticks_expo(1) * _deltatime;
|
||||||
_v = math::constrain(_v, -7.f, 7.f);
|
_v = math::constrain(_v, -7.f, 7.f);
|
||||||
_z += _sticks(2) * _deltatime;
|
_z += _sticks_expo(2) * _deltatime;
|
||||||
|
|
||||||
Vector2f center_to_position = Vector2f(_position.data()) - _center;
|
Vector2f center_to_position = Vector2f(_position.data()) - _center;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user