I'm trying to modify the subroutine so that the turbine can yaw, this I can acheive. However, when I try to resolve the drag force so that it can be determined for any direction, I have problems. I'm determining a yaw error, simple trigonometry, and when I include this yaw correction (trig function) in both FUDRAG and FVDRAG the loop starts returning my angle of attack as NaN and the U and V as zero. However, if I include this yaw correction in either FUDRAG or FVDRAG the whole subroutine works fine. Any suggestions?