Degree-based Trig Functions


#1

The standard trignometric functions (SIN, COS, TAN, SIN, ACOS, ATAN) provided in the RMC controllers handle angles in radians. The attached User Function library provides SIN_DEG, COS_DEG, and TAN_DEG, which accept an angle in degrees, and ASIN_DEG, ACOS_DEG, and ATAN_DEG, which return the result in degrees.

Notice that additionally, this function library includes ATAN2 (and ATAN2_DEG), which take two coordinate values (x and y) instead of the ratio (y/x) like the standard ATAN/ATAN_DEG function. This allows the function to work properly over all quadrants in the coordinate space.
TrigFunctionsInDegrees.rmcflib (3.14 KB)