Skip to content

Commit

Permalink
AP_Scripting: added GPS yaw binding
Browse files Browse the repository at this point in the history
useful for seeing if switching to a GPS yaw source set in EK3 will work
  • Loading branch information
tridge committed May 28, 2024
1 parent 3f6ce2d commit 4e3eea2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libraries/AP_Scripting/docs/docs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2819,6 +2819,13 @@ gps.GPS_OK_FIX_2D = enum_integer
gps.NO_FIX = enum_integer
gps.NO_GPS = enum_integer

-- get yaw from GPS in degrees
---@param instance integer -- instance number
---@return number|nil -- yaw in degrees
---@return number|nil -- yaw accuracy in degrees
---@return uint32_t_ud|nil -- time in milliseconds of last yaw reading
function gps:gps_yaw_deg(instance) end

-- Returns nil or the instance number of the first GPS that has not been fully configured. If all GPS’s have been configured this returns nil.
---@return integer|nil
function gps:first_unconfigured_gps() end
Expand Down
1 change: 1 addition & 0 deletions libraries/AP_Scripting/generator/description/bindings.desc
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ singleton AP_GPS method last_message_time_ms uint32_t uint8_t 0 ud->num_sensors(
singleton AP_GPS method have_vertical_velocity boolean uint8_t 0 ud->num_sensors()
singleton AP_GPS method get_antenna_offset Vector3f uint8_t 0 ud->num_sensors()
singleton AP_GPS method first_unconfigured_gps boolean uint8_t'Null
singleton AP_GPS method gps_yaw_deg boolean uint8_t 0 ud->num_sensors() float'Null float'Null uint32_t'Null

include AP_Math/AP_Math.h

Expand Down

0 comments on commit 4e3eea2

Please sign in to comment.