mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 10:23:33 +08:00
PositionControl: add control states structure
This commit is contained in:
committed by
Lorenz Meier
parent
bf15e852ff
commit
9c2ec3c229
@@ -45,6 +45,13 @@
|
||||
#include <px4_module_params.h>
|
||||
#pragma once
|
||||
|
||||
struct PositionControlStates {
|
||||
matrix::Vector3f position;
|
||||
matrix::Vector3f velocity;
|
||||
matrix::Vector3f acceleration;
|
||||
float yaw;
|
||||
};
|
||||
|
||||
/**
|
||||
* Core Position-Control for MC.
|
||||
* This class contains P-controller for position and
|
||||
@@ -80,10 +87,9 @@ public:
|
||||
|
||||
/**
|
||||
* Update the current vehicle state.
|
||||
* @param state a vehicle_local_position_s structure
|
||||
* @param vel_dot the derivative of the vehicle velocity
|
||||
* @param PositionControlStates structure
|
||||
*/
|
||||
void updateState(const vehicle_local_position_s &state, const matrix::Vector3f &vel_dot);
|
||||
void updateState(const PositionControlStates &states);
|
||||
|
||||
/**
|
||||
* Update the desired setpoints.
|
||||
|
||||
Reference in New Issue
Block a user