// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Estimate angular speed between two recorded poses // Not compiled or tested in-world // Setup: Use a spare owned prim. Set two Euler poses and positive DT. Touch for private calculations. // Stop / restore: Disable/remove. No camera or object settings are changed. // Notes: The shortest difference loses revolutions greater than180 degrees between samples; sample fast enough for the intended motion. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Transform planning only. vector BEFORE=<0.0,0.0,10.0>; vector AFTER=<0.0,0.0,35.0>; float DT=0.5; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; if(DT<=0.0) { llOwnerSay("Positive elapsed time required."); return; } rotation a=llEuler2Rot(BEFORE*DEG_TO_RAD); rotation b=llEuler2Rot(AFTER*DEG_TO_RAD); rotation relative=b/a; float angle=llRot2Angle(relative); llOwnerSay("Minimum angular speed rad/s="+(string)(angle/DT)+" deg/s="+(string)(angle*RAD_TO_DEG/DT)); } }