On Sun, Aug 9, 2015 at 11:16 AM, Michael Powell
Hello,
I'd like to calculate air density at altitude. Studying some notes on wikipedia:
I am trying to derived a "specific gas constant" dimension, and
corresponding units: usually in the form of (J/(kg K)).
Mass and temperature dimensions are simple enough to build upon.
However, energy? Not so much, or perhaps there is a better way that I
am not grasping.
/// derived dimension for specific gas constant : J M^-1 Theta^-1
typedef derived_dimension
https://en.wikipedia.org/wiki/Density_of_air
Symbol is typically Greek Rho, whose dimensions are generally M/L^3; units will probably be kg/m^3, although I am also reading about slugs/ft^3.
Which incorporates a gas constant value:
http://en.wikipedia.org/wiki/Gas_constant
Whose units appear to be Joules/(Volume*Temp).
I'm not seeing anything too terribly exotic there; all these units / dimensions are present in Boost.Units?
As is usually the case, it is interesting to see how the units library "reduces" the units during code writing, compilation. Very impressive indeed.
Thank you...
Best regards,
Michael Powell