mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-04 20:54:28 +02:00
fix: 💥 standard_gravity
removed from si2019
namespace as it is not an SI defining constant
This commit is contained in:
@@ -40,7 +40,7 @@ namespace {
|
|||||||
|
|
||||||
using namespace units::aliases::isq::si;
|
using namespace units::aliases::isq::si;
|
||||||
|
|
||||||
inline constexpr auto g = units::isq::si::si2019::standard_gravity<>; // NOLINT(readability-identifier-length)
|
inline constexpr auto g = units::isq::si::standard_gravity<>; // NOLINT(readability-identifier-length)
|
||||||
inline constexpr auto air_density = kg_per_m3<>(1.225);
|
inline constexpr auto air_density = kg_per_m3<>(1.225);
|
||||||
|
|
||||||
class Box {
|
class Box {
|
||||||
|
@@ -47,7 +47,7 @@ using kg = si::kilogram;
|
|||||||
using N = si::newton;
|
using N = si::newton;
|
||||||
using kgpm3 = si::kilogram_per_metre_cub;
|
using kgpm3 = si::kilogram_per_metre_cub;
|
||||||
|
|
||||||
inline constexpr auto g = si::si2019::standard_gravity<>;
|
inline constexpr auto g = si::standard_gravity<>;
|
||||||
inline constexpr si::density<kgpm3> air_density(1.225);
|
inline constexpr si::density<kgpm3> air_density(1.225);
|
||||||
|
|
||||||
|
|
||||||
|
@@ -42,7 +42,7 @@ using namespace units::isq;
|
|||||||
using namespace si::mass_references;
|
using namespace si::mass_references;
|
||||||
using namespace si::volume_references;
|
using namespace si::volume_references;
|
||||||
|
|
||||||
inline constexpr Acceleration auto g = si::si2019::standard_gravity<>;
|
inline constexpr Acceleration auto g = si::standard_gravity<>;
|
||||||
inline constexpr Density auto air_density = 1.225 * (kg / m3);
|
inline constexpr Density auto air_density = 1.225 * (kg / m3);
|
||||||
|
|
||||||
class Box {
|
class Box {
|
||||||
|
@@ -32,7 +32,16 @@
|
|||||||
#include <units/isq/si/speed.h>
|
#include <units/isq/si/speed.h>
|
||||||
#include <units/isq/si/thermodynamic_temperature.h>
|
#include <units/isq/si/thermodynamic_temperature.h>
|
||||||
|
|
||||||
namespace units::isq::si::si2019 {
|
namespace units::isq::si {
|
||||||
|
|
||||||
|
namespace si2019 {
|
||||||
|
|
||||||
|
// defining constants
|
||||||
|
template<Representation Rep = double>
|
||||||
|
inline constexpr auto hyperfine_structure_transition_frequency = frequency<hertz, Rep>(Rep{9'192'631'770});
|
||||||
|
|
||||||
|
template<Representation Rep = double>
|
||||||
|
inline constexpr auto speed_of_light = speed<metre_per_second, Rep>(299'792'458);
|
||||||
|
|
||||||
template<Representation Rep = double>
|
template<Representation Rep = double>
|
||||||
inline constexpr auto planck_constant = energy<joule, Rep>(6.62607015e-34) * time<second, Rep>(1);
|
inline constexpr auto planck_constant = energy<joule, Rep>(6.62607015e-34) * time<second, Rep>(1);
|
||||||
@@ -46,16 +55,12 @@ inline constexpr auto boltzmann_constant = energy<joule, Rep>(1.380649e-23) / th
|
|||||||
template<Representation Rep = double>
|
template<Representation Rep = double>
|
||||||
inline constexpr auto avogadro_constant = Rep(6.02214076e23) / amount_of_substance<mole, Rep>(1);
|
inline constexpr auto avogadro_constant = Rep(6.02214076e23) / amount_of_substance<mole, Rep>(1);
|
||||||
|
|
||||||
template<Representation Rep = double>
|
|
||||||
inline constexpr auto speed_of_light = speed<metre_per_second, Rep>(299'792'458);
|
|
||||||
|
|
||||||
template<Representation Rep = double>
|
|
||||||
inline constexpr auto hyperfine_structure_transition_frequency = frequency<hertz, Rep>(Rep{9'192'631'770});
|
|
||||||
|
|
||||||
template<Representation Rep = double>
|
template<Representation Rep = double>
|
||||||
inline constexpr auto luminous_efficacy = luminous_flux<lumen, Rep>(683) / power<watt, Rep>(1);
|
inline constexpr auto luminous_efficacy = luminous_flux<lumen, Rep>(683) / power<watt, Rep>(1);
|
||||||
|
|
||||||
|
} // namespace si2019
|
||||||
|
|
||||||
template<Representation Rep = double>
|
template<Representation Rep = double>
|
||||||
inline constexpr auto standard_gravity = acceleration<metre_per_second_sq, Rep>(9.80665);
|
inline constexpr auto standard_gravity = acceleration<metre_per_second_sq, Rep>(9.80665);
|
||||||
|
|
||||||
} // namespace units::isq::si::si2019
|
} // namespace units::isq::si
|
||||||
|
Reference in New Issue
Block a user