1unit module Astro::Constants:ver<0.0.4>:auth<github:DUFFEE>; 2# ABSTRACT: This library provides physical constants for use in Physics and Astronomy based on values from CODATA2014. 3 4# 'They are not constant but are changing still. - Cymbeline, Act II, Scene 5' 5 6=begin pod 7 8=head1 SYNOPSIS 9 10 use strict; # important! 11 use Astro::Constants::MKS qw/:long/; 12 13 # to calculate the gravitational force of the Sun on the Earth in Newtons, use GMm/r^2 14 my $force_sun_earth = GRAVITATIONAL * MASS_SOLAR * MASS_EARTH / ASTRONOMICAL_UNIT**2; 15 16=head1 DESCRIPTION 17 18This module provides physical and mathematical constants for use 19in Astronomy and Astrophysics. The two metric systems of units, 20MKS and CGS, are kept in two separate modules and are called by 21name explicitly. 22It allows you to choose between constants in units of 23centimetres /grams /seconds 24with B<Astro::Constants::CGS> and metres /kilograms /seconds with 25B<Astro::Constants::MKS>. 26 27The C<:long> tag imports all the constants in their long name forms 28(i.e. GRAVITATIONAL). Useful subsets can be imported with these tags: 29C<:fundamental> C<:conversion> C<:mathematics> C<:cosmology> 30C<:planetary> C<:electromagnetic> or C<:nuclear>. 31Alternate names such as LIGHT_SPEED instead of SPEED_LIGHT or HBAR 32instead of H_BAR are imported with C<:alternates>. I'd like 33to move away from their use, but they have been in the module for years. 34Short forms of the constant names are included to provide backwards 35compatibility with older versions based on Jeremy Bailin's Astroconst 36library and are available through the import tag C<:short>. 37 38The values are stored in F<Physical_Constants.xml> in the B<data> directory 39and are mostly based on the 2014 CODATA values from NIST. 40 41Long name constants are constructed with the L<constant> pragma and 42are not interpolated in double quotish situations because they are 43really inlined functions. 44Short name constants are constructed with the age-old idiom of fiddling 45with the symbol table using typeglobs, e.g. C<*PI = \3.14159>, 46and may be slower than the long name constants. 47 48=head2 Why use this module 49 50You are tired of typing in all those numbers and having to make sure that they are 51all correct. How many significant figures is enough or too much? Where's the 52definitive source, Wikipedia? And which mass does "$m1" refer to, solar or lunar? 53 54The constant values in this module are protected against accidental re-assignment 55in your code. The test suite protects them against accidental finger trouble in my code. 56Other people are using this module, so more eyeballs are looking for errors 57and we all benefit. The constant names are a little longer than you might like, 58but you gain in the long run from readable, sharable code that is clear in meaning. 59Your programming errors are a little easier to find when you can see that the units 60don't match. Isn't it reassuring that you can verify how a number is produced 61and which meeting of which standards body is responsible for its value? 62 63Trusting someone else's code does carry some risk, which you I<should> consider, 64but have you also considered the risk of doing it yourself with no one else 65to check your work? 66 67=head3 And plus, it's B<FASTER> 68 69Benchmarking has shown that the imported constants can be more than 3 times 70faster than using variables or other constant modules because of the way 71the compiler optimizes your code. So, if you've got a lot of calculating to do, 72this is the module to do it with. 73 74=head1 EXPORT 75 76Nothing is exported by default, so the module doesn't clobber any of your variables. 77Select from the following tags: 78 79=item C<:long> (use this one to get the most constants) 80=item C<:short> 81=item C<:fundamental> 82=item C<:conversion> 83=item C<:mathematics> 84=item C<:cosmology> 85=item C<:planetary> 86=item C<:electromagnetic> 87=item C<:nuclear> 88=item C<:alternates> 89 90 91 92=head3 SPEED_LIGHT 93 94 2.99792458e8 MKS 95 2.99792458e10 CGS 96 97speed of light in a vacuum 98 99This constant is also available using the alternate name C<LIGHT_SPEED> (imported using the :alternate tag for backwards compatibility) 100 101=end pod 102 103our constant SPEED_LIGHT is export(:fundamental :cosmology :electromagnetic) = 2.99792458e8; 104 105=head3 BOLTZMANN 106 107 1.38064852e-23 MKS 108 1.38064852e-16 CGS 109 110Boltzmann's constant 111 112=end pod 113 114our constant BOLTZMANN is export(:fundamental :electromagnetic) = 1.38064852e-23; 115 116=head3 GRAVITATIONAL 117 118 6.67408e-11 MKS 119 6.67408e-8 CGS 120 121universal gravitational constant 122 123=end pod 124 125our constant GRAVITATIONAL is export(:fundamental :cosmology :planetary) = 6.67408e-11; 126 127=head3 ELECTRON_VOLT 128 129 1.6021766208e-19 MKS 130 1.6021766208e-12 CGS 131 132electron volt 133 134=end pod 135 136our constant ELECTRON_VOLT is export(:fundamental :conversion :electromagnetic :nuclear) = 1.6021766208e-19; 137 138=head3 PLANCK 139 140 6.626070040e-34 MKS 141 6.626070040e-27 CGS 142 143Planck constant 144 145=end pod 146 147our constant PLANCK is export(:fundamental :cosmology :electromagnetic :nuclear) = 6.626070040e-34; 148 149=head3 H_BAR 150 151 1.054571800e-34 MKS 152 1.054571800e-27 CGS 153 154Planck's constant /2pi 155 156This constant is also available using the alternate name C<HBAR> (imported using the :alternate tag for backwards compatibility) 157 158=end pod 159 160our constant H_BAR is export(:fundamental :cosmology :electromagnetic :nuclear) = 1.054571800e-34; 161 162=head3 CHARGE_ELEMENTARY 163 164 1.6021766208e-19 MKS 165 4.8032046729e-10 CGS 166 167electron charge (defined positive) 168 169This constant is also available using the alternate name C<ELECTRON_CHARGE> (imported using the :alternate tag for backwards compatibility) 170 171=end pod 172 173our constant CHARGE_ELEMENTARY is export(:fundamental :electromagnetic :nuclear) = 1.6021766208e-19; 174 175=head3 STEFAN_BOLTZMANN 176 177 5.670367e-8 MKS 178 5.670367e-5 CGS 179 180Stefan-Boltzmann constant 181 182=end pod 183 184our constant STEFAN_BOLTZMANN is export(:fundamental :cosmology :electromagnetic :nuclear) = 5.670367e-8; 185 186=head3 DENSITY_RADIATION 187 188 7.565723e-16 MKS 189 7.565723e-15 CGS 190 191radiation density constant, 4 * sigma / c 192 193This constant is also available using the alternate name C<A_RAD> (imported using the :alternate tag for backwards compatibility) 194 195=end pod 196 197our constant DENSITY_RADIATION is export(:fundamental :cosmology :electromagnetic :nuclear) = 7.565723e-16; 198 199=head3 WIEN 200 201 2.8977729e-3 MKS 202 2.8977729e-1 CGS 203 204Wien wavelength displacement law constant 205 206=end pod 207 208our constant WIEN is export(:fundamental :electromagnetic :cosmology :planetary :nuclear) = 2.8977729e-3; 209 210=head3 ALPHA 211 212 7.2973525664e-3 MKS 213 7.2973525664e-3 CGS 214 215fine structure constant 216 217=end pod 218 219our constant ALPHA is export(:fundamental :cosmology :electromagnetic :nuclear) = 7.2973525664e-3; 220 221=head3 IMPEDANCE_VACUUM 222 223 376.730313461 224 225characteristic impedance of vacuum 226 227This constant is also available using the alternate name C<VACUUM_IMPEDANCE> (imported using the :alternate tag for backwards compatibility) 228 229=end pod 230 231our constant IMPEDANCE_VACUUM is export(:fundamental :cosmology :electromagnetic :nuclear) = 376.730313461; 232 233=head3 PERMITIV_FREE_SPACE 234 235 8.854187817e-12 MKS 236 1 CGS 237 238permittivity of free space, epsilon_0, the electric constant 239 240This constant is also available using the alternate name C<PERMITIVITY_0> (imported using the :alternate tag for backwards compatibility) 241 242=end pod 243 244our constant PERMITIV_FREE_SPACE is export(:fundamental :electromagnetic :nuclear) = 8.854187817e-12; 245 246=head3 PERMEABL_FREE_SPACE 247 248 1.2566370614e-6 MKS 249 1 CGS 250 251permeability of free space, mu_0, the magnetic constant 252 253This constant is also available using these alternate names (imported using the :alternate tag): PERMEABILITY_0, CONSTANT_MAGNETIC 254 255=end pod 256 257our constant PERMEABL_FREE_SPACE is export(:fundamental :electromagnetic :nuclear) = 1.2566370614e-6; 258 259=head3 PI 260 261 3.14159265358979324 262 263trig constant pi 264 265=end pod 266 267our constant PI is export(:mathematical) = 3.14159265358979324; 268 269=head3 FOUR_PI 270 271 12.5663706143592 272 273trig constant pi times 4 (shorthand for some calculations) 274 275This constant is also available using the alternate name C<FOURPI> (imported using the :alternate tag for backwards compatibility) 276 277=end pod 278 279our constant FOUR_PI is export(:mathematical) = 12.5663706143592; 280 281=head3 STERADIAN 282 283 57.2957795130823 284 285a measure of solid angle in square degrees 286 287=end pod 288 289our constant STERADIAN is export(:conversion) = 57.2957795130823; 290 291=head3 EXP 292 293 2.71828182846 294 295base of natural logarithm 296 297=end pod 298 299our constant EXP is export(:mathematical) = 2.71828182846; 300 301=head3 ATOMIC_MASS_UNIT 302 303 1.660539040e-27 MKS 304 1.660539040e-24 CGS 305 306atomic mass unit, 1 u 307 308=end pod 309 310our constant ATOMIC_MASS_UNIT is export(:conversion :nuclear) = 1.660539040e-27; 311 312=head3 PARSEC 313 314 3.08567758149e16 MKS 315 3.08567758149e18 CGS 316 317parsec 318 319=end pod 320 321our constant PARSEC is export(:conversion :cosmology :planetary) = 3.08567758149e16; 322 323=head3 ASTRONOMICAL_UNIT 324 325 149_597_870_700 MKS 326 1.496e13 CGS 327 328astronomical unit 329 330=end pod 331 332our constant ASTRONOMICAL_UNIT is export(:conversion :cosmology :planetary) = 149_597_870_700; 333 334=head3 LIGHT_YEAR 335 336 9_460_730_472_580_800 MKS 337 9.4607304725808e17 CGS 338 339the distance that light travels in vacuum in one Julian year 340 341=end pod 342 343our constant LIGHT_YEAR is export(:conversion :cosmology :planetary) = 9_460_730_472_580_800; 344 345=head3 ANGSTROM 346 347 1e-10 MKS 348 1e-8 CGS 349 350Angstrom 351 352=end pod 353 354our constant ANGSTROM is export(:conversion :electromagnetic :nuclear) = 1e-10; 355 356=head3 JANSKY 357 358 1e-26 MKS 359 1e-23 CGS 360 361Jansky 362 363=end pod 364 365our constant JANSKY is export(:conversion :cosmology :electromagnetic) = 1e-26; 366 367=head3 AVOGADRO 368 369 6.022140857e23 370 371Avogadro's number 372 373=end pod 374 375our constant AVOGADRO is export(:conversion :nuclear) = 6.022140857e23; 376 377=head3 YEAR 378 379 31_557_600 380 381defined as exactly 365.25 days of 86400 SI seconds 382 383This constant is also available using the alternate name C<YEAR_JULIAN> (imported using the :alternate tag for backwards compatibility) 384 385=end pod 386 387our constant YEAR is export(:conversion :cosmology) = 31_557_600; 388 389=head3 YEAR_TROPICAL 390 391 31_556_925.1 392 393the period of time for the ecliptic longitude of the Sun to increase 360 degrees, approximated by the Gregorian calendar 394 395=end pod 396 397our constant YEAR_TROPICAL is export(:conversion :cosmology) = 31_556_925.1; 398 399=head3 YEAR_SIDEREAL 400 401 31_558_149.8 402 403the period of revolution of the Earth around the Sun in a fixed reference frame 404 405=end pod 406 407our constant YEAR_SIDEREAL is export(:conversion :cosmology) = 31_558_149.8; 408 409=head3 YEAR_ANOMALISTIC 410 411 31_558_432.6 412 413the period between successive passages of the Earth through perihelion 414 415=end pod 416 417our constant YEAR_ANOMALISTIC is export(:conversion :planetary) = 31_558_432.6; 418 419=head3 YEAR_ECLIPSE 420 421 29_947_974.3 422 423the period between successive passages of the Sun (as seen from the geocenter) through the same lunar node 424 425=end pod 426 427our constant YEAR_ECLIPSE is export(:conversion :planetary) = 29_947_974.3; 428 429=head3 MASS_SOLAR 430 431 1.9884e30 MKS 432 1.9884e33 CGS 433 434solar mass 435 436This constant is also available using the alternate name C<SOLAR_MASS> (imported using the :alternate tag for backwards compatibility) 437 438=end pod 439 440our constant MASS_SOLAR is export(:cosmology :planetary) = 1.9884e30; 441 442=head3 LUMINOSITY_SOLAR 443 444 3.846e26 MKS 445 3.846e33 CGS 446 447solar luminosity 448 449This constant is also available using the alternate name C<SOLAR_LUMINOSITY> (imported using the :alternate tag for backwards compatibility) 450 451=end pod 452 453our constant LUMINOSITY_SOLAR is export(:cosmology :planetary) = 3.846e26; 454 455=head3 DENSITY_CRITICAL_RHOc 456 457 1.8791e-26 MKS 458 1.8791e-29 CGS 459 460critical density /h^2 461 462This constant is also available using the alternate name C<RHO_C> (imported using the :alternate tag for backwards compatibility) 463 464=end pod 465 466our constant DENSITY_CRITICAL_RHOc is export(:cosmology) = 1.8791e-26; 467 468=head3 HUBBLE_TIME 469 470 3.0853056e17 471 472Hubble time *h, the inverse of Hubble's constant valued at 100 km/s/Mpc (DEPRECATED - see ChangeLog) 473 474=end pod 475 476our constant HUBBLE_TIME is export(:cosmology) = 3.0853056e17; 477 478=head3 TEMPERATURE_CMB 479 480 2.725 481 482cosmic microwave background temperature in Kelvin 483 484This constant is also available using the alternate name C<CMB_TEMPERATURE> (imported using the :alternate tag for backwards compatibility) 485 486=end pod 487 488our constant TEMPERATURE_CMB is export(:cosmology) = 2.725; 489 490=head3 MAGNITUDE_SOLAR_V 491 492 -26.74 493 494solar V magnitude 495 496This constant is also available using the alternate name C<SOLAR_V_MAG> (imported using the :alternate tag for backwards compatibility) 497 498=end pod 499 500our constant MAGNITUDE_SOLAR_V is export(:cosmology :planetary) = -26.74; 501 502=head3 MAGNITUDE_SOLAR_V_ABSOLUTE 503 504 4.83 505 506solar absolute V magnitude 507 508This constant is also available using the alternate name C<SOLAR_V_ABS_MAG> (imported using the :alternate tag for backwards compatibility) 509 510=end pod 511 512our constant MAGNITUDE_SOLAR_V_ABSOLUTE is export(:cosmology :planetary) = 4.83; 513 514=head3 RADIUS_SOLAR 515 516 6.96e8 MKS 517 6.96e10 CGS 518 519solar radius 520 521This constant is also available using the alternate name C<SOLAR_RADIUS> (imported using the :alternate tag for backwards compatibility) 522 523=end pod 524 525our constant RADIUS_SOLAR is export(:planetary) = 6.96e8; 526 527=head3 MASS_EARTH 528 529 5.9722e24 MKS 530 5.9722e27 CGS 531 532mass of Earth 533 534This constant is also available using the alternate name C<EARTH_MASS> (imported using the :alternate tag for backwards compatibility) 535 536=end pod 537 538our constant MASS_EARTH is export(:planetary) = 5.9722e24; 539 540=head3 RADIUS_EARTH 541 542 6.378_136_6e6 MKS 543 6.378_136_6e8 CGS 544 545radius of Earth 546 547This constant is also available using the alternate name C<EARTH_RADIUS> (imported using the :alternate tag for backwards compatibility) 548 549=end pod 550 551our constant RADIUS_EARTH is export(:planetary) = 6.378_136_6e6; 552 553=head3 TEMPERATURE_SOLAR_SURFACE 554 555 5778 556 557surface temperature of sun 558 559This constant is also available using the alternate name C<SOLAR_TEMPERATURE> (imported using the :alternate tag for backwards compatibility) 560 561=end pod 562 563our constant TEMPERATURE_SOLAR_SURFACE is export(:planetary) = 5778; 564 565=head3 DENSITY_SOLAR 566 567 1408 MKS 568 1.408 CGS 569 570mean solar density 571 572This constant is also available using the alternate name C<SOLAR_DENSITY> (imported using the :alternate tag for backwards compatibility) 573 574=end pod 575 576our constant DENSITY_SOLAR is export(:planetary) = 1408; 577 578=head3 DENSITY_EARTH 579 580 5514 MKS 581 5.514 CGS 582 583mean Earth density 584 585This constant is also available using the alternate name C<EARTH_DENSITY> (imported using the :alternate tag for backwards compatibility) 586 587=end pod 588 589our constant DENSITY_EARTH is export(:planetary) = 5514; 590 591=head3 GRAVITY_SOLAR 592 593 274.0 MKS 594 27400 CGS 595 596solar surface gravity 597 598This constant is also available using the alternate name C<SOLAR_GRAVITY> (imported using the :alternate tag for backwards compatibility) 599 600=end pod 601 602our constant GRAVITY_SOLAR is export(:planetary) = 274.0; 603 604=head3 GRAVITY_EARTH 605 606 9.78 MKS 607 978 CGS 608 609Earth surface gravity 610 611This constant is also available using the alternate name C<EARTH_GRAVITY> (imported using the :alternate tag for backwards compatibility) 612 613=end pod 614 615our constant GRAVITY_EARTH is export(:planetary) = 9.78; 616 617=head3 RADIUS_LUNAR 618 619 1.7381e6 MKS 620 1.7381e8 CGS 621 622lunar radius 623 624This constant is also available using the alternate name C<LUNAR_RADIUS> (imported using the :alternate tag for backwards compatibility) 625 626=end pod 627 628our constant RADIUS_LUNAR is export(:planetary) = 1.7381e6; 629 630=head3 MASS_LUNAR 631 632 7.342e22 MKS 633 7.342e25 CGS 634 635lunar mass 636 637This constant is also available using the alternate name C<LUNAR_MASS> (imported using the :alternate tag for backwards compatibility) 638 639=end pod 640 641our constant MASS_LUNAR is export(:planetary) = 7.342e22; 642 643=head3 AXIS_SM_LUNAR 644 645 3.844e8 MKS 646 3.844e10 CGS 647 648lunar orbital semi-major axis 649 650This constant is also available using the alternate name C<LUNAR_SM_AXIS> (imported using the :alternate tag for backwards compatibility) 651 652=end pod 653 654our constant AXIS_SM_LUNAR is export(:planetary) = 3.844e8; 655 656=head3 ECCENTRICITY_LUNAR 657 658 0.0549 659 660lunar orbital eccentricity 661 662This constant is also available using the alternate name C<LUNAR_ECCENTRICITY> (imported using the :alternate tag for backwards compatibility) 663 664=end pod 665 666our constant ECCENTRICITY_LUNAR is export(:planetary) = 0.0549; 667 668=head3 THOMSON_CROSS_SECTION 669 670 6.6524587158e-29 MKS 671 6.6524587158e-25 CGS 672 673Thomson cross-section 674 675This constant is also available using the alternate name C<THOMSON_XSECTION> (imported using the :alternate tag for backwards compatibility) 676 677=end pod 678 679our constant THOMSON_CROSS_SECTION is export(:electromagnetic :nuclear) = 6.6524587158e-29; 680 681=head3 MASS_ELECTRON 682 683 9.10938356e-31 MKS 684 9.10938356e-28 CGS 685 686mass of electron 687 688This constant is also available using the alternate name C<ELECTRON_MASS> (imported using the :alternate tag for backwards compatibility) 689 690=end pod 691 692our constant MASS_ELECTRON is export(:electromagnetic :nuclear) = 9.10938356e-31; 693 694=head3 MASS_PROTON 695 696 1.672621898e-27 MKS 697 1.672621898e-24 CGS 698 699mass of proton 700 701This constant is also available using the alternate name C<PROTON_MASS> (imported using the :alternate tag for backwards compatibility) 702 703=end pod 704 705our constant MASS_PROTON is export(:nuclear) = 1.672621898e-27; 706 707=head3 MASS_NEUTRON 708 709 1.674927471e-27 MKS 710 1.674927471e-24 CGS 711 712neutron mass 713 714This constant is also available using the alternate name C<NEUTRON_MASS> (imported using the :alternate tag for backwards compatibility) 715 716=end pod 717 718our constant MASS_NEUTRON is export(:nuclear) = 1.674927471e-27; 719 720=head3 MASS_HYDROGEN 721 722 1.6738e-27 723 724mass of Hydrogen atom -- 725This value is from the IUPAC and is a little smaller than MASS_PROTON + MASS_ELECTRON, but within the uncertainty given here. The current value is 1.008u +/- 0.0002 derived from a range of terrestrial materials. If this is for precision work, you had best understand what you're using. See https://iupac.org/what-we-do/periodic-table-of-elements/ 726 727This constant is also available using the alternate name C<HYDROGEN_MASS> (imported using the :alternate tag for backwards compatibility) 728 729=end pod 730 731our constant MASS_HYDROGEN is export(:nuclear) = 1.6738e-27; 732 733=head3 MASS_ALPHA 734 735 6.644_657_230e-27 736 737mass of alpha particle 738 739=end pod 740 741our constant MASS_ALPHA is export(:nuclear) = 6.644_657_230e-27; 742 743=head3 RADIUS_ELECTRON 744 745 2.8179403227e-15 MKS 746 2.8179403227e-13 CGS 747 748classical electron radius 749 750This constant is also available using the alternate name C<ELECTRON_RADIUS> (imported using the :alternate tag for backwards compatibility) 751 752=end pod 753 754our constant RADIUS_ELECTRON is export(:nuclear :electromagnetic) = 2.8179403227e-15; 755 756=head3 RADIUS_BOHR 757 758 5.2917721067e-11 MKS 759 5.2917721067e-9 CGS 760 761Bohr radius 762 763This constant is also available using the alternate name C<BOHR_RADIUS> (imported using the :alternate tag for backwards compatibility) 764 765=end pod 766 767our constant RADIUS_BOHR is export(:electromagnetic :nuclear) = 5.2917721067e-11; 768 769=head3 RADIUS_JUPITER 770 771 69_911_000 MKS 772 773Volumetric mean radius of Jupiter 774 775=end pod 776 777our constant RADIUS_JUPITER is export(:planetary) = 69_911_000; 778 779=head3 MASS_JUPITER 780 781 1.89819e27 MKS 782 783mass of Jupiter 784 785=end pod 786 787our constant MASS_JUPITER is export(:planetary) = 1.89819e27; 788=begin pod 789 790=head3 pretty 791 792This is a helper function that rounds a value or list of values to 5 significant figures. 793 794=head3 precision 795 796Give this method the string of the constant and it returns the precision or uncertainty 797listed. 798 799 $rel_precision = precision('GRAVITATIONAL'); 800 $abs_precision = precision('MASS_EARTH'); 801 802At the moment you need to know whether the uncertainty is relative or absolute. 803Looking to fix this in future versions. 804 805=head2 Deprecated functions 806 807I've gotten rid of C<list_constants> and C<describe_constants> because they are now in 808the documentation. Use C<perldoc Astro::Constants> for that information. 809 810=head1 SEE ALSO 811 812=item L<Astro::Cosmology> 813=item L<Perl Data Language|PDL> 814=item L<NIST|http://physics.nist.gov> 815=item L<Astronomical Almanac|http://asa.usno.navy.mil> 816=item L<IAU 2015 Resolution B3|http://iopscience.iop.org/article/10.3847/0004-6256/152/2/41/meta> 817=item L<Neil Bower's review on providing read-only values|http://neilb.org/reviews/constants.html> 818=item L<Test::Number::Delta> 819=item L<Test::Deep::NumberTolerant> for testing values within objects 820 821Reference Documents: 822 823=item L<IAU 2009 system of astronomical constants|http://aa.usno.navy.mil/publications/reports/Luzumetal2011.pdf> 824=item L<Astronomical Constants 2016.pdf|http://asa.usno.navy.mil/static/files/2016/Astronomical_Constants_2016.pdf> 825=item L<IAU recommendations concerning units|https://www.iau.org/publications/proceedings_rules/units> 826=item L<Re-definition of the Astronomical Unit|http://syrte.obspm.fr/IAU_resolutions/Res_IAU2012_B2.pdf> 827 828=head1 REPOSITORY 829 830* L<https://github.com/duffee/Astro-Constants> 831 832=head1 ISSUES 833 834File issues/suggestions at the Github repository L<https://github.com/duffee/Astro-Constants>. 835The venerable L<RT|https://rt.cpan.org/Dist/Display.html?Status=Active&Queue=Astro-Constants> 836is the canonical bug tracker that is clocked by L<meta::cpan|https://metacpan.org/pod/Astro::Constants>. 837 838Using C<strict> is a must with this code. Any constants you forgot to import will 839evaluate to 0 and silently introduce errors in your code. Caveat Programmer. 840 841If you are using this module, drop me a line using any available means at your 842disposal, including 843*gasp* email (address in the Author section), to let me know how you're using it. 844What new features would you like to see? 845If you've had an experience with using the module, let other people know what you 846think, good or bad, by rating it at 847L<cpanratings|http://cpanratings.perl.org/rate/?distribution=Astro-Constants>. 848 849=head2 Extending the data set 850 851If you want to add in your own constants or override the factory defaults, 852run make, edit the F<PhysicalConstants.xml> file and then run C<dzil build> again. 853If you have a pre-existing F<PhysicalConstants.xml> file, drop it in place 854before running C<dzil build>. 855 856=head2 Availability 857 858the original astroconst sites have disappeared 859 860=head1 ROADMAP 861 862I plan to deprecate the short names and change the order in which 863long names are constructed, moving to a I<noun_adjective> format. 864LIGHT_SPEED and SOLAR_MASS become SPEED_LIGHT and MASS_SOLAR. 865This principle should make the code easier to read with the most 866important information coming at the beginning of the name. 867 868=head1 ASTROCONST X<ASTROCONST> 869 870(Gleaned from the Astroconst home page - 871L<astroconst.org|http://web.astroconst.org> ) 872 873Astroconst is a set of header files in various languages (currently C, 874Fortran, Perl, Java, IDL and Gnuplot) that provide a variety of useful 875astrophysical constants without constantly needing to look them up. 876 877The generation of the header files from one data file is automated, so you 878can add new constants to the data file and generate new header files in all 879the appropriate languages without needing to fiddle with each header file 880individually. 881 882This package was created and is maintained by Jeremy Bailin. It's license 883states that it I<is completely free, both as in speech and as in beer>. 884 885=head1 DISCLAIMER 886 887No warranty expressed or implied. This is free software. If you 888want someone to assume the risk of an incorrect value, you better 889be paying them. 890 891(What would you want me to test in order for you to depend on this module?) 892 893I<from Jeremy Bailin's astroconst header files> 894 895The Astroconst values have been gleaned from a variety of sources, 896and have quite different precisions depending both on the known 897precision of the value in question, and in some cases on the 898precision of the source I found it from. These values are not 899guaranteed to be correct. Astroconst is not certified for any use 900whatsoever. If your rocket crashes because the precision of the 901lunar orbital eccentricity isn't high enough, that's too bad. 902 903=head1 ACKNOWLEDGMENTS 904 905Jeremy Balin, for writing the astroconst package and helping 906test and develop this module. 907 908Doug Burke, for giving me the idea to write this module in the 909first place, tidying up Makefile.PL, testing and improving the 910documentation. 911 912=end pod 913 914 915