APM:Libraries
libraries
AP_Vehicle
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
;
33
AP_Int8
throttle_slewrate
;
34
AP_Int8
throttle_cruise
;
35
AP_Int8
takeoff_throttle_max
;
36
AP_Int16
airspeed_min
;
37
AP_Int16
airspeed_max
;
38
AP_Int32
airspeed_cruise_cm
;
39
AP_Int32
min_gndspeed_cm
;
40
AP_Int8
crash_detection_enable
;
41
AP_Int16
roll_limit_cd
;
42
AP_Int16
pitch_limit_max_cd
;
43
AP_Int16
pitch_limit_min_cd
;
44
AP_Int8
autotune_level
;
45
AP_Int8
stall_prevention
;
46
AP_Int16
loiter_radius
;
47
48
struct
Rangefinder_State
{
49
bool
in_range
:1;
50
bool
have_initial_reading
:1;
51
bool
in_use
:1;
52
float
initial_range
;
53
float
correction
;
54
float
initial_correction
;
55
float
last_stable_correction
;
56
uint32_t
last_correction_time_ms
;
57
uint8_t
in_range_count
;
58
float
height_estimate
;
59
float
last_distance
;
60
};
61
62
63
// stages of flight
64
enum
FlightStage
{
65
FLIGHT_TAKEOFF
= 1,
66
FLIGHT_VTOL
= 2,
67
FLIGHT_NORMAL
= 3,
68
FLIGHT_LAND
= 4,
69
FLIGHT_ABORT_LAND
= 7
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_Vehicle::FixedWing::Rangefinder_State::last_correction_time_ms
uint32_t last_correction_time_ms
Definition:
AP_Vehicle.h:56
AP_Vehicle::FixedWing::Rangefinder_State::height_estimate
float height_estimate
Definition:
AP_Vehicle.h:58
AP_Vehicle::FixedWing::FLIGHT_VTOL
Definition:
AP_Vehicle.h:66
AP_Vehicle::FixedWing::loiter_radius
AP_Int16 loiter_radius
Definition:
AP_Vehicle.h:46
AP_Vehicle::FixedWing::Rangefinder_State::have_initial_reading
bool have_initial_reading
Definition:
AP_Vehicle.h:50
AP_Vehicle::FixedWing::FLIGHT_LAND
Definition:
AP_Vehicle.h:68
AP_Vehicle::FixedWing::Rangefinder_State::last_stable_correction
float last_stable_correction
Definition:
AP_Vehicle.h:55
AP_Vehicle::FixedWing::throttle_cruise
AP_Int8 throttle_cruise
Definition:
AP_Vehicle.h:34
AP_Vehicle::MultiCopter
Definition:
AP_Vehicle.h:76
AP_Vehicle::FixedWing::Rangefinder_State::in_range_count
uint8_t in_range_count
Definition:
AP_Vehicle.h:57
AP_Vehicle::FixedWing::FLIGHT_ABORT_LAND
Definition:
AP_Vehicle.h:69
AP_Vehicle::FixedWing::autotune_level
AP_Int8 autotune_level
Definition:
AP_Vehicle.h:44
AP_Vehicle::FixedWing::Rangefinder_State::in_use
bool in_use
Definition:
AP_Vehicle.h:51
AP_Vehicle::FixedWing::Rangefinder_State::initial_range
float initial_range
Definition:
AP_Vehicle.h:52
AP_Vehicle::FixedWing::Rangefinder_State::last_distance
float last_distance
Definition:
AP_Vehicle.h:59
AP_Vehicle::FixedWing::airspeed_max
AP_Int16 airspeed_max
Definition:
AP_Vehicle.h:37
AP_Vehicle::FixedWing::pitch_limit_min_cd
AP_Int16 pitch_limit_min_cd
Definition:
AP_Vehicle.h:43
AP_Vehicle::FixedWing::Rangefinder_State::in_range
bool in_range
Definition:
AP_Vehicle.h:49
AP_Param.h
A system for managing and storing variables that are of general interest to the system.
AP_Vehicle::FixedWing::takeoff_throttle_max
AP_Int8 takeoff_throttle_max
Definition:
AP_Vehicle.h:35
AP_Vehicle::FixedWing::throttle_max
AP_Int8 throttle_max
Definition:
AP_Vehicle.h:32
AP_Vehicle::FixedWing::min_gndspeed_cm
AP_Int32 min_gndspeed_cm
Definition:
AP_Vehicle.h:39
AP_Vehicle::FixedWing::crash_detection_enable
AP_Int8 crash_detection_enable
Definition:
AP_Vehicle.h:40
AP_Vehicle::FixedWing::throttle_slewrate
AP_Int8 throttle_slewrate
Definition:
AP_Vehicle.h:33
AP_Vehicle::FixedWing::throttle_min
AP_Int8 throttle_min
Definition:
AP_Vehicle.h:31
AP_Vehicle_Type.h
AP_Vehicle::FixedWing::airspeed_min
AP_Int16 airspeed_min
Definition:
AP_Vehicle.h:36
AP_Vehicle::FixedWing::roll_limit_cd
AP_Int16 roll_limit_cd
Definition:
AP_Vehicle.h:41
AP_Vehicle::FixedWing::Rangefinder_State
Definition:
AP_Vehicle.h:48
AP_Vehicle::FixedWing::Rangefinder_State::initial_correction
float initial_correction
Definition:
AP_Vehicle.h:54
AP_Vehicle::FixedWing::FLIGHT_TAKEOFF
Definition:
AP_Vehicle.h:65
AP_Vehicle::FixedWing::stall_prevention
AP_Int8 stall_prevention
Definition:
AP_Vehicle.h:45
AP_Vehicle::FixedWing::Rangefinder_State::correction
float correction
Definition:
AP_Vehicle.h:53
AP_Vehicle::FixedWing
Definition:
AP_Vehicle.h:30
AP_Vehicle::FixedWing::FlightStage
FlightStage
Definition:
AP_Vehicle.h:64
AP_Vehicle::FixedWing::pitch_limit_max_cd
AP_Int16 pitch_limit_max_cd
Definition:
AP_Vehicle.h:42
AP_Vehicle::FixedWing::FLIGHT_NORMAL
Definition:
AP_Vehicle.h:67
AP_Vehicle
Definition:
AP_Vehicle.h:24
AP_Vehicle::FixedWing::airspeed_cruise_cm
AP_Int32 airspeed_cruise_cm
Definition:
AP_Vehicle.h:38
AP_Vehicle::MultiCopter::angle_max
AP_Int16 angle_max
Definition:
AP_Vehicle.h:77
Generated on Sun Jun 17 2018 14:18:51 for APM:Libraries by
1.8.13