This is a simple program which communicates with the asteroid_server . It lets a user type commands and see the results on a terminal screen. The main purpose of this program is to show how to communicate with the asteroid_server. No processing or interpretation of results is made. Asteroid_client requires two arguments in the command line: server address and user identification word. First introduction string sent by the server is displayed on the screen and a prompt appears afterwards. Here are some examples:
Asteroid server 1.17 Asteroid>help Available commands: ------------------- help set_observatory get_observatory info check efemeride fits get_elements Type help command for details Asteroid>get_observatory Observatory name=WWW Longitude=-14.000000 Latitude=+46.000000 Altitude=100 meters Asteroid>help fits fits time crval1 crval2 crpix1 crpix2 cdelt1 cdelt2 crot width height mag time is expressed in Julian days crval1 crval2 crpix1 crpix2 cdelt1 cdelt2 crot are WCS values from the FITS header. width and height are the width and height of the image expressed in pixels, mag is the maximum magnitude This command returns a list of all asteroids below the given magnitude which fall on the image. Output format is as following: number name ra dec xpix ypix mag If the asteroid is not numbered, the number is 0. ra if given HH:MM:SS.ss format. dec is given +DD:MM:SS.s format. xpix and ypix are the asteroid pixel coordinates. Asteroid>efemeride Ceres "1999 04 01 00:00:00" 1d 3 Asteroid (1) Ceres 1999 04 01 00:00:00 2451269.500000 04:49:42.32 +24:40:57.9 8.83 20 63 2.646874 2.941737 1999 04 02 00:00:00 2451270.500000 04:51:09.66 +24:45:03.4 8.83 20 63 2.646169 2.952943 1999 04 03 00:00:00 2451271.500000 04:52:37.70 +24:49:06.2 8.83 19 62 2.645467 2.964076
Asteroid_client uses readline and history libraries, so that the previous commands can be recalled and easily modified to make new queries. It was written and tested in Linux but there should be no significant problems compiling it on other Unix platforms.
Program is finished by pressing ^D.
Asteroid_client.py performs mostly the same functions as the asteroid_client. The only difference is that it is written in Python. It provides a simple class which makes connection to the server a little bit easier. You can download the Python source
|email@example.com||Back to index|