magnetic compass deviation calculation