Software |
![]() |
Home |
Show content only (no menu, header) ls *-cam1.jpg| jpeg2yuv -f 20 -I p| yuv2lav -f a -b 10000 -q 75 -o mov1.avi ls *-cam2.jpg| jpeg2yuv -f 20 -I p| yuv2lav -f a -b 10000 -q 75 -o mov2.avi ls *-cam3.jpg| jpeg2yuv -f 20 -I p| yuv2lav -f a -b 10000 -q 75 -o mov3.avi skycam programSoftware architecture, interfacing to hardware
Source CodeSoftware source code: skycam.c .This file contains all custom software to run the system, and is approximately 7000 lines of C code. Output of "skycam help"A single executable is created by compiling skycam ( compile command line). The single executable is then used to issues low level and high level commands. The executable (named skycam) keeps track of the system status using files which are written and read as needed. A list of commands is obtained by typing "./skycam help":--------------- LIST OF COMMANDS ------------------- help : print list of commands and exit ASTRONOMICAL COMMANDS-------------------------------- utcnow : compute current UTC (->utc.txt) lst yr mo day : compute local sidearal time (->lst.txt) lstnow : compute current local sidereal time (->lst.txt) radec2altaz : convert ra dec into alt az (deg) altaz2radec : convert alt az into ra dec (deg) moonpos : get current Moon position sunpos : get current Sun position COMMUNICATION SETUP------------------------------------- resetusb Main loopThe main loop is started by typing "./skycam mainloop". It will monitor the weather, and decide what to do (nothing, take darks, take flats, or observe) from weather data, time, and position of the Sun.Keeping it safe: monitorloopThe camera system does not have a dome - it is therefore essential to make sure that it is properly parked during bad weather, and that it NEVER points at the Sun (this would destroy the camera, and lens). The software is written with this goal in mind. The "monitorloop" command checks, through the filesystem, that the main loop heartbeat is beating (periodically updates a file), and takes control of the system to park the camera if the main loop has crashed.Astrometry, data quality verificationCommunication with camera (gphoto2)The camera is connected to the computer through USB. gphoto2 is used to communicate to the camera.Example commands: # set iso to 400 /usr/local/bin/gphoto2 --set-config /main/imgsettings/iso=4 # set aperture to F1.2 /usr/local/bin/gphoto2 --set-config /main/capturesettings/aperture=1.2 # capture a 120s exposure /usr/local/bin/gphoto2 --bulb=120.0 --capture-image-and-download Communication with monitoring webcamsWebcams are on USB ports. streamer is used to acquire frames.Software NotesThe system runs on Ubuntu 10.04 (64-bit). Cfits is used for image analysis.Camera control: gphoto2sudo apt-get install gphoto2 # installed version 2.4.5 of gphoto and verstion 2.4.8 of libgphoto2 # need newer version to support Bulb exposure ... moving to manual install sudo apt-get install libltdl7-dev sudo apt-get install libpopt-dev sudo apt-get install libjpeg-dev # download libgphoto2-2.4.9 ./configure make sudo make install # download gphoto2-2.4.9 ./configure make make install # NOTES: # gphoto2 2.4.8 is : /usr/local/bin/gphoto2 # gphoto2 2.4.5 is : /usr/bin/gphoto2 [default] Page content last updated: 27/06/2023 06:35:52 HST html file generated 27/06/2023 06:34:44 HST |