Astro::Units - Astronomical unit conversion with high precision and large number support
version 1.00
Astro::Units can capable of converting the astrological units into mile or kilometers with the added support of conversion from astrological to light year and vice-versa
# Raw number input will be truncated by Perl hence need to use # either bignum in the script or single quotes to pass large number to methods use Astro::Units; use bignum; my $astro = new Astouniuts(); print $astro->get_astronomical_units(19999); #use bigint OR use Astro::Units; my $astro = new Astouniuts(); print $astro->get_astronomical_units('19999'); #single quote
Astro::Units,
Astro::Units
Features include:
High Precision
Support for very large number range
Fast
Imperial as well as SI unit system support
Astro::Units is useful for performing the astrological conversion and calculation till n'th digit with precision. Without worrying about result getting truncated.
Conversion Values were taken from
http://www.kylesconverter.com/length/
https://www.calculateme.com/astronomy
Module internally uses
https://perldoc.perl.org/bignum.html
https://perldoc.perl.org/Math/BigFloat.html
https://github.com/spajai/Astro-Units
Report issue on above link
Frequently asked questions. Make sure you read here FIRST.
Creates and returns a new Astro::Units object.
my $astro = Astro::Units->new()
Astro::Units supports unit option
my $astro = Astro::Units->new(unit => 'mile') or my $astro = Astro::Units->new(unit => 'kilometer')
Default is Kilometers mile mi m anything starting will m will be considered as miles kilometers kl k anything starting will k will be considered as kilometers
#Astrologocal units to mi/km get_astronomical_units get_light_years get_light_week get_light_days get_light_hours get_light_minutes get_light_seconds get_light_parsecs #reverse function mi/km to Astrologocal units convert_to_astronomical_units convert_to_light_years convert_to_light_weeks convert_to_light_days convert_to_light_hours convert_to_light_minutes convert_to_light_seconds convert_to_light_parsec #Astrologocal units to light units mi/km not applicable au_to_light_years au_to_light_weeks au_to_light_days au_to_light_hours au_to_light_minutes au_to_light_seconds au_to_light_parsecs #light units to astronomical units mi/km not applicable light_years_to_au light_weeks_to_au light_days_to_au light_hours_to_au light_minutes_to_au light_seconds_to_au light_parsecs_to_au
To convert the user astrological units to kilometers or miles as per the setting in object.
Returns equivalent mi/km for given astronomical_units (au)
Returns equivalent mi/km for given light-years (ly)
Returns equivalent mi/km for given light-week (lw)
Returns equivalent mi/km for given light-days (ld)
Returns equivalent mi/km for given light-hours (lh)
Returns equivalent mi/km for given light-minutes (lm)
Returns equivalent mi/km for given light-seconds (ls)
Returns equivalent mi/km for given parsecs (ps)
Returns equivalent Mi/Km for given astrological-unit
Returns equivalent light years for given Astronomical units (AU)
Returns equivalent light weeks for given Astronomical units (AU)
Returns equivalent light days for given Astronomical units (AU)
Returns equivalent light hours for given Astronomical units (AU)
Returns equivalent light minutes for given Astronomical units (AU)
Returns equivalent light seconds for given Astronomical units (AU)
Returns equivelent parsecs for given Astronomical units (AU)
Returns equivalent Atronomical units for given Astrologocal unit
Sushrut Pajai <sushrutpajai at gmail.com>
This software is copyright (c) 2018 by Sushrut Pajai
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language itself.
To install Astro::Units, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Astro::Units
CPAN shell
perl -MCPAN -e shell install Astro::Units
For more information on module installation, please visit the detailed CPAN module installation guide.