how to calculate respiratory rate from heart rate