Disclaimer: though I'm anonymous here, I'm the author of both Astro::Coord::ECI and Astro::SIMBAD::Client.

Astro::Coord::ECI and friends are a bit heavyweight if all you want to do is convert degrees to radians. The actual code to do this is two lines:

use constant PI => atan2 (0, -1);
sub deg2rad { return defined $_[0] ? $_[0] * PI / 180 : undef }

As for computing angles, I will not recommend a specific module. I will say the initial implementation of Astro::Coord::ECI->angle() naively used the law of cosines, but I had to switch to the law of haversines after trying to compute the closest passage of a satellite to a star and having the law of cosines blow up.

All I can say about Astro::SIMBAD::Client is that it is a mess. Sorry. There are a number of ways to get the data, the SIMBAD API changed over time, and, well, what can I say? It badly needs a simpler interface. It takes me 30-some lines of code just to get the position and proper motion of a star. If you decide you want to wrestle with it, you can contact me at wyant at cpan dot org.


In reply to Re: perl in the stars by Anonymous Monk
in thread perl in the stars by Aldebaran

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.