# Air density factor when calculating Airspeed

I am making my own attitude indicator / AHRS, like a Garmin G5. I am using two pressure sensors to measure altitude & airspeed via static /pitot lines.

Now I know the formula for calculating airspeed is: SQRT( (2 * ( Pitot - Static)) / density ) and many sources I find use 1.2 for the density factor, which should actually be 1.225 from my research.

But that density value is for air at sea level. I'm thinking I should adjust the density factor based on altitude. For instance, at 10k feet, the density drops to about 0.91 kg / m3. Not a big difference but enough to possibly be a factor.

Anyone have experience doing what I am making?

• If IAS is what you're looking for, you should simply not consider the reduction in air density due to altitude. As altitude increases and density decreases, the ASI will show a lower dynamic pressure (IAS) for the same true-airspeed, but the wings and rest of the aircraft will also experience the same reduced dynamic pressure. So use the sea level density irrespective of the altitude - if IAS (dynamic pressure) is what you want your ASI to read. But if you want TAS, you must account for density: $TAS = IAS / √σ$ (where $σ$ is relative density). Commented Jan 7, 2023 at 23:07
• You need to look up and understand the differences between: True air speed (TAS), Indicated air speed (IAS), Equivalent air speed (EAS), and Calibrated air speed (CAS). Commented Jan 8, 2023 at 6:01