Measurement of gas in enclosed spaces