Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_Scripting: Add geofence_rtl.lua script #29523

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MichelleRos
Copy link
Contributor

Script for AGL geofence, which RTLs when given altitude is exceeded and vehicle is further than a given distance from home.

@@ -0,0 +1,107 @@
--[[
based on copter_terrain_brake.lua
script to automatically RTL the plane when above a given altitude AGL.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
script to automatically RTL the plane when above a given altitude AGL.
script to automatically RTL the vehicle when above a given altitude AGL.

assert(param:add_table(PARAM_TABLE_KEY, PARAM_TABLE_PREFIX, 14), 'could not add param table')

--[[
// @Param: TERR_BRK_ENABLE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should his be TERR_RTL?

end

if TERR_BRK_ENABLE:get() == 1 then
gcs:send_text(MAV_SEVERITY.INFO, string.format("Loaded Auto max alt checker"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add some better words, including numbers

@tridge tridge force-pushed the pr/geofence-script branch from 7a5121d to 9f16df0 Compare March 24, 2025 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants