// bytran -|- spectral calculations for portable devices using the HITRAN database
//
// Developed by Dzianis Pliutau (Denis Plutov) and Kostya Roslyakov
// www.bytran.org | bytran@bytran.org
// Copyright (c) 2016 Dzianis Pliutau
// Distributed under the MIT license
//
// Parts of the line-by-line calculation algorithm are based on the Python code from the HITRAN Application Programming Interface (HAPI)
// R.V. Kochanov, I.E. Gordon, L.S. Rothman, P. Wcisło, C. Hill, J.S. Wilzewski, "HITRAN Application Programming Interface (HAPI):
// A comprehensive approach to working with spectroscopic data", JQSRT, Volume 177, July 2016, Pages 15–30; (hitran.org/hapi/)
//
// The MIT License (MIT)
// Copyright (c) 2016 Dzianis Pliutau
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,
// modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software
// is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
// IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.



// Class containing constants to be used in calculations
#include "const.h"

// Physical constants
const double Const::BoltsCgs = 1.380648813E-16;   // erg/K, CGS, Boltzman number
const double Const::Bolts = 1.3806503e-23;    // SI units Boltzman number
const double Const::cCgs = 2.99792458E+10;    // cm/s, CGS
const double Const::c = 2.99792458e+08;       // SI units, m/s
const double Const::hCgs = 6.626196e-27;      // erg*s, CGS
const double Const::pi = 3.14159265358979;    // Pi number value
const double Const::Loch =  2.47937196e19 ;   // Lochmidts number, per cubic centimeter at 0 Celsius (296K) and 1 Atm pressure
const double Const::c2 = 1.4388028496642257;  // c2 - second black body radiation constant

// Reference temperature and pressure values
const double Const::tempRef = 296;  // Reference temperature, Kelvin
const double Const::totalPressRef = 1.0;  // Reference pressure, Atm

// Constant used to calcualte the molecular mass, this value is equal to (1 / Avogadro) * 10^-3
const double Const::cMassMol = 1.66053873e-27;

// Constant to calculate the Doppler half-width
// 1/c * sqrt(2 * Na * k * ln(2) / 10^-3)
const double Const::DopplerHWConst = 3.5811652900936203956070045567649e-7;

// Computational constants
const double Const::sqrt2Ln2 = 1.1774100225;
const double Const::sqrtLn2divSqrtPi = 0.469718639319144059835;
const double Const::ln2 = 0.6931471805599;
const double Const::sqrtLn2 = 0.8325546111576977563531646448952;

Const::Const()
{
}
