Documentation for C++ NORAD SGP4/SDP4 Implementation
Developed by Michael F. Henry
December, 2003

Copyright © 2003-2005. All rights reserved.

The files in this package implement the SGP4 and SDP4 algorithms described in the 
December, 1980 NORAD document "Space Track Report No. 3". The report provides 
FORTRAN IV implementations of each. These two orbital models,  one for "near-earth" 
objects and one for "deep space" objects, are widely used in satellite tracking software 
and can produce very accurate results when used with current NORAD two-line element 
datum.

The original NORAD FORTRAN IV SGP4/SDP4 implementations were converted to 
Pascal by Dr. TS Kelso in 1995. In 1996 these routines were ported in a straight-forward 
manner to C++ by Varol Okan. The SGP4/SDP4 classes here were written by Michael F. 
Henry in 2002-03 and are a modern C++ re-write of the work done by Okan. In addition 
to introducing an object-oriented architecture, the last residues of the original FORTRAN 
code (such as labels and gotos) were eradicated.

The project files were compiled using Microsoft Visual Studio 7.0. Any compiler that 
supports the C++ Standard Template Library should work, including Visual Studio 6.0. 
The project generates a single executable, SxP4Test.exe, which calculates ECI position 
and velocity information for the test element sets originally published in the NORAD 
report. Also provided as an additional example is how to use the classes to calculate the 
look angle from a location on the earth to a satellite in orbit.

Here is the correct program output:


SGP4 Test
1 88888U          80275.98708465  .00073094  13844-3  66816-4 0    8
2 88888  72.8435 115.9689 0086731  52.6988 110.5714 16.05824518  105

  TSINCE            X                Y                Z

       0.00     2328.97070437   -5995.22083333    1719.97065611
     360.00     2456.10787343   -6071.93868176    1222.89554078
     720.00     2567.56296224   -6112.50380175     713.96182588
    1080.00     2663.09017513   -6115.48274470     196.39907463
    1440.00     2742.55440194   -6079.66984186    -326.39149750

                    XDOT             YDOT             ZDOT

                   2.91207225      -0.98341531      -7.09081697
                   2.67938906      -0.44828838      -7.22879265
                   2.44024485       0.09811117      -7.31995951
                   2.19612076       0.65241695      -7.36282421
                   1.94849696       1.21107421      -7.35619305

SDP4 Test
1 11801U          80230.29629788  .01431103  00000-0  14311-1       8
2 11801  46.7916 230.4354 7318036  47.4722  10.4117  2.28537848     6

  TSINCE            X                Y                Z

       0.00     7473.37213351     428.95462549    5828.74786677
     360.00    -3305.22417985   32410.86360001  -24697.17732308
     720.00    14271.28695394   24110.46300337   -4725.76750899
    1080.00    -9990.05752318   22717.36123643  -23616.89356981
    1440.00     9787.87233694   33753.34427732  -15030.80628319

                    XDOT             YDOT             ZDOT

                   5.10715289       6.44468289      -0.18613182
                  -1.30113547      -1.15131513      -0.28333528
                  -0.32050442       2.67984097      -2.08405301
                  -1.01667268      -2.29026701       0.72892308
                  -1.09425038       0.92358954      -1.52230979

Example output:
AZ: 100.2  EL: 12.9


A brief description of important classes:

cTle – This class encapsulates a single set of NORAD two line elements.

cEci – This class encapsulates Earth-Centered Inertial coordinates and velocity for a 
given moment in time.

cOrbit – Given a cTle object, this class provides information about the orbit of the 
described satellite, including inclination, perigee, eccentricity, etc. Most importantly, it 
provides ECI coordinates/velocity for the satellite.

CSite – Describes a location on the earth. Given the ECI coordinates of a satellite, this 
class can generate Azimuth/Elevation look angles to the satellite.

cNoradBase, cNoradSGP4, cNoradSDP4 – These classes implement the NORAD 
SGP4/SDP4 algorithms. They are used by cOrbit to calculate the ECI 
coordinates/velocity of its associated satellite.

For excellent information on the underlying physics of orbits, visible satellite 
observations, current NORAD TLE data, and other related material, see 
http://www.celestrak.com which is maintained by Dr. TS Kelso.

Michael F. Henry
December, 2003
