mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 06:43:33 +08:00
navigator: mission class added (WIP)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/****************************************************************************
|
||||
/***************************************************************************
|
||||
*
|
||||
* Copyright (c) 2013-2014 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
@@ -43,23 +43,33 @@
|
||||
#include <controllib/blocks.hpp>
|
||||
#include <controllib/block/BlockParam.hpp>
|
||||
|
||||
#include <uORB/topics/mission.h>
|
||||
#include <uORB/topics/mission.h>
|
||||
#include <uORB/topics/home_position.h>
|
||||
#include <uORB/topics/vehicle_global_position.h>
|
||||
|
||||
class RTL : public control::SuperBlock
|
||||
#include "mission.h"
|
||||
|
||||
class Navigator;
|
||||
|
||||
class RTL : public Mission
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
RTL();
|
||||
RTL(Navigator *navigator);
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
~RTL();
|
||||
virtual ~RTL();
|
||||
|
||||
virtual bool update(struct position_setpoint_triplet_s *pos_sp_triplet);
|
||||
|
||||
virtual void reset();
|
||||
|
||||
private:
|
||||
void set_home_position(const home_position_s *home_position);
|
||||
|
||||
bool get_current_rtl_item(const vehicle_global_position_s *global_position, mission_item_s *new_mission_item);
|
||||
@@ -67,7 +77,6 @@ public:
|
||||
|
||||
void move_to_next();
|
||||
|
||||
private:
|
||||
int _mavlink_fd;
|
||||
|
||||
enum RTLState {
|
||||
@@ -77,7 +86,7 @@ private:
|
||||
RTL_STATE_DESCEND,
|
||||
RTL_STATE_LAND,
|
||||
RTL_STATE_FINISHED,
|
||||
} _rtl_state;
|
||||
} _rtl_state;
|
||||
|
||||
home_position_s _home_position;
|
||||
float _loiter_radius;
|
||||
|
||||
Reference in New Issue
Block a user