Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Static Public Attributes | List of all members
shamunits::ConversionConstants< T > Struct Template Reference

#include <shamunits/include/shamunits/ConversionConstants.hpp>

Static Public Attributes

static constexpr T au_to_m = 149597870700
 conversion factor from au to meters
 
static constexpr T ly_to_m = 9460730472580800
 conversion factor from light years to meters
 
static constexpr T pc_to_m = 3.0857e16
 conversion factor from parsecs to meters
 
static constexpr T rsol_to_m = 6.957e8
 conversion factor from solar radii to meters
 
static constexpr T rearth_to_m = 6.378137e6
 conversion factor from earth equatorial radii to meters
 
static constexpr T mn_to_s = 60
 conversion factor from minutes to seconds
 
static constexpr T hr_to_s = 3600
 conversion factor from hours to seconds
 
static constexpr T dy_to_s = 24 * hr_to_s
 conversion factor from days to seconds
 
static constexpr T yr_to_s = 31557600
 conversion factor from years to seconds
 
static constexpr T Myr_to_s = 1e6 * yr_to_s
 conversion factor from $10^6$ years to seconds
 
static constexpr T Gyr_to_s = 1e9 * yr_to_s
 conversion factor from $10^9$ years to seconds
 
static constexpr T eV_to_J = 1.602176634e-19
 conversion factor from electron volts to joules
 
static constexpr T erg_to_J = 1e-7
 conversion factor from ergs to joules
 
static constexpr T K_degC_offset = 273.15
 conversion offset from kelvin degrees to celsius
 
static constexpr T litre_to_pint = 0.568
 conversion offset from litre to british pint
 
static constexpr T gcm3_to_guiness_density = 1.017
 

Detailed Description

template<class T>
struct shamunits::ConversionConstants< T >

Conversion constants from a units to another one

Todo:
Could be also a XMacro next to names definitions

Definition at line 24 of file ConversionConstants.hpp.

Member Data Documentation

◆ au_to_m

template<class T >
shamunits::ConversionConstants< T >::au_to_m = 149597870700
staticconstexpr

conversion factor from au to meters

Definition at line 26 of file ConversionConstants.hpp.

◆ dy_to_s

template<class T >
shamunits::ConversionConstants< T >::dy_to_s = 24 * hr_to_s
staticconstexpr

conversion factor from days to seconds

Definition at line 34 of file ConversionConstants.hpp.

◆ erg_to_J

template<class T >
shamunits::ConversionConstants< T >::erg_to_J = 1e-7
staticconstexpr

conversion factor from ergs to joules

Definition at line 40 of file ConversionConstants.hpp.

◆ eV_to_J

template<class T >
shamunits::ConversionConstants< T >::eV_to_J = 1.602176634e-19
staticconstexpr

conversion factor from electron volts to joules

Definition at line 39 of file ConversionConstants.hpp.

◆ gcm3_to_guiness_density

template<class T >
constexpr T shamunits::ConversionConstants< T >::gcm3_to_guiness_density = 1.017
staticconstexpr

We first want to thanks E. Lynch for his useful contribution to the devellopement of numerical methods and new standard of measurement

/// todo find a more precise measurement of the Guinness density (shall be done in Ireland)
/// protocol :
///  1 - start by ordering the most precise pint of guiness (in ireland)
///  2 - weight the pint
///  4 - proceed to drink the beer (including any leftover foam)
///  54 - weight the pint again
///  745 - proceed to compute the dedzabfgzi if the zad beer
///  current estimation is sourced from
///     - Tinseth, Glenn. Javascript Beer Specs Calculator. The Real Beer Page. 1997.
/// 

Definition at line 59 of file ConversionConstants.hpp.

◆ Gyr_to_s

template<class T >
shamunits::ConversionConstants< T >::Gyr_to_s = 1e9 * yr_to_s
staticconstexpr

conversion factor from $10^9$ years to seconds

Definition at line 37 of file ConversionConstants.hpp.

◆ hr_to_s

template<class T >
shamunits::ConversionConstants< T >::hr_to_s = 3600
staticconstexpr

conversion factor from hours to seconds

Definition at line 33 of file ConversionConstants.hpp.

◆ K_degC_offset

template<class T >
shamunits::ConversionConstants< T >::K_degC_offset = 273.15
staticconstexpr

conversion offset from kelvin degrees to celsius

Definition at line 42 of file ConversionConstants.hpp.

◆ litre_to_pint

template<class T >
shamunits::ConversionConstants< T >::litre_to_pint = 0.568
staticconstexpr

conversion offset from litre to british pint

Definition at line 44 of file ConversionConstants.hpp.

◆ ly_to_m

template<class T >
shamunits::ConversionConstants< T >::ly_to_m = 9460730472580800
staticconstexpr

conversion factor from light years to meters

Definition at line 27 of file ConversionConstants.hpp.

◆ mn_to_s

template<class T >
shamunits::ConversionConstants< T >::mn_to_s = 60
staticconstexpr

conversion factor from minutes to seconds

Definition at line 32 of file ConversionConstants.hpp.

◆ Myr_to_s

template<class T >
shamunits::ConversionConstants< T >::Myr_to_s = 1e6 * yr_to_s
staticconstexpr

conversion factor from $10^6$ years to seconds

Definition at line 36 of file ConversionConstants.hpp.

◆ pc_to_m

template<class T >
shamunits::ConversionConstants< T >::pc_to_m = 3.0857e16
staticconstexpr

conversion factor from parsecs to meters

Definition at line 28 of file ConversionConstants.hpp.

◆ rearth_to_m

template<class T >
shamunits::ConversionConstants< T >::rearth_to_m = 6.378137e6
staticconstexpr

conversion factor from earth equatorial radii to meters

Definition at line 30 of file ConversionConstants.hpp.

◆ rsol_to_m

template<class T >
shamunits::ConversionConstants< T >::rsol_to_m = 6.957e8
staticconstexpr

conversion factor from solar radii to meters

Definition at line 29 of file ConversionConstants.hpp.

◆ yr_to_s

template<class T >
shamunits::ConversionConstants< T >::yr_to_s = 31557600
staticconstexpr

conversion factor from years to seconds

Definition at line 35 of file ConversionConstants.hpp.


The documentation for this struct was generated from the following file: