A Hmm-based Prediction Model For Spatio-temporal Trajectories