Analysing accelerometer data using hidden Markov models