just remember that if you have lots of "extra" wire and bundle it up into a neat coil,-----you'll have an electromagnet.
The spaghetti behind the instrument panel should only be sufficiently long to reach it's termination without sharp angles or strain and should allow the connected item to be readily-withdrawn from the panel for maintenance /disconnection.
Can't you set small "correcting" magnets to reduce the errors?
a good Yachtsman's book should give you the info...try the old-fashioned public library!