Thanks for your suggestions. I guess this formular could also be transformed and used to calculate for instance height using relative change in pressure. From a design perspective I want to isolate these types of calculation from the sensor drivers and provide them in a separate class/library.
This week the focus has been on improving the support for low-power mode and pushing the default idle mode as low as possible. I have added a number of example sketches to show how to go towards ultra low power (1-10 uA range) in power-down.
Below is a link to one of the sketches. It is a basic wireless temperature sensor using DS18B20s and Cosa Wireless interface and drivers (NRF24L01P, CC1101 or RF 433). The sketch will power up and issue a conversion request to two DS18B20 sensors. Sleep until the conversion to complete (750 ms). After that the temperature samples are read and sent in a message together with a sequence number and the power supply status (i.e. battery voltage). The results for an Arduino Mini Pro 16 Mhz with Power LED removed with the VWI driver and a RF 433 module are;
Power Idle Sampling Transmitting
LiPo 3.9 V 40 uA 1.3 mA 6 mA
FTDI 5,1 V 190 uA 1.5 mA 10 mA
Further reduction is possible by removing the regulator from the Arduino Mini Pro and running on the internal 8 MHz clock. On an Arduino LilyPad the power down mode is less than 1 uA.
Cheers!