CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
Ardupilot

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: Ardupilot/ardupilot
Path: blob/master/AntennaTracker/Parameters.h
Views: 1798
1
#pragma once
2
3
#define AP_PARAM_VEHICLE_NAME tracker
4
5
#include <AC_PID/AC_PID.h>
6
#include <AP_Param/AP_Param.h>
7
8
// Global parameter class.
9
//
10
class Parameters {
11
public:
12
13
/*
14
* The value of k_format_version determines whether the existing
15
* eeprom data is considered valid. You should only change this
16
* value under the following circumstances:
17
*
18
* 1) the meaning of an existing eeprom parameter changes
19
*
20
* 2) the value of an existing k_param_* enum value changes
21
*
22
* Adding a new parameter should _not_ require a change to
23
* k_format_version except under special circumstances. If you
24
* change it anyway then all ArduPlane users will need to reload all
25
* their parameters. We want that to be an extremely rare
26
* thing. Please do not just change it "just in case".
27
*
28
* To determine if a k_param_* value has changed, use the rules of
29
* C++ enums to work out the value of the neighboring enum
30
* values. If you don't know the C++ enum rules then please ask for
31
* help.
32
*/
33
34
//////////////////////////////////////////////////////////////////
35
// STOP!!! DO NOT CHANGE THIS VALUE UNTIL YOU FULLY UNDERSTAND THE
36
// COMMENTS ABOVE. IF UNSURE, ASK ANOTHER DEVELOPER!!!
37
static const uint16_t k_format_version = 1;
38
//////////////////////////////////////////////////////////////////
39
40
41
enum {
42
// Layout version number, always key zero.
43
//
44
k_param_format_version = 0,
45
k_param_software_type, // deprecated
46
47
k_param_gcs0 = 100, // stream rates for SERIAL0
48
k_param_gcs1, // stream rates for SERIAL1
49
k_param_sysid_this_mav,
50
k_param_sysid_my_gcs,
51
k_param_serial0_baud, // deprecated
52
k_param_serial1_baud, // deprecated
53
k_param_imu,
54
k_param_compass_enabled_deprecated,
55
k_param_compass,
56
k_param_ahrs, // AHRS group
57
k_param_barometer,
58
k_param_scheduler,
59
k_param_ins,
60
k_param_sitl,
61
k_param_pidPitch_old, // deprecated
62
k_param_pidYaw_old, // deprecated
63
k_param_gcs2, // stream rates for SERIAL2
64
k_param_serial2_baud, // deprecated
65
66
k_param_yaw_slew_time,
67
k_param_pitch_slew_time,
68
k_param_min_reverse_time,
69
70
k_param_start_latitude,
71
k_param_start_longitude,
72
k_param_startup_delay,
73
k_param_BoardConfig,
74
k_param_gps,
75
k_param_scan_speed_unused, // deprecated
76
k_param_proxy_mode_unused, // deprecated
77
k_param_servo_pitch_type,
78
k_param_onoff_yaw_rate,
79
k_param_onoff_pitch_rate,
80
k_param_onoff_yaw_mintime,
81
k_param_onoff_pitch_mintime,
82
k_param_yaw_trim,
83
k_param_pitch_trim,
84
k_param_yaw_range,
85
k_param_pitch_range, //deprecated
86
k_param_distance_min,
87
k_param_sysid_target, // 138
88
k_param_gcs3, // stream rates for fourth MAVLink port
89
k_param_log_bitmask, // 140
90
k_param_notify,
91
k_param_can_mgr,
92
k_param_battery,
93
94
k_param_serial_manager_old = 144, // serial manager library
95
k_param_servo_yaw_type,
96
k_param_alt_source,
97
k_param_mavlink_update_rate,
98
k_param_pitch_min,
99
k_param_pitch_max,
100
k_param_gcs4,
101
k_param_gcs5,
102
k_param_gcs6,
103
104
//
105
// 200 : Radio settings
106
//
107
k_param_channel_yaw_old = 200,
108
k_param_channel_pitch_old,
109
k_param_pidPitch2Srv,
110
k_param_pidYaw2Srv,
111
k_param_rc_channels,
112
k_param_servo_channels,
113
114
k_param_stats_old = 218,
115
k_param_scripting_old = 219,
116
117
//
118
// 220: Waypoint data
119
//
120
k_param_command_total = 220,
121
122
// 254,255: reserved
123
k_param_gcs_pid_mask = 225,
124
k_param_scan_speed_yaw,
125
k_param_scan_speed_pitch,
126
k_param_initial_mode,
127
k_param_disarm_pwm,
128
129
k_param_auto_opts,
130
k_param_NavEKF2,
131
k_param_NavEKF3,
132
133
k_param_logger = 253, // 253 - Logging Group
134
135
k_param_vehicle = 257, // vehicle common block of parameters
136
};
137
138
AP_Int16 format_version;
139
140
// Telemetry control
141
//
142
AP_Int16 sysid_this_mav;
143
AP_Int16 sysid_my_gcs;
144
AP_Int16 sysid_target;
145
146
AP_Float yaw_slew_time;
147
AP_Float pitch_slew_time;
148
AP_Float min_reverse_time;
149
AP_Int16 scan_speed_yaw;
150
AP_Int16 scan_speed_pitch;
151
152
AP_Float start_latitude;
153
AP_Float start_longitude;
154
155
AP_Float startup_delay;
156
AP_Int8 servo_pitch_type;
157
AP_Int8 servo_yaw_type;
158
AP_Int8 alt_source;
159
AP_Int8 mavlink_update_rate;
160
AP_Float onoff_yaw_rate;
161
AP_Float onoff_pitch_rate;
162
AP_Float onoff_yaw_mintime;
163
AP_Float onoff_pitch_mintime;
164
AP_Float yaw_trim;
165
AP_Float pitch_trim;
166
AP_Int16 yaw_range; // yaw axis total range of motion in degrees
167
AP_Int16 distance_min; // target's must be at least this distance from tracker to be tracked
168
AP_Int16 pitch_min;
169
AP_Int16 pitch_max;
170
AP_Int16 gcs_pid_mask;
171
AP_Int8 initial_mode;
172
AP_Int8 disarm_pwm;
173
AP_Int8 auto_opts;
174
175
// Waypoints
176
//
177
AP_Int8 command_total; // 1 if HOME is set
178
179
AP_Int32 log_bitmask;
180
181
// AC_PID controllers
182
AC_PID pidPitch2Srv;
183
AC_PID pidYaw2Srv;
184
185
Parameters() :
186
pidPitch2Srv(0.2, 0.0f, 0.05f, 0.02f, 4000.0f, 0.0f, 0.0f, 0.0f, 0.1f),
187
pidYaw2Srv (0.2, 0.0f, 0.05f, 0.02f, 4000.0f, 0.0f, 0.0f, 0.0f, 0.1f)
188
{}
189
};
190
191
extern const AP_Param::Info var_info[];
192
193