@cabinfo.eu/astrophysics-library
Version:
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.2.0.
2 lines • 5.71 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define("@cabinfo.eu/astrophysics-library",["exports"],e):e((t.cabinfo=t.cabinfo||{},t.cabinfo.eu=t.cabinfo.eu||{},t.cabinfo.eu["astrophysics-library"]={}))}(this,function(t){"use strict";var n=function o(t,e,n,s,a){this.name=t,this.symbol=e,this.value=n,this.unit=s,this.description=a},e=(s.prototype.getConstantInfo=function(e){return this.constants.find(function(t){return t.symbol===e})},s.prototype.logConstants=function(){console.log(this.constants)},s.prototype.toJSON=function(){return Object.getOwnPropertyNames(this)},s.prototype.meter2au=function(t){return Math.round(t/this.au*1e6)/1e6},s.prototype.au2meter=function(t){return t*this.au},s.prototype.au2kilometer=function(t){return t*this.au/1e3},s.prototype.meter2pc=function(t){return Math.round(t/this.pc*1e6)/1e6},s.prototype.pc2meter=function(t){return t*this.pc},s.prototype.pc2kilometer=function(t){return t*this.pc/1e3},s.prototype.pc2au=function(t){return this.meter2au(this.pc2meter(t))},s.prototype.au2pc=function(t){return this.meter2pc(this.au2meter(t))},s.prototype.lr2pc=function(t){return this.meter2pc(this.lr2meter(t))},s.prototype.lr2au=function(t){return this.meter2au(this.lr2meter(t))},s.prototype.lr2meter=function(t){return t*this.lr},s.prototype.lr2kilometer=function(t){return t*this.lr/1e3},s.prototype.meter2lr=function(t){return Math.round(t/this.lr*1e6)/1e6},s.prototype.au2lr=function(t){return this.meter2lr(this.au2meter(t))},s.prototype.pc2lr=function(t){return this.meter2lr(this.pc2meter(t))},s.prototype.kg2ev=function(t){return Math.round(t/this.eV*Math.pow(this.c,2)*1e6)/1e6},s.prototype.ev2kg=function(t){return t*this.eV/Math.pow(this.c,2)},s);function s(){var e=this;this.constants=[],this.constants.push(new n("PI constant","π",Math.PI,"None","")),this.constants.push(new n("Celerity","c",299792458,"m.s-1","Celerity of light in vaccum")),this.constants.push(new n("Planck constant","h",662607015e-42,"J.s","The Planck constant is a physical constant that is the quantum of electromagnetic action, which relates the energy carried by a photon to its frequency")),this.constants.push(new n("Boltzmann constant","k",138064852e-31,"J.K-1","The Boltzmann constant (kB or k) is a physical constant which relates the average relative kinetic energy of particles in a gas with the temperature of the gas and occurs in Planck's law of black-body radiation and in Boltzmann's entropy formula.")),this.constants.push(new n("Gravitational constant","G",667408e-16,"N.m2.kg-2","Gravitational constant is an empirical physical constant involved in the calculation of gravitational effects in Isaac Newton's law of universal gravitation and in Albert Einstein's general theory of relativity.")),this.constants.push(new n("Elementary charge","e",1602176634e-28,"A.s","")),this.constants.push(new n("Coulomb","C",1,"A.s","")),this.constants.push(new n("Avogadro constant","NA",6.022140857,"mol-1","")),this.constants.push(new n("Standard acceleration","g",9.80665,"m.s-2","Standard acceleration due to gravity on earth")),this.constants.push(new n("Bohr radius","a0",.52917721092,"Å","The Bohr radius is approximately equal to the most probable distance between the nucleus and the electron in a hydrogen atom in its ground state. ")),this.constants.push(new n("Ideal gas constant","R",8.3144598,"J.K-1.mol-1","")),this.constants.push(new n("Unified mass unit (dalton)","u",1660538921e-36,"kg","Standard unit of mass that quantifies mass on an atomic or molecular scale")),this.constants.push(new n("Vacuum permeability","µ0",12566e-10,"T.m.A-1","Vacuum permeability is the magnetic permeability in a classical vacuum.")),this.constants.push(new n("Vacuum permittivity","ε0",885418782e-20,"F.m-1","Vacuum permittivity is an ideal, (baseline) physical constant, which is the value of the absolute dielectric permittivity of classical vacuum.")),this.constants.push(new n("Impedance of free space","Z0",376.73,"Ω","The impedance of free space equals the product of the vacuum permeability μ0 and the speed of light in vacuum c0.")),this.constants.push(new n("Astronomical unit","au",149597870700,"m","Astronomical unit is the distance from Earth to the Sun")),this.constants.push(new n("Parsec","pc",648e3/Math.PI*149597870700,"m","The parsec is a unit of length used to measure large distances to astronomical objects outside the Solar System. A parsec is defined as the distance at which one astronomical unit subtends an angle of one arcsecond,[1] which corresponds to 648000/π astronomical units.")),this.constants.push(new n("Light year","lr",9460730472580800,"m","Light-year is the distance that light travels in vacuum in one Julian year (365.25 days).")),this.constants.push(new n("Electronvolt","eV",1602176565e-28,"J","")),this.constants.push(new n("Solar mass","M☉",1.9884e30,"kg","")),this.constants.push(new n("Earth mass","M⊕",59722e20,"kg","")),this.constants.push(new n("Lunar mass","ML",7342e19,"kg","")),this.constants.push(new n("Jupiter mass","MJ",18986e23,"kg","")),this.constants.push(new n("Solar radius","R☉",696342e3,"m","")),this.constants.push(new n("Earth radius","R⊕",6378137,"m","")),this.constants.push(new n("Lunar radius","RL",1737400,"m","")),this.constants.push(new n("Electron mass","ML",910938291e-39,"kg","")),this.constants.push(new n("Neutron mass","ML",167493e-32,"kg","")),this.constants.push(new n("Proton mass","ML",1672649e-33,"kg","")),this.constants.forEach(function(t){e[t.symbol]=t.value})}t.CConstant=n,t.CPhysicsConstants=e,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=cabinfo.eu-astrophysics-library.umd.min.js.map