PositionControl: add control states structure

This commit is contained in:
Dennis Mannhart
2018-07-20 09:26:18 +02:00
committed by Lorenz Meier
parent bf15e852ff
commit 9c2ec3c229
2 changed files with 25 additions and 9 deletions
@@ -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.