user354134
user354134

Reputation:

Perl equivalent of pyephem?

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?

Upvotes: 4

Views: 244

Answers (2)

tsee
tsee

Reputation: 5072

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)

Upvotes: 4

ennuikiller
ennuikiller

Reputation: 46965

You might want to start here:

Perl Astro Modules

Upvotes: 1

Related Questions