Simultaneous investigation of magnetospheric plasma and spacecraft charging