ardupilot/libraries/AP_Scripting/applets
petrosilius 1d810bfa6f 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!
2024-05-28 17:42:52 +10:00
..
Aerobatics/FixedWing AP_Scripting: ignore lua-language-server-errors 2024-05-21 09:42:22 +10:00
WebExamples AP_Scripting: added web server appliction 2023-12-11 18:00:38 +11:00
BattEstimate.lua AP_Scripting: ignore lua-language-server-errors 2024-05-21 09:42:22 +10:00
BattEstimate.md
Gimbal_Camera_Mode.lua
Gimbal_Camera_Mode.md
Heli_IM_COL_Tune.lua AP_Scripting: ignore lua-language-server-errors 2024-05-21 09:42:22 +10:00
Heli_IM_Col_Tune.md
Heli_idle_control.lua AP_Scripting: ignore lua-language-server-errors 2024-05-21 09:42:22 +10:00
Heli_idle_control.md AP_Scripting: script for idle control (gas helicopters) 2024-01-09 22:29:50 -05:00
Hexsoon LEDs.lua
Hexsoon LEDs.md
MissionSelector.lua AP_Scripting: ignore lua-language-server-errors 2024-05-21 09:42:22 +10:00
MissionSelector.md
ONVIF_Camera_Control.lua
ONVIF_Camera_Control.md
QuadPlane_Low_Alt_FW_mode_prevention.lua
QuadPlane_Low_Alt_FW_mode_prevention.md
README.md
RockBlock.lua AP_Scripting: ignore lua-language-server-errors 2024-05-21 09:42:22 +10:00
RockBlock.md
Script_Controller.lua AP_Scripting: ignore lua-language-server-errors 2024-05-21 09:42:22 +10:00
Script_Controller.md
SmartAudio.lua AP_Scripting: ignore lua-language-server-errors 2024-05-21 09:42:22 +10:00
SmartAudio.md
VTOL-quicktune.lua AP_Scripting: ignore lua-language-server-errors 2024-05-21 09:42:22 +10:00
VTOL-quicktune.md AP_SCripting: update VTOL QuickTune to allow YAW FLTE = 0 2024-04-09 09:31:42 +10:00
ahrs-source-extnav-optflow.lua AP_Scripting: EKF source switching for ExtNav and optflow 2024-02-28 18:52:37 +11:00
ahrs-source-extnav-optflow.md AP_Scripting: EKF source switching for ExtNav and optflow 2024-02-28 18:52:37 +11:00
copter-deadreckon-home.lua AP_Scripting: ignore lua-language-server-errors 2024-05-21 09:42:22 +10:00
copter-deadreckon-home.md AP_Scripting: rename GPS_ to GPS1_ 2024-03-19 19:50:12 +11:00
copter_terrain_brake.lua AP_Scripting: added copter_loiter_brake script 2024-05-07 19:39:39 +10:00
copter_terrain_brake.md AP_Scripting: added copter_loiter_brake script 2024-05-07 19:39:39 +10:00
forward_flight_motor_shutdown.lua AP_Scripting: ignore lua-language-server-errors 2024-05-21 09:42:22 +10:00
forward_flight_motor_shutdown.md
leds_on_a_switch.lua AP_Scripting: ignore lua-language-server-errors 2024-05-21 09:42:22 +10:00
leds_on_a_switch.md
motor_failure_test.lua
motor_failure_test.md
mount-poi.lua AP_Scripting: ignore lua-language-server-errors 2024-05-21 09:42:22 +10:00
mount-poi.md
net_webserver.lua AP_Scripting: ignore lua-language-server-errors 2024-05-21 09:42:22 +10:00
net_webserver.md AP_Scripting: added web server appliction 2023-12-11 18:00:38 +11:00
pelco_d_antennatracker.lua AP_Scripting: added tracker Pelco-D control script 2024-05-28 17:42:52 +10:00
pelco_d_antennatracker.md AP_Scripting: added tracker Pelco-D control script 2024-05-28 17:42:52 +10:00
plane_package_place.lua AP_Scripting: ignore lua-language-server-errors 2024-05-21 09:42:22 +10:00
plane_package_place.md
plane_precland.lua AP_Scripting: ignore lua-language-server-errors 2024-05-21 09:42:22 +10:00
plane_precland.md AP_Scripting: support precision loiter in quadplanes 2024-03-12 10:45:56 +11:00
plane_ship_landing.lua AP_Scripting: ignore lua-language-server-errors 2024-05-21 09:42:22 +10:00
revert_param.lua AP_Scripting: ignore lua-language-server-errors 2024-05-21 09:42:22 +10:00
revert_param.md AP_Scripting: allow revert of angular rate limits 2024-05-08 17:43:04 +10:00
rover-quicktune.lua AP_Scripting: ignore lua-language-server-errors 2024-05-21 09:42:22 +10:00
rover-quicktune.md AP_Scripting: simplify Rover quick tune 2023-11-29 08:18:07 -08:00
runcam_on_arm.lua AP_Scripting: fix some more of the easy luacheck warnings 2023-12-13 18:10:26 +11:00
runcam_on_arm.md
winch-control.lua AP_Scripting: ignore lua-language-server-errors 2024-05-21 09:42:22 +10:00
winch-control.md

README.md

LUA Applets

Unlike the code in the examples directory, these are complete applets that required no user editing of the file for use. Each one has an .md file describing its operation and any switches or parameters in ArduPilot that are required for operation. The user only has to copy the applet to APM/scripts directory on their SD card, in order to install. Of course, scripting must be enabled via SCR_ENABLE =1 and the autopilot be capable of running scripts. See the Wiki for Lua Scripting under Advanced Configuration.

Each will have a Wiki entry mirroring the .md file'd contents with a link back to this directory.