Starbase/Other/LaserDesignatorTranslationSensor/Framerate Indepentdant LDTS
2024-05-09 16:07:27 -07:00

21 lines
626 B
Plaintext

:a=cos :H :b=cos :V :c=sin :H :d=sin :V :s=:P :f=h*:R :g=:L goto++:w%m
m=5 h=100 f=.5 l=35.6 t=6 z=.001 d=16.68 goto++:w%m
:i=:f*:b*:c :j=:f*:a*:d :k=l-h*:g-:f*:a*:b :L=h/(:S+d)-t goto++:w%m
n=:s/((:i^2+:j^2+:k^2)^f+z) :x=-:i*n :y=:j*n :z=:k*n goto++:w%m
// LEQ Directional-Speedo by NTPS + Thaccus
// Inputs:
// :P - Speedometer output
// :R - Sensor Distance
// :V - Sensor Vertical
// :H - Sensor Horizontal
// :L - Length of Beam
// Outputs:
// :x - Velocity in x direction.
// :y - Velocity in y direction.
// :z - Velocity in z direction.
// :L - Length of Beam
// Internal Memory:
// :a :b :c :d :s :f :g :w :i :j :K