I see that you found a good spot for the electronic compass inside the cabin...... good to hear!
Having experienced your same dilemma on several different boats, I've found that as long as you are 3ft away from magnets, metal (aluminum not included), LARGE electronics, speakers, amps and...