A versatile ankle-mounted fall detection device based on attitude heading systems