aboutsummaryrefslogtreecommitdiff
path: root/src/modules/controllib/uorb/blocks.hpp
diff options
context:
space:
mode:
authorJames Goppert <james.goppert@gmail.com>2013-07-28 22:27:05 -0400
committerJames Goppert <james.goppert@gmail.com>2013-07-28 22:27:05 -0400
commitdc542b2a4818bfc1c3c1cd24c5ee513d5b5ea0c4 (patch)
treea3a3715da3a9bac871241df71a79d7687b862e3f /src/modules/controllib/uorb/blocks.hpp
parent1980d9dd63e29390f7c3ba9b31be576c07706f73 (diff)
downloadpx4-firmware-dc542b2a4818bfc1c3c1cd24c5ee513d5b5ea0c4.tar.gz
px4-firmware-dc542b2a4818bfc1c3c1cd24c5ee513d5b5ea0c4.tar.bz2
px4-firmware-dc542b2a4818bfc1c3c1cd24c5ee513d5b5ea0c4.zip
Segway stabilized.
Diffstat (limited to 'src/modules/controllib/uorb/blocks.hpp')
-rw-r--r--src/modules/controllib/uorb/blocks.hpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/modules/controllib/uorb/blocks.hpp b/src/modules/controllib/uorb/blocks.hpp
index 54f31735c..9c0720aa5 100644
--- a/src/modules/controllib/uorb/blocks.hpp
+++ b/src/modules/controllib/uorb/blocks.hpp
@@ -57,6 +57,10 @@
#include <drivers/drv_hrt.h>
#include <poll.h>
+extern "C" {
+#include <systemlib/geo/geo.h>
+}
+
#include "../blocks.hpp"
#include "UOrbSubscription.hpp"
#include "UOrbPublication.hpp"
@@ -65,6 +69,25 @@ namespace control
{
/**
+ * Waypoint Guidance block
+ */
+class __EXPORT BlockWaypointGuidance : public SuperBlock
+{
+private:
+ BlockLimitSym _xtYawLimit;
+ BlockP _xt2Yaw;
+ float _psiCmd;
+public:
+ BlockWaypointGuidance(SuperBlock *parent, const char *name);
+ virtual ~BlockWaypointGuidance();
+ void update(vehicle_global_position_s &pos,
+ vehicle_attitude_s &att,
+ vehicle_global_position_setpoint_s &posCmd,
+ vehicle_global_position_setpoint_s &lastPosCmd);
+ float getPsiCmd() { return _psiCmd; }
+};
+
+/**
* UorbEnabledAutopilot
*/
class __EXPORT BlockUorbEnabledAutopilot : public SuperBlock