SGP - C Library
Five mathematical models for prediction of satellite position and velocity using NORAD "two-line-elements" are available: SGP, SGP4, SDP4, SGP8 and SDP8. USSPACECOM currently uses the SGP4 routines for near-earth satellites, and SDP4 for deep-space satellites.
Dr TS Kelso has wrtitten the "NORAD SGP4 Pascal Library" which offers a standardized approach for the developement of satellite prediction software using Turbo Pascal.
Based on this library I have rewritten most of this code in C. For reference, also the SGP, SGP8 and SDP8 units were included in this library (for Pascal code see this page).
Source Code Availability
Included in the Spacetrack Report No. 3 is a sample implementation in FORTRAN. You can find the Spacetrack Report No.3 at http://www.celestrak.com.
Dr TS Kelso has written a SGP4/SDP4 Pascal Library Package which is also available at http://www.celestrak.com.
Based in this package I have written an implementation in C which is available here. Please check for updates often during the next weeks, since the C package probably has some bugs.
NOTE: There seem to be updates to the SGP4/SDP4 models available which are not incorporated into this release. Therefore, please consider this package to be deprecated and take a look at http://www.centerforspace.com/downloads/ instead.
License - important legal notice
The SGP C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library 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 Lesser General Public License for more details.
Downloads - Source Code
Please note that this code probably contains some flaws. Please check often for updates during the next weeks when these bugs might be fixed.
Bug reports, patches
Feel free to report any bugs. Patches will be included in the source code for future releases if I consider them useful. You can reach me at firstname.lastname@example.org.