Coeli SkyServer Daemon for POSIX
realtime astronomy

Coeli Astronomy Software

Overview

SkyServer streams live astronomical data to file at user-specified intervals.

It is a computationally rigorous backend for planetaria, sky charts, ephemerides, astrological, or any application that may need to use realtime celestial data, making such data continuously available for processing either textually or graphically by your display script.

SkyServer's astronomy libraries, written in Delphi-mode extended Pascal, have a ten-year pedigree. They are proven, stable, fast, and arc-second accurate, serving as the computation engine behind such well-regarded software products as Coeli Stella 2000, Adastra, DeskNite, and several other shareware titles for MS Windows. 


They are now made freely available under the GNU General Public License for the POSIX platform, built with the Free Pascal Compiler, and tested on i386 architecture under Linux.

SkyServer's initial data set comprises a 15,695-star selection from the Yale and Hipparcos catalogs; Critical, NEO, bright, and transneptunian asteroids; DSOs, comets, sun, moon & planets, plus line sets for drawing, including constellation lines, boundaries, grids, aequator, ecliptic, horizon, galactic equator, polar points, and Milky Way.

Further data extensions may be obtained direct from Coeli. Extensions feature the complete SAO and Hipparcos star catalogs, regularly updated orbital elements for comets and asteroids, and nearly 300 extra star names and associated notes, all suitable for loading straight into SkyServer.

SkyServer dishes your data out in digestible form. Readable by both human and software, there are two principal file formats: "record jar" and rdb tables.

The latter may be manipulated at the command line without modification using a relational database tool such as NoSql. The record jar file is designed to be read in by a display script or simply perused by the user. See below for an example record from 'stars.data'.

While the underlying Coeli engine has been tried and tested to production standard and been in constant development for over a decade, the SkyServer POSIX daemon itself is a first beta release. It needs testers and contributors, and I hope you will join the project.

Our aim is to offer a free, comprehensive, complete, yet extensible backend for astronomy scripting, thus rendering the hitherto daunting task of creating personalized astronomical applications for web or desktop a trivial matter. Whatever your style or preference - whether this be C, Java, Python, Ruby, Perl, PHP, or shell - SkyServer will provide the celestial data in realtime, right down to the screen coordinates of each and every object in its database, pixel-ready.

Your own display script will not need to do a single calculation.

ooOOoo

Header + two examples from stars.data illustrating "record jar" format:

#This Star Catalogue "record jar" data file created at  4:55:52 LCT Aug 24 2006
#Observing from   9º 18' 17'' N  75º 23' 52'' W  Sincelejo, Colombia
#
#Field-identifier string expansions follow:
#
*Name=Name
*Code=Yale Star Designation String
*Flam=Flamsteed Catalog Number
*Bayer=Bayer Designation (Greek letter)
*Constel=Constellation
*Yale=Yale Catalog Number
*HD=Henry Draper Catalog Number
*SAO=SAO Catalog Number
*Spect=Spectral Type
*MagVis=Visual Magnitude
*MagAbs=Absolute Magnitude
*Col=Colour Index BV
*Tint=8-bit Palette Tint
*Llax=Parallax
*RA=Right Ascension (degrees)
*Dec=Declination (degrees)
*Alt=Altitude (degrees)
*Az=Azimuth (degrees)
*Up=Rising Time
*Down=Setting Time
*Transit=Transit Time
*EcLat=Ecliptic Latitude (degrees)
*EcLong=Ecliptic Longitude (degrees)
*Xu=Universal X Coordinate
*Yu=Universal Y Coordinate
*Xs=Screen X Coordinate
*Ys=Screen Y Coordinate
#
#Begin Data...
#
%%
Name=Sirius
Code=01  CMA
Flam=9
Bayer=alpha
Constel=Canis Majoris
Yale=2491
HD=48915
SAO=151881
Spect=A1Vm
MagVis=-1.5
Col=0
Tint=1
Llax=0.37500
RA=101.28710
Dec=-16.71610
Alt=42.54021
Az=123.08785
Up= 1:48:12
Down=13:23:44
Transit= 7:35:58
EcLat=-39.60439
EcLong=104.08142
Xu=0.31377
Yu=0.22805
Xs=321
Ys=175
%%
Name=Canopus
Code=01  CAR
Bayer=alpha
Constel=Carinae
Yale=2326
HD=45348
SAO=234480
Spect=F0II
MagVis=-0.7
Col=15
Tint=6
Llax=0.02800
RA=95.98790
Dec=-52.69580
Alt=21.24149
Az=158.19801
Up= 2:05:20
Down=12:24:18
Transit= 7:14:49
EcLat=-75.82318
EcLong=104.95959
Xu=0.41343
Yu=0.37920
Xs=423
Ys=291
%%

...

From the display script writer's point of view, the important values here will be Xs and Ys, the screen coordinates of each star. The ancillary information can of course also be employed in a report alongside, or superimposed upon, the sky-plot. For a textual ephemeris, most of the data fields are useful.

Suggested report format for a planetarium script:

Name: Tania Australis
34 Mu Ursae Majoris
Ursa Major - The Great Bear
Flamsteed #34
Yale #4069
Henry Draper #89758
SAO #43310
Magnitude:  3.0
Absolute magnitude:  0.8
Spectrum: M0
Distance: 93.1 Ly
Parallax: 0.0350
Proper motion RA  -0.005 arcsec/yr
Proper motion Dec 0.035 arcsec/yr
Observed at 18:05:27  Aug 24 2006
From   60º 58' N  25º 40' E  Lahti, Finland
Galactic Lat.  56º 57' 35",  Galactic Long. 178º  7'  2"
RA  10h 22m 19s, Dec  41º 29' 57"
Alt  38º  0' 39",  Az 288º 57'  5"
Rises N/A,  Transits 12:29:24,  Sets Never.

