AstroPC Home Sky Charts Home Documentation Examples Download Source code

Cartes du Ciel
Sky Charts V2
partial source code

This page is now obsolete!
 
The full GPL source code of the version 3 is now available.
Look at http://skychart.sourceforge.net to access the latest version of the code by CVS.

If you are interested to the old code for historical purpose you can look at the remainder of this page, but beware this is not the current version of the code.


 

 

 

 

On this page you find part of the program source code.

I don't want to put all the program source here for at least two reason :

1- It is well undocumented and I don't have enough time to change that.
2- Your creativity will probably be better starting from zero rather than trying to sort out thousand of lines of code.

But some part may be useful for all principally the DLL with well defined function. Some are coded in C and other in Pascal for Delphi. All the zip files include a precompiled DLL, then you don't need a specific compiler to use them. 

Most of my own code here is available under the term of the GNU General Public Licence. Other right may apply for derivative work, please contact the original author. Remember that a citation of the original author of a program is always appreciated.



Catalog.dll
: Access to all the catalog used by Cartes du Ciel.

The catalog.dll allow to access the stars and nebulae catalogs data file used by Cartes du Ciel. A list of all those catalog is available within the Cartes du Ciel help file.
All the stuff here consist of Pascal source code for use with Delphi 4. But it is possible to use the precompiled DLL with any other programming language. The only change to do is to convert the declarative from catalogues.pas to your programming language. 
Send me the file to include here if you do that for a well know compiler.
The DLL source code is distributed under the terms of the GNU General Public License.

Files :
- catalog.dll : a precompiled DLL
- catalog.dpr : Delphi project to compile the DLL
- catalogues.pas : declarative for all the DLL function (the interface file)
- demo.exe  : demo executable that use the BSC catalog
- demo.dpr  : Delphi project to compile the demo 
- demo1.pas  : the demo source including some usage explanation
- other *.pas  : specific unit for each catalog used by the DLL

The Pascal source code and CATALOG.DLL : catalog.zip  (258 Kb, updated June 30 2000 for CDC 2.6 with SAC 7.1)

Jim Cornmell contribute C++ header to use the DLL : Ccatalogue.zip

Ivo Dostal do a nice catalog browser that use this dll : CDC Catalogs Browser



Getdss.dll : Read RealSky® CDs.

I use a library developed by Bill Gray of Project Pluto and the Windows DLL is based on a version by Chris Marriott of Skymap Software .
You may find all details about this library on their web site and particularly on http://www.projectpluto.com/get_dss.htm and http://www.skymap.com/dss.htm

Change were made to the original DLL code and it was renamed GETDSS.DLL to avoid confusion with the Skymap version.
- Parameters where added for national language CD mount prompt. 
- Add a function to retrieve a simplified list of possible plate including exposure time information.
- Add a function to extract the image from a specified plate. 
I do this two change to put the plate selection in the main Pascal code instead of the C DLL.
- Add DataSource=4 to find plate from North and South RealSky when both are available.
- Change library options for better integration with Pascal.
- Add standard WCS keyword to the output FITS file.
- Allow .RLS lump file to reside on another directory.

The C source code and GETDSS.DLL 8 May 2002 version :  getdss020805.zip  (405Kb)
A sample program with the Delphi source : dssdemo.zip (610Kb)


Telescope plugin :

You can also use this source code to write plugin for any other telescope model.

ASCOM: Connect to any telescope model supported by the ASCOM Platform.
Also contain a very simple example to start using OLEobject in Delphi.

Full Pascal source code : cdcascomsrc.zip

Meade : Can drive LX200, Autostar and Magellan devices.
March 6 2003 : Add focus control.

Full Pascal source code : lx200src.zip

Encoder: Support encoder using the Tangent protocol like AAM, Ouranos, NGC-MAX, Navigator-1.
To do : Implement three stars alignment, pointing model correction, ...

Full Pascal source code : encodersrc.zip

Two Delphi component are require to compile this plugin. Please install this two package first (simply double click the .dpk file, and select Install from the IDE) :
HiResTim.zip
EnhEdits.zip



Elp82.dll :  Computation of geocentric lunar coordinates 

Computation of geocentric lunar coordinates from ELP 2000-82 and ELP2000-85 theories (M. Chapront-Touze and J. Chapront, Bureau des Longitude). Constants fitted to JPL's ephemerides DE200/LE200.

The original Fortran program Elp82b.f is converted in Pascal, all the series files are include in structure in the DLL with all terms down to a precision of 10-8 assuring some hundredth of arc seconds of precision.
The high level function Lune return equatorial position, distance and phase. LuneIncl function return the position angle of the midpoint of the bright limb according to Meeus chapter 46.

The Pascal source code and ELP82.DLL : elp82.zip  (113 Kb)



Plan404.dll : Position of the planets

