APM:Libraries
AP_Vehicle.h
Go to the documentation of this file.
1 /*
2  This program is free software: you can redistribute it and/or modify
3  it under the terms of the GNU General Public License as published by
4  the Free Software Foundation, either version 3 of the License, or
5  (at your option) any later version.
6 
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  GNU General Public License for more details.
11 
12  You should have received a copy of the GNU General Public License
13  along with this program. If not, see <http://www.gnu.org/licenses/>.
14  */
15 #pragma once
16 
17 /*
18  this header holds a parameter structure for each vehicle type for
19  parameters needed by multiple libraries
20  */
21 
22 #include <AP_Param/AP_Param.h>
23 
24 class AP_Vehicle {
25 
26 public:
27  /*
28  common parameters for fixed wing aircraft
29  */
30  struct FixedWing {
31  AP_Int8 throttle_min;
32  AP_Int8 throttle_max;
34  AP_Int8 throttle_cruise;
36  AP_Int16 airspeed_min;
37  AP_Int16 airspeed_max;
39  AP_Int32 min_gndspeed_cm;
41  AP_Int16 roll_limit_cd;
43  AP_Int16 pitch_limit_min_cd;
44  AP_Int8 autotune_level;
46  AP_Int16 loiter_radius;
47 
49  bool in_range:1;
51  bool in_use:1;
53  float correction;
57  uint8_t in_range_count;
60  };
61 
62 
63  // stages of flight
64  enum FlightStage {
70  };
71  };
72 
73  /*
74  common parameters for multicopters
75  */
76  struct MultiCopter {
77  AP_Int16 angle_max;
78  };
79 };
80 
81 
82 #include "AP_Vehicle_Type.h"
AP_Int16 loiter_radius
Definition: AP_Vehicle.h:46
AP_Int16 pitch_limit_min_cd
Definition: AP_Vehicle.h:43
A system for managing and storing variables that are of general interest to the system.
AP_Int8 takeoff_throttle_max
Definition: AP_Vehicle.h:35
AP_Int32 min_gndspeed_cm
Definition: AP_Vehicle.h:39
AP_Int8 crash_detection_enable
Definition: AP_Vehicle.h:40
AP_Int8 throttle_slewrate
Definition: AP_Vehicle.h:33
AP_Int16 roll_limit_cd
Definition: AP_Vehicle.h:41
AP_Int8 stall_prevention
Definition: AP_Vehicle.h:45
AP_Int16 pitch_limit_max_cd
Definition: AP_Vehicle.h:42
AP_Int32 airspeed_cruise_cm
Definition: AP_Vehicle.h:38