How can a sounding rocket accurately take the temperature of the atmosphere while flying through it at high speed?

A sounding rocket is a rocket that ascends into the high atmosphere in order to take all sorts of measurements so we can learn more about the upper atmosphere. They don't go into orbit, so they can be smaller than what we normally think of space rockets. However, they can still go above 100km fairly easily, and they still go very fast.

What I want to know is, how can it accurately measure the ambient temperature at whatever altitude it's at? The rocket will be flying very fast, incurring a lot of heat from air friction.

• Note that the heat is not due to friction, but from compression of the air in front. – JDługosz Jan 22 '16 at 7:55
• @JDługosz I'm pretty sure it's from both. Solid surfaces suffer from skin friction across moving air, which produces heat just like any other friction. – DrZ214 Jan 22 '16 at 22:52
• @DrZ214 No, it's not. The influence of friction is negligible. – Rikki-Tikki-Tavi Sep 13 '16 at 16:29

According to the link here,

In meteorological rockets, the temperature sensor is not measured as the rocket ascends but a payload containing the sensor is ejected from a high altitude and as it parachutes down measurements are beamed back.

Here is an answer from over on aviation.stackexchange.com which addresses this issue. I've quoted a portion of it below, but see that link for more info.

As you measure temperature moving at high velocities, your outside thermometer will measure a higher temp than what is actually outside (what a non-moving thermometer would get). That's because as the air rams into your thermometer it gets a little bit compressed, and that makes it heat up a little bit.

Amazingly, some smart people have even calculated how much that "ram rise" is, and you can actually compensate (well, in theory) from the indicated temperature to calculate what the actual outside air temp is:

$$Ram~Rise=SAT\times0.2\times{M}^2$$

According to Mathav Raj's answer, temperature isn't measure during ascent, but this explains how it could be done.

• I think the document in Mathav Raj's answer might also contain this information - there is discussion in that document about a whole lot of other corrections that can be performed on the measured value, and that formula may also apply during ascent. The same ram rise issue is experienced on the way down. – Steve Jan 22 '16 at 12:49