Perhaps the oldfashioned way? Figure out your current latitude and which direction is north, then feed that into the system. GPS updates will take care of the former, a flux rate gyro, variation database and GPS fix gives you the latter.
Ships are on INS these days? Hmm... the drift must be quite a factor. Oh well, not if they keep updating from GPS - and why shouldn't they? After all, ships don't require the degree of independence an aircraft does - they can always stop and figure things out!
I thought I was doing good trying to avoid those airport hotels... and look at me now.