Skip to content

Commit

Permalink
AP_Scripting: add bindings for ahrs.wind_alignment and ahrs.head_wind
Browse files Browse the repository at this point in the history
  • Loading branch information
magicrub authored and tridge committed Dec 25, 2023
1 parent 39e7209 commit 47fdf22
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions libraries/AP_Scripting/docs/docs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3008,6 +3008,18 @@ function ahrs:groundspeed_vector() end
---@return Vector3f_ud
function ahrs:wind_estimate() end

-- Determine how aligned heading_deg is with the wind. Return result
-- is 1.0 when perfectly aligned heading into wind, -1 when perfectly
-- aligned with-wind, and zero when perfect cross-wind. There is no
-- distinction between a left or right cross-wind. Wind speed is ignored
---@param heading_deg number
---@return number
function ahrs:wind_alignment(heading_deg) end

-- Forward head-wind component in m/s. Negative means tail-wind
---@return number
function ahrs:head_wind() end

-- desc
---@return number|nil
function ahrs:get_hagl() end
Expand Down
2 changes: 2 additions & 0 deletions libraries/AP_Scripting/generator/description/bindings.desc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ singleton AP_AHRS method get_gyro Vector3f
singleton AP_AHRS method get_accel Vector3f
singleton AP_AHRS method get_hagl boolean float'Null
singleton AP_AHRS method wind_estimate Vector3f
singleton AP_AHRS method wind_alignment float'skip_check float'skip_check
singleton AP_AHRS method head_wind float'skip_check
singleton AP_AHRS method groundspeed_vector Vector2f
singleton AP_AHRS method get_velocity_NED boolean Vector3f'Null
singleton AP_AHRS method get_relative_position_NED_home boolean Vector3f'Null
Expand Down

0 comments on commit 47fdf22

Please sign in to comment.