diff --git a/Environment/LayeredSphericalAtmosphereBuilder.h b/Environment/LayeredSphericalAtmosphereBuilder.h index a9c32abc141c14490eb046b805cd0352ecb9e5af..f051485ca7de45460003628be03052a988995466 100644 --- a/Environment/LayeredSphericalAtmosphereBuilder.h +++ b/Environment/LayeredSphericalAtmosphereBuilder.h @@ -13,6 +13,7 @@ #include <corsika/environment/NuclearComposition.h> #include <corsika/environment/VolumeTreeNode.h> #include <corsika/geometry/Point.h> +#include <corsika/units/PhysicalConstants.h> #include <corsika/units/PhysicalUnits.h> #include <memory> @@ -20,16 +21,6 @@ namespace corsika::environment { - /** - * A namespace containing various Earth radii. - */ - namespace EarthRadius { - static constexpr auto Mean{6'371'000 * units::si::meter}; - static constexpr auto Eqautorial{6'378'137 * units::si::meter}; - static constexpr auto Polar{6'356'752 * units::si::meter}; - static constexpr auto PolarCurvature{6'399'593 * units::si::meter}; - } // namespace EarthRadius - class LayeredSphericalAtmosphereBuilder { std::unique_ptr<NuclearComposition> composition_; geometry::Point center_; @@ -44,7 +35,7 @@ namespace corsika::environment { public: LayeredSphericalAtmosphereBuilder( corsika::geometry::Point center, - units::si::LengthType earthRadius = EarthRadius::Mean) + units::si::LengthType earthRadius = units::constants::EarthRadius::Mean) : center_(center) , earthRadius_(earthRadius) {} diff --git a/Framework/Units/PhysicalConstants.h b/Framework/Units/PhysicalConstants.h index eacccfe165b779f810156cdf3c4d30df35d99dba..da86bbd1edc3564badee1dedfd0bf7ead7d2ad4f 100644 --- a/Framework/Units/PhysicalConstants.h +++ b/Framework/Units/PhysicalConstants.h @@ -53,6 +53,16 @@ namespace corsika::units::constants { // molar gas constant auto constexpr R = Rep(8.314'459'8) * joule / (mole * kelvin); + /** + * A namespace containing various Earth radii. + */ + namespace EarthRadius { + static constexpr auto Mean{6'371'000 * meter}; + static constexpr auto Eqautorial{6'378'137 * meter}; + static constexpr auto Polar{6'356'752 * meter}; + static constexpr auto PolarCurvature{6'399'593 * meter}; + } // namespace EarthRadius + // etc. } // namespace corsika::units::constants