Code to calculate vertical speed or altitude from barometric pressure

Doe's anyone has the code or algorithm to calculate vertical speed (or altitude) from barometric pressure?

Thank's