Originally Posted by MarkSF
The GPS does not provide heading, it only provides course. It's dumb, in that it thinks the boat is pointing in the direction it's going....
Sorry I don't agree and go as far as saying that reality is diametrically opposite to your description
If the boat is effectively stationary and drifting on a tide, the GPS will give an accurate reading of the direction and speed of the boat's movement. GPS is far from dumb.
Equally if you are sailing a compass course of say, 165 degrees and there is a 090 degree current setting, the steering compass will read 165 (assuming it is accurate) and the GPS will read a vectored course including the current drift.
In other words, the compass will tell you where the boat is pointing and the GPS will tell you where you're going.
And I agree with Tommays - what you're trying to do is beyond the realm of a pocket calculator.