Electric Fields in the Ionosphere and Magnetosphere