I’m not sure how the speed of sound could depend on altitude, even in principle. The air doesn’t know where it is!
Putting that aside, in an ideal gas, the speed of sound depends on the composition of the gas and the temperature and, interestingly, does not depend on pressure, and pressure is the main way that the altitude would affect the speed of sound. So measuring the speed of sound in air actually makes for a pretty good thermometer.
From your own link:
"The speed has a weak dependence on frequency and pressure in ordinary air, deviating slightly from ideal behavior."
"The speed of sound is raised by humidity. The difference between 0% and 100% humidity is about 1.5 m/s at standard pressure and temperature, but the size of the humidity effect increases dramatically with temperature."
"Slight" can matter significantly in an application like this.
> the size of the humidity effect increases dramatically with temperature.
This has little do with the behavior of sound. The fraction of the air that consists of water vapor at 100% relative is very small at cool temperatures and increases to 100% at 100 degrees C.
(Yes, water boils at the temperature at which air that is saturated with water vapor is all water vapor.)
In liquids the speed of sound is related to the density, I would have thought similar for air but I see your point. Very insightful!
Can an ideal gas of same volume, mass and temperature be brought to different pressures?
https://courses.lumenlearning.com/suny-physics/chapter/13-3-...
Not unless you change the average mass of the molecules.
An ideal gas’ pressure is a function of number of particles per unit volume, its temperature, and nothing else. If you do anything involving adding or removing heat or changing the volume or pressure, you probably also need to know the specific heat at constant volume and the specific heat at constant pressure or, frequency, their ratio. That ratio is called the adiabatic index or the heat capacity ratio, it’s written as gamma, and it’s the last parameter in the speed of sound of an ideal gas. Interestingly, it doesn’t vary all that much between different gasses.