4 * AntennaTracker parameter definitions
8 const AP_Param::Info
Tracker::var_info
[] = {
9 // @Param: FORMAT_VERSION
10 // @DisplayName: Eeprom format version number
11 // @Description: This value is incremented when changes are made to the eeprom format
13 GSCALAR(format_version
, "FORMAT_VERSION", 0),
15 // @Param: SYSID_THISMAV
16 // @DisplayName: MAVLink system ID of this vehicle
17 // @Description: Allows setting an individual system id for this vehicle to distinguish it from others on the same network
20 GSCALAR(sysid_this_mav
, "SYSID_THISMAV", MAV_SYSTEM_ID
),
22 // @Param: SYSID_MYGCS
23 // @DisplayName: Ground station MAVLink system ID
24 // @Description: The identifier of the ground station in the MAVLink protocol. Don't change this unless you also modify the ground station to match.
28 GSCALAR(sysid_my_gcs
, "SYSID_MYGCS", 255),
30 // @Param: SYSID_TARGET
31 // @DisplayName: Target vehicle's MAVLink system ID
32 // @Description: The identifier of the vehicle being tracked. This should be zero (to auto detect) or be the same as the SYSID_THISMAV parameter of the vehicle being tracked.
35 GSCALAR(sysid_target
, "SYSID_TARGET", 0),
37 // @Param: YAW_SLEW_TIME
38 // @DisplayName: Time for yaw to slew through its full range
39 // @Description: This controls how rapidly the tracker will change the servo output for yaw. It is set as the number of seconds to do a full rotation. You can use this parameter to slow the trackers movements, which may help with some types of trackers. A value of zero will allow for unlimited servo movement per update.
44 GSCALAR(yaw_slew_time
, "YAW_SLEW_TIME", 2),
46 // @Param: PITCH_SLEW_TIME
47 // @DisplayName: Time for pitch to slew through its full range
48 // @Description: This controls how rapidly the tracker will change the servo output for pitch. It is set as the number of seconds to do a full range of pitch movement. You can use this parameter to slow the trackers movements, which may help with some types of trackers. A value of zero will allow for unlimited servo movement per update.
53 GSCALAR(pitch_slew_time
, "PITCH_SLEW_TIME", 2),
55 // @Param: MIN_REVERSE_TIME
56 // @DisplayName: Minimum time to apply a yaw reversal
57 // @Description: When the tracker detects it has reached the limit of servo movement in yaw it will reverse and try moving to the other extreme of yaw. This parameter controls the minimum time it should reverse for. It is used to cope with trackers that have a significant lag in movement to ensure they do move all the way around.
62 GSCALAR(min_reverse_time
, "MIN_REVERSE_TIME", 1),
64 // @Param: START_LATITUDE
65 // @DisplayName: Initial Latitude before GPS lock
66 // @Description: Combined with START_LONGITUDE this parameter allows for an initial position of the tracker to be set. This position will be used until the GPS gets lock. It can also be used to run a stationary tracker with no GPS attached.
68 // @Increment: 0.000001
71 GSCALAR(start_latitude
, "START_LATITUDE", 0),
73 // @Param: START_LONGITUDE
74 // @DisplayName: Initial Longitude before GPS lock
75 // @Description: Combined with START_LATITUDE this parameter allows for an initial position of the tracker to be set. This position will be used until the GPS gets lock. It can also be used to run a stationary tracker with no GPS attached.
77 // @Increment: 0.000001
80 GSCALAR(start_longitude
, "START_LONGITUDE", 0),
82 // @Param: STARTUP_DELAY
83 // @DisplayName: Delay before first servo movement from trim
84 // @Description: This parameter can be used to force the servos to their trim value for a time on startup. This can help with some servo types
89 GSCALAR(startup_delay
, "STARTUP_DELAY", 0),
91 // @Param: SERVO_PITCH_TYPE
92 // @DisplayName: Type of servo system being used for pitch
93 // @Description: This allows selection of position servos or on/off servos for pitch
94 // @Values: 0:Position,1:OnOff,2:ContinuousRotation
96 GSCALAR(servo_pitch_type
, "SERVO_PITCH_TYPE", SERVO_TYPE_POSITION
),
98 // @Param: SERVO_YAW_TYPE
99 // @DisplayName: Type of servo system being used for yaw
100 // @Description: This allows selection of position servos or on/off servos for yaw
101 // @Values: 0:Position,1:OnOff,2:ContinuousRotation
103 GSCALAR(servo_yaw_type
, "SERVO_YAW_TYPE", SERVO_TYPE_POSITION
),
105 // @Param: ONOFF_YAW_RATE
106 // @DisplayName: Yaw rate for on/off servos
107 // @Description: Rate of change of yaw in degrees/second for on/off servos
112 GSCALAR(onoff_yaw_rate
, "ONOFF_YAW_RATE", 9.0f
),
114 // @Param: ONOFF_PITCH_RATE
115 // @DisplayName: Pitch rate for on/off servos
116 // @Description: Rate of change of pitch in degrees/second for on/off servos
121 GSCALAR(onoff_pitch_rate
, "ONOFF_PITCH_RATE", 1.0f
),
123 // @Param: ONOFF_YAW_MINT
124 // @DisplayName: Yaw minimum movement time
125 // @Description: Minimum amount of time in seconds to move in yaw
130 GSCALAR(onoff_yaw_mintime
, "ONOFF_YAW_MINT", 0.1f
),
132 // @Param: ONOFF_PITCH_MINT
133 // @DisplayName: Pitch minimum movement time
134 // @Description: Minimum amount of time in seconds to move in pitch
139 GSCALAR(onoff_pitch_mintime
, "ONOFF_PITCH_MINT", 0.1f
),
142 // @DisplayName: Yaw trim
143 // @Description: Amount of extra yaw to add when tracking. This allows for small adjustments for an out of trim compass.
148 GSCALAR(yaw_trim
, "YAW_TRIM", 0),
150 // @Param: PITCH_TRIM
151 // @DisplayName: Pitch trim
152 // @Description: Amount of extra pitch to add when tracking. This allows for small adjustments for a badly calibrated barometer.
157 GSCALAR(pitch_trim
, "PITCH_TRIM", 0),
160 // @DisplayName: Yaw Angle Range
161 // @Description: Yaw axis total range of motion in degrees
166 GSCALAR(yaw_range
, "YAW_RANGE", YAW_RANGE_DEFAULT
),
168 // @Param: DISTANCE_MIN
169 // @DisplayName: Distance minimum to target
170 // @Description: Tracker will track targets at least this distance away
175 GSCALAR(distance_min
, "DISTANCE_MIN", DISTANCE_MIN_DEFAULT
),
177 // @Param: ALT_SOURCE
178 // @DisplayName: Altitude Source
179 // @Description: What provides altitude information for vehicle. Vehicle only assumes tracker has same altitude as vehicle's home
180 // @Values: 0:Barometer,1:GPS,2:GPS vehicle only
182 GSCALAR(alt_source
, "ALT_SOURCE", 0),
184 // @Param: MAV_UPDATE_RATE
185 // @DisplayName: Mavlink Update Rate
186 // @Description: The rate at which Mavlink updates position and baro data
191 GSCALAR(mavlink_update_rate
, "MAV_UPDATE_RATE", 1),
194 // @DisplayName: Minimum Pitch Angle
195 // @Description: The lowest angle the pitch can reach
200 GSCALAR(pitch_min
, "PITCH_MIN", PITCH_MIN_DEFAULT
),
203 // @DisplayName: Maximum Pitch Angle
204 // @Description: The highest angle the pitch can reach
209 GSCALAR(pitch_max
, "PITCH_MAX", PITCH_MAX_DEFAULT
),
213 // @Path: ../libraries/AP_Baro/AP_Baro.cpp
214 GOBJECT(barometer
, "BARO", AP_Baro
),
217 // @Path: ../libraries/AP_Compass/AP_Compass.cpp
218 GOBJECT(compass
, "COMPASS_", Compass
),
221 // @Path: ../libraries/AP_Scheduler/AP_Scheduler.cpp
222 GOBJECT(scheduler
, "SCHED_", AP_Scheduler
),
225 // @Path: GCS_Mavlink.cpp
226 GOBJECTN(_gcs
.chan_parameters
[0], gcs0
, "SR0_", GCS_MAVLINK_Parameters
),
228 #if MAVLINK_COMM_NUM_BUFFERS >= 2
230 // @Path: GCS_Mavlink.cpp
231 GOBJECTN(_gcs
.chan_parameters
[1], gcs1
, "SR1_", GCS_MAVLINK_Parameters
),
234 #if MAVLINK_COMM_NUM_BUFFERS >= 3
236 // @Path: GCS_Mavlink.cpp
237 GOBJECTN(_gcs
.chan_parameters
[2], gcs2
, "SR2_", GCS_MAVLINK_Parameters
),
240 #if MAVLINK_COMM_NUM_BUFFERS >= 4
242 // @Path: GCS_Mavlink.cpp
243 GOBJECTN(_gcs
.chan_parameters
[3], gcs3
, "SR3_", GCS_MAVLINK_Parameters
),
246 #if MAVLINK_COMM_NUM_BUFFERS >= 5
248 // @Path: GCS_Mavlink.cpp
249 GOBJECTN(_gcs
.chan_parameters
[4], gcs4
, "SR4_", GCS_MAVLINK_Parameters
),
252 #if MAVLINK_COMM_NUM_BUFFERS >= 6
254 // @Path: GCS_Mavlink.cpp
255 GOBJECTN(_gcs
.chan_parameters
[5], gcs5
, "SR5_", GCS_MAVLINK_Parameters
),
258 #if MAVLINK_COMM_NUM_BUFFERS >= 7
260 // @Path: GCS_Mavlink.cpp
261 GOBJECTN(_gcs
.chan_parameters
[6], gcs6
, "SR6_", GCS_MAVLINK_Parameters
),
264 // @Param: LOG_BITMASK
265 // @DisplayName: Log bitmask
266 // @Description: 4 byte bitmap of log types to enable
267 // @Bitmask: 0:ATTITUDE,1:GPS,2:RCIN,3:IMU,4:RCOUT,5:COMPASS,6:Battery
269 GSCALAR(log_bitmask
, "LOG_BITMASK", DEFAULT_LOG_BITMASK
),
272 // @Path: ../libraries/AP_InertialSensor/AP_InertialSensor.cpp
273 GOBJECT(ins
, "INS", AP_InertialSensor
),
276 // @Path: ../libraries/AP_AHRS/AP_AHRS.cpp
277 GOBJECT(ahrs
, "AHRS_", AP_AHRS
),
281 // @Path: ../libraries/SITL/SITL.cpp
282 GOBJECT(sitl
, "SIM_", SITL::SIM
),
286 // @Path: ../libraries/AP_BoardConfig/AP_BoardConfig.cpp
287 GOBJECT(BoardConfig
, "BRD_", AP_BoardConfig
),
289 #if HAL_MAX_CAN_PROTOCOL_DRIVERS
291 // @Path: ../libraries/AP_CANManager/AP_CANManager.cpp
292 GOBJECT(can_mgr
, "CAN_", AP_CANManager
),
297 // @Path: ../libraries/AP_GPS/AP_GPS.cpp
298 GOBJECT(gps
, "GPS", AP_GPS
),
301 // @Path: ../libraries/AP_Notify/AP_Notify.cpp
302 GOBJECT(notify
, "NTF_", AP_Notify
),
305 // @Path: ../libraries/RC_Channel/RC_Channels_VarInfo.h
306 GOBJECT(rc_channels
, "RC", RC_Channels_Tracker
),
309 // @Path: ../libraries/SRV_Channel/SRV_Channels.cpp
310 GOBJECT(servo_channels
, "SERVO", SRV_Channels
),
312 // AP_SerialManager was here
314 // @Param: PITCH2SRV_P
315 // @DisplayName: Pitch axis controller P gain
316 // @Description: Pitch axis controller P gain. Converts the difference between desired pitch angle and actual pitch angle into a pitch servo pwm change
321 // @Param: PITCH2SRV_I
322 // @DisplayName: Pitch axis controller I gain
323 // @Description: Pitch axis controller I gain. Corrects long-term difference in desired pitch angle vs actual pitch angle
328 // @Param: PITCH2SRV_IMAX
329 // @DisplayName: Pitch axis controller I gain maximum
330 // @Description: Pitch axis controller I gain maximum. Constrains the maximum pwm change that the I gain will output
336 // @Param: PITCH2SRV_D
337 // @DisplayName: Pitch axis controller D gain
338 // @Description: Pitch axis controller D gain. Compensates for short-term change in desired pitch angle vs actual pitch angle
343 // @Param: PITCH2SRV_FF
344 // @DisplayName: Pitch axis controller feed forward
345 // @Description: Pitch axis controller feed forward
350 // @Param: PITCH2SRV_FLTT
351 // @DisplayName: Pitch axis controller target frequency in Hz
352 // @Description: Pitch axis controller target frequency in Hz
358 // @Param: PITCH2SRV_FLTE
359 // @DisplayName: Pitch axis controller error frequency in Hz
360 // @Description: Pitch axis controller error frequency in Hz
366 // @Param: PITCH2SRV_FLTD
367 // @DisplayName: Pitch axis controller derivative frequency in Hz
368 // @Description: Pitch axis controller derivative frequency in Hz
374 // @Param: PITCH2SRV_SMAX
375 // @DisplayName: Pitch slew rate limit
376 // @Description: Sets an upper limit on the slew rate produced by the combined P and D gains. If the amplitude of the control action produced by the rate feedback exceeds this value, then the D+P gain is reduced to respect the limit. This limits the amplitude of high frequency oscillations caused by an excessive gain. The limit should be set to no more than 25% of the actuators maximum slew rate to allow for load effects. Note: The gain will not be reduced to less than 10% of the nominal value. A value of zero will disable this feature.
381 // @Param: PITCH2SRV_PDMX
382 // @DisplayName: Pitch axis controller PD sum maximum
383 // @Description: Pitch axis controller PD sum maximum. The maximum/minimum value that the sum of the P and D term can output
389 // @Param: PITCH2SRV_D_FF
390 // @DisplayName: Pitch Derivative FeedForward Gain
391 // @Description: FF D Gain which produces an output that is proportional to the rate of change of the target
396 // @Param: PITCH2SRV_NTF
397 // @DisplayName: Pitch Target notch filter index
398 // @Description: Pitch Target notch filter index
402 // @Param: PITCH2SRV_NEF
403 // @DisplayName: Pitch Error notch filter index
404 // @Description: Pitch Error notch filter index
408 GGROUP(pidPitch2Srv
, "PITCH2SRV_", AC_PID
),
411 // @DisplayName: Yaw axis controller P gain
412 // @Description: Yaw axis controller P gain. Converts the difference between desired yaw angle (heading) and actual yaw angle into a yaw servo pwm change
418 // @DisplayName: Yaw axis controller I gain
419 // @Description: Yaw axis controller I gain. Corrects long-term difference in desired yaw angle (heading) vs actual yaw angle
424 // @Param: YAW2SRV_IMAX
425 // @DisplayName: Yaw axis controller I gain maximum
426 // @Description: Yaw axis controller I gain maximum. Constrains the maximum pwm change that the I gain will output
433 // @DisplayName: Yaw axis controller D gain
434 // @Description: Yaw axis controller D gain. Compensates for short-term change in desired yaw angle (heading) vs actual yaw angle
439 // @Param: YAW2SRV_FF
440 // @DisplayName: Yaw axis controller feed forward
441 // @Description: Yaw axis controller feed forward
446 // @Param: YAW2SRV_FLTT
447 // @DisplayName: Yaw axis controller target frequency in Hz
448 // @Description: Yaw axis controller target frequency in Hz
454 // @Param: YAW2SRV_FLTE
455 // @DisplayName: Yaw axis controller error frequency in Hz
456 // @Description: Yaw axis controller error frequency in Hz
462 // @Param: YAW2SRV_FLTD
463 // @DisplayName: Yaw axis controller derivative frequency in Hz
464 // @Description: Yaw axis controller derivative frequency in Hz
470 // @Param: YAW2SRV_SMAX
471 // @DisplayName: Yaw slew rate limit
472 // @Description: Sets an upper limit on the slew rate produced by the combined P and D gains. If the amplitude of the control action produced by the rate feedback exceeds this value, then the D+P gain is reduced to respect the limit. This limits the amplitude of high frequency oscillations caused by an excessive gain. The limit should be set to no more than 25% of the actuators maximum slew rate to allow for load effects. Note: The gain will not be reduced to less than 10% of the nominal value. A value of zero will disable this feature.
477 // @Param: YAW2SRV_PDMX
478 // @DisplayName: Yaw axis controller PD sum maximum
479 // @Description: Yaw axis controller PD sum maximum. The maximum/minimum value that the sum of the P and D term can output
485 // @Param: YAW2SRV_D_FF
486 // @DisplayName: Yaw Derivative FeedForward Gain
487 // @Description: FF D Gain which produces an output that is proportional to the rate of change of the target
492 // @Param: YAW2SRV_NTF
493 // @DisplayName: Yaw Target notch filter index
494 // @Description: Yaw Target notch filter index
498 // @Param: YAW2SRV_NEF
499 // @DisplayName: Yaw Error notch filter index
500 // @Description: Yaw Error notch filter index
504 GGROUP(pidYaw2Srv
, "YAW2SRV_", AC_PID
),
507 // @DisplayName: Number of loaded mission items
508 // @Description: Set to 1 if HOME location has been loaded by the ground station. Do not change this manually.
511 GSCALAR(command_total
, "CMD_TOTAL", 0),
514 // @Path: ../libraries/AP_BattMonitor/AP_BattMonitor.cpp
515 GOBJECT(battery
, "BATT", AP_BattMonitor
),
517 // @Param: GCS_PID_MASK
518 // @DisplayName: GCS PID tuning mask
519 // @Description: bitmask of PIDs to send MAVLink PID_TUNING messages for
521 // @Values: 0:None,1:Pitch,2:Yaw
522 // @Bitmask: 0:Pitch,1:Yaw
523 GSCALAR(gcs_pid_mask
, "GCS_PID_MASK", 0),
525 // @Param: SCAN_SPEED_YAW
526 // @DisplayName: Speed at which to rotate the yaw axis in scan mode
527 // @Description: This controls how rapidly the tracker will move the servos in SCAN mode
532 GSCALAR(scan_speed_yaw
, "SCAN_SPEED_YAW", 2),
534 // @Param: SCAN_SPEED_PIT
535 // @DisplayName: Speed at which to rotate pitch axis in scan mode
536 // @Description: This controls how rapidly the tracker will move the servos in SCAN mode
541 GSCALAR(scan_speed_pitch
, "SCAN_SPEED_PIT", 5),
543 // @Param: INITIAL_MODE
544 // @DisplayName: Mode tracker will switch into after initialization
545 // @Description: 0:MANUAL, 1:STOP, 2:SCAN, 10:AUTO
547 GSCALAR(initial_mode
, "INITIAL_MODE", 10),
549 // @Param: SAFE_DISARM_PWM
550 // @DisplayName: PWM that will be output when disarmed or in stop mode
551 // @Description: 0:zero pwm, 1:trim pwm
553 GSCALAR(disarm_pwm
, "SAFE_DISARM_PWM", 0),
555 // @Param: AUTO_OPTIONS
556 // @DisplayName: Auto mode options
557 // @Description: 1: Scan for unknown target
559 // @Values: 0:None, 1: Scan for unknown target in auto mode
560 // @Bitmask: 0:Scan for unknown target
561 GSCALAR(auto_opts
, "AUTO_OPTIONS", 0),
564 // @Path: ../libraries/AP_Vehicle/AP_Vehicle.cpp
567 #if HAL_NAVEKF2_AVAILABLE
569 // @Path: ../libraries/AP_NavEKF2/AP_NavEKF2.cpp
570 GOBJECTN(ahrs
.EKF2
, NavEKF2
, "EK2_", NavEKF2
),
573 #if HAL_NAVEKF3_AVAILABLE
575 // @Path: ../libraries/AP_NavEKF3/AP_NavEKF3.cpp
576 GOBJECTN(ahrs
.EKF3
, NavEKF3
, "EK3_", NavEKF3
),
583 void Tracker::load_parameters(void)
585 AP_Vehicle::load_parameters(g
.format_version
, Parameters::k_format_version
);
588 // PARAMETER_CONVERSION - Added: Jan-2024
589 AP_Param::convert_class(g
.k_param_stats_old
, &stats
, stats
.var_info
, 0, true);
592 #if AP_SCRIPTING_ENABLED
593 // PARAMETER_CONVERSION - Added: Jan-2024
594 AP_Param::convert_class(g
.k_param_scripting_old
, &scripting
, scripting
.var_info
, 0, true);
597 // PARAMETER_CONVERSION - Added: Feb-2024 for Tracker-4.6
598 #if HAL_LOGGING_ENABLED
599 AP_Param::convert_class(g
.k_param_logger
, &logger
, logger
.var_info
, 0, true);
602 static const AP_Param::TopLevelObjectConversion toplevel_conversions
[] {
603 #if AP_SERIALMANAGER_ENABLED
604 // PARAMETER_CONVERSION - Added: Feb-2024 for Tracker-4.6
605 { &serial_manager
, serial_manager
.var_info
, Parameters::k_param_serial_manager_old
},
609 AP_Param::convert_toplevel_objects(toplevel_conversions
, ARRAY_SIZE(toplevel_conversions
));
611 #if HAL_HAVE_SAFETY_SWITCH
612 // configure safety switch to allow stopping the motors while armed
613 AP_Param::set_default_by_name("BRD_SAFETYOPTION", AP_BoardConfig::BOARD_SAFETY_OPTION_BUTTON_ACTIVE_SAFETY_OFF
|
614 AP_BoardConfig::BOARD_SAFETY_OPTION_BUTTON_ACTIVE_SAFETY_ON
|
615 AP_BoardConfig::BOARD_SAFETY_OPTION_BUTTON_ACTIVE_ARMED
);