If we can obtain the temperature and the barometric pressure, how to use international barometric formula to calculate the altitude correctly?

h = 44330 * [ 1 - ( p / p0 ) ^ ( 1 / 5.255) ]

h = altitude (m)

p = measured pressure (Pa)

p0 = reference pressure at sea level.

(1)Because the p0 is related to the weather, the following method is suitable for calibrating altimeter. Is it right?

We input the correct altitude H' and also obtain the temperature T' and pressure P'. When we need to calculate the altitude, use this pressure P' as p0, and the actual altitude = the measured altitude + H'.

(2)After we get the altitude result according to the formula above, it is necessary to calibrate using the temperature to obtain the actual measured altitude, as the following. Is it right?

The actual altitude = the raw altitude result * the actual average temperature / the standard average temperature

Here, the average temperature is the mean between the sea level and the location where measured.

And the actual altitude will be added H' to get the final result.

Is it right to use the steps above in a altimeter?