3 #define AP_PARAM_VEHICLE_NAME tracker
5 #include <AC_PID/AC_PID.h>
6 #include <AP_Param/AP_Param.h>
8 // Global parameter class.
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:
18 * 1) the meaning of an existing eeprom parameter changes
20 * 2) the value of an existing k_param_* enum value changes
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".
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
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 //////////////////////////////////////////////////////////////////
42 // Layout version number, always key zero.
44 k_param_format_version
= 0,
45 k_param_software_type
, // deprecated
47 k_param_gcs0
= 100, // stream rates for SERIAL0
48 k_param_gcs1
, // stream rates for SERIAL1
49 k_param_sysid_this_mav
,
51 k_param_serial0_baud
, // deprecated
52 k_param_serial1_baud
, // deprecated
54 k_param_compass_enabled_deprecated
,
56 k_param_ahrs
, // AHRS group
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
66 k_param_yaw_slew_time
,
67 k_param_pitch_slew_time
,
68 k_param_min_reverse_time
,
70 k_param_start_latitude
,
71 k_param_start_longitude
,
72 k_param_startup_delay
,
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
,
85 k_param_pitch_range
, //deprecated
87 k_param_sysid_target
, // 138
88 k_param_gcs3
, // stream rates for fourth MAVLink port
89 k_param_log_bitmask
, // 140
94 k_param_serial_manager_old
= 144, // serial manager library
95 k_param_servo_yaw_type
,
97 k_param_mavlink_update_rate
,
105 // 200 : Radio settings
107 k_param_channel_yaw_old
= 200,
108 k_param_channel_pitch_old
,
109 k_param_pidPitch2Srv
,
112 k_param_servo_channels
,
114 k_param_stats_old
= 218,
115 k_param_scripting_old
= 219,
118 // 220: Waypoint data
120 k_param_command_total
= 220,
123 k_param_gcs_pid_mask
= 225,
124 k_param_scan_speed_yaw
,
125 k_param_scan_speed_pitch
,
126 k_param_initial_mode
,
133 k_param_logger
= 253, // 253 - Logging Group
135 k_param_vehicle
= 257, // vehicle common block of parameters
138 AP_Int16 format_version
;
142 AP_Int16 sysid_this_mav
;
143 AP_Int16 sysid_my_gcs
;
144 AP_Int16 sysid_target
;
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
;
152 AP_Float start_latitude
;
153 AP_Float start_longitude
;
155 AP_Float startup_delay
;
156 AP_Int8 servo_pitch_type
;
157 AP_Int8 servo_yaw_type
;
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
;
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
170 AP_Int16 gcs_pid_mask
;
171 AP_Int8 initial_mode
;
177 AP_Int8 command_total
; // 1 if HOME is set
179 AP_Int32 log_bitmask
;
181 // AC_PID controllers
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
)
191 extern const AP_Param::Info var_info
[];