Question

What's the Perl equivalent of pyephem?

Since pyephem is based on a C library(?), I'm guessing someone's created a Perl version too?

Was it helpful?

Solution

Have you checked out libnova? It's quite powerful. There's a Perl wrapper for that: Astro::Nova.

Quoting the documentation below, one of these could do exactly what you want. The Perl docs are relatively sparse because I didn't want to reproduce the entire library documentation for the wrapper. The functions are mostly similar to how the work in C. Exceptions from that should be documented. The main libnova docs have all the details.

(int $status, Astro::Nova::RstTime $rst) =
  get_object_rst(double JD, Astro::Nova::LnLatPosn observer, Astro::Nova::EquPosn object)
(int $status, Astro::Nova::RstTime $rst) =
  get_object_rst_horizon(double JD, Astro::Nova::LnLatPosn observer,
                         Astro::Nova::EquPosn object, double horizon)
(int $status, Astro::Nova::RstTime $rst) =
  get_object_next_rst(double JD, Astro::Nova::LnLatPosn observer, Astro::Nova::EquPosn object)
(int $status, Astro::Nova::RstTime $rst) =
  get_object_next_rst_horizon(double JD, Astro::Nova::LnLatPosn observer,
                              Astro::Nova::EquPosn object, double horizon)

OTHER TIPS

You might want to start here:

Perl Astro Modules

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top