How it is calculated
θ = atan2(sin Δλ · cos φ₂, cos φ₁ · sin φ₂ − sin φ₁ · cos φ₂ · cos Δλ)
Initial great-circle bearing to the Kaaba (21.4225° N, 39.8262° E), measured clockwise from TRUE north; distance by the haversine formula. A magnetic compass points to magnetic north, which in the US differs from true north by up to about 20°; correct for your local magnetic declination.