This is a DLL version of plan404 : http://www.moshier.net/index.html by Steve Moshier
I build this dll to allow the use of this function from a Pascal main program.
This archive contains trigonometric series for the motions of the nine planets, adjusted for a best fit to JPL's DE404 Long (3000 B.C.  to 3000 A.D) Ephemeris. The series give heliocentric ecliptic coordinates with precision ranging from about 0.1 arc second for the Earth to 1 arc second for Pluto.

The function Plan404 compute heliocentric equatorial J2000 rectangular coordinates and heliocentric ecliptic J2000 polar coordinates for the nine planets. 
There is an example of calling this function from Delphi in file readme_dll.txt.

The C source code and PLAN404.DLL : plan404dll.zip  (175 Kb)



Series96.dll : Position of the planets

Ephemerides of planets between 1900 and 2100 Chapront J., Francou G., Bureau des Longitudes 1996
Planetary motions have been represented with series resulting of an approximation by frequency analysis of JPL numerical integration DE403. Series represent the heliocentric coordinates of planets as functions of time between 1900 and 2100 for the 9 bodies : Mercury, Venus, Earth-Moon Barycenter, Mars, Jupiter, Saturn, Uranus, Neptune and Pluto.
The method allows to compute planetary ephemerides with the aid of compact tables and keeps accuracy of published ephemerides.

The original Fortran program series.f is converted in Pascal. The file reading function is separated from the main function
and the data for each planet are kept in memory to avoid multiple file read. With this modification the performance are
now very good.

The series files are modified to allow easiest reading from Pascal :
 - adding a zero after decimal point 
 - ading a space between two contiguous fields
The files are renamed serie96p.xxx to avoid confusion with the original.

The functions in the DLL are :
- SetSeriesPath : initialyze the path to the data files.
- Plan96 : compute heliocentric rectangular coordinates and optionally the velocities.
- Earth96 : compute rectangular coordinate of geocentric Earth-Moon barycenter.
Look at the source dll series96.dpr for more details.

The Pascal source code, SERIES96.DLL and data files : series96.zip  (206 Kb)

September 13 2000, modification by Jeff Burton :
I've made modifications to the series96.dll and added the data from the series96.xxx files as constant arrays within the dll.
This means the dll will no longer need the external series96.xxx files. You had this request on your source code page. :)
The dll in this file can be dropped in place of the existing series96.dll with no problems. I left the SetSeriesPath function in the dll so Cartes du Ciel could use the dll, but the function doesn't do anything.

The Pascal source code, SERIES96.DLL : series96b.zip  (414 Kb)



Satxy.dll : Satellites of the planets

Positions of the satellites of Mars, Jupiter, Saturn and Uranus with a precision of 0.5 arcsec for the period 1997-2020. 
Based on posxy by J.-E. Arlot, Ch. Ruatti, D.T. Vu and W. Thuillot, Bureau des Longitudes

I convert the diffpos.f Fortran program in Pascal and include all the coefficient in structure table.

The function Satxyfm return the differential equatorial coordinates for each satellite of a given planet. Look at file satxy.txt for an example of calling this function from Delphi.

The include program mkposxy allow you to generate the structure elp.pas from the BDL files. Then it is possible to generate smaller DLL by limiting the period or the planets to what you need. It is also possible to use the full precision coefficients available at  ftp://ftp.bdl.fr/pub/ephem/satel/posxy/higprec

The Pascal source code and SATXY.DLL : satxy.zip  (1032 Kb)
 
September 3 2000 modification by Jeff Burton :
I've been looking at the source code for your satxy.dll. As a result, I've been able to build a new satxy.dll that uses the high-precision coefficients available from the JPL. This new version of the library also includes data for the years 1995 and 1996 (these years were only available for the high-precision data) as well as the years 1997-2020.
The Pascal source code for the high precision version : satxyhi.zip  (2450 Kb)
 


TstDDE : How to interface "Cartes du Ciel / Sky Charts" using DDE

This files are to demonstrate how to use the DDE interface to Sky Charts. This require at least the version 2.44.
Most of the information you need are in file tstdde1.pas. 
If you port the sample program to another language like C++ or VB send me a copy to include in this zip file.

File content :
Tstdde1.pas : Delphi example
Tstdde1.dfm : Delphi form definition
Tstdde.exe : Compiled example
Tstdde.dpr : Delphi project
Sky_dde_util.pas: Other functions not directly DDE related 
Skychartdde.doc : MS Word document with DDEAUTO field

TstDDE sample program : tstdde.zip  (180 Kb)

NEW! A very useful contribution that let you script CDC from .bat file.
CDCcmd v1.0 by Jim Cornmell - 2003 : CDCcmd.zip (70Kb)

The CDCcmd program is:
----------------------
1) simple.
2) designed to show how to use DDE in MFC Visual C++, so you can write your own
   programs.  The full MFC project can be found in the CDCcmd folder, just
   select CDCcmd.dsw and compile.
3) designed to provide a useful scripting tool for Cartes du Ciel.
4) freeware.


Contacts

Send email to the author Patrick Chevalley if you have any remarks, questions or suggestions.