You can subscribe to this list here.
2004 |
Jan
(1) |
Feb
(1) |
Mar
(45) |
Apr
(2) |
May
(9) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: <ph...@us...> - 2004-03-04 21:19:06
|
Update of /cvsroot/uts/uts/src/tel/telgo.paramount In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12099/src/tel/telgo.paramount Added Files: .cvsignore Log Message: - oops. --- NEW FILE: .cvsignore --- *.lo *.la .deps .libs Makefile Makefile.in aclocal.m4 autom4te.cache confdefs.h config.cache config.guess config.h config.h.in config.log config.status config.sub configure install-sh libtool ltconfig ltmain.sh missing mkinstalldirs stamp-h stamp-h1 stamp-h.in |
Update of /cvsroot/uts/uts/src/tel/telgo.paramount In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11912/src/tel/telgo.paramount Added Files: Makefile.am main.c setup-server.py setup.py telgo telgo.paramount.py telgo.server.py Log Message: - new telgo.paramount - telgo wrapper for Paramount ME --- NEW FILE: Makefile.am --- bin_PROGRAMS = telgo.paramount telgo_paramount_SOURCES = main.c telgo_paramount_LDADD = -lm -lcfitsio -lsimpleskts --- NEW FILE: main.c --- /* * telgo.paramount - telgo wrapper for Paramount ME * Copyright (C) 2004 - Paulo Henrique S. de Santana * * Based on telgo.lx200 * Copyright (C) 2000 by Andre Luiz de Amorim * * This file is part of UTS. * UTS 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 of the License, or * (at your option) any later version. * * UTS 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. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA * */ /* $Id */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <signal.h> #include <math.h> #include <string.h> #include "sockets.h" #ifdef HAVE_CONFIG_H #include "config.h" #endif #define FCS_GAIN 10000 /* 1/100 seconds */ enum { FALSE, TRUE }; typedef enum { BUSY, WAIT } stat_t; struct ras { int hh; int mm; int ss; }; struct decs { int dd; int mm; int ss; }; typedef struct { struct ras ra; float ra_range; struct decs dec; float dec_range; float lat; float lon; stat_t status; int moving; int focus; } tel_info; void wait_tel(tel_info *tel); void usage(char *command); //void status(tel_info *tel, stat_t stat); void setup(void); void controlc(int signumber); void change_focus(int argc, char ** argv); void move_tel(int argc, char **argv); tel_info tel; int ram, rah, decm, decd; float ras, decs; Socket *skt; char buffer[500]; char *targethost = "localhost"; int targetport = 10000; int main(int argc, char ** argv) { signal(SIGINT, controlc); signal(SIGABRT, controlc); fprintf(stderr, "Paramount ME Telescope controller ver. %s\n\n", VERSION); if (argc < 2) usage(argv[0]); if (*argv[1] == 'f') change_focus(argc, argv); else move_tel(argc, argv); exit(0); } void move_tel(int argc, char **argv) { if (argc < 5) usage(argv[0]); setup(); sscanf(argv[3], "%d:%d:%d", &tel.ra.hh, &tel.ra.mm, &tel.ra.ss); sscanf(argv[4], "%d:%d:%d", &tel.dec.dd, &tel.dec.mm, &tel.dec.ss); /* socket stuff */ char sktmode[10]; snprintf(sktmode, 10, "c%d", targetport); skt = Sopen(targethost, sktmode); if (skt == NULL) { printf("Nao foi possivel conectar a %s:%d.\n", targethost, targetport); exit (100); } Sgets(buffer, 500, skt); if(!(strcmp(buffer, "OK") == 0)) { printf("Desconectado pelo servidor.\n"); exit (101); } printf("%s\n", buffer); /*** Write Coords. ***/ tel.moving = TRUE; sprintf(buffer, "%02d:%4.1f %02d:%02d", tel.ra.hh, tel.ra.mm + tel.ra.ss / 60.0, tel.dec.dd, tel.dec.mm); Sputs(buffer, skt); /* Sgets(buffer, 500, skt); */ /* if(!(strcmp(buffer, "OK") == 0)) { */ /* printf("Nao foi possivel mover.\n"); */ /* exit (102); */ /* } */ Sputs("GO", skt); Sgets(buffer, 500, skt); /* if(!(strcmp(buffer, "OK") == 0)) { */ /* printf("Nao foi possivel mover.\n"); */ /* exit (103); */ /* } */ wait_tel(&tel); } void wait_tel(tel_info *tel) { /* int rah; */ /* float ram; */ /* int decd, decm; */ /* float delta_dec; */ /* float delta_ra; */ /* char buf[64]; */ /* while (tel->moving) { */ /* /\* get current RA *\/ */ /* strcpy(buf, ":GR#"); */ /* write_serial(tel->serial, buf, strlen(buf)); */ /* read_serial(tel->serial, buf, 64); */ /* sscanf(buf, "%d:%f#", &rah, &ram); */ /* /\* get current DEC *\/ */ /* strcpy(buf, ":GD#"); */ /* write_serial(tel->serial, buf, strlen(buf)); */ /* read_serial(tel->serial, buf, 64); */ /* sscanf(buf, "%d%*c%d#", &decd, &decm); */ /* /\* are DEC and RA in range? *\/ */ /* decd -= tel->dec.dd; */ /* decm -= tel->dec.mm; */ /* delta_dec = fabs(decd + (decm / 60.0)); */ /* rah -= tel->ra.hh; */ /* ram -= tel->ra.mm; */ /* ram -= ((double)tel->ra.ss / 60.0); */ /* delta_ra = fabs(rah + (ram / 60.0)); */ /* /\* limpa a linha e escreve os deltas *\/ */ /* fprintf(stderr, "\r "); */ /* fprintf(stderr, "\rdelta-dec = %f; delta-ra = %f", delta_dec, delta_ra); */ /* fflush(stderr); */ /* if ((delta_dec < tel->dec_range) && (delta_ra < tel->ra_range)) */ /* tel->moving = FALSE; */ /* sleep(1); */ /* } */ /* /\* ja era pra ter parado, mas ainda esta' tremendo... esperar mais uns 5-10s *\/ */ /* sleep(7); */ } void setup(void) { tel.ra_range = 0.007; /* 1min */ tel.dec_range = 0.007; /* 1min */ tel.moving = FALSE; tel.status = BUSY; tel.focus = FALSE; } void change_focus(int argc, char ** argv) { /* int steps; if (argc < 4) usage(argv[0]); porta = argv[2]; tel.focus = TRUE; setup(); write_serial(tel.serial, ":FF#", 4); sscanf(argv[3], "%d", &steps); if (steps == 0) exit(0); else if (steps < 0) write_serial(tel.serial, ":F-#", 4); else write_serial(tel.serial, ":F+#", 4); usleep(abs(steps) * FCS_GAIN); write_serial(tel.serial, ":FQ#", 4); exit(0); */ } void usage(char *command) { fprintf(stderr, "SYNTAX: %s p terminal_device RA DEC\n", command); fprintf(stderr, " %s f terminal_device steps\n\n", command); fprintf(stderr, "E.g.: %s p /dev/ttyS1 12:12:12 13:12:14\n", command); fprintf(stderr, " %s f /dev/ttyS1 +50\n\n", command); exit(1); } void controlc(int signumber) { if (signumber == SIGINT) fprintf(stderr, "\nControl-C signal caught, exiting.\n"); else fprintf(stderr, "\nAborting...\n"); //if (tel.focus) // write_serial(tel.serial, ":FQ#", 4); exit(2); } --- NEW FILE: setup-server.py --- # setup.py from distutils.core import setup import py2exe setup(console=["server.py"]) --- NEW FILE: setup.py --- # setup.py from distutils.core import setup import py2exe setup(console=["telgo.py"]) --- NEW FILE: telgo --- #! /usr/bin/python2 import sys import string from socket import * import select __description__ = "Paramount ME telgo wrapper" __version__ = "0.1" __date__ = "01/03/2004" # parse arguments if len(sys.argv) < 5: print """ %s - versao %s - %s Usage: %s p server[:port] ra dec Ex. : %s p localhost:1000 +12:12:12 21:21:21 %s p server +12:12:12 21:21:21 %s p - +12:12:12 21:21:21 """ % (__description__, __version__, __date__, sys.argv[0], sys.argv[0], sys.argv[0], sys.argv[0]) sys.exit(-1) # get target host and port from command line if ":" in sys.argv[2]: target = string.split(sys.argv[2], ":") elif sys.argv[2] != "-": target = [sys.argv[2], 10000] else: target = ['localhost', 10000] # helpful names targetRA = sys.argv[3] targetDEC = sys.argv[4] # connect, send coordinates, and wait until telescope stop try: skt = socket(AF_INET, SOCK_STREAM) print "Connecting to %s:%d... wait... " % tuple(target), sys.stdout.flush() skt.connect(tuple(target)) print "OK" skt.sendall("RA*%s" % targetRA) skt.sendall("DEC*%s" % targetDEC) skt.sendall("MOVE") print "Moving to %s %s... wait... " % (targetRA, targetDEC), sys.stdout.flush() # wait until telescope move wait = select.select([skt], [], [skt], 180) if len(wait[0]) or len(wait[2]): data = skt.recv(256) if data == "OK": print "OK" else: print "ERROR (%s)" % data else: print "ERROR (Timeout)" skt.sendall("BYE") skt.close() sys.exit(0) except KeyboardInterrupt: print "Ctrl+C... exiting..." skt.sendall("BYE") skt.close() sys.exit(1) except error, e: print "ERROR (%s)" % (e[1]) skt.sendall("BYE") skt.close() sys.exit(1) --- NEW FILE: telgo.paramount.py --- #! /usr/bin/python2 import sys import string from socket import * import select __description__ = "Paramount ME telgo wrapper" __version__ = "0.1" __date__ = "01/03/2004" # parse arguments if len(sys.argv) < 5: print """ %s - versao %s - %s Usage: %s p server[:port] ra dec Ex. : %s p localhost:1000 +12:12:12 21:21:21 %s p server +12:12:12 21:21:21 %s p - +12:12:12 21:21:21 """ % (__description__, __version__, __date__, sys.argv[0], sys.argv[0], sys.argv[0], sys.argv[0]) sys.exit(-1) # get target host and port from command line if ":" in sys.argv[2]: target = string.split(sys.argv[2], ":") elif sys.argv[2] != "-": target = [sys.argv[2], 10000] else: target = ['localhost', 10000] # helpful names targetRA = sys.argv[3] targetDEC = sys.argv[4] # connect, send coordinates, and wait until telescope stop try: skt = socket(AF_INET, SOCK_STREAM) print "Connecting to %s:%d... wait... " % tuple(target), sys.stdout.flush() skt.connect(tuple(target)) print "OK" skt.sendall("RA*%s" % targetRA) skt.sendall("DEC*%s" % targetDEC) skt.sendall("MOVE") print "Moving to %s %s... wait... " % (targetRA, targetDEC), sys.stdout.flush() # wait until telescope move wait = select.select([skt], [], [skt], 180) if len(wait[0]) or len(wait[2]): data = skt.recv(256) if data == "OK": print "OK" else: print "ERROR (%s)" % data else: print "ERROR (Timeout)" skt.sendall("BYE") skt.close() sys.exit(0) except KeyboardInterrupt: print "Ctrl+C... exiting..." skt.sendall("BYE") skt.close() sys.exit(1) except error, e: print "ERROR (%s)" % (e[1]) skt.sendall("BYE") skt.close() sys.exit(1) --- NEW FILE: telgo.server.py --- #!/bin/python import sys import time import win32com.client from socket import * sk = socket(AF_INET, SOCK_STREAM) sk.bind(('localhost', 10000)) sk.listen(5) try: obj = win32com.client.Dispatch("TheSky.Telescope") util = win32com.client.Dispatch("DriverHelper.Util") thesky = win32com.client.Dispatch("RASCOM.RASCOMTheSky.1") except Exception: print "ERRROOOOO" sys.exit(1) obj.Connected = True #obj.FindHome() targetRA = 0 targetDEC = 0 conn = addr = None try: while 1: conn, addr = sk.accept() print "Entrando... %s:%d" % addr sys.stdout.flush() while 1: data = conn.recv(1024) if not data: continue if data == 'MOVE': print "moving to %s %s" % (targetRA, targetDEC) sys.stdout.flush() obj.SlewToCoordinates(util.HMSToHours(targetRA), util.DMSToDegrees(targetDEC)) conn.send("OK") sys.stdout.flush() elif data.count("RA"): targetRA = data.split('*')[1] print "setting RA to %s" % targetRA sys.stdout.flush() elif data.count("DEC"): targetDEC = data.split('*')[1] print "setting DEC to %s" % targetDEC sys.stdout.flush() elif data == "BYE": conn.close() break elif data == "SHUTDOWN": obj.Park() obj.Connected = False thesky.Quit() break print "Saindo... %s:%d\n" % addr sys.stdout.flush() conn.close() except KeyboardInterrupt: print "Ctrl+C... saindo." if conn: conn.close() sk.close() obj.Park() obj.Connected = False thesky.Quit() sys.exit(1) except error, e: print "error:", e[0],e[1] if conn: conn.close() sk.close() obj.Park() obj.Connected = False thesky.Quit() sys.exit(1) except: if conn: conn.close() sk.close() obj.Park() obj.Connected = False thesky.Quit() sys.exit(1) |
From: <ph...@us...> - 2004-03-04 21:17:48
|
Update of /cvsroot/uts/uts/src/tel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11912/src/tel Modified Files: Makefile.am Log Message: - new telgo.paramount - telgo wrapper for Paramount ME Index: Makefile.am =================================================================== RCS file: /cvsroot/uts/uts/src/tel/Makefile.am,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile.am 29 Jan 2004 03:03:20 -0000 1.1.1.1 --- Makefile.am 4 Mar 2004 20:56:19 -0000 1.2 *************** *** 1 **** ! SUBDIRS = etc teld telgo.fake telgo.lx200 \ No newline at end of file --- 1 ---- ! SUBDIRS = etc teld telgo.fake telgo.lx200 telgo.paramount \ No newline at end of file |
From: <ph...@us...> - 2004-03-04 21:16:52
|
Update of /cvsroot/uts/uts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11709 Modified Files: configure.ac Log Message: - added telgo.paramount Index: configure.ac =================================================================== RCS file: /cvsroot/uts/uts/configure.ac,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** configure.ac 29 Jan 2004 03:02:34 -0000 1.1.1.1 --- configure.ac 4 Mar 2004 20:55:24 -0000 1.2 *************** *** 89,93 **** # outputs ! AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([Makefile src/Makefile --- 89,93 ---- # outputs ! AM_CONFIG_HEADER([config.h]) AC_CONFIG_FILES([Makefile src/Makefile *************** *** 108,112 **** src/tel/teld/Makefile src/tel/telgo.fake/Makefile ! src/tel/telgo.lx200/Makefile]) - AC_OUTPUT \ No newline at end of file --- 108,115 ---- src/tel/teld/Makefile src/tel/telgo.fake/Makefile ! src/tel/telgo.lx200/Makefile ! src/tel/telgo.paramount/Makefile]) ! ! AC_OUTPUT ! |
From: <ph...@us...> - 2004-03-04 21:13:40
|
Update of /cvsroot/uts/uts/src/tel/telgo.paramount In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10951/telgo.paramount Log Message: Directory /cvsroot/uts/uts/src/tel/telgo.paramount added to the repository |
From: <st...@us...> - 2004-03-04 20:51:22
|
Update of /cvsroot/uts/uts/src/etc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6457 Modified Files: secd Log Message: Added teld and camd. Index: secd =================================================================== RCS file: /cvsroot/uts/uts/src/etc/secd,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** secd 4 Mar 2004 20:15:46 -0000 1.2 --- secd 4 Mar 2004 20:29:55 -0000 1.3 *************** *** 6,11 **** # # chkconfig: 4 41 60 ! # description: Spm is the Simple Sockets Library (SSL) ! # PortMaster. It controls server names and their port numbers. # Source function library. --- 6,10 ---- # # chkconfig: 4 41 60 ! # description: Run socket secretaries for each instrument. # Source function library. |
From: <st...@us...> - 2004-03-04 20:37:12
|
Update of /cvsroot/uts/uts/src/etc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2374 Modified Files: secd spmd Added Files: uts_defaults Log Message: Created uts_defaults file. Things like UTS_DIR are defined there. --- NEW FILE: uts_defaults --- UTS_DIR=/home/indus/observatorio/uts UTS_BIN=$UTS_DIR/bin UTS_ETC=$UTS_DIR/etc export UTS_DIR Index: secd =================================================================== RCS file: /cvsroot/uts/uts/src/etc/secd,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** secd 29 Jan 2004 03:02:40 -0000 1.1.1.1 --- secd 4 Mar 2004 20:15:46 -0000 1.2 *************** *** 12,18 **** . /etc/rc.d/init.d/functions ! export GUTS_DIR="/home/telescopio/guts" ! test -x $GUTS_DIR/bin/sec || exit 0 RETVAL=0 --- 12,18 ---- . /etc/rc.d/init.d/functions ! . /etc/rc.d/init.d/uts_defaults ! test -x $UTS_BIN/sec || exit 0 RETVAL=0 *************** *** 24,28 **** start) echo -n 'Starting Socket Secretary daemon: ' ! daemon $GUTS_DIR/bin/runsecs.sh touch /var/lock/subsys/secd echo --- 24,28 ---- start) echo -n 'Starting Socket Secretary daemon: ' ! daemon $UTS_BIN/runsecs.sh touch /var/lock/subsys/secd echo *************** *** 31,35 **** echo -n 'Stopping Socket Secretary daemon: ' echo ! . $GUTS_DIR/bin/stopsecs rm -f /var/lock/subsys/secd echo --- 31,35 ---- echo -n 'Stopping Socket Secretary daemon: ' echo ! . $UTS_BIN/stopsecs rm -f /var/lock/subsys/secd echo *************** *** 41,45 **** ;; status) ! status $GUTS_DIR/bin/sec RETVAL=$? ;; --- 41,45 ---- ;; status) ! status $UTS_BIN/sec RETVAL=$? ;; Index: spmd =================================================================== RCS file: /cvsroot/uts/uts/src/etc/spmd,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** spmd 29 Jan 2004 03:02:40 -0000 1.1.1.1 --- spmd 4 Mar 2004 20:15:46 -0000 1.2 *************** *** 13,19 **** . /etc/rc.d/init.d/functions ! export GUTS_DIR="/home/telescopio/guts" ! test -x $GUTS_DIR/bin/Spm || exit 0 RETVAL=0 --- 13,19 ---- . /etc/rc.d/init.d/functions ! . /etc/rc.d/init.d/uts_defaults ! test -x $UTS_BIN/Spm || exit 0 RETVAL=0 *************** *** 27,31 **** if [ ! -f /var/lock/subsys/Spm ]; then echo -n 'Starting Spm daemon: ' ! daemon $GUTS_DIR/bin/Spm sleep 2 RETVAL=$? --- 27,31 ---- if [ ! -f /var/lock/subsys/Spm ]; then echo -n 'Starting Spm daemon: ' ! daemon $UTS_BIN/Spm sleep 2 RETVAL=$? *************** *** 36,40 **** stop) echo -n 'Stopping Spm daemon: ' ! killproc $GUTS_DIR/bin/Spm RETVAL=$? [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/Spm --- 36,40 ---- stop) echo -n 'Stopping Spm daemon: ' ! killproc $UTS_BIN/Spm RETVAL=$? [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/Spm *************** *** 47,51 **** ;; status) ! status $GUTS_DIR/bin/Spm RETVAL=$? ;; --- 47,51 ---- ;; status) ! status $UTS_BIN/Spm RETVAL=$? ;; |
From: <st...@us...> - 2004-02-03 22:03:18
|
Update of /cvsroot/uts/uts/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16460 Added Files: Technical_Description Log Message: Added technical description of the project. --- NEW FILE: Technical_Description --- Instruments are controlled by a daemon. These daemons are composed by three programs: 1. A low level driver program, which interfaces to the hardware such as a telescope or CCD camera. All the hardware-specific code is kept in this level. 2. A generic instrument daemon. This program sends requests to the driver using a standard "protocol". 3. A communication daemon - the Secretary. The instrument daemon feeds the secretary with its status. All other instruments that need to know the status of this instrument, will talk to this program. In our first approach there are three instruments. A telescope (Meade LX-200), a CCD camera (SBIG ST-7E) and a "virtual" instrument called Synchronizer, which takes care of scheduling of observations. It receives observational data (coordinates, imaging information, etc) from a web interface. One important character of the instrument control daemons is that they do not receive commands, but rather take their decisions based on the status of the rest of the observatory. We believe that with this approach we avoid a super-complex control program that takes care of everything, having instead the "intelligence" distributed through the various daemons. All the programs are being written in C/C++, and some scripts in python and PHP. The communication is made through network sockets, using the Simple Sockets Library. Please see http://users.erols.com/astronaut/ssl/ |
From: <ph...@pr...> - 2004-01-29 05:15:40
|
Update of /cvsroot/uts/uts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6836 Modified Files: TODO-sf Log Message: - update CVS TODO entries status Index: TODO-sf =================================================================== RCS file: /cvsroot/uts/uts/TODO-sf,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** TODO-sf 29 Jan 2004 03:02:34 -0000 1.1.1.1 --- TODO-sf 29 Jan 2004 03:44:08 -0000 1.2 *************** *** 5,10 **** == ! - importar arquivos para o cvs ! - configurar syncmail Mail --- 5,10 ---- == ! - importar arquivos para o cvs => FEITO ! - configurar syncmail => FEITO Mail |