You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AP_Scripting: added tracker Pelco-D control script
This script uses the scaled output from the antennatracker servos and map them to corresponding Pelco-D messages to be sent via a RS-485 interface to a motorized base (can be anything from motorized tracker to a PTZ camera).
If your FCU doesnt offer a RS-485 interface by default, you can use or TTL-RS485- or USB-RS485-adapters.
Pelco-D allows to control using either speed-/differential- or absolute-control control of the pan-/tilt-axis.
Currently the script uses speed based control using by mapping the "ContinuousRotation" type servos outputs to the corresponding Pelco-D messages.
The absolute control messages are implemented nevertheless for future use.
The script assumes therefor at least the following parameters to be set:
SCR_ENABLE = 1
SERVO_PITCH_TYPE = 2 # ContinuousRotation type servo
SERVO_YAW_TYPE = 2 # ContinuousRotation type servo
SERIALx_PROTOCOL = 28 # serial port used by luascript
Additionally the PITCH2SRV and YAW2SRV tuning needs to be done as described by the antennatracker description.
Also keep attention to the PITCH_MIN, PITCH_MAX and YAW_RANGE parameters to fit your Pelco-D hardware!
This scripts uses the scaled output from the antennatracker servos and map them to corresponding Pelco-D messages to be sent via a RS-485 interface to a motorized base (can be anything from motorized tracker to a PTZ camera). If your FCU doesnt offer a RS-485 interface by default, you can use or TTL-RS485- or USB-RS485-adapters. I tested this script using a USB-RS485 adapter using Linux/Obal board and a Hikvision PTZ camera.
4
+
5
+
Pelco-D allows to control using either speed-/differential- or absolute-control control of the pan-/tilt-axis. Currently the script uses speed based control using by mapping the "ContinuousRotation" type servos outputs to the corresponding Pelco-D messages. The absolute control messages are implemented nevertheless for future use.
6
+
7
+
The script assumes the following parameters to be set:
8
+
9
+
SCR_ENABLE = 1
10
+
SERVO_PITCH_TYPE = 2 # ContinuousRotation type servo
11
+
SERVO_YAW_TYPE = 2 # ContinuousRotation type servo
12
+
SERIALx_PROTOCOL = 28 # replace 'x' with the serial port used by luascript
13
+
14
+
Additionally the PITCH2SRV, YAW2SRV tuning needs to be done as described by the antennatracker description.
15
+
Also keep attention to the PITCH_MIN, PITCH_MAX and YAW_RANGE parameters to fit your Pelco-D hardware!
0 commit comments