added a decode function the measurement data, need to be tested