Development Of An Advanced Step Counting Algorithm With Integrated Activity Detection For Free Living Environments