Added code to get linear Z acceleration