This math is incorrect. I realize it's just for simulation, but it should still be performed correctly. If you hard set the pressure and temperature to standard values, then this will be correct at sea level and you will only have to include altitude in the calculation.

Related to https://github.com/TauLabs/TauLabs/pull/328, I have prepared a patch set for all the atmospheric constants. I don't want to merge that into pr-328 for fear that the PR will become overwhelming, but you might consider that these values will become available soon from a #define.