How to get the Ambient pressure

Ambient pressure cannot be got directly in the watch face, So I need to know the algorithm for calculating sea level pressure by elevation and ambient pressure. So I can get the elevation and sea-level pressure and then calculate the ambient pressure.