Astro::Coord::Constellations - Identify the constellation for position (RA, Dec)
Version 0.01
use Astro::Coord::Constellations qw/constellation_for_eq constellations_table/; my $constellation_abbrev = constellation_for_eq($ra, $dec, $epoch); my %con = constellations_table(); my $name = $con{'And'}->[0]; # Andromeda my $genitive = $con{'And'}->[1]; # Andromedae
Identify the constellation to which a celestial position (as defined by equatorial coordinates for any epoch) belongs to, according to the IAU constellation boundaries.
my $constellation = constellation_for_eq($ra, $dec, $epoch);
Given equatorial coordinates in hours for Right Ascension $ra and degrees for Declination $dec for epoch $epoch in years AD, the constellation (abbreviation) is returned. You can pass the coordinates as the strings you find in human-readable catalogs, see the function read_coordinates of Astro::Coord::Precession for what formats are supported.
$ra
$dec
$epoch
read_coordinates
my %con = constellations_table(); $con{UMi}; # ['Ursa Minor', 'Ursa Minoris']
Returns a Perl hash with constellation abbreviations as keys and arrayrefs with the constellation name and genitive.
Dimitrios Kechagias, <dkechag at cpan.org>
<dkechag at cpan.org>
Please report any bugs or feature requests to bug-astro-coord-constellations at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Astro-Coord-Constellations. You could also raise issues or submit PRs to the github repo below.
bug-astro-coord-constellations at rt.cpan.org
https://github.com/dkechag/Astro-Coord-Constellations
IAU constellation boundaries from ftp://cdsarc.u-strasbg.fr/pub/cats/VI/42/data.dat. Based on the Fortran program CONFND by FO @ CDS (francois@simbad.u-strasbg.fr).
This software is copyright (c) 2021 by Dimitrios Kechagias.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Astro::Coord::Constellations, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Astro::Coord::Constellations
CPAN shell
perl -MCPAN -e shell install Astro::Coord::Constellations
For more information on module installation, please visit the detailed CPAN module installation guide.