AstroImage documentation

AstroImage © Marko Grönroos, 1996. All rights reserved. Right to copy and use the programs freely for non-commercial, non-profit purposes granted.

For commercial use the cost for the licence is USD50 for version 1.0 of the software. Please contact me for further information. Commercial is defined here as installing the service on a company server (unless the service is bought from that company) or collecting money for viewing the images or using them in any other use that can be interpreted as commercial (advertisement, astrologers, etc.).

Non-commercial organizations or individuals may volunteer to pay the licence fee (or a portion of it), especially if they want to encourage me to develop more features to the software, etc.

I take no responsibility for any damage that the use of this software may cause.


Introduction

Astroimage is a program that calculates the positions of the Sun, Moon, planets and stars and outputs them as a GIF image that contains header information so that WWW browsers detect it as a GIF image.

You can modify the image by giving the program parameters from (for example) a HTML form.

Notice: AstroImage is just a working name for this one program that actually is just one module in my astronomy software package that doesn't yet have any real name.


How CGI images work

If you call for example the CGI-program:
	http://www.utu.fi/org/yhd/ursa/astroimage.cgi
, it displays the output of that program as a GIF image. The actual program, astroimage.cgi would in this example be placed in your local HTML document tree, for example
	/usr/local/etc/httpd/htdocs/org/yhd/ursa/astroimage.cgi
The way of identifying CGI-programs depends on your HTTP server software. The above example was for Spinner server (and some others). For a NCSA server it might be:
	 http://www.utu.fi/cgi-bin/astroimage.cgi
for the program in server machine's directory:
	/usr/local/etc/httpd/cgi-bin/astroimage.cgi
What actually happends here is that the browser asks the server for the document http://www.utu.fi/org/yhd/ursa/astroimage.cgi. The server notices the .cgi end in the name and therefore knows that it is a program. It executes the program and sends all it's outputs back to the browser. Now, in the beginning of the output there is the header:
	Content-type: image/gif
This tells the browser that the page is actually a GIF image.

Installing AstroImage

Open the tar archive in the directory where you want the page installed.
 gtar zxf astroimg-1.0-*.tar.gz
(or something similar in the case you don't have gtar). You may already have done this.

The .arc-files are the star database files and they are in an internal binary format. The bright.arc-file contains about 270 brightest stars of which most have also names. sao.arc contains about 15000 stars (all up to +7.0 magnitude), of which about 200 have been named. Actually I cheated a little to get names for some of the sao stars and concatenated the bright-list in the end of the sao-list. Therefore there are about 270 duplicate stars but you won't really notice unless you zoom up enough... (..which you can't do currently..)

If you are using NCSA HTTP server, you may have to put the CGI-program (and the star files) under the cgi-bin directory and therefore elsewhere to where your other HTML documents reside. Ok, now it's installed..


Using the program

Just call the url http:/......./astroimage.cgi. Or use the form (astroim.html) that gives you the possibility to customize the map. It should be noted that OUTSIDE FINLAND YOU WILL GET A FALSE VIEW WITH THE DEFAULT PARAMETERS!

Parameters

If you don't happend to live where I do, you might wish to set some of the parameters. Ok, here is the list:
class = allsky or horizontal
Class-parameter selects the type of view (projection) that should be used. These should be self-explanatory. horizontal currently displays just the southern sky (no direction selection). The projection of the horizontal view is not very realistic.
Default value: allsky
source = bright or sao
The star catalog to be used
Default value: bright for the allsky view and sao for the horizontal view.
language = finnish or english
The language to be used
Default value: finnish
date = DD.MM.YYYY
The date should be given in the European format
Default value: current date on the server machine
time = hh:mm:ss
Self-explanatory
Default value: current time on the server machine
zone = +-hours
The timezone for the used time. Please notice that there is a minor bug in the server and you should give this parameter ALWAYS when you (or actually the server) are not at the +2-timezone.
Default value: +2 (Finland)
loc_lat = +-deg min sec or +-deg.decimals
loc_lo = +-deg min sec or +-deg.decimals
Geographical latitude and longitude of the viewer.
Default value: loc_lat=60.5&loc_lo=-22 (Turku, Finland)
solarlines = 0 or 1
Whether or not pointer lines are drawn to the planetary objects in the allsky-view
Default value: 1 (yes)
skycoloring = 0 or 1
Whether or not the allsky-view is colored differently if the Sun is above the horizont or a little (5 deg) below it.
Default value: 1 (yes)

Example

We want to know what the sky looks at New York, NY, USA, which would be impossible otherwise. We don't need to see as many stars as possible and want view it at noon on christmas day, 1996. You would call the program as follows:
 http://www.utu.fi/org/yhd/ursa/astroimage.cgi?class=allsky&source=bright&loc_lat=45&language=english&loc_lo=70&date=25.12.1996&time=12:00:00&zone=-6&skycoloring=0&solarlines=0
You can give the parameters in any order.

Further information

The latest release should be found by FTP at:
	ftp://ftp.funet.fi/pub/astro/unix/prog/astroimage/
The latest working version that I use should be found at
	http://www.utu.fi/org/yhd/ursa/astroimage.cgi
or through
	http://www.utu.fi/org/yhd/ursa/astro.cgi
or with the form
	http://www.utu.fi/org/yhd/ursa/astroim.html
You can contact me by sending mail to magi@utu.fi. All bug reports and improvement suggestions are welcome.

The source code is not available for several reasons. One is that I don't have enough time to create an easily compilable package. I might consider it after I manage to make an english version for the text version (astro.cgi).