mirror of https://github.com/ArduPilot/ardupilot
AP_Scripting: added new functions to support trajectory script
This commit is contained in:
parent
822c26f811
commit
d17b528cab
|
@ -462,6 +462,11 @@ function Vector3f_ud:normalize() end
|
|||
---@return number
|
||||
function Vector3f_ud:length() end
|
||||
|
||||
-- Computes angle between this vector and vector v2
|
||||
---@param v2 Vector3f_ud
|
||||
---@return number
|
||||
function Vector3f_ud:angle(v2) end
|
||||
|
||||
-- desc
|
||||
---@param param1 number -- XY rotation in radians
|
||||
function Vector3f_ud:rotate_xy(param1) end
|
||||
|
@ -470,6 +475,77 @@ function Vector3f_ud:rotate_xy(param1) end
|
|||
---@return Vector2f_ud
|
||||
function Vector3f_ud:xy() end
|
||||
|
||||
-- desc
|
||||
---@class Quaternion_ud
|
||||
local Quaternion_ud = {}
|
||||
|
||||
---@return Quaternion_ud
|
||||
function Quaternion() end
|
||||
|
||||
-- get field
|
||||
---@return number
|
||||
function Quaternion_ud:q4() end
|
||||
|
||||
-- set field
|
||||
---@param value number
|
||||
function Quaternion_ud:q4(value) end
|
||||
|
||||
-- get field
|
||||
---@return number
|
||||
function Quaternion_ud:q3() end
|
||||
|
||||
-- set field
|
||||
---@param value number
|
||||
function Quaternion_ud:q3(value) end
|
||||
|
||||
-- get field
|
||||
---@return number
|
||||
function Quaternion_ud:q2() end
|
||||
|
||||
-- set field
|
||||
---@param value number
|
||||
function Quaternion_ud:q2(value) end
|
||||
|
||||
-- get field
|
||||
---@return number
|
||||
function Quaternion_ud:q1() end
|
||||
|
||||
-- set field
|
||||
---@param value number
|
||||
function Quaternion_ud:q1(value) end
|
||||
|
||||
-- Applies rotation to vector argument
|
||||
---@param vec Vector3f_ud
|
||||
function Quaternion_ud:earth_to_body(vec) end
|
||||
|
||||
-- Returns inverse of quaternion
|
||||
---@return Quaternion_ud
|
||||
function Quaternion_ud:inverse() end
|
||||
|
||||
-- Construct quaternion from Euler angles
|
||||
---@param roll number
|
||||
---@param pitch number
|
||||
---@param yaw number
|
||||
function Quaternion_ud:from_euler(roll, pitch, yaw) end
|
||||
|
||||
-- Returns yaw component of quaternion
|
||||
---@return number
|
||||
function Quaternion_ud:get_euler_yaw() end
|
||||
|
||||
-- Returns pitch component of quaternion
|
||||
---@return number
|
||||
function Quaternion_ud:get_euler_pitch() end
|
||||
|
||||
-- Returns roll component of quaternion
|
||||
---@return number
|
||||
function Quaternion_ud:get_euler_roll() end
|
||||
|
||||
-- Mutates quaternion have length 1
|
||||
function Quaternion_ud:normalize() end
|
||||
|
||||
-- Returns length or norm of quaternion
|
||||
---@return number
|
||||
function Quaternion_ud:length() end
|
||||
|
||||
-- desc
|
||||
---@class Location_ud
|
||||
|
|
|
@ -55,6 +55,7 @@ singleton AP_AHRS method get_origin boolean Location'Null
|
|||
singleton AP_AHRS method set_origin boolean Location
|
||||
singleton AP_AHRS method initialised boolean
|
||||
singleton AP_AHRS method get_posvelyaw_source_set uint8_t
|
||||
singleton AP_AHRS method get_quaternion boolean Quaternion'Null
|
||||
|
||||
include AP_Arming/AP_Arming.h
|
||||
|
||||
|
@ -128,6 +129,7 @@ userdata Vector3f method scale Vector3f float'skip_check
|
|||
userdata Vector3f method copy Vector3f
|
||||
userdata Vector3f method xy Vector2f
|
||||
userdata Vector3f method rotate_xy void float'skip_check
|
||||
userdata Vector3f method angle float Vector3f
|
||||
|
||||
userdata Vector2f field x float'skip_check read write
|
||||
userdata Vector2f field y float'skip_check read write
|
||||
|
@ -142,6 +144,22 @@ userdata Vector2f operator +
|
|||
userdata Vector2f operator -
|
||||
userdata Vector2f method copy Vector2f
|
||||
|
||||
userdata Quaternion field q1 float'skip_check read write
|
||||
userdata Quaternion field q2 float'skip_check read write
|
||||
userdata Quaternion field q3 float'skip_check read write
|
||||
userdata Quaternion field q4 float'skip_check read write
|
||||
userdata Quaternion method length float
|
||||
userdata Quaternion method normalize void
|
||||
userdata Quaternion operator *
|
||||
userdata Quaternion method get_euler_roll float
|
||||
userdata Quaternion method get_euler_pitch float
|
||||
userdata Quaternion method get_euler_yaw float
|
||||
userdata Quaternion method from_euler void float'skip_check float'skip_check float'skip_check
|
||||
userdata Quaternion method inverse Quaternion
|
||||
userdata Quaternion method earth_to_body void Vector3f
|
||||
userdata Quaternion method to_axis_angle void Vector3f
|
||||
userdata Quaternion method from_axis_angle void Vector3f float'skip_check
|
||||
userdata Quaternion method from_angular_velocity void Vector3f float'skip_check
|
||||
|
||||
include AP_Notify/AP_Notify.h
|
||||
singleton AP_Notify rename notify
|
||||
|
|
Loading…
Reference in New Issue