Real-time Uncertainty-Aware Motion Planning for Magnetic-based Navigation