Effects of spacecraft potential on three-dimensional electron measurements in the solar wind