Should specify whether the bearing is supposed to be in radians or degrees (FYI, it's radians).
Also, in the 3rd paragraph the word "displacement" is in there twice. Minor typo :)
Zero-crossing detection saves the day since the Function block apparently doesn't have it.
In real Simulink, you'd just be able to use an "Abs" block here :)
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.