Perl question (and thanks to all)

Have a question about using Celestia? Check here first for FAQs and helpful advice.
Forum rules
Please help to make this forum more useful by checking the FAQs before posting! Keep it clean, keep it civil, keep it truthful, stay on topic, be responsible, share your knowledge.
Topic author
maatkai
Posts: 8
Joined: 14.01.2010
With us: 15 years 1 month

Perl question (and thanks to all)

Post #1by maatkai » 19.01.2010, 17:07

Hi everybody!

I'm a newborn here in this forum, but a long time user of Celestia (since v1.3)

Despite i use Celestia for years, (and hundreds of hours to modify data files), i just started to compile via the sources and that's great! (few experiences in C+ but years ago, i forgot everything!)

My question here is about Perl Scripts. I saw that in v1.6 there is a folder "tools" with perl Scripts which allows me (if i don't misunderstood) to create my own catalogs (deepsky, globular, stars.dat and so on)
So i started to get informations about perl scripts (ahhhh, newbies...) , i download ActivePerl, install it, copy the .pm files from "tools" to the root of ActivePerl and run!
I do a test with Globular.pm but unfortunately, when i run it, i have a message "quaternion not find". And of course, this file is missing in the "Math" folder of ActivePerl.
I did not find any information about use these tools in Celestia (maybe i don't look for enough) or maybe i don't use them in the right way.
At this point, any help will be welcome!

ps: excuse my maybe-wrong english, i'm french of course...

pps: for my first post, i would like to thanks all of you for the amazing work you done here.
And specially to : Selden, your resources are a gold mine!, Cham's, your addons are so wonderful (and useful)! Vincent, the LuaEduTools transform and improve in a so great way how i manage my numbers addons that it's a
totally different Celestia i have now thanks to you! Thanks to all of you guys and of course to Chris for create this unbelievable software!

Cyril/Maatkai

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 10 months
Location: Hamburg, Germany

Re: Perl question (and thanks to all)

Post #2by t00fri » 19.01.2010, 17:37

maatkai wrote:Hi everybody!

I'm a newborn here in this forum, but a long time user of Celestia (since v1.3)

Despite i use Celestia for years, (and hundreds of hours to modify data files), i just started to compile via the sources and that's great! (few experiences in C+ but years ago, i forgot everything!)

My question here is about Perl Scripts. I saw that in v1.6 there is a folder "tools" with perl Scripts which allows me (if i don't misunderstood) to create my own catalogs (deepsky, globular, stars.dat and so on)
So i started to get informations about perl scripts (ahhhh, newbies...) , i download ActivePerl, install it, copy the .pm files from "tools" to the root of ActivePerl and run!
I do a test with Globular.pm but unfortunately, when i run it, i have a message "quaternion not find". And of course, this file is missing in the "Math" folder of ActivePerl.
I did not find any information about use these tools in Celestia (maybe i don't look for enough) or maybe i don't use them in the right way.
At this point, any help will be welcome!

ps: excuse my maybe-wrong english, i'm french of course...

pps: for my first post, i would like to thanks all of you for the amazing work you done here.
And specially to : Selden, your resources are a gold mine!, Cham's, your addons are so wonderful (and useful)! Vincent, the LuaEduTools transform and improve in a so great way how i manage my numbers addons that it's a
totally different Celestia i have now thanks to you! Thanks to all of you guys and of course to Chris for create this unbelievable software!

Cyril/Maatkai

Hi Cyril,

Welcome!!

All these Perl scripts and the generated data files in the distribution have been written by me, except the ones for the Hiparcos stars (stardb) and charm2. One of the great things about Perl is the easy implementation of Perl modules, like e.g. the Quaternions and others that you will need.

One downloads these modules from the world server http://www.cpan.org/. After unpacking, one simply types in a UNIX-type shell (bash, zsh):
> perl Makefile.PL
which generates the actual Makefiles etc. Next you type

> make
> make test
> make install

that's all.

As you presumably know, Perl comes from the Unix world and thus, no wonder that Windows implementations like "Active Perl" are not so great.

What I do when working with Windows is this: I use a CYGWIN Linux layer for Windows: http://www.cygwin.com/ which is simply great in many respects! It provides all the intelligent shells from UNIX and still runs native Windows programs as well. Upgrading and adding programs etc is most simple via the net.

Then I run all my Perl code within CYGWIN and never bother with Windows implementations thereof...

Another problem is that you need the catalog files precisely in the form I used them, otherwise you will surely run into trouble. If there is interest, I can easily make them available on our CelestialMatters site (which I recommend to you anyway). Of course all data come from the astronomical world server: http://cdsweb.u-strasbg.fr/ (not far from you ;-) ), but there are different options for the download format! If they don't match you are in trouble...

Just click on the icon below to get to our CelestialMatters WEB page. There is also a forum with lots of advanced stuff related to Celestia and beyond!! You click it from the menue (forum).

Actually, my Perl source scripts are part of the Celestia distribution since a LONG time. However before 1.6.0, Chris Laurel usually forgot to add them to the binary Windows distributions, which many people use and which normally he releases.

Good luck.

Fridger
Image

ajtribick
Developer
Posts: 1855
Joined: 11.08.2003
With us: 21 years 6 months

Re: Perl question (and thanks to all)

Post #3by ajtribick » 19.01.2010, 19:41

ActivePerl should have installed a "Perl Package Manager" entry in your Start menu. You should be able to find the option to install Math::Quaternion in there.

Topic author
maatkai
Posts: 8
Joined: 14.01.2010
With us: 15 years 1 month

Re: Perl question (and thanks to all)

Post #4by maatkai » 20.01.2010, 10:06

Thanks to both of you for your quick answer.

Fridger : http://www.cpan.org/ was the "magic site", i found here what is missing. I didn't try yet Cygwin but i keep that preciously, your advices will be useful.
I build successfully the stardb with ActivePerl, but for Globulars, one of the catalog's site was down yesterday.

ajtribick: i've got nothing but the documentation's site of AP in the Start Menu, anyway i install with success Quaternion "manually" that i found on http://www.cpan.org/.


Cyril


Return to “Help Central”