Algorithm Development And Implementation Of Activity Recognition System Utilizing Wearable Mems Sensors