daily pastebin goal
7%
SHARE
TWEET

OFP vehicle speed from velocity vectors

Faguss Jun 13th, 2018 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. _plane = _this select 0
  2. _x     = velocity _plane select 0
  3. _y     = velocity _plane select 1
  4. _z     = velocity _plane select 2
  5. _xy    = sqrt (_x^2 + _y^2)
  6. _speed = 3.6 * (if (_xy!=0) then {_xy/cos (atan (_z/_xy))} else {abs _z})
  7. hint Format ["%1 %2", speed _plane, _speed]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top