still porting barometer code