Calculation of escape currents of electrons emitted from negatively charged spacecraft surfaces in a magnetic field