Skip to content

Commit

Permalink
Scripting: added Lat,Lon to aerobatics POSM/POST
Browse files Browse the repository at this point in the history
this makes "map POSM POST" work on aerobatic scripts
  • Loading branch information
tridge committed Sep 26, 2024
1 parent 00163ce commit 8895723
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2124,7 +2124,9 @@ end

-- log a pose from position and quaternion attitude
function log_pose(logname, pos, quat)
logger.write(logname, 'px,py,pz,q1,q2,q3,q4,r,p,y', 'ffffffffff',
local loc = ahrs:get_origin():copy()
loc:offset(pos:x(),pos:y())
logger.write(logname, 'px,py,pz,q1,q2,q3,q4,r,p,y,Lat,Lon', 'ffffffffffLL',
pos:x(),
pos:y(),
pos:z(),
Expand All @@ -2134,7 +2136,9 @@ function log_pose(logname, pos, quat)
quat:q4(),
math.deg(quat:get_euler_roll()),
math.deg(quat:get_euler_pitch()),
math.deg(quat:get_euler_yaw()))
math.deg(quat:get_euler_yaw()),
loc:lat(),
loc:lng())
end

--[[
Expand Down

0 comments on commit 8895723

Please sign in to comment.