Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Perl Module for Swiss Ephemeris?

by Anonymous Monk
on Sep 07, 2003 at 04:11 UTC ( [id://289542]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks;

Does anyone know if someone is working on a module for interacting with the Swiss Ephemeris?

http://www.astro.com/swisseph/?lang=e

Such a project may well take a while to complete once begun. I'd like to place some additional requests in regard to it being compatible with ActiveState Build 522 and if presented in a compressed format (like a *.zip file) that care be taken to compress it with WinZip, as files compressed with PowerArchiver provoke an error during the attempt to extract with a WinZip utility.

Also, it's been my (very) recent experience in attempting to extract the Win32::OLE module downloaded from CPAN that all forms successfully downloaded to a Win32OS fail to allow extraction with either WinZip or PowerArchiver. This is puzzling and implies that there's yet snother compression utility out there somewhere that may not be quite compatible with the ones I know about.

Thanks in advance.

Sincerely Yours;

Robert

Replies are listed 'Best First'.
Re: Perl Module for Swiss Ephemeris?
by demerphq (Chancellor) on Sep 07, 2003 at 10:41 UTC

    fail to allow extraction with either WinZip or PowerArchiver.

    Yes. Its unlikely that the CPAN authors will have spent any time supporting these commercial (and typically GUI based) compression tools. I know that there are command line versions available for both of them, but its unlikely that CPAN knows how to talk to them properly. But Im only guessing as Ive not investiagted deeper.

    This is puzzling and implies that there's yet snother compression utility out there somewhere that may not be quite compatible with the ones I know about.

    Yep. There sure are other compression tool, and yes some of them quite possibly are not supported by either commercial tool. bzip probably isnt supported by either for instance. I dont know if they are compress compatible as well. (Although they should be.) Anyway, we could list compression schemes that these tools dont support till the cows come home. :-) The real question you want answered is what compression tools should you get your hands on to get CPAN to work correctly. And the answer is simple. Install cygwin which is a standard unix tool set ported to Win32. In it you will find ports of the standard compression tools zip, gzip, unzip and tar. It is these tools that CPAN knows how to play with. But no stress, Winzip is and powerarchiver should be fully compatible with their compression.

    As an added bonus the tools set contains such conveniences like diff, patch, find, xargs, head, tail, wget, etc that are missing from the Win32 toolset. Once you know they are there and how to use them working without them is like painting when you are missing three of your favorite colors. :-)


    ---
    demerphq

    <Elian> And I do take a kind of perverse pleasure in having an OO assembly language...
Re: Perl Module for Swiss Ephemeris?
by Limbic~Region (Chancellor) on Sep 07, 2003 at 04:19 UTC
    Robert,
    A quick search on CPAN for ephemeris turned up Astro::Coord, a module for Astronomical coordinate transformations. I have no idea what you want the module to do in regards to the data from Swiss Ephermeris though, so this may or may not be applicable.

    Cheers - L~R

Re: Perl Module for Swiss Ephemeris?
by benn (Vicar) on Sep 07, 2003 at 13:19 UTC
    If you're wanting to use this now, you don't necessarily need a module. There appear to be command-line versions of all the programs in the suite (both Windows and *nix), allowing you to use backticks to simply do....
    my $data = `swetest -b1.1.2002 -n1 -s1 -fPLBRS -pp -eswe`;
    or whatever. (Data from the test page)

    Should you need deeper interaction with the code, all the C source is available on their site. Looking at the amount of calculation going on in the code, you're probably better off wrapping this somehow (Inline::C / SWIG / XS ), rather than re-writing in Perl.

    Hope this helps,
    Ben.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://289542]
Approved by Paladin
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-24 04:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found