Not entirely irrelevant
as altitude increases, molar mass goes down a little, which means the ideal gas law will produce different numbers. At 2900m, air composition is pretty normal.
Anyway. Let's set up some variables and constants.
P = Pressure (Pascals, not atmospheres or mmHg or whatever);
D = Density;
V = Volume;
T = Temperature (Kelvin);
n = Number of moles of gas in a given volume;
R = universal gas constant (8.3144 J per mole degree)
M = Mass of a given volume of gas
Ideal gas law: PV=nRT
So, (P / D).(M / n) = RT
. The (M / n)
is the value that would slowly change with altitude, or indeed if you were flying over Venus instead of Earth, but for this case we can use the typical molar mass of air, hence 28.92g/mole . R is always 8.3144 in these units.
Therefore, T = (P / D) . (3.478)
Be careful with units, significant figures, &c &c