mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
Ref T223, use const values for standard pressure
* standardISASeaLevelPressure * use static const values for standard pressure * minor formatting
This commit is contained in:
@@ -46,8 +46,9 @@ namespace BlackWxPlugin
|
||||
|
||||
double millibarToLevel(double millibar)
|
||||
{
|
||||
static const double hPaStandardPressure = CPhysicalQuantitiesConstants::ICAOFlightLevelPressure().value(CPressureUnit::mbar());
|
||||
millibar /= 100;
|
||||
double level = (1 - std::pow(millibar / 1013.25, 0.190284)) * 145366.45;
|
||||
double level = (1 - std::pow(millibar / hPaStandardPressure, 0.190284)) * 145366.45;
|
||||
return level;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user