diff --git a/libraries/AP_Scripting/applets/Aerobatics/FixedWing/plane_aerobatics.lua b/libraries/AP_Scripting/applets/Aerobatics/FixedWing/plane_aerobatics.lua index f98be87a34e86..9dee1d007e037 100644 --- a/libraries/AP_Scripting/applets/Aerobatics/FixedWing/plane_aerobatics.lua +++ b/libraries/AP_Scripting/applets/Aerobatics/FixedWing/plane_aerobatics.lua @@ -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(), @@ -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 --[[