Optimise dipole orientation