This brings into focus a math issue I've been wrestling with for some time, but haven't yet been able to adequately express.
Unexpectedly, some of the "equations" posted here aren't really equal! For instance, "pressure altitude - in feet"[1] (formulas that require a particular set of unit are a big red flag) is given as:
h_alt = ( 1 - ( P_sta / 1013.25 )^0.190284 ) · 145366.45
But this can't be correct -- the left side has a dimensions of length^1, while the right side has dimensions of (mass^0.190284 · length^-0.190284 · time^-0.380568). At the risk of stating the obvious, these are not equal!Another red flag is that the page specifies that altitude and pressure inputs for this formula (I can't call it an "equation") must be given as dimensionless numbers. But length and pressure quantities have dimensions of length^1 and (mass^1 · length^-1 · time^-2), respectively.
To transform this expression into an equation (and as a side-effect, make it work with any arbitrary pressure and length units), just replace each "naked" (improperly dimensionless) variable X by the quantity X/<unit>, then rearrange so the units become part of the constants. For example, the above expression can be refactored into an equation as follows:
Substitute (X/unit) for X:
(h_alt / foot) = ( 1 - ( (P_sta / millibar) / 1013.25 )^0.190284 ) · 145366.45
Rearrange: h_alt = ( 1 - ( P_sta / (1013.25 millibar))^0.190284 ) 145366.45 foot
Convert to SI: h_alt = (1 - (P_sta / (101.325 kPa))^0.190284 · 44307.69396 meter
Note that we can do the same thing with the "equivalent" expression in meters[2] (a further red flag: if they're equivalent, why should any system of equations need more than one copy?) it should yield the same result: h_alt = ( 1 - ( P_sta / 1013.25 )^0.190284 ) · 44307.69396
(h_alt / meter) = ( 1 - ( (P_sta / millibar) / 1013.25 )^0.190284 ) · 44307.69396
h_alt = ( 1 - ( P_sta / (1013.25 millibar))^0.190284 ) · 44307.69396 meter
Well I'll be damned. :)Euler was the first person to realize this, afaik. Is there a term to describe these kind of "de-unit-ified" equations? More than once I've found myself needing to reconstruct a proper equation (with correct dimensions and constants) from one of these bastardized non-equations.
[1] https://www.fxsolver.com/browse/formulas/Pressure+Altitude+-...
[2] https://www.fxsolver.com/browse/formulas/Pressure+Altitude+-...
edit: I'd fix it myself (by submitting an equation), but I can't figure out how to embed units in the equation itself. It interprets "kPa," "kg," "m," and "s" as variable names. :(
TL;DR fxsolver.com doesn't seem to support embedding units in expressions, leading to to confusing non-equal "equations"