Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-24 16:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found