The charging of spacecraft surfaces