Ref T223, use const values for standard pressure

* standardISASeaLevelPressure
* use static const values for standard pressure
* minor formatting
This commit is contained in:
Klaus Basan
2018-01-14 21:19:02 +01:00
parent 56adde399e
commit f049900e1f
13 changed files with 72 additions and 48 deletions

View File

@@ -19,7 +19,6 @@ namespace BlackMisc
{
namespace PhysicalQuantities
{
/*!
* Physical quantities constants
*/
@@ -43,14 +42,14 @@ namespace BlackMisc
//! International Standard Atmosphere pressure at mean sea level, 1013.25hPa
static const CPressure &ISASeaLevelPressure()
{
static CPressure p(1013.25, CPressureUnit::hPa());
static CPressure p(1013.25, CPressureUnit::mbar());
return p;
}
//! ICAO standard pressure datum for flight levels, 1013.2hPa
static const CPressure &ICAOFlightLevelPressure()
{
static CPressure p(1013.2, CPressureUnit::hPa());
static CPressure p(1013.2, CPressureUnit::mbar());
return p;
}

View File

@@ -34,8 +34,8 @@ namespace BlackMisc
//! \copydoc CPhysicalQuantity(const QString &unitString)
CPressure(const QString &unitString) : CPhysicalQuantity(unitString) {}
};
}
}
} // ns
} // ns
Q_DECLARE_METATYPE(BlackMisc::PhysicalQuantities::CPressure)