Southern Stars Systems is making the source code for SkySight publicly available. In doing so, we invite astronomical-imaging enthusiasts to actively participate in its development. We've decided that releasing the current program as a public beta, and continuing its development as an open-source project, is the best way to bring the result of our efforts to the astronomical community, and ensure that the product has a future.
With the source code to SkySight, anyone with a knowledge of C programming will be able to do things like add support for their own cameras, add custom image-processing routines, extend the list of supported file formats, or even port the entire program to other operating systems!
The source code on the site is available under a Public Source License. This terms of this license are identical to the Apple Public Source License (which is a modified version of Netscape's Mozilla Public License). Here's how our license works:
You have the right to use, modify, and redistribute any of the source code you've downloaded from this site, free of charge. However, if you make any modifications, you must provide us a with copy of the modified version, and give us the right to use, modify, and redistribute your modified version, also free of charge. Finally, you need to maintain a copy of the original license agreement with your modified code.
That's really it! You should read the complete license before downloading any code. You can e-mail us or call us toll-free at (866) 887-7827 if you have any further questions regarding our open source licensing.
First, you should install and run the appropriate version of the SkySight public beta. This ensures that certain system extensions (Mac OS) and DLLs (Windows) which are not included in the public source distributions are installed properly. Also, if you can run the existing public beta successfully, you will be able to isolate any problems that you may encounter when running your own modified versions of the program to your own sources.
There are two versions of the current source code distribution: one for Macintosh, and one for Windows. The Windows version is a ZIP-compressed archive, while the Macintosh version is a MacBinary-encoded StuffIt archive. Macintosh users may need to obtain a uility like StuffIt Expander from Aladdin Systems in order to decode it.
Except for their compression format, the two distributions are identical. You may click on the links below to download either one:
Windows version: 6.9 MB ZIP-compressed archive.
Macintosh version: 7.0 MB MacBinary-encoded StuffIt archive.
Right now, the above source code distributions support two development enviroments, one for Windows and one for Macintosh. The Windows environment is Microsoft Visual C++ version 6.0, and the Macintosh environment is Metrowerks CodeWarrior Pro, version 5. Please note that Southern Stars Systems does not sell these products, and that we do not provide general technical support for them either. But we will answer questions specifically related to building our source code with these development environments.
Finally, all of our source code is written in good old, ANSI/ISO standard C. It's simple, it's fast, and it's the still the most widely understood and widely used programming language in existence.
After downloading and decompressing either of the above source code distributions, here is what you should find:
AstroLib: this is our own library of astronomical computation routines. It forms the computational engine at the heart of SkyChart III and SkySight. Currently, all of the documentation for the routines in this library is stored in the header file "AstroLib.h", as a series of extensive comments.
GUILib: this is our Generic User Interface library. It is a general-purpose toolkit that provides a set of common interfaces to the Windows APIs and Macintosh Toolbox APIs for user-interface elements like windows, menus, dialogs; memory allocation and file reading/writing, etc. This is probably the piece that is of the most interest to the programming community at large.
There are several subdirectories under the GUILib folder:
Macintosh: contains the C source code and header files which represent the Mac OS implementation of GUILib.
Windows: contains the C source code and header files which represent the Win32 implementation of GUILib.
Demos: contains the C source code for some simple, stand-alone GUILib demonstration applications.
JPEGLib: this is the Independent JPEG Group's cross-platform library for reading/writing JPEG image files. It is an unmodified copy of version 6b of the IJG's original sources, which can be found by clicking on the above link.
LibTIFF: this is Sam Leffer's cross-platform library for reading/writing TIFF image files. It is an unmodified copy of version 3.5.5 of Sam Leffer's original LibTIFF sources, which can be found by clicking here.
GIFLib: this is a set of library routines for reading/writing GIF image files. It is based on version 4.1 of the GIFLib library originally developed by Gershon Elber, but slightly modified by us.
Currently, all of the documentation for GUILib is stored as extensive comments in the file "GUILib.h", in the "Windows" subdirectory. This file is the common, "master" GUILib header file, and is #included by both the Mac and Windows versions of GUILib.
SkySight: this folder contains the source code, resource files, and build environments for SkySight. Both Macintosh and Windows versions of the build environents are included. Please note that not all of the SkySight source code is included; we wish to keep parts of SkySight proprietary, and for those parts, only library/object code has been included. However, there is enough here for you to build your own versions of the SkySight executables based on the source code that is included.
Source: contains the common C source code and header files required to build both the Mac OS and Windows versions of the main SkySight executables.
Resource: contains the resource files required to build both the Macintosh and Windows versions. There are two subdirectories here:
Macintosh: contains the Macintosh-specific resource files.
Windows: contains the Windows-specific resource files.
Build: contains the build environments for the Mac OS and Windows versions. There are two subdirectories:
Macintosh: contains the Macintosh build enviroment, including the Metrowerks Code Warrior Pro 5 project file.
Windows: contains the Windows build enviroment, including the Microsoft Visual C++ 6.0 workspace and project files.
ParLib: this is our cross-platform API for performing low-level parallel-port communications. It is based on the original MS-DOS parallel I/O API, but will also work in Windows 95, 98, Me, and the Mac OS (with our MacParallel extension and one of the parallel-port cards listed on the SkySight download page). The ParLib API is defined in the header file "ParLib.h". The Windows implementation is contained in the C source code file "ParLib.c", and the Macintosh implementation is distributed as an object-code library called "ParLib". We may make the source code to the Macintosh library available at a later date.
ParLib is based on original work by Mr. Matthew Nelson. We would like to properly credit Mr. Nelson for this work, and thank him for his kind permission to continue distributing MacParallel and ParLib from this site.
SBIG: this directory contains code for communicating with the Santa Barbara Instrument Group's parallel-port CCD cameras. There are two subdirectories here:
Windows: contains an unmodified copy of version 2.70 of the Windows parallel driver distributed freely on SBIG's web site.
Macintosh: contains a version of SBIG's Windows parallel driver modified to work with our own Macintosh parallel driver. This driver is distributed as a compiled object code library only; we cannot distribute the source code due to our licensing agreement with SBIG.
Cookbook: this is a set of routines for communicating with the Cookbook 245 CCD camera. It is based on the TCAMERA C++ class library written by TyBee Evans of Intricate Micro Systems, and contains extensive modifications by us in order to work with our parallel communications API.
License.html: a copy of the Southern Stars Systems Public Source License, in HTML format. You must include this License with any copy(ies) of the above source code modules that you reproduce or redistribute.
After you've downloaded and installed one the above archives, here's how to build the Macintosh and/or Windows SkySight executables:
Macintosh: double-click the file SkySight.mcp, inside the SkySight:Build:Macintosh folder. This should launch the Metrowerks CodeWarrior IDE automatically. (If it doesn't, you can open SkySight.mcp manually, from within CodeWarrior.) Then select Make from CodeWarrior's Project menu.
Windows: double-click the file SkySight.dsw, inside the SkySight\Build\Windows subdirectory. This should launch Microsoft Visual C++ DevStudio automatically. (If it doesn't, you can open SkySight.dsw manually, from within DevStudio.) Then select Rebuild All from DevStudio's Build menu.
Everything should build automatically; if it does not, contact us for help.
There are a few areas where a little bit of work will go a long way toward making SkySight a much more useful product.
Porting to Windows NT/2000. The only thing preventing SkySight from running on Windows NT/2000 is a suitable version of ParLib, our parallel I/O communications library. Right now, the Windows version of ParLib is a set of 5 simple C functions which call the x86 assemby-code instructions for moving data in and out of the parallel-port I/O address space. These are hardware-level instructions which a user-mode application is forbidden from calling directly in Windows NT/2000. (We can get away with this in Windows 95/98/Me because those versions of Windows have much less strictly enforced hardware abstraction.)
It should be relatively simple to place these functions into a virtual device driver instead of compiling them into the program directly. If someone with Windows NT driver experience would like to contribute, it would help us out a great deal.
Porting GUILib to Mac OS X. Right now, the Macintosh version of GUILib is built on top of the "Classic" version of Mac OS Toolbox APIs. In order to port SkySight to Mac OS X, GUILib would have to be rewritten to use the "Carbon" version of those APIs. As the "Carbon" and "Classic" Mac OS APIs are not terribly different, this should also be a relatively straightforward project. (But, as they say with any other such project, the devil is in the details...)
This project would have a huge payoff, since then any other program built on GUILib— such as SkyChart III— could also be easily ported to Mac OS X. If anyone out there would be interested in helping with this, please let us know.
Porting MacParallel to Mac OS X. In order for SkySight to work on Mac OS X, our drivers for the PCI and PCMCIA parallel-port cards would need to be completely rewritten. The source code to these drivers is proprietary to Southern Stars, and is not included in the current open source distribution. But if you'd be interested in helping us with this project, please e-mail us or give us a call toll-free at (866) 887-7827.
Adding support for additional CCD cameras. We designed SkySight with the intent to make support for additional CCD camera types relatively straightforward. All of our camera support takes the form of a single camera interface function, one function for each different camera type. All of the camera interface functions are prototyped in the header file CameraInterface.h; to add your own, you'd simply place the function protoype into that header file, and put a similar reference into the table of camera types in CameraType.c.
The actual camera interface function itself should take the following form:
short DemoCameraInterface ( short function, CameraInterfaceDataPtr data );
The function parameter is an integer command code describing what you want the camera to do: e.g. CAMERA_START_EXPOSURE to start an exposure, CAMERA_GET_TEMPERATURE to determine the status of the camera's cooling system, etc. (All of the command codes that your function is required to support are #defined in the header file "CameraInterface.h".)
The data parameter is a pointer to a C struct which contains additional input parameters relevant to the command, and receives the output from the command. For example, in the CAMERA_START_EXPOSURE command, the exposure length in seconds is containged in one of the fields of this structure; similarly, for the CAMERA_GET_TEMPERATURE command, the temperature of the camera's CCD sensor would be returned in another field of the struct. The exact layout of the CameraInterfaceData struct, and the meanings of its individual fields, are also listed in CameraInterface.h.
The function's return value is an error code. Right now, there are only two error codes in use: TRUE (if the function completed the requested command successfuly) or FALSE (if it failed). In future releases, we plan to make this a little more sophisticated.
The existing camera interface files, DemoCameraInterface.c, SBIGParallelCameraInterface.c, and CookbookCameraInterface.c, ought to provide a lot of helpful example material as well. They are extensively commented, and they already work.
If you have a CCD camera you'd like to help add support for, please e-mail us or give us a call toll-free at (866) 887-7827.
Copyright ©1993-2002 Southern Stars Systems. All Rights Reserved.
All product names are trademarks of their respective owners.
This page was last updated on 7 September 2002.