completed pressure ground function

to calculate the pressure ground