Reconstruction of the interplanetary magnetic field from the magnetosheath data: A steady-state approach