how to calculate ventilation rate from spirometer