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?