I would like to know how to calculate the local Mach number on the upper surface of an airfoil given the ambient temperature, the local velocity on the airfoil surface, the freestream velocity, and the ambient pressure.
I am assuming from my knowledge that the Mach number depends only the temperature, so I would need to calculate the local temperature on the upper airfoil surface, which is pretty trivial using the isentropic gas equations.
So $$a ~=~ \sqrt{\gamma * R * T}.$$
And then just divide the local velocity by the local speed of sound. Is this the right way to do it?