Since I had trouble getting only the compass bearing portion to work properly for two days, after I've finally got it to work I figured I might as well share the code in case there are people out there who might need it, particularly in Java. This will save a lot of time and frustration. Additionall...