Browse Source

AP_Landing: add new library for fixed wing landing abstraction

master
Tom Pittenger 8 years ago committed by Tom Pittenger
parent
commit
61b02cb41d
  1. 3
      ArduPlane/Plane.h
  2. 1
      ArduPlane/make.inc
  3. 1
      ArduPlane/wscript
  4. 28
      libraries/AP_Landing/AP_Landing.cpp
  5. 38
      libraries/AP_Landing/AP_Landing.h

3
ArduPlane/Plane.h

@ -91,6 +91,7 @@ @@ -91,6 +91,7 @@
#include <AP_ADSB/AP_ADSB.h>
#include <AP_Button/AP_Button.h>
#include <AP_ICEngine/AP_ICEngine.h>
#include <AP_Landing/AP_Landing.h>
#include "GCS_Mavlink.h"
#include "quadplane.h"
@ -649,6 +650,8 @@ private: @@ -649,6 +650,8 @@ private:
AP_Terrain terrain {ahrs, mission, rally};
#endif
AP_Landing landing {mission};
AP_ADSB adsb {ahrs};
// avoidance of adsb enabled vehicles (normally manned vheicles)

1
ArduPlane/make.inc

@ -60,3 +60,4 @@ LIBRARIES += AC_Avoidance @@ -60,3 +60,4 @@ LIBRARIES += AC_Avoidance
LIBRARIES += AP_Proximity
LIBRARIES += AP_Tuning
LIBRARIES += AP_Stats
LIBRARIES += AP_Landing

1
ArduPlane/wscript

@ -31,6 +31,7 @@ def build(bld): @@ -31,6 +31,7 @@ def build(bld):
'AC_Avoidance',
'AP_Proximity',
'AP_Stats',
'AP_Landing',
],
)

28
libraries/AP_Landing/AP_Landing.cpp

@ -0,0 +1,28 @@ @@ -0,0 +1,28 @@
/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* AP_Landing.cpp - Landing logic handler for ArduPlane
*/
#include "AP_Landing.h"
// table of user settable parameters
const AP_Param::GroupInfo AP_Landing::var_info[] = {
AP_GROUPEND
};

38
libraries/AP_Landing/AP_Landing.h

@ -0,0 +1,38 @@ @@ -0,0 +1,38 @@
/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <AP_Param/AP_Param.h>
#include <AP_Mission/AP_Mission.h>
/// @class AP_Landing
/// @brief Class managing ArduPlane landing methods
class AP_Landing
{
public:
// constructor
AP_Landing(AP_Mission &_mission) :
mission(_mission) {
AP_Param::setup_object_defaults(this, var_info);
}
static const struct AP_Param::GroupInfo var_info[];
private:
AP_Mission &mission;
};
Loading…
Cancel
Save