[Report copied from Stella 2000]

The key symbols for record jar file format are as follows:

# comment
* field-designator expansion strings (header only)
= field/attribute separator
%% record separator.

You can readily see that this format lends itself well to scripting in a language strong on string-manipulation, such as Python. With Glade GTK+, the combination would make for an ideal - and lightweight - graphical frontend.



Files: General Information

Astronomical files written by SkyServer have a .data or .table file extension. We recommend a RAM disk for regular use of the server, since disk operations can become fairly intensive, especially when skyserver is set for a short update interval. Paths and many other user parameters can be configured in the skyserver.cfg configuration file.

SkyServer writes to skyserver.log at each sky update. It also creates skyserver.errors and skyserver.messages. These latter will scarcely ever be written to. While the skyserver daemon is running, they take the place of stderr and stdout. However, it's worth checking these files now and then during testing and bug-tracking.

Raw data files for loading by SkyServer at startup generally have a .cat or .csv file extension, and should be placed in the same directory as the skyserver executable (which, believe it or not, is named skyserver!)

No dynamic libraries are required. SkyServer is statically linked and thus self-contained.

Controlling SkyServer


The most basic (and essential) method of setting up Skyserver to your preferences is via the skyserver.cfg startup configuration file. Please see the example skyserver.cfg included with the package for full commented guidance.

Runtime control of Skyserver is achieved by sending the standard POSIX IPC signals.

Currently supported are SIGUSR1 (zoom in), SIGUSR2 (zoom out), and SIGHUP (read rc file).

These signals can be sent either from the command line, using the Unix kill utility, or from within your own script. For the latter, see your language's documentation for details on how to send signals to a process.

To zoom in and out, you need do nothing more than send SIGUSR1 or SIGUSR2, respectively.

So, assuming skyserver's current process ID (PID) is 1955, to zoom in from the command line, issue the command:

kill -USR1 1955

To zoom out, use the command:

kill -USR2 1955

There are two ways to obtain SkyServer's PID:

1) by issuing the shell command "ps ax|grep skyserver", or
2) by reading it from the file .skyserver.pid, which skyserver writes to its data directory on startup.


Example - Centering the projection:

To get Skyserver to center its sky projection on a selected object, you will need to

1) Create the dotfile .skyserver.rc in Skyserver's data output directory and write the following lines:

Action=1
Alt=[altitude of the selected object]
Az=[azimuth of the selected object]

2) Send signal SIGHUP.

Therefore, assuming you have created a .skyserver.rc file with the contents

Action=1
Alt=45.0
Az=180.0

from the command line, you can type

kill -HUP 1955

and Skyserver will read that file and center its projection on those coordinates. See the source code for SkyShow Electric Planisphere, for an example of how to do it in Free Pascal.


Contacting the development team

Please send your hacks, bug-reports, and feedback to -

"contact -'AT'- coeli -'DOT'- com"

The phrase "SkyServer POSIX" must appear somewhere in the title and text of your message, or it will be in danger of deletion by the spam filter.


Downloading SkyServer

The overall SkyServer suite consists of a single package:

skyserver.tar.bz2 contains the executable, data, source code, library units, and example scripts.

The latest snapshot can always be downloaded from

http://www.coeli.com/software/skyserver.tar.bz2


Using SkyServer

SkyServer requires no special installation. Just unpack skyserver-X.X.X.tar.bz2 to a directory of your choice. Cd to /sky/bin. Type ./skyserver at the terminal. If you haven't edited or created skyserver.cfg, it will use its "factory defaults", which are fine for demonstration purposes. For serious use, you will need at the very least to set your home geographical coordinates in the .cfg file. An example is provided with the package.

If you are situated in the USA, go to the US Census Gazetteer to search for your coordinates:

http://www.census.gov/cgi-bin/gazetteer

If elsewhere in the world try NIMA:

http://gnswww.nga.mil/geonames/GNS/index.jsp

NB: SkyServer interprets the time from the Linux system as LOCAL, calculating GMT, GST, and LST from this value. Make sure Tux really knows where you are before using SkyServer in a mission-critical situation!

To stop the skyserver daemon, issue the command

killall skyserver



Building SkyServer

To compile skyserver.pas, you will need the Free Pascal Compiler, version 1.9 or greater. To get it, go to

http://www.freepascal.org

or, under Debian distros, simply use apt-get or synaptic.

First, you will need to unpack the contents of skyserver-X.X.X.tar.bz2 to a new project directory. You then have two options:

1) Add ~/sky/units/ to your search path, or
2) Copy the entire contents of ~/sky/units/ to your main FPC units directory.

Then cd to ~/sky/src and at the command prompt, type

fpc skyserver.pas

and it should compile without errors.



Join the project

Please submit your comments, feedback, ideas, improvements and bug-fixes to the address given above. Join the project! I hope you'll enjoy using and hacking skyserver.

Clear Skies!

Pete Chayleigh
Coeli Software.
http://www.coeli.com
contact -"AT"- coeli -"DOT"- com

Coeli Software

| [home] |


License and Disclaimer

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.