VAR_x := 2.0 * (NCAD6WP5.raw * NCAD6WP3.raw - NCAD6WP4.raw * NCAD6WP2.raw); if abs(VAR_x) < 1 then return(arcsin(VAR_x)*180/3.1415926); else if VAR_x <= -1 then return(-90); else return(90); elseif; endif;