In the past with another brand of plc, I have used a simple math technique of approximating a trig function with a taylor series power expansion of the form:
cos(x)= 1-(x*x)/2 +(x*x*x*x)/(1*2*3*4) -(x*x*x*x*x*x)/(1*2*3*4*5*6) .....see any calculus book for the taylor series expansion of the cosine function
raan