In general engineering the Moody Diagram can be used to estimate the friction factor based on the Reynolds number which in addition to temperature is also dependent upon pressure (density and viscosity)and velocity.
If turbulence is controlling, that is a very high Nre, the friction factor is in basically independent of position along the pipe. If not,then a mean friction factor has to be determined over the length of the pipe, perhaps based on an inlet and outlet Nre.
Dependent upon the pressure and temperature, an estimate of compressibility factor, Z, should be made. If in the range of expected pressure and pressure drop, Z is approximately constant, then a perfect gas approach is satisfactory. Otherwise, an equation of state or use of a Mollier diagram for air should be incorporated is solving for the pressure drop/friction losses.
Heat transfer is another factor to be considered.
Does this answer the original question?