Implement a standard atmosphere calculator in R