A Remotely Controlled Onboard Measurement System for Optimization of Energy Consumption of Electrical Trains