mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
mx::astro::units::solar< _realT > Struct Template Reference

template<typename _realT>
struct mx::astro::units::solar< _realT >

Solar units-type.

The units are:

  • Length: au
  • Time: year
  • Mass: solar mass
  • Energy: solar-luminosity-year
  • Temperature: solar effective temperature

Definition at line 74 of file units.hpp.

#include <astro/units.hpp>

Public Types

typedef _realT realT
 The real floating point type in which to specify constants. More...
 

Static Public Attributes

static constexpr realT length = static_cast<realT>(1)/constants::au<si<realT>>()
 Conversion from SI (m) to solar (au) More...
 
static constexpr realT time = static_cast<realT>(1.0) / constants::year<si<realT>>()
 Conversion from SI (s) to solar (yr) More...
 
static constexpr realT mass = constants::G<si<realT>>()/constants::GMSun<si<realT>>()
 Conversion from SI (kg) to solar (M_sun) More...
 
static constexpr realT energy = static_cast<realT>(1.0)/( constants::lumSun<si<realT>>()*static_cast<realT>(365.25)*static_cast<realT>(86400.0))
 Conversion from SI (J) to solar (Solar-luminosities X year) More...
 
static constexpr realT temperature = static_cast<realT>(1.0) / constants::TeffSun<si<realT>>()
 Conversion from SI (K) to solar (5772 K) More...
 

Member Typedef Documentation

◆ realT

template<typename _realT >
typedef _realT mx::astro::units::solar< _realT >::realT

The real floating point type in which to specify constants.

Definition at line 76 of file units.hpp.

Member Data Documentation

◆ energy

template<typename _realT >
constexpr realT mx::astro::units::solar< _realT >::energy = static_cast<realT>(1.0)/( constants::lumSun<si<realT>>()*static_cast<realT>(365.25)*static_cast<realT>(86400.0))
staticconstexpr

Conversion from SI (J) to solar (Solar-luminosities X year)

Definition at line 80 of file units.hpp.

◆ length

template<typename _realT >
constexpr realT mx::astro::units::solar< _realT >::length = static_cast<realT>(1)/constants::au<si<realT>>()
staticconstexpr

Conversion from SI (m) to solar (au)

Definition at line 77 of file units.hpp.

◆ mass

template<typename _realT >
constexpr realT mx::astro::units::solar< _realT >::mass = constants::G<si<realT>>()/constants::GMSun<si<realT>>()
staticconstexpr

Conversion from SI (kg) to solar (M_sun)

Definition at line 79 of file units.hpp.

◆ temperature

template<typename _realT >
constexpr realT mx::astro::units::solar< _realT >::temperature = static_cast<realT>(1.0) / constants::TeffSun<si<realT>>()
staticconstexpr

Conversion from SI (K) to solar (5772 K)

Definition at line 81 of file units.hpp.

◆ time

template<typename _realT >
constexpr realT mx::astro::units::solar< _realT >::time = static_cast<realT>(1.0) / constants::year<si<realT>>()
staticconstexpr

Conversion from SI (s) to solar (yr)

Definition at line 78 of file units.hpp.


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