Naughter Software Logo

SGP4PropWrappers v1.0 C++ wrapper classes to encapsulate the Astrodynamics Standards (AstroStds) libraries

 

As a extension to the author's AA+ class framework for Computational Astronomy, I was looking for open source code which would calculate the position of Artificial Satellites. What I found is that these algorithms originated in 1970 and was called Simplified General Perturbation 4 (SGP4). For the background to this algorithm, please see https://en.wikipedia.org/wiki/Simplified_perturbations_models. In 1980 this algorithm was made publically available with the publication of Spacetrack Report No. 3. This original code was implemented in Fortran. Since then there has been a number of implementations and re-implementations of SGP4 made available. Open source and commercial implementations include https://github.com/dnwrnr/sgp4, http://www.zeptomoby.com/satellites/trackLibrary.htm, https://github.com/csete/gpredict, https://www.chiandh.eu/comp/soft.html, https://ktrack.sourceforge.net, https://www.qsl.net/kd2bd/predict.html, https://github.com/KJ7LNW/sgp4sdp4, http://celestrak.org/software/tskelso-sw.php and https://github.com/Bill-Gray/sat_code. The original SGP4 implementation is now maintained by US Space Command as the Astrodynamics Standards (AstroStds) libraries. These libraries are export controlled requiring a license but a subset is freely available (in binary form) and redistributable. Included in AstroStds is C wrapper code to use it, along with support for other computer languages. SGP4PropWrappers provide a better (IMHO) C++ wrapping for the AstroStds and includes a fully reworked application to calculate a complete topocentric ephemeris for satellite passes such as the ISS.

 

The complete list of classes which SGP4PropWrappers provides are:

 

Features

 

Here is the snippet of the topocentric ephemeris generated by SGP4PropWrappers for the International Space Station for a pass over South East Ireland in late April 2024:

HQ SpOC Sgp4Prop - Version: v9.3 - Build: Jan 19 2024 - Platform: Windows 64-bit - Compiler: OneAPI ifort

EPHEMERIS GENERATED BY SGP4 USING THE WGS-72 EARTH MODEL
COORDINATE FRAME=TRUE EQUATOR AND MEAN EQUINOX OF EPOCH
USING THE FK5 MEAN OF J2000 TIME AND REFERENCE FRAME

Input File = D:\Dev\My Code\SGP4PropWrappers\input\ISS.inp
Observer Geodetic Latitude = 52.500000 Degrees
Observer Geodetic Longitude = -6.560000 Degrees
Observer Height above WGS-72 ellipsoid = 0.000000 KM
Start Time = 0.000000 minute(s) from epoch
Stop Time = 14400.000000 minute(s) from epoch
Step size = 0.500000 minute(s)
Positive satellite elevation passes only
Observer is in darkness satellite passes only

YYYYMMMDDHHMMSS.SSS TSINCE (MIN) RA (DEG) DEC (DEG) AZ (DEG) EL(DEG) RANGE (KM) RADOT (DEG/S) DECDOT (DEG/S) AZDOT (DEG/S) ELDOT (DEG/S) RANGEDOT (KM/S) SUNLIT(S) SUNLIT(O)

1 25544U 98067A 24110.51708638 +.00026201 00000 0 45835-3 0 0999
2 25544 51.6390 246.3171 0004667 76.3880 41.5560 15.5043548044944
Epoch of TLE = 2024Apr19122436.263 UTC

2024Apr20050636.263 1002.0000000 263.8471053 -35.8157907 192.1381634 0.7167164 2257.6378494 0.1508781 0.0332968 -0.1122207 0.0516575 -5.5288317 1 0
2024Apr20050706.263 1002.5000000 268.6443757 -34.7418358 188.5011614 2.2908451 2095.7244639 0.1693867 0.0385978 -0.1308174 0.0532333 -5.2541820 1 0
2024Apr20050736.263 1003.0000000 274.0365520 -33.4794562 184.2526499 3.9056006 1943.1466507 0.1905052 0.0459481 -0.1530533 0.0542920 -4.9034810 1 0
2024Apr20050806.263 1003.5000000 280.0963057 -31.9592510 179.2791772 5.5375108 1802.4691882 0.2137608 0.0558644 -0.1791483 0.0542570 -4.4573891 1 0
2024Apr20050836.263 1004.0000000 286.8718223 -30.0986532 173.4686832 7.1413797 1676.8678080 0.2379451 0.0686574 -0.2087120 0.0522501 -3.8949478 1 0
2024Apr20050906.263 1004.5000000 294.3608279 -27.8136410 166.7367134 8.6413165 1570.1236978 0.2608787 0.0840313 -0.2401913 0.0471247 -3.1977312 1 0
2024Apr20050936.263 1005.0000000 302.4813237 -25.0446766 159.0701720 9.9262181 1486.4398517 0.2794799 0.1005680 -0.2703116 0.0377595 -2.3576535 1 0
2024Apr20051006.263 1005.5000000 311.0527203 -21.7956492 150.5813912 10.8596468 1429.9762104 0.2904242 0.1154679 -0.2940758 0.0237246 -1.3874275 1 0
2024Apr20051036.263 1006.0000000 319.8059362 -18.1690458 141.5439621 11.3128137 1404.0927311 0.2913590 0.1251535 -0.3060810 0.0060628 -0.3282679 1 0
2024Apr20051106.263 1006.5000000 328.4306251 -14.3670603 132.3682707 11.2132120 1410.5105548 0.2820102 0.1268653 -0.3030632 -0.0125983 0.7536606 1 0
2024Apr20051136.263 1007.0000000 336.6427157 -10.6418920 123.5032815 10.5785167 1448.8018997 0.2643229 0.1201912 -0.2858646 -0.0291362 1.7850979 1 0
2024Apr20051206.263 1007.5000000 344.2388014 -7.2197381 115.3144437 9.5077615 1516.5230301 0.2415148 0.1071410 -0.2588978 -0.0414611 2.7082017 1 0
2024Apr20051236.263 1008.0000000 351.1148888 -4.2461228 108.0116600 8.1375446 1609.9041615 0.2168067 0.0908085 -0.2276652 -0.0491563 3.4932445 1 0
2024Apr20051306.263 1008.5000000 357.2526508 -1.7763232 101.6525535 6.5969326 1724.6976524 0.1926099 0.0739323 -0.1965672 -0.0530070 4.1368554 1 0
2024Apr20051336.263 1009.0000000 2.6910283 0.2020290 96.1901894 4.9836755 1856.8313164 0.1703418 0.0582472 -0.1681636 -0.0541959 4.6522917 1 0
2024Apr20051406.263 1009.5000000 7.4987622 1.7385001 91.5252184 3.3611127 2002.7540344 0.1506184 0.0445426 -0.1434837 -0.0537798 5.0596567 1 0
2024Apr20051436.263 1010.0000000 11.7546872 2.8961481 87.5428329 1.7652615 2159.5367042 0.1335429 0.0329858 -0.1226252 -0.0525160 5.3795738 1 0
2024Apr20051506.263 1010.5000000 15.5361488 3.7376333 84.1329366 0.2137822 2324.8363654 0.1189460 0.0234250 -0.1052407 -0.0508820 5.6302159 1 0

From the above, we can see that there will be a pass of the ISS on April 20th 2024 from 05:06 UTC to 05:15 UTC. At 5:10 UTC or 6:10 lrish Summer Time, this pass will reach a max elevation of just over 11 degrees, at a bearing of 141 Degrees (or roughly South East) and a range of 1404 KM. Please note that all date times reported in the ephemeris files are UTC.

 

The enclosed zip file contains the wrapper class source code and a simple console application which exercises the classes functionality.

 

Copyright

 

Updates

1.0 (20 April 2024)