├── .gitignore ├── Builds ├── gtg-linux-386-32b-1.0.zip ├── gtg-mac-intel-0.1.zip └── gtg-mac-intel-1.0.zip ├── Examples ├── Images │ ├── 1.png │ ├── 2.png │ ├── 3.png │ ├── 4.png │ ├── 5.png │ ├── 6.png │ └── 7.png ├── Observer.dbf ├── Observer.prj ├── Observer.qpj ├── Observer.shp ├── Observer.shx ├── README.md ├── example1.dbf ├── example1.prj ├── example1.shp ├── example1.shx ├── example2.dbf ├── example2.prj ├── example2.shp ├── example2.shx ├── example3.dbf ├── example3.prj ├── example3.shp ├── example3.shx ├── example4.dbf ├── example4.prj ├── example4.shp ├── example4.shx ├── example5.dbf ├── example5.prj ├── example5.shp ├── example5.shx ├── example6.dbf ├── example6.prj ├── example6.shp ├── example6.shx ├── example7-unsplit.dbf ├── example7-unsplit.prj ├── example7-unsplit.shp ├── example7-unsplit.shx ├── example7.dbf ├── example7.prj ├── example7.shp ├── example7.shx └── geoeye1.tle ├── LICENSE ├── Libraries ├── README.md ├── sgp4 │ ├── .hg_archival.txt │ ├── .hgignore │ ├── .hgtags │ ├── AUTHORS │ ├── COPYING │ ├── ChangeLog │ ├── INSTALL │ ├── Makefile.am │ ├── Makefile.in │ ├── NEWS │ ├── README │ ├── SGP4-VER.TLE │ ├── aclocal.m4 │ ├── autom4te.cache │ │ ├── output.0 │ │ ├── output.1 │ │ ├── traces.0 │ │ └── traces.1 │ ├── configure │ ├── configure.ac │ ├── depcomp │ ├── install-sh │ ├── libsgp4 │ │ ├── .deps │ │ │ ├── CoordGeodetic.Po │ │ │ ├── CoordTopocentric.Po │ │ │ ├── DateTime.Po │ │ │ ├── Eci.Po │ │ │ ├── Globals.Po │ │ │ ├── Observer.Po │ │ │ ├── OrbitalElements.Po │ │ │ ├── SGP4.Po │ │ │ ├── SolarPosition.Po │ │ │ ├── TimeSpan.Po │ │ │ ├── Tle.Po │ │ │ ├── Util.Po │ │ │ └── Vector.Po │ │ ├── CoordGeodetic.cpp │ │ ├── CoordGeodetic.h │ │ ├── CoordTopocentric.cpp │ │ ├── CoordTopocentric.h │ │ ├── DateTime.cpp │ │ ├── DateTime.h │ │ ├── DecayedException.h │ │ ├── Eci.cpp │ │ ├── Eci.h │ │ ├── Globals.cpp │ │ ├── Globals.h │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── Observer.cpp │ │ ├── Observer.h │ │ ├── OrbitalElements.cpp │ │ ├── OrbitalElements.h │ │ ├── SGP4.cpp │ │ ├── SGP4.h │ │ ├── SatelliteException.h │ │ ├── SolarPosition.cpp │ │ ├── SolarPosition.h │ │ ├── TimeSpan.cpp │ │ ├── TimeSpan.h │ │ ├── Tle.cpp │ │ ├── Tle.h │ │ ├── TleException.h │ │ ├── Util.cpp │ │ ├── Util.h │ │ ├── Vector.cpp │ │ └── Vector.h │ ├── missing │ ├── passpredict │ │ ├── .deps │ │ │ └── passpredict.Po │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ └── passpredict.cpp │ ├── runtest │ │ ├── .deps │ │ │ └── runtest.Po │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── SGP4-VER.TLE │ │ ├── runtest.cpp │ │ └── runtest.out.txt │ └── sattrack │ │ ├── .deps │ │ └── sattrack.Po │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ └── sattrack.cpp └── shapelib │ ├── .cvsignore │ ├── ChangeLog │ ├── HOWTO-RELEASE │ ├── LICENSE.LGPL │ ├── Makefile │ ├── README │ ├── README.tree │ ├── contrib │ ├── .cvsignore │ ├── Makefile │ ├── ShapeFileII.pas │ ├── Shape_PointInPoly.cpp │ ├── Shape_PointInPoly_README.txt │ ├── csv2shp.c │ ├── dbfcat.c │ ├── dbfinfo.c │ ├── doc │ │ └── shpproj.txt │ ├── makefile.vc │ ├── my_nan.h │ ├── shpcat.c │ ├── shpcentrd.c │ ├── shpdata.c │ ├── shpdxf.c │ ├── shpfix.c │ ├── shpgeo.c │ ├── shpgeo.h │ ├── shpinfo.c │ ├── shpproj.c │ ├── shpsort.c │ ├── shpsort.txt │ ├── shpwkb.c │ └── tests │ │ └── shpproj.sh │ ├── dbfadd.c │ ├── dbfcreate.c │ ├── dbfdump.c │ ├── dbfopen.c │ ├── makefile.vc │ ├── makeshape.sh │ ├── mkdist.sh │ ├── mkinstalldirs │ ├── mkrelease.sh │ ├── safileio.c │ ├── shapefil.h │ ├── shapelib.def │ ├── shpadd.c │ ├── shpcreate.c │ ├── shpdump.c │ ├── shpopen.c │ ├── shprewind.c │ ├── shptest.c │ ├── shptree.c │ ├── shptreedump.c │ ├── shputils.c │ ├── stream1.out │ ├── stream1.sh │ ├── stream2.out │ ├── stream2.sh │ ├── stream3.out │ └── web │ ├── .cvsignore │ ├── codepage.html │ ├── dbf_api.html │ ├── index.html │ ├── license.html │ ├── manifest.html │ ├── release.html │ ├── shapelib-tools.html │ └── shp_api.html ├── Makefile ├── README.md ├── Source ├── Makefile ├── Usage.txt ├── gtg.cpp ├── gtg.h ├── gtgattr.cpp ├── gtgattr.h ├── gtgshp.cpp ├── gtgshp.h ├── gtgtle.cpp ├── gtgtle.h ├── gtgtrace.cpp ├── gtgtrace.h ├── gtgutil.cpp └── gtgutil.h └── test ├── cases ├── 10 │ ├── 10.tle │ └── 10.txt ├── 11 │ ├── 11.tle │ └── 11.txt ├── 12 │ ├── 12.tle │ └── 12.txt ├── 13 │ ├── 13.tle │ └── 13.txt ├── 14 │ ├── 14.tle │ └── 14.txt ├── 15 │ ├── 15.tle │ └── 15.txt ├── 16 │ ├── 16.tle │ └── 16.txt ├── 17 │ ├── 17.tle │ └── 17.txt ├── 18 │ ├── 18.tle │ └── 18.txt ├── 19 │ ├── 19.tle │ └── 19.txt ├── 20 │ ├── 20.tle │ └── 20.txt ├── 21 │ ├── 21.tle │ └── 21.txt ├── 22 │ ├── 22.tle │ └── 22.txt ├── 23 │ ├── 23.tle │ └── 23.txt ├── 24 │ ├── 24.tle │ └── 24.txt ├── 25 │ ├── 25.tle │ └── 25.txt ├── 26 │ ├── 26.tle │ └── 26.txt ├── 27 │ ├── 27.tle │ └── 27.txt ├── 28 │ ├── 28.tle │ └── 28.txt ├── 29 │ ├── 29.tle │ └── 29.txt ├── 30 │ ├── 30.lib.txt │ ├── 30.rsr.txt │ ├── 30.tle │ └── 30.txt ├── 31 │ ├── 31.tle │ └── 31.txt ├── 32 │ ├── 32.tle │ └── 32.txt ├── 33 │ ├── 33.tle │ └── 33.txt ├── 01 │ ├── 01.tle │ └── 01.txt ├── 02 │ ├── 02.tle │ └── 02.txt ├── 03 │ ├── 03.tle │ └── 03.txt ├── 04 │ ├── 04.tle │ └── 04.txt ├── 05 │ ├── 05.tle │ └── 05.txt ├── 06 │ ├── 06.tle │ └── 06.txt ├── 07 │ ├── 07.tle │ └── 07.txt ├── 08 │ ├── 08.tle │ └── 08.txt ├── 09 │ ├── 09.tle │ └── 09.txt ├── Makefile ├── README.md ├── difftable.tcl ├── gtg-vs-reference.diff ├── librefdiff.txt ├── librsrdiff.txt ├── test-gtg.txt ├── test-library.txt ├── test-reference.txt ├── test-rsr.txt └── test.tcl ├── images ├── README.md ├── comparison.png ├── elevation-trace.png ├── iss-orthographic.png ├── iss.png ├── iss2.png └── ls83.png ├── iss.dbf ├── iss.shp ├── iss.shx ├── options ├── README.md ├── iss.tle ├── stations.tle └── test.tcl └── solar ├── Makefile └── solarposition.cpp /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore executable, intermediate object code, and libraries 2 | /gtg 3 | *.o 4 | *.a 5 | 6 | # Ignore test files unless explicitly added as examples 7 | /test 8 | 9 | # Ignore Reference directory (contains TLE/SGP4 documentation and papers) 10 | /Reference 11 | 12 | # Ignore OS litter 13 | .DS_Store 14 | 15 | # Ignore libsgp4 aclocal/automake/configure-specific files & settings 16 | /Libraries/sgp4/Makefile 17 | /Libraries/sgp4/autom4te.cache/requests 18 | /Libraries/sgp4/config.log 19 | /Libraries/sgp4/config.status 20 | /Libraries/sgp4/libsgp4/Makefile 21 | /Libraries/sgp4/passpredict/Makefile 22 | /Libraries/sgp4/runtest/Makefile 23 | /Libraries/sgp4/sattrack/Makefile 24 | 25 | # Ignore binary utilities built with libraries 26 | /Libraries/sgp4/passpredict/passpredict 27 | /Libraries/sgp4/runtest/runtest 28 | /Libraries/sgp4/sattrack/sattrack 29 | /Libraries/shapelib/dbfdump 30 | -------------------------------------------------------------------------------- /Builds/gtg-linux-386-32b-1.0.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Builds/gtg-linux-386-32b-1.0.zip -------------------------------------------------------------------------------- /Builds/gtg-mac-intel-0.1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Builds/gtg-mac-intel-0.1.zip -------------------------------------------------------------------------------- /Builds/gtg-mac-intel-1.0.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Builds/gtg-mac-intel-1.0.zip -------------------------------------------------------------------------------- /Examples/Images/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/Images/1.png -------------------------------------------------------------------------------- /Examples/Images/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/Images/2.png -------------------------------------------------------------------------------- /Examples/Images/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/Images/3.png -------------------------------------------------------------------------------- /Examples/Images/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/Images/4.png -------------------------------------------------------------------------------- /Examples/Images/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/Images/5.png -------------------------------------------------------------------------------- /Examples/Images/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/Images/6.png -------------------------------------------------------------------------------- /Examples/Images/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/Images/7.png -------------------------------------------------------------------------------- /Examples/Observer.dbf: -------------------------------------------------------------------------------- 1 | _a1WLATNLONN 42.102221999999998 -75.911666999999994 -------------------------------------------------------------------------------- /Examples/Observer.prj: -------------------------------------------------------------------------------- 1 | PROJCS["WGS_84_World_Mercator",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Mercator"],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1],PARAMETER["standard_parallel_1",0.0]] -------------------------------------------------------------------------------- /Examples/Observer.qpj: -------------------------------------------------------------------------------- 1 | PROJCS["WGS 84 / World Mercator",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","3395"]] 2 | -------------------------------------------------------------------------------- /Examples/Observer.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/Observer.shp -------------------------------------------------------------------------------- /Examples/Observer.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/Observer.shx -------------------------------------------------------------------------------- /Examples/example1.dbf: -------------------------------------------------------------------------------- 1 | _A WFIDN 2 | 0 -------------------------------------------------------------------------------- /Examples/example1.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4322"]] 2 | -------------------------------------------------------------------------------- /Examples/example1.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/example1.shp -------------------------------------------------------------------------------- /Examples/example1.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/example1.shx -------------------------------------------------------------------------------- /Examples/example2.dbf: -------------------------------------------------------------------------------- 1 | _ZA WFIDN 2 | 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 -------------------------------------------------------------------------------- /Examples/example2.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4322"]] 2 | -------------------------------------------------------------------------------- /Examples/example2.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/example2.shp -------------------------------------------------------------------------------- /Examples/example2.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/example2.shx -------------------------------------------------------------------------------- /Examples/example3.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/example3.dbf -------------------------------------------------------------------------------- /Examples/example3.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4322"]] 2 | -------------------------------------------------------------------------------- /Examples/example3.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/example3.shp -------------------------------------------------------------------------------- /Examples/example3.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/example3.shx -------------------------------------------------------------------------------- /Examples/example4.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/example4.dbf -------------------------------------------------------------------------------- /Examples/example4.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4322"]] 2 | -------------------------------------------------------------------------------- /Examples/example4.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/example4.shp -------------------------------------------------------------------------------- /Examples/example4.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/example4.shx -------------------------------------------------------------------------------- /Examples/example5.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/example5.dbf -------------------------------------------------------------------------------- /Examples/example5.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4322"]] 2 | -------------------------------------------------------------------------------- /Examples/example5.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/example5.shp -------------------------------------------------------------------------------- /Examples/example5.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/example5.shx -------------------------------------------------------------------------------- /Examples/example6.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/example6.dbf -------------------------------------------------------------------------------- /Examples/example6.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4322"]] 2 | -------------------------------------------------------------------------------- /Examples/example6.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/example6.shp -------------------------------------------------------------------------------- /Examples/example6.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/example6.shx -------------------------------------------------------------------------------- /Examples/example7-unsplit.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/example7-unsplit.dbf -------------------------------------------------------------------------------- /Examples/example7-unsplit.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4322"]] 2 | -------------------------------------------------------------------------------- /Examples/example7-unsplit.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/example7-unsplit.shp -------------------------------------------------------------------------------- /Examples/example7-unsplit.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/example7-unsplit.shx -------------------------------------------------------------------------------- /Examples/example7.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/example7.dbf -------------------------------------------------------------------------------- /Examples/example7.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4322"]] 2 | -------------------------------------------------------------------------------- /Examples/example7.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/example7.shp -------------------------------------------------------------------------------- /Examples/example7.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Examples/example7.shx -------------------------------------------------------------------------------- /Examples/geoeye1.tle: -------------------------------------------------------------------------------- 1 | GEOEYE 1 2 | 1 33331U 08042A 12091.09077403 .00000328 00000-0 70846-4 0 9565 3 | 2 33331 98.1132 165.3484 0011197 115.0161 245.2220 14.64451624190457 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Jim DeVona 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /Libraries/README.md: -------------------------------------------------------------------------------- 1 | # Libraries 2 | 3 | Ground Track Generator has two external dependencies: [Shapelib](http://shapelib.maptools.org/) and Dan Warner's [C++ SGP4 Satellite Library](http://www.danrw.com/sgp4-satellite.php). 4 | 5 | ## Shapelib 6 | 7 | 1. Go to and download from 8 | 2. Unzip the archive; rename the directory `shapelib` and put it in this directory. 9 | 10 | ## Dan Warner's C++ SGP4 Satellite Library 11 | 12 | 1. Go to and download 13 | 2. Unzip the archive; rename the directory `sgp4` and put it in this directory. 14 | 15 | Note that it may be necessary to [re-]run `aclocal`, `automake`, and `./configure` in `sgp4` before it can be built with `make`. 16 | -------------------------------------------------------------------------------- /Libraries/sgp4/.hg_archival.txt: -------------------------------------------------------------------------------- 1 | repo: 2e03ee3ea61cfd974f0a00b281e117f8e7afb60f 2 | node: 94c5f78b9e4071ce228f23b8f46bb34d951f3f94 3 | branch: default 4 | latesttag: v1.0 5 | latesttagdistance: 10 6 | -------------------------------------------------------------------------------- /Libraries/sgp4/.hgignore: -------------------------------------------------------------------------------- 1 | # Exact paths to config junk 2 | ^config.(h|log|status|guess|sub)$ 3 | 4 | # Build artifacts 5 | ^libsgp4/libsgp4.a$ 6 | ^passpredict/passpredict$ 7 | ^runtest/runtest$ 8 | ^sattrack/sattrack$ 9 | .(deps|libs)/*$ 10 | .cmp$ 11 | autom4te.cache/*$ 12 | doxygen/*$ 13 | 14 | Makefile(.in)?$ 15 | .(deps|libs)$ 16 | \.l?o$ 17 | 18 | # Merged files 19 | \.orig$ 20 | 21 | # Backup files 22 | .*~$ 23 | -------------------------------------------------------------------------------- /Libraries/sgp4/.hgtags: -------------------------------------------------------------------------------- 1 | 85e07bf8b43e0e1312fdb6e288bf08b5b3b017be v1.0 2 | -------------------------------------------------------------------------------- /Libraries/sgp4/AUTHORS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Libraries/sgp4/AUTHORS -------------------------------------------------------------------------------- /Libraries/sgp4/ChangeLog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Libraries/sgp4/ChangeLog -------------------------------------------------------------------------------- /Libraries/sgp4/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = libsgp4 sattrack runtest passpredict 2 | -------------------------------------------------------------------------------- /Libraries/sgp4/NEWS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Libraries/sgp4/NEWS -------------------------------------------------------------------------------- /Libraries/sgp4/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Libraries/sgp4/README -------------------------------------------------------------------------------- /Libraries/sgp4/configure.ac: -------------------------------------------------------------------------------- 1 | AC_PREREQ([2.61]) 2 | AC_INIT([sgp4], 1.0, [info@danrw.com]) 3 | AM_INIT_AUTOMAKE 4 | AM_SILENT_RULES([yes]) 5 | 6 | AC_CONFIG_SRCDIR([libsgp4/Tle.cpp]) 7 | 8 | CFLAGS=" $CFLAGS" 9 | CXXFLAGS=" $CXXFLAGS" 10 | 11 | AC_PROG_RANLIB 12 | AC_PROG_CXX 13 | 14 | AC_ARG_ENABLE(debug, 15 | AC_HELP_STRING([--enable-debug], 16 | [build debug library (default=no)]) 17 | , 18 | , 19 | enable_debug=no) 20 | 21 | if test x$enable_debug = xyes; then 22 | AM_CXXFLAGS="-g -O0 -Werror -Wextra -W -Wall -Wconversion" 23 | else 24 | AM_CXXFLAGS="-DNDEBUG -O2 -fomit-frame-pointer -Wextra -Werror -W -Wall -Wconversion" 25 | fi 26 | 27 | AC_SEARCH_LIBS([clock_gettime], 28 | [rt], 29 | [AC_DEFINE(HAVE_CLOCK_GETTIME, 30 | [1], 31 | [Define if clock_gettime is available.])]) 32 | 33 | AC_SUBST(AM_CXXFLAGS) 34 | 35 | AC_CONFIG_FILES([Makefile 36 | libsgp4/Makefile 37 | passpredict/Makefile 38 | runtest/Makefile 39 | sattrack/Makefile]) 40 | 41 | AC_OUTPUT 42 | echo "---" 43 | echo "Configuration summary for $PACKAGE_NAME version $VERSION" 44 | echo "" 45 | echo " * Installation prefix: $prefix" 46 | echo " * System type: $build_vendor-$build_os" 47 | echo " * Host CPU: $build_cpu" 48 | echo " C Compiler: ${CC}" 49 | echo " C++ Compiler: ${CXX}" 50 | echo " Compiler flags: ${AM_CXXFLAGS}" 51 | echo " Linker flags: ${AM_LDFLAGS}" 52 | echo " Libraries: ${LIBS}" 53 | echo " Debug enabled: $enable_debug" 54 | echo "" 55 | echo "---" 56 | -------------------------------------------------------------------------------- /Libraries/sgp4/libsgp4/.deps/Globals.Po: -------------------------------------------------------------------------------- 1 | Globals.o: Globals.cpp Globals.h /usr/include/c++/4.7/cmath \ 2 | /usr/include/c++/4.7/i686-linux-gnu/bits/c++config.h \ 3 | /usr/include/c++/4.7/i686-linux-gnu/bits/os_defines.h \ 4 | /usr/include/features.h /usr/include/i386-linux-gnu/bits/predefs.h \ 5 | /usr/include/i386-linux-gnu/sys/cdefs.h \ 6 | /usr/include/i386-linux-gnu/bits/wordsize.h \ 7 | /usr/include/i386-linux-gnu/gnu/stubs.h \ 8 | /usr/include/i386-linux-gnu/gnu/stubs-32.h \ 9 | /usr/include/c++/4.7/i686-linux-gnu/bits/cpu_defines.h \ 10 | /usr/include/c++/4.7/bits/cpp_type_traits.h \ 11 | /usr/include/c++/4.7/ext/type_traits.h /usr/include/math.h \ 12 | /usr/include/i386-linux-gnu/bits/huge_val.h \ 13 | /usr/include/i386-linux-gnu/bits/huge_valf.h \ 14 | /usr/include/i386-linux-gnu/bits/huge_vall.h \ 15 | /usr/include/i386-linux-gnu/bits/inf.h \ 16 | /usr/include/i386-linux-gnu/bits/nan.h \ 17 | /usr/include/i386-linux-gnu/bits/mathdef.h \ 18 | /usr/include/i386-linux-gnu/bits/mathcalls.h \ 19 | /usr/include/i386-linux-gnu/bits/mathinline.h 20 | 21 | Globals.h: 22 | 23 | /usr/include/c++/4.7/cmath: 24 | 25 | /usr/include/c++/4.7/i686-linux-gnu/bits/c++config.h: 26 | 27 | /usr/include/c++/4.7/i686-linux-gnu/bits/os_defines.h: 28 | 29 | /usr/include/features.h: 30 | 31 | /usr/include/i386-linux-gnu/bits/predefs.h: 32 | 33 | /usr/include/i386-linux-gnu/sys/cdefs.h: 34 | 35 | /usr/include/i386-linux-gnu/bits/wordsize.h: 36 | 37 | /usr/include/i386-linux-gnu/gnu/stubs.h: 38 | 39 | /usr/include/i386-linux-gnu/gnu/stubs-32.h: 40 | 41 | /usr/include/c++/4.7/i686-linux-gnu/bits/cpu_defines.h: 42 | 43 | /usr/include/c++/4.7/bits/cpp_type_traits.h: 44 | 45 | /usr/include/c++/4.7/ext/type_traits.h: 46 | 47 | /usr/include/math.h: 48 | 49 | /usr/include/i386-linux-gnu/bits/huge_val.h: 50 | 51 | /usr/include/i386-linux-gnu/bits/huge_valf.h: 52 | 53 | /usr/include/i386-linux-gnu/bits/huge_vall.h: 54 | 55 | /usr/include/i386-linux-gnu/bits/inf.h: 56 | 57 | /usr/include/i386-linux-gnu/bits/nan.h: 58 | 59 | /usr/include/i386-linux-gnu/bits/mathdef.h: 60 | 61 | /usr/include/i386-linux-gnu/bits/mathcalls.h: 62 | 63 | /usr/include/i386-linux-gnu/bits/mathinline.h: 64 | -------------------------------------------------------------------------------- /Libraries/sgp4/libsgp4/CoordGeodetic.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Daniel Warner 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #include "CoordGeodetic.h" 19 | -------------------------------------------------------------------------------- /Libraries/sgp4/libsgp4/CoordTopocentric.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Daniel Warner 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #include "CoordTopocentric.h" 19 | -------------------------------------------------------------------------------- /Libraries/sgp4/libsgp4/DecayedException.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Daniel Warner 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #ifndef DECAYEDEXCEPTION_H_ 19 | #define DECAYEDEXCEPTION_H_ 20 | 21 | #include "DateTime.h" 22 | #include "Vector.h" 23 | 24 | #include 25 | 26 | /** 27 | * @brief The exception that the SGP4 class throws when a satellite decays. 28 | */ 29 | class DecayedException : public std::exception 30 | { 31 | public: 32 | /** 33 | * Constructor 34 | * @param[in] dt time of the event 35 | * @param[in] pos position of the satellite at dt 36 | * @param[in] vel velocity of the satellite at dt 37 | */ 38 | DecayedException(const DateTime& dt, const Vector& pos, const Vector& vel) 39 | : _dt(dt), _pos(pos), _vel(vel) 40 | { 41 | } 42 | 43 | /** 44 | * Destructor 45 | */ 46 | virtual ~DecayedException(void) throw () 47 | { 48 | } 49 | 50 | /** 51 | * @returns the error string 52 | */ 53 | virtual const char* what() const throw () 54 | { 55 | return "Error: Satellite decayed"; 56 | } 57 | 58 | /** 59 | * @returns the date 60 | */ 61 | DateTime Decayed() const 62 | { 63 | return _dt; 64 | } 65 | 66 | /** 67 | * @returns the position 68 | */ 69 | Vector Position() const 70 | { 71 | return _pos; 72 | } 73 | 74 | /** 75 | * @returns the velocity 76 | */ 77 | Vector Velocity() const 78 | { 79 | return _vel; 80 | } 81 | 82 | private: 83 | DateTime _dt; 84 | Vector _pos; 85 | Vector _vel; 86 | }; 87 | 88 | #endif 89 | -------------------------------------------------------------------------------- /Libraries/sgp4/libsgp4/Eci.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Daniel Warner 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #include "Eci.h" 19 | 20 | #include "Globals.h" 21 | #include "Util.h" 22 | 23 | /** 24 | * Converts a DateTime and Geodetic position to Eci coordinates 25 | * @param[in] dt the date 26 | * @param[in] geo the geodetic position 27 | */ 28 | void Eci::ToEci(const DateTime& dt, const CoordGeodetic &geo) 29 | { 30 | /* 31 | * set date 32 | */ 33 | m_dt = dt; 34 | 35 | static const double mfactor = kTWOPI * (kOMEGA_E / kSECONDS_PER_DAY); 36 | 37 | /* 38 | * Calculate Local Mean Sidereal Time for observers longitude 39 | */ 40 | const double theta = m_dt.ToLocalMeanSiderealTime(geo.longitude); 41 | 42 | /* 43 | * take into account earth flattening 44 | */ 45 | const double c = 1.0 46 | / sqrt(1.0 + kF * (kF - 2.0) * pow(sin(geo.latitude), 2.0)); 47 | const double s = pow(1.0 - kF, 2.0) * c; 48 | const double achcp = (kXKMPER * c + geo.altitude) * cos(geo.latitude); 49 | 50 | /* 51 | * X position in km 52 | * Y position in km 53 | * Z position in km 54 | * W magnitude in km 55 | */ 56 | m_position.x = achcp * cos(theta); 57 | m_position.y = achcp * sin(theta); 58 | m_position.z = (kXKMPER * s + geo.altitude) * sin(geo.latitude); 59 | m_position.w = m_position.Magnitude(); 60 | 61 | /* 62 | * X velocity in km/s 63 | * Y velocity in km/s 64 | * Z velocity in km/s 65 | * W magnitude in km/s 66 | */ 67 | m_velocity.x = -mfactor * m_position.y; 68 | m_velocity.y = mfactor * m_position.x; 69 | m_velocity.z = 0.0; 70 | m_velocity.w = m_velocity.Magnitude(); 71 | } 72 | 73 | /** 74 | * @returns the position in geodetic form 75 | */ 76 | CoordGeodetic Eci::ToGeodetic() const 77 | { 78 | const double theta = Util::AcTan(m_position.y, m_position.x); 79 | 80 | const double lon = Util::WrapNegPosPI(theta 81 | - m_dt.ToGreenwichSiderealTime()); 82 | 83 | const double r = sqrt((m_position.x * m_position.x) 84 | + (m_position.y * m_position.y)); 85 | 86 | static const double e2 = kF * (2.0 - kF); 87 | 88 | double lat = Util::AcTan(m_position.z, r); 89 | double phi = 0.0; 90 | double c = 0.0; 91 | int cnt = 0; 92 | 93 | do 94 | { 95 | phi = lat; 96 | const double sinphi = sin(phi); 97 | c = 1.0 / sqrt(1.0 - e2 * sinphi * sinphi); 98 | lat = Util::AcTan(m_position.z + kXKMPER * c * e2 * sinphi, r); 99 | cnt++; 100 | } 101 | while (fabs(lat - phi) >= 1e-10 && cnt < 10); 102 | 103 | const double alt = r / cos(lat) - kXKMPER * c; 104 | 105 | return CoordGeodetic(lat, lon, alt, true); 106 | } 107 | -------------------------------------------------------------------------------- /Libraries/sgp4/libsgp4/Eci.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Daniel Warner 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #ifndef ECI_H_ 19 | #define ECI_H_ 20 | 21 | #include "CoordGeodetic.h" 22 | #include "Vector.h" 23 | #include "DateTime.h" 24 | 25 | /** 26 | * @brief Stores an Earth-centered inertial position for a particular time. 27 | */ 28 | class Eci 29 | { 30 | public: 31 | 32 | /** 33 | * @param[in] dt the date to be used for this position 34 | * @param[in] latitude the latitude in degrees 35 | * @param[in] longitude the longitude in degrees 36 | * @param[in] altitude the altitude in kilometers 37 | */ 38 | Eci(const DateTime& dt, 39 | const double latitude, 40 | const double longitude, 41 | const double altitude) 42 | { 43 | ToEci(dt, CoordGeodetic(latitude, longitude, altitude)); 44 | } 45 | 46 | /** 47 | * @param[in] dt the date to be used for this position 48 | * @param[in] geo the position 49 | */ 50 | Eci(const DateTime& dt, const CoordGeodetic& geo) 51 | { 52 | ToEci(dt, geo); 53 | } 54 | 55 | /** 56 | * @param[in] dt the date to be used for this position 57 | * @param[in] position 58 | */ 59 | Eci(const DateTime &dt, const Vector &position) 60 | : m_dt(dt), 61 | m_position(position) 62 | { 63 | } 64 | 65 | /** 66 | * @param[in] dt the date to be used for this position 67 | * @param[in] position the position 68 | * @param[in] velocity the velocity 69 | */ 70 | Eci(const DateTime &dt, const Vector &position, const Vector &velocity) 71 | : m_dt(dt), 72 | m_position(position), 73 | m_velocity(velocity) 74 | { 75 | } 76 | 77 | /** 78 | * Destructor 79 | */ 80 | virtual ~Eci() 81 | { 82 | } 83 | 84 | /** 85 | * Equality operator 86 | * @param dt the date to compare 87 | * @returns true if the object matches 88 | */ 89 | bool operator==(const DateTime& dt) const 90 | { 91 | return m_dt == dt; 92 | } 93 | 94 | /** 95 | * Inequality operator 96 | * @param dt the date to compare 97 | * @returns true if the object doesn't match 98 | */ 99 | bool operator!=(const DateTime& dt) const 100 | { 101 | return m_dt != dt; 102 | } 103 | 104 | /** 105 | * Update this object with a new date and geodetic position 106 | * @param dt new date 107 | * @param geo new geodetic position 108 | */ 109 | void Update(const DateTime& dt, const CoordGeodetic& geo) 110 | { 111 | ToEci(dt, geo); 112 | } 113 | 114 | /** 115 | * @returns the position 116 | */ 117 | Vector Position() const 118 | { 119 | return m_position; 120 | } 121 | 122 | /** 123 | * @returns the velocity 124 | */ 125 | Vector Velocity() const 126 | { 127 | return m_velocity; 128 | } 129 | 130 | /** 131 | * @returns the date 132 | */ 133 | DateTime GetDateTime() const 134 | { 135 | return m_dt; 136 | } 137 | 138 | /** 139 | * @returns the position in geodetic form 140 | */ 141 | CoordGeodetic ToGeodetic() const; 142 | 143 | private: 144 | void ToEci(const DateTime& dt, const CoordGeodetic& geo); 145 | 146 | DateTime m_dt; 147 | Vector m_position; 148 | Vector m_velocity; 149 | }; 150 | 151 | #endif 152 | -------------------------------------------------------------------------------- /Libraries/sgp4/libsgp4/Globals.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Daniel Warner 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #include "Globals.h" 19 | -------------------------------------------------------------------------------- /Libraries/sgp4/libsgp4/Globals.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Daniel Warner 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #ifndef GLOBALS_H_ 19 | #define GLOBALS_H_ 20 | 21 | #include 22 | 23 | const double kAE = 1.0; 24 | const double kQ0 = 120.0; 25 | const double kS0 = 78.0; 26 | const double kMU = 398600.8; 27 | const double kXKMPER = 6378.135; 28 | const double kXJ2 = 1.082616e-3; 29 | const double kXJ3 = -2.53881e-6; 30 | const double kXJ4 = -1.65597e-6; 31 | 32 | /* 33 | * alternative XKE 34 | * affects final results 35 | * aiaa-2006-6573 36 | * const double kXKE = 60.0 / sqrt(kXKMPER * kXKMPER * kXKMPER / kMU); 37 | * dundee 38 | * const double kXKE = 7.43669161331734132e-2; 39 | */ 40 | const double kXKE = 60.0 / sqrt(kXKMPER * kXKMPER * kXKMPER / kMU); 41 | const double kCK2 = 0.5 * kXJ2 * kAE * kAE; 42 | const double kCK4 = -0.375 * kXJ4 * kAE * kAE * kAE * kAE; 43 | 44 | /* 45 | * alternative QOMS2T 46 | * affects final results 47 | * aiaa-2006-6573 48 | * #define QOMS2T (pow(((Q0 - S0) / XKMPER), 4.0)) 49 | * dundee 50 | * #define QOMS2T (1.880279159015270643865e-9) 51 | */ 52 | const double kQOMS2T = pow(((kQ0 - kS0) / kXKMPER), 4.0); 53 | 54 | const double kS = kAE * (1.0 + kS0 / kXKMPER); 55 | const double kPI = 3.14159265358979323846264338327950288419716939937510582; 56 | const double kTWOPI = 2.0 * kPI; 57 | const double kTWOTHIRD = 2.0 / 3.0; 58 | const double kTHDT = 4.37526908801129966e-3; 59 | /* 60 | * earth flattening 61 | */ 62 | const double kF = 1.0 / 298.26; 63 | /* 64 | * earth rotation per sideral day 65 | */ 66 | const double kOMEGA_E = 1.00273790934; 67 | const double kAU = 1.49597870691e8; 68 | 69 | const double kSECONDS_PER_DAY = 86400.0; 70 | const double kMINUTES_PER_DAY = 1440.0; 71 | const double kHOURS_PER_DAY = 24.0; 72 | 73 | // Jan 1.0 1900 = Jan 1 1900 00h UTC 74 | const double kEPOCH_JAN1_00H_1900 = 2415019.5; 75 | 76 | // Jan 1.5 1900 = Jan 1 1900 12h UTC 77 | const double kEPOCH_JAN1_12H_1900 = 2415020.0; 78 | 79 | // Jan 1.5 2000 = Jan 1 2000 12h UTC 80 | const double kEPOCH_JAN1_12H_2000 = 2451545.0; 81 | 82 | #endif 83 | 84 | -------------------------------------------------------------------------------- /Libraries/sgp4/libsgp4/Makefile.am: -------------------------------------------------------------------------------- 1 | lib_LIBRARIES = libsgp4.a 2 | libsgp4_a_SOURCES = \ 3 | CoordGeodetic.cpp \ 4 | CoordTopocentric.cpp \ 5 | DateTime.cpp \ 6 | Eci.cpp \ 7 | Globals.cpp \ 8 | Observer.cpp \ 9 | OrbitalElements.cpp \ 10 | SGP4.cpp \ 11 | SolarPosition.cpp \ 12 | TimeSpan.cpp \ 13 | Tle.cpp \ 14 | Util.cpp \ 15 | Vector.cpp 16 | include_HEADERS = CoordGeodetic.h \ 17 | Eci.h \ 18 | OrbitalElements.h \ 19 | SatelliteException.h \ 20 | TleException.h \ 21 | Vector.h \ 22 | CoordTopocentric.h \ 23 | Globals.h \ 24 | Observer.h \ 25 | SGP4.h \ 26 | SolarPosition.h \ 27 | Tle.h \ 28 | Util.h \ 29 | TimeSpan.h \ 30 | DateTime.h 31 | -------------------------------------------------------------------------------- /Libraries/sgp4/libsgp4/Observer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Daniel Warner 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #include "Observer.h" 19 | 20 | #include "CoordTopocentric.h" 21 | 22 | /* 23 | * calculate lookangle between the observer and the passed in Eci object 24 | */ 25 | CoordTopocentric Observer::GetLookAngle(const Eci &eci) 26 | { 27 | /* 28 | * update the observers Eci to match the time of the Eci passed in 29 | * if necessary 30 | */ 31 | Update(eci.GetDateTime()); 32 | 33 | /* 34 | * calculate differences 35 | */ 36 | Vector range_rate = eci.Velocity() - m_eci.Velocity(); 37 | Vector range = eci.Position() - m_eci.Position(); 38 | 39 | range.w = range.Magnitude(); 40 | 41 | /* 42 | * Calculate Local Mean Sidereal Time for observers longitude 43 | */ 44 | double theta = eci.GetDateTime().ToLocalMeanSiderealTime(m_geo.longitude); 45 | 46 | double sin_lat = sin(m_geo.latitude); 47 | double cos_lat = cos(m_geo.latitude); 48 | double sin_theta = sin(theta); 49 | double cos_theta = cos(theta); 50 | 51 | double top_s = sin_lat * cos_theta * range.x 52 | + sin_lat * sin_theta * range.y - cos_lat * range.z; 53 | double top_e = -sin_theta * range.x 54 | + cos_theta * range.y; 55 | double top_z = cos_lat * cos_theta * range.x 56 | + cos_lat * sin_theta * range.y + sin_lat * range.z; 57 | double az = atan(-top_e / top_s); 58 | 59 | if (top_s > 0.0) 60 | { 61 | az += kPI; 62 | } 63 | 64 | if (az < 0.0) 65 | { 66 | az += 2.0 * kPI; 67 | } 68 | 69 | double el = asin(top_z / range.w); 70 | double rate = range.Dot(range_rate) / range.w; 71 | 72 | /* 73 | * azimuth in radians 74 | * elevation in radians 75 | * range in km 76 | * range rate in km/s 77 | */ 78 | return CoordTopocentric(az, 79 | el, 80 | range.w, 81 | rate); 82 | } 83 | -------------------------------------------------------------------------------- /Libraries/sgp4/libsgp4/Observer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Daniel Warner 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #ifndef OBSERVER_H_ 19 | #define OBSERVER_H_ 20 | 21 | #include "CoordGeodetic.h" 22 | #include "Eci.h" 23 | 24 | class DateTime; 25 | class CoordTopocentric; 26 | 27 | /** 28 | * @brief Stores an observers location in Eci coordinates. 29 | */ 30 | class Observer 31 | { 32 | public: 33 | /** 34 | * Constructor 35 | * @param[in] latitude observers latitude in degrees 36 | * @param[in] longitude observers longitude in degrees 37 | * @param[in] altitude observers altitude in kilometers 38 | */ 39 | Observer(const double latitude, 40 | const double longitude, 41 | const double altitude) 42 | : m_geo(latitude, longitude, altitude), 43 | m_eci(DateTime(), m_geo) 44 | { 45 | } 46 | 47 | /** 48 | * Constructor 49 | * @param[in] geo the observers position 50 | */ 51 | Observer(const CoordGeodetic &geo) 52 | : m_geo(geo), 53 | m_eci(DateTime(), geo) 54 | { 55 | } 56 | 57 | /** 58 | * Destructor 59 | */ 60 | virtual ~Observer() 61 | { 62 | } 63 | 64 | /** 65 | * Set the observers location 66 | * @param[in] geo the observers position 67 | */ 68 | void SetLocation(const CoordGeodetic& geo) 69 | { 70 | m_geo = geo; 71 | m_eci.Update(m_eci.GetDateTime(), m_geo); 72 | } 73 | 74 | /** 75 | * Get the observers location 76 | * @returns the observers position 77 | */ 78 | CoordGeodetic GetLocation() const 79 | { 80 | return m_geo; 81 | } 82 | 83 | /** 84 | * Get the look angle for the observers position to the object 85 | * @param[in] eci the object to find the look angle to 86 | * @returns the lookup angle 87 | */ 88 | CoordTopocentric GetLookAngle(const Eci &eci); 89 | 90 | private: 91 | /** 92 | * @param[in] dt the date to update the observers position for 93 | */ 94 | void Update(const DateTime &dt) 95 | { 96 | if (m_eci != dt) 97 | { 98 | m_eci.Update(dt, m_geo); 99 | } 100 | } 101 | 102 | /** the observers position */ 103 | CoordGeodetic m_geo; 104 | /** the observers Eci for a particular time */ 105 | Eci m_eci; 106 | }; 107 | 108 | #endif 109 | 110 | -------------------------------------------------------------------------------- /Libraries/sgp4/libsgp4/OrbitalElements.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Daniel Warner 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #include "OrbitalElements.h" 19 | 20 | #include "Tle.h" 21 | 22 | OrbitalElements::OrbitalElements(const Tle& tle) 23 | { 24 | /* 25 | * extract and format tle data 26 | */ 27 | mean_anomoly_ = tle.MeanAnomaly(false); 28 | ascending_node_ = tle.RightAscendingNode(false); 29 | argument_perigee_ = tle.ArgumentPerigee(false); 30 | eccentricity_ = tle.Eccentricity(); 31 | inclination_ = tle.Inclination(false); 32 | mean_motion_ = tle.MeanMotion() * kTWOPI / kMINUTES_PER_DAY; 33 | bstar_ = tle.BStar(); 34 | epoch_ = tle.Epoch(); 35 | 36 | /* 37 | * recover original mean motion (xnodp) and semimajor axis (aodp) 38 | * from input elements 39 | */ 40 | const double a1 = pow(kXKE / MeanMotion(), kTWOTHIRD); 41 | const double cosio = cos(Inclination()); 42 | const double theta2 = cosio * cosio; 43 | const double x3thm1 = 3.0 * theta2 - 1.0; 44 | const double eosq = Eccentricity() * Eccentricity(); 45 | const double betao2 = 1.0 - eosq; 46 | const double betao = sqrt(betao2); 47 | const double temp = (1.5 * kCK2) * x3thm1 / (betao * betao2); 48 | const double del1 = temp / (a1 * a1); 49 | const double a0 = a1 * (1.0 - del1 * (1.0 / 3.0 + del1 * (1.0 + del1 * 134.0 / 81.0))); 50 | const double del0 = temp / (a0 * a0); 51 | 52 | recovered_mean_motion_ = MeanMotion() / (1.0 + del0); 53 | /* 54 | * alternative way to calculate 55 | * doesnt affect final results 56 | * recovered_semi_major_axis_ = pow(XKE / RecoveredMeanMotion(), TWOTHIRD); 57 | */ 58 | recovered_semi_major_axis_ = a0 / (1.0 - del0); 59 | 60 | /* 61 | * find perigee and period 62 | */ 63 | perigee_ = (RecoveredSemiMajorAxis() * (1.0 - Eccentricity()) - kAE) * kXKMPER; 64 | period_ = kTWOPI / RecoveredMeanMotion(); 65 | } 66 | 67 | -------------------------------------------------------------------------------- /Libraries/sgp4/libsgp4/OrbitalElements.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Daniel Warner 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #ifndef ORBITALELEMENTS_H_ 19 | #define ORBITALELEMENTS_H_ 20 | 21 | #include "Util.h" 22 | #include "DateTime.h" 23 | 24 | class Tle; 25 | 26 | /** 27 | * @brief The extracted orbital elements used by the SGP4 propagator. 28 | */ 29 | class OrbitalElements 30 | { 31 | public: 32 | OrbitalElements(const Tle& tle); 33 | 34 | virtual ~OrbitalElements() 35 | { 36 | } 37 | 38 | /* 39 | * XMO 40 | */ 41 | double MeanAnomoly() const 42 | { 43 | return mean_anomoly_; 44 | } 45 | 46 | /* 47 | * XNODEO 48 | */ 49 | double AscendingNode() const 50 | { 51 | return ascending_node_; 52 | } 53 | 54 | /* 55 | * OMEGAO 56 | */ 57 | double ArgumentPerigee() const 58 | { 59 | return argument_perigee_; 60 | } 61 | 62 | /* 63 | * EO 64 | */ 65 | double Eccentricity() const 66 | { 67 | return eccentricity_; 68 | } 69 | 70 | /* 71 | * XINCL 72 | */ 73 | double Inclination() const 74 | { 75 | return inclination_; 76 | } 77 | 78 | /* 79 | * XNO 80 | */ 81 | double MeanMotion() const 82 | { 83 | return mean_motion_; 84 | } 85 | 86 | /* 87 | * BSTAR 88 | */ 89 | double BStar() const 90 | { 91 | return bstar_; 92 | } 93 | 94 | /* 95 | * AODP 96 | */ 97 | double RecoveredSemiMajorAxis() const 98 | { 99 | return recovered_semi_major_axis_; 100 | } 101 | 102 | /* 103 | * XNODP 104 | */ 105 | double RecoveredMeanMotion() const 106 | { 107 | return recovered_mean_motion_; 108 | } 109 | 110 | /* 111 | * PERIGE 112 | */ 113 | double Perigee() const 114 | { 115 | return perigee_; 116 | } 117 | 118 | /* 119 | * Period in minutes 120 | */ 121 | double Period() const 122 | { 123 | return period_; 124 | } 125 | 126 | /* 127 | * EPOCH 128 | */ 129 | DateTime Epoch() const 130 | { 131 | return epoch_; 132 | } 133 | 134 | private: 135 | double mean_anomoly_; 136 | double ascending_node_; 137 | double argument_perigee_; 138 | double eccentricity_; 139 | double inclination_; 140 | double mean_motion_; 141 | double bstar_; 142 | double recovered_semi_major_axis_; 143 | double recovered_mean_motion_; 144 | double perigee_; 145 | double period_; 146 | DateTime epoch_; 147 | }; 148 | 149 | #endif 150 | -------------------------------------------------------------------------------- /Libraries/sgp4/libsgp4/SatelliteException.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Daniel Warner 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #ifndef SATELLITEEXCEPTION_H_ 19 | #define SATELLITEEXCEPTION_H_ 20 | 21 | #include 22 | 23 | /** 24 | * @brief The exception that the SGP4 class throws upon an error. 25 | */ 26 | class SatelliteException : public std::exception 27 | { 28 | public: 29 | SatelliteException(const char* message) 30 | : message_(message) 31 | { 32 | } 33 | 34 | virtual ~SatelliteException(void) throw () 35 | { 36 | } 37 | 38 | virtual const char* what() const throw () 39 | { 40 | return message_.c_str(); 41 | } 42 | 43 | private: 44 | std::string message_; 45 | }; 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /Libraries/sgp4/libsgp4/SolarPosition.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Daniel Warner 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #include "SolarPosition.h" 19 | 20 | #include "Globals.h" 21 | #include "Util.h" 22 | 23 | #include 24 | 25 | Eci SolarPosition::FindPosition(const DateTime& dt) 26 | { 27 | const double mjd = dt.ToJulian() - kEPOCH_JAN1_12H_1900; 28 | const double year = 1900 + mjd / 365.25; 29 | const double T = (mjd + Delta_ET(year) / kSECONDS_PER_DAY) / 36525.0; 30 | const double M = Util::DegreesToRadians(Util::Wrap360(358.47583 31 | + Util::Wrap360(35999.04975 * T) 32 | - (0.000150 + 0.0000033 * T) * T * T)); 33 | const double L = Util::DegreesToRadians(Util::Wrap360(279.69668 34 | + Util::Wrap360(36000.76892 * T) 35 | + 0.0003025 * T*T)); 36 | const double e = 0.01675104 - (0.0000418 + 0.000000126 * T) * T; 37 | const double C = Util::DegreesToRadians((1.919460 38 | - (0.004789 + 0.000014 * T) * T) * sin(M) 39 | + (0.020094 - 0.000100 * T) * sin(2 * M) 40 | + 0.000293 * sin(3 * M)); 41 | const double O = Util::DegreesToRadians( 42 | Util::Wrap360(259.18 - 1934.142 * T)); 43 | const double Lsa = Util::WrapTwoPI(L + C 44 | - Util::DegreesToRadians(0.00569 - 0.00479 * sin(O))); 45 | const double nu = Util::WrapTwoPI(M + C); 46 | double R = 1.0000002 * (1 - e * e) / (1 + e * cos(nu)); 47 | const double eps = Util::DegreesToRadians(23.452294 - (0.0130125 48 | + (0.00000164 - 0.000000503 * T) * T) * T + 0.00256 * cos(O)); 49 | R = R * kAU; 50 | 51 | Vector solar_position(R * cos(Lsa), 52 | R * sin(Lsa) * cos(eps), 53 | R * sin(Lsa) * sin(eps), 54 | R); 55 | 56 | return Eci(dt, solar_position); 57 | } 58 | 59 | double SolarPosition::Delta_ET(double year) const 60 | { 61 | return 26.465 + 0.747622 * (year - 1950) + 1.886913 62 | * sin(kTWOPI * (year - 1975) / 33); 63 | } 64 | -------------------------------------------------------------------------------- /Libraries/sgp4/libsgp4/SolarPosition.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Daniel Warner 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #ifndef SOLARPOSITION_H_ 19 | #define SOLARPOSITION_H_ 20 | 21 | #include "DateTime.h" 22 | #include "Eci.h" 23 | 24 | /** 25 | * @brief Find the position of the sun 26 | */ 27 | class SolarPosition 28 | { 29 | public: 30 | SolarPosition() 31 | { 32 | } 33 | 34 | virtual ~SolarPosition() 35 | { 36 | } 37 | 38 | Eci FindPosition(const DateTime& dt); 39 | 40 | private: 41 | double Delta_ET(double year) const; 42 | }; 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /Libraries/sgp4/libsgp4/TimeSpan.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Daniel Warner 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #include "TimeSpan.h" 19 | -------------------------------------------------------------------------------- /Libraries/sgp4/libsgp4/TleException.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Daniel Warner 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #ifndef TLEEXCEPTION_H_ 19 | #define TLEEXCEPTION_H_ 20 | 21 | #include 22 | 23 | /** 24 | * @brief The exception that the Tle class throws on an error. 25 | * 26 | * The exception that the Tle decoder will throw on an error. 27 | */ 28 | class TleException : public std::exception 29 | { 30 | public: 31 | /** 32 | * Constructor 33 | * @param message Exception message 34 | */ 35 | TleException(const char* message) 36 | : m_message(message) 37 | { 38 | } 39 | 40 | /** 41 | * Destructor 42 | */ 43 | virtual ~TleException(void) throw () 44 | { 45 | } 46 | 47 | /** 48 | * Get the exception message 49 | * @returns the exception message 50 | */ 51 | virtual const char* what() const throw () 52 | { 53 | return m_message.c_str(); 54 | } 55 | 56 | private: 57 | /** the exception message */ 58 | std::string m_message; 59 | }; 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /Libraries/sgp4/libsgp4/Util.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Daniel Warner 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #include "Util.h" 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | namespace Util 25 | { 26 | namespace 27 | { 28 | struct IsDigit: std::unary_function 29 | { 30 | bool operator()(char c) const 31 | { 32 | return std::isdigit(c, std::locale::classic()) == 0; 33 | } 34 | }; 35 | } 36 | 37 | void TrimLeft(std::string& s) 38 | { 39 | s.erase(s.begin(), 40 | std::find_if(s.begin(), s.end(), std::not1(IsDigit()))); 41 | } 42 | 43 | void TrimRight(std::string& s) 44 | { 45 | s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(IsDigit())).base(), 46 | s.end()); 47 | } 48 | 49 | void Trim(std::string& s) 50 | { 51 | TrimLeft(s); 52 | TrimRight(s); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Libraries/sgp4/libsgp4/Util.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Daniel Warner 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #ifndef UTIL_H_ 19 | #define UTIL_H_ 20 | 21 | #include "Globals.h" 22 | 23 | #include 24 | 25 | namespace Util 26 | { 27 | template 28 | 29 | bool FromString(const std::string& str, T& val) 30 | { 31 | std::stringstream ss(str); 32 | return !(ss >> val).fail(); 33 | } 34 | 35 | /* 36 | * always positive result 37 | * Mod(-3,4)= 1 fmod(-3,4)= -3 38 | */ 39 | inline double Mod(const double x, const double y) 40 | { 41 | if (y == 0) 42 | { 43 | return x; 44 | } 45 | 46 | return x - y * floor(x / y); 47 | } 48 | 49 | inline double WrapNegPosPI(const double a) 50 | { 51 | return Mod(a + kPI, kTWOPI) - kPI; 52 | } 53 | 54 | inline double WrapTwoPI(const double a) 55 | { 56 | return Mod(a, kTWOPI); 57 | } 58 | 59 | inline double WrapNegPos180(const double a) 60 | { 61 | return Mod(a + 180.0, 360.0) - 180.0; 62 | } 63 | 64 | inline double Wrap360(const double a) 65 | { 66 | return Mod(a, 360.0); 67 | } 68 | 69 | inline double DegreesToRadians(const double degrees) 70 | { 71 | return degrees * kPI / 180.0; 72 | } 73 | 74 | inline double RadiansToDegrees(const double radians) 75 | { 76 | return radians * 180.0 / kPI; 77 | } 78 | 79 | inline double AcTan(const double sinx, const double cosx) 80 | { 81 | if (cosx == 0.0) 82 | { 83 | if (sinx > 0.0) 84 | { 85 | return kPI / 2.0; 86 | } 87 | else 88 | { 89 | return 3.0 * kPI / 2.0; 90 | } 91 | } 92 | else 93 | { 94 | if (cosx > 0.0) 95 | { 96 | return atan(sinx / cosx); 97 | } 98 | else 99 | { 100 | return kPI + atan(sinx / cosx); 101 | } 102 | } 103 | } 104 | 105 | void TrimLeft(std::string& s); 106 | void TrimRight(std::string& s); 107 | void Trim(std::string& s); 108 | } 109 | 110 | #endif 111 | -------------------------------------------------------------------------------- /Libraries/sgp4/libsgp4/Vector.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Daniel Warner 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #include "Vector.h" 19 | -------------------------------------------------------------------------------- /Libraries/sgp4/libsgp4/Vector.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Daniel Warner 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #ifndef VECTOR_H_ 19 | #define VECTOR_H_ 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | /** 27 | * @brief Generic vector 28 | * 29 | * Stores x, y, z, w 30 | */ 31 | struct Vector 32 | { 33 | public: 34 | 35 | /** 36 | * Default constructor 37 | */ 38 | Vector() 39 | : x(0.0), y(0.0), z(0.0), w(0.0) 40 | { 41 | } 42 | 43 | /** 44 | * Constructor 45 | * @param arg_x x value 46 | * @param arg_y y value 47 | * @param arg_z z value 48 | */ 49 | Vector(const double arg_x, 50 | const double arg_y, 51 | const double arg_z) 52 | : x(arg_x), y(arg_y), z(arg_z), w(0.0) 53 | { 54 | } 55 | 56 | /** 57 | * Constructor 58 | * @param arg_x x value 59 | * @param arg_y y value 60 | * @param arg_z z value 61 | * @param arg_w w value 62 | */ 63 | Vector(const double arg_x, 64 | const double arg_y, 65 | const double arg_z, 66 | const double arg_w) 67 | : x(arg_x), y(arg_y), z(arg_z), w(arg_w) 68 | { 69 | } 70 | 71 | /** 72 | * Copy constructor 73 | * @param v value to copy from 74 | */ 75 | Vector(const Vector& v) 76 | { 77 | x = v.x; 78 | y = v.y; 79 | z = v.z; 80 | w = v.w; 81 | } 82 | 83 | /** 84 | * Destructor 85 | */ 86 | virtual ~Vector() 87 | { 88 | } 89 | 90 | /** 91 | * Assignment operator 92 | * @param v value to copy from 93 | */ 94 | Vector& operator=(const Vector& v) 95 | { 96 | if (this != &v) 97 | { 98 | x = v.x; 99 | y = v.y; 100 | z = v.z; 101 | w = v.w; 102 | } 103 | return *this; 104 | } 105 | 106 | /** 107 | * Subtract operator 108 | * @param v value to suctract from 109 | */ 110 | Vector operator-(const Vector& v) 111 | { 112 | return Vector(x - v.x, 113 | y - v.y, 114 | z - v.z, 115 | 0.0); 116 | } 117 | 118 | /** 119 | * Calculates the magnitude of the vector 120 | * @returns magnitude of the vector 121 | */ 122 | double Magnitude() const 123 | { 124 | return sqrt(x * x + y * y + z * z); 125 | } 126 | 127 | /** 128 | * Calculates the dot product 129 | * @returns dot product 130 | */ 131 | double Dot(const Vector& vec) const 132 | { 133 | return (x * vec.x) + 134 | (y * vec.y) + 135 | (z * vec.z); 136 | } 137 | 138 | /** 139 | * Converts this vector to a string 140 | * @returns this vector as a string 141 | */ 142 | std::string ToString() const 143 | { 144 | std::stringstream ss; 145 | ss << std::right << std::fixed << std::setprecision(3); 146 | ss << "X: " << std::setw(9) << x; 147 | ss << ", Y: " << std::setw(9) << y; 148 | ss << ", Z: " << std::setw(9) << z; 149 | ss << ", W: " << std::setw(9) << w; 150 | return ss.str(); 151 | } 152 | 153 | /** x value */ 154 | double x; 155 | /** y value */ 156 | double y; 157 | /** z value */ 158 | double z; 159 | /** w value */ 160 | double w; 161 | }; 162 | 163 | inline std::ostream& operator<<(std::ostream& strm, const Vector& v) 164 | { 165 | return strm << v.ToString(); 166 | } 167 | 168 | #endif 169 | -------------------------------------------------------------------------------- /Libraries/sgp4/passpredict/Makefile.am: -------------------------------------------------------------------------------- 1 | bin_PROGRAMS = passpredict 2 | passpredict_SOURCES = passpredict.cpp 3 | passpredict_LDADD = ../libsgp4/libsgp4.a 4 | INCLUDES = -I../libsgp4 5 | -------------------------------------------------------------------------------- /Libraries/sgp4/runtest/Makefile.am: -------------------------------------------------------------------------------- 1 | bin_PROGRAMS = runtest 2 | runtest_SOURCES = runtest.cpp 3 | runtest_LDADD = ../libsgp4/libsgp4.a 4 | INCLUDES = -I../libsgp4 5 | -------------------------------------------------------------------------------- /Libraries/sgp4/sattrack/Makefile.am: -------------------------------------------------------------------------------- 1 | bin_PROGRAMS = sattrack 2 | sattrack_SOURCES = sattrack.cpp 3 | sattrack_LDADD = ../libsgp4/libsgp4.a 4 | INCLUDES = -I../libsgp4 5 | -------------------------------------------------------------------------------- /Libraries/sgp4/sattrack/sattrack.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Daniel Warner 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | #include 24 | 25 | int main() 26 | { 27 | Observer obs(51.507406923983446, -0.12773752212524414, 0.05); 28 | Tle tle = Tle("UK-DMC 2 ", 29 | "1 35683U 09041C 12289.23158813 .00000484 00000-0 89219-4 0 5863", 30 | "2 35683 98.0221 185.3682 0001499 100.5295 259.6088 14.69819587172294"); 31 | SGP4 sgp4(tle); 32 | 33 | std::cout << tle << std::endl; 34 | 35 | while (true) 36 | { 37 | /* 38 | * current time 39 | */ 40 | DateTime now = DateTime::Now(true); 41 | /* 42 | * calculate satellite position 43 | */ 44 | Eci eci = sgp4.FindPosition(now); 45 | /* 46 | * get look angle for observer to satellite 47 | */ 48 | CoordTopocentric topo = obs.GetLookAngle(eci); 49 | /* 50 | * convert satellite position to geodetic coordinates 51 | */ 52 | CoordGeodetic geo = eci.ToGeodetic(); 53 | 54 | std::cout << now << " " << topo << " " << geo << std::endl; 55 | }; 56 | 57 | return 0; 58 | } 59 | -------------------------------------------------------------------------------- /Libraries/shapelib/.cvsignore: -------------------------------------------------------------------------------- 1 | dbfadd 2 | dbfcreate 3 | dbfdump 4 | shpadd 5 | shpcreate 6 | shpdump 7 | shprewind 8 | shptreedump 9 | shptest 10 | *.dll 11 | *.lib 12 | *.exp 13 | *.la 14 | *.lo 15 | .libs 16 | -------------------------------------------------------------------------------- /Libraries/shapelib/HOWTO-RELEASE: -------------------------------------------------------------------------------- 1 | Producing Shapelib Releases 2 | =========================== 3 | 4 | 1) Update web/release.html with change notes on the new release and commit. 5 | 6 | 2) Build the release files. 7 | 8 | ./mkrelease.sh 1.3.0 9 | 10 | 3) Upload: 11 | 12 | scp shapelib-1.3.0{.tar.gz,.zip} warmerdam@upload.osgeo.org:/osgeo/download/shapelib 13 | ... add upload notes to maptools.org ... 14 | 15 | 4) Announce on shapelib mailing list. 16 | 17 | -------------------------------------------------------------------------------- /Libraries/shapelib/Makefile: -------------------------------------------------------------------------------- 1 | 2 | PREFIX = /usr/local 3 | CFLAGS = -g -Wall -fPIC 4 | #CFLAGS = -g -DUSE_CPL 5 | #CC = g++ 6 | 7 | LIBOBJ = shpopen.o dbfopen.o safileio.o shptree.o 8 | SHPBIN = shpcreate shpadd shpdump shprewind dbfcreate dbfadd dbfdump \ 9 | shptreedump 10 | 11 | default: all 12 | 13 | all: $(SHPBIN) shptest lib 14 | 15 | shpopen.o: shpopen.c shapefil.h 16 | $(CC) $(CFLAGS) -c shpopen.c 17 | 18 | shptree.o: shptree.c shapefil.h 19 | $(CC) $(CFLAGS) -c shptree.c 20 | 21 | dbfopen.o: dbfopen.c shapefil.h 22 | $(CC) $(CFLAGS) -c dbfopen.c 23 | 24 | safileio.o: safileio.c shapefil.h 25 | $(CC) $(CFLAGS) -c safileio.c 26 | 27 | shpcreate: shpcreate.c shpopen.o safileio.o 28 | $(CC) $(CFLAGS) shpcreate.c shpopen.o safileio.o $(LINKOPT) -o shpcreate 29 | 30 | shpadd: shpadd.c shpopen.o safileio.o 31 | $(CC) $(CFLAGS) shpadd.c shpopen.o safileio.o $(LINKOPT) -o shpadd 32 | 33 | shpdump: shpdump.c shpopen.o safileio.o 34 | $(CC) $(CFLAGS) shpdump.c shpopen.o safileio.o $(LINKOPT) -o shpdump 35 | 36 | shprewind: shprewind.c shpopen.o safileio.o 37 | $(CC) $(CFLAGS) shprewind.c shpopen.o safileio.o $(LINKOPT) -o shprewind 38 | 39 | dbfcreate: dbfcreate.c dbfopen.o safileio.o 40 | $(CC) $(CFLAGS) dbfcreate.c dbfopen.o safileio.o $(LINKOPT) -o dbfcreate 41 | 42 | dbfadd: dbfadd.c dbfopen.o safileio.o 43 | $(CC) $(CFLAGS) dbfadd.c dbfopen.o safileio.o $(LINKOPT) -o dbfadd 44 | 45 | dbfdump: dbfdump.c dbfopen.o safileio.o 46 | $(CC) $(CFLAGS) dbfdump.c dbfopen.o safileio.o $(LINKOPT) -o dbfdump 47 | 48 | shptest: shptest.c shpopen.o safileio.o 49 | $(CC) $(CFLAGS) shptest.c shpopen.o safileio.o $(LINKOPT) -o shptest 50 | 51 | shputils: shputils.c shpopen.o safileio.o dbfopen.o 52 | $(CC) $(CFLAGS) shputils.c shpopen.o safileio.o dbfopen.o $(LINKOPT) -o shputils 53 | 54 | shptreedump: shptreedump.c shptree.o shpopen.o safileio.o 55 | $(CC) $(CFLAGS) shptreedump.c shptree.o shpopen.o safileio.o $(LINKOPT) \ 56 | -o shptreedump 57 | 58 | clean: 59 | rm -f *.o shptest $(SHPBIN) libshp.a 60 | 61 | test: test2 test3 62 | 63 | # 64 | # Note this stream only works if example data is accessable. 65 | # Fetch ftp://gdal.velocet.ca/pub/outgoing/shape_eg_data.zip 66 | # 67 | test1: 68 | @./stream1.sh > s1.out 69 | @if test "`diff s1.out stream1.out`" = '' ; then \ 70 | echo "******* Stream 1 Succeeded *********"; \ 71 | rm s1.out; \ 72 | else \ 73 | echo "******* Stream 1 Failed *********"; \ 74 | diff s1.out stream1.out; \ 75 | fi 76 | 77 | test2: 78 | @./stream2.sh > s2.out 79 | @if test "`diff s2.out stream2.out`" = '' ; then \ 80 | echo "******* Stream 2 Succeeded *********"; \ 81 | rm s2.out; \ 82 | rm test*.s??; \ 83 | else \ 84 | echo "******* Stream 2 Failed *********"; \ 85 | diff s2.out stream2.out; \ 86 | fi 87 | 88 | test3: 89 | @./makeshape.sh > s3.out 90 | @if test "`diff s3.out stream3.out`" = '' ; then \ 91 | echo "******* Stream 3 Succeeded *********"; \ 92 | rm s3.out; \ 93 | rm test.*; \ 94 | else \ 95 | echo "******* Stream 3 Failed *********"; \ 96 | diff s3.out stream3.out; \ 97 | fi 98 | 99 | 100 | lib: libshp.a 101 | 102 | libshp.a: $(LIBOBJ) 103 | ar r libshp.a $(LIBOBJ) 104 | 105 | lib_install: libshp.a 106 | cp libshp.a $(PREFIX)/lib 107 | cp shapefil.h $(PREFIX)/include 108 | 109 | bin_install: $(SHPBIN) 110 | cp $(SHPBIN) $(PREFIX)/bin 111 | 112 | install: lib_install bin_install 113 | 114 | -------------------------------------------------------------------------------- /Libraries/shapelib/README: -------------------------------------------------------------------------------- 1 | 2 | Please read shapelib.html. 3 | 4 | Building on Unix 5 | ---------------- 6 | 7 | 1) Edit Makefile, and set CFLAGS, and CC macros as required for the 8 | target system. Often the defaults will work fine. 9 | 10 | 2) type "make" 11 | 12 | The result should be: 13 | 14 | Core shapelib support. 15 | shpopen.o 16 | dbfopen.o 17 | safileio.o 18 | shptree.o 19 | libshp.a 20 | 21 | Utility/demonstration programs: 22 | shpcreate, shpdump, shpadd, dbfcreate, dbfdump, dbfadd, shptreedump 23 | 24 | 3) To test type: 25 | make test 26 | 27 | 4) To libshp.a and the test binaries in /usr/local: 28 | make install 29 | 30 | 31 | Building on Windows 32 | ------------------- 33 | 34 | If you have run the VC++ VCVARS32.BAT, you should be able to type the 35 | following in a command window to build the code and executables: 36 | 37 | C:> nmake /f makefile.vc 38 | 39 | Otherwise create your own VC++ project. There aren't many files to deal with 40 | here! 41 | 42 | -------------------------------------------------------------------------------- /Libraries/shapelib/contrib/.cvsignore: -------------------------------------------------------------------------------- 1 | shpdxf 2 | dbfinfo 3 | shpcentrd 4 | shpdata 5 | shpwkb 6 | dbfcat 7 | shpinfo 8 | shpfix 9 | shpcat 10 | Shape_PointInPoly 11 | shpproj 12 | shpsort 13 | -------------------------------------------------------------------------------- /Libraries/shapelib/contrib/Makefile: -------------------------------------------------------------------------------- 1 | 2 | #LINKOPT = /usr/local/lib/libdbmalloc.a 3 | #CFLAGS = -g 4 | 5 | # Endian: define either _LITTLE_ENDIAN or _BIG_ENDIAN 6 | ENDIAN = -D_LITTLE_ENDIAN 7 | 8 | CFLAGS = -g -I.. -I$(HOME)/bld/include -DPROJ4 $(ENDIAN) -DDEBUG -DDEBUG2 9 | 10 | SHPOBJ = ../shpopen.o ../dbfopen.o ../safileio.o 11 | 12 | SHPGOBJ = ../shpopen.o ../dbfopen.o ../safileio.o shpgeo.o 13 | 14 | GEOOBJ = ./shpgeo.o -lm -L$(HOME)/bld/lib -lproj 15 | 16 | default: all 17 | 18 | all: shpdxf shpproj dbfinfo shpcentrd shpdata shpwkb dbfinfo dbfcat shpinfo shpfix shpcat Shape_PointInPoly shpsort 19 | 20 | clean: 21 | rm -f shpdxf shpproj dbfinfo shpcentrd shpdata shpwkb dbfcat dbfinfo shpinfo shpfix shpcat *.o 22 | 23 | shpgeo.o: shpgeo.c shpgeo.h 24 | $(CC) $(CFLAGS) -c shpgeo.c 25 | 26 | shpdxf: shpdxf.c $(SHPOBJ) 27 | $(CC) $(CFLAGS) shpdxf.c ${SHPOBJ} $(LINKOPT) -o shpdxf 28 | 29 | shpcentrd: shpcentrd.c $(SHPGOBJ) 30 | $(CC) $(CFLAGS) shpcentrd.c ${SHPOBJ} $(LINKOPT) $(GEOOBJ) -o shpcentrd 31 | 32 | shpdata: shpdata.c $(SHPGOBJ) 33 | $(CC) $(CFLAGS) shpdata.c ${SHPOBJ} $(LINKOPT) $(GEOOBJ) -o shpdata 34 | 35 | shpinfo: shpinfo.c $(SHPOBJ) 36 | $(CC) $(CFLAGS) shpinfo.c ${SHPOBJ} $(LINKOPT) $(GEOOBJ) -o shpinfo 37 | 38 | shpfix: shpfix.c $(SHPOBJ) 39 | $(CC) $(CFLAGS) shpfix.c ${SHPOBJ} $(LINKOPT) -o shpfix 40 | 41 | shpcat: shpcat.c $(SHPOBJ) 42 | $(CC) $(CFLAGS) shpcat.c ${SHPOBJ} $(LINKOPT) -o shpcat 43 | 44 | shpwkb: shpwkb.c $(SHPGOBJ) 45 | $(CC) $(CFLAGS) shpwkb.c ${SHPOBJ} $(LINKOPT) $(GEOOBJ) -o shpwkb 46 | 47 | shpproj: shpproj.c $(SHPGOBJ) 48 | $(CC) $(CFLAGS) shpproj.c $(SHPOBJ) $(GEOOBJ) -lm -lproj $(LINKOPT) -o shpproj 49 | 50 | shpsort: shpsort.c $(SHPOBJ) 51 | $(CC) $(CFLAGS) shpsort.c ${SHPOBJ} $(LINKOPT) -lm -o shpsort 52 | 53 | dbfinfo: dbfinfo.c $(SHPOBJ) 54 | $(CC) $(CFLAGS) dbfinfo.c $(SHPOBJ) $(LINKOPT) -o dbfinfo 55 | 56 | dbfcat: dbfcat.c $(SHPOBJ) 57 | $(CC) $(CFLAGS) dbfcat.c $(SHPOBJ) $(LINKOPT) -o dbfcat 58 | 59 | Shape_PointInPoly: Shape_PointInPoly.cpp $(SHPOBJ) 60 | $(CXX) $(CFLAGS) Shape_PointInPoly.cpp $(SHPOBJ) $(LINKOPT) \ 61 | -o Shape_PointInPoly 62 | 63 | check: testproj 64 | 65 | testproj: 66 | tests/shpproj.sh 67 | -------------------------------------------------------------------------------- /Libraries/shapelib/contrib/Shape_PointInPoly_README.txt: -------------------------------------------------------------------------------- 1 | =============================================================================== 2 | Project: Shape_PoinInPoly 3 | Purpose: Sample and the function for calculatin a point in a polygon 4 | (complex,compound - it doesn't matter). Can be used for labeling. 5 | Author: Copyright (c) 2004, Marko Podgorsek, d-mon@siol.net 6 | =============================================================================== 7 | Requires: shapelib 1.2 (http://shapelib.maptools.org/) 8 | Tested and created on platform: 9 | Windows 2000 Professional 10 | Visual Studio .NET 7.0 11 | P4 2.4 GHz 12 | 1GB RAM 13 | 14 | I just found out about the ShapeLib, GDAL and OGR and I must say that they're 15 | all great projects. 16 | I belive I'll use some of those libraries in the future. Right now I'm using 17 | only shapelib. 18 | The thing that led me to the http://wwww.maptools.org was the need of finding 19 | the point in poly...but as I found out that even OGR didn't support it. So 20 | there I was. I was forced to make my own function. Well, it was fun. I learned 21 | a lot. 22 | I wrote this function for the Autodesk Autocad 2004 MPolygon, because there was 23 | no function to do this in the Object Arx SDK (the Acad programming SDK). Well, 24 | it will be in the 2005 release...but, still. There is a function in the 25 | Autodesk Map 2004 version...in the menu. 26 | Not usefull when you need the coordinates, not the point on the screen... 27 | So when the Acad version was done I was thinking of doing it on the Shape files, 28 | too. A little bit of changing the structures and variable 29 | types (so they're not using Object Arx) and I was done. 30 | And here it is....Contribution from me to the ShapeLib world :)...and maybe even 31 | OGR (a little bit of changing there). 32 | 33 | Some statistics: 34 | For about 69000 polygons in Autocad picture (.dwg files) 35 | Autodesk Map 2004 was creating centroids (the menu command) about 45s (1 scan 36 | line) 37 | My function, with 3 scan lines took about 5s. And I was drawing the dots on the 38 | picture... 39 | 40 | ------------------------------------------------------------------------------- 41 | DPoint2d CreatePointInPoly(SHPObject *psShape, int quality) 42 | 43 | The second parameter quality tell the function just how many rays shall it use 44 | to get the point. 45 | quality = 3 works very well, but anything below 5 is good. 46 | This doesn't mean that the execution will slow down, but it just finds a good 47 | point. That's all. 48 | 49 | The qality shows on the compound objects (multiple poligons with more than one 50 | exterior loop) - if not enough rays, then there may be no centroid. 51 | Or the U shaped thin polygon, only the bootom (below the y center line) is fat. 52 | Autodesk Map with one scan line will create the centroid on one of the thin 53 | parts, because it only uses the y center line. If you have more rays, one will 54 | surely pass the fat area and centroid will be created there. 55 | 56 | ------------------------------------------------------------------------------- 57 | Anyone using this function: 58 | Just send me an e-mail, so I'll see if I did anything good for the public. 59 | And you can send me e-mail with questions also. 60 | -------------------------------------------------------------------------------- /Libraries/shapelib/contrib/dbfinfo.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999 Carl Anderson 3 | * 4 | * This code is in the public domain. 5 | * 6 | * This code is based in part on the earlier work of Frank Warmerdam 7 | * 8 | * requires shapelib 1.2 9 | * gcc dbfinfo dbfopen.o dbfinfo 10 | * 11 | * 12 | * $Log: dbfinfo.c,v $ 13 | * Revision 1.3 2011-07-24 03:17:46 fwarmerdam 14 | * include string.h and stdlib.h where needed in contrib (#2146) 15 | * 16 | * Revision 1.2 1999-05-26 02:56:31 candrsn 17 | * updates to shpdxf, dbfinfo, port from Shapelib 1.1.5 of dbfcat and shpinfo 18 | * 19 | * 20 | */ 21 | 22 | #include 23 | #include 24 | #include "shapefil.h" 25 | 26 | int main( int argc, char ** argv ) 27 | 28 | { 29 | DBFHandle hDBF; 30 | int *panWidth, i, iRecord; 31 | char szFormat[32], szField[1024]; 32 | char ftype[15], cTitle[32], nTitle[32]; 33 | int nWidth, nDecimals; 34 | int cnWidth, cnDecimals; 35 | DBFHandle cDBF; 36 | DBFFieldType hType,cType; 37 | int ci, ciRecord; 38 | 39 | /* -------------------------------------------------------------------- */ 40 | /* Display a usage message. */ 41 | /* -------------------------------------------------------------------- */ 42 | if( argc != 2 ) 43 | { 44 | printf( "dbfinfo xbase_file\n" ); 45 | exit( 1 ); 46 | } 47 | 48 | /* -------------------------------------------------------------------- */ 49 | /* Open the file. */ 50 | /* -------------------------------------------------------------------- */ 51 | hDBF = DBFOpen( argv[1], "rb" ); 52 | if( hDBF == NULL ) 53 | { 54 | printf( "DBFOpen(%s,\"r\") failed.\n", argv[1] ); 55 | exit( 2 ); 56 | } 57 | 58 | printf ("Info for %s\n",argv[1]); 59 | 60 | /* -------------------------------------------------------------------- */ 61 | /* If there is no data in this file let the user know. */ 62 | /* -------------------------------------------------------------------- */ 63 | i = DBFGetFieldCount(hDBF); 64 | printf ("%ld Columns, %ld Records in file\n",i,DBFGetRecordCount(hDBF)); 65 | 66 | /* -------------------------------------------------------------------- */ 67 | /* Compute offsets to use when printing each of the field */ 68 | /* values. We make each field as wide as the field title+1, or */ 69 | /* the field value + 1. */ 70 | /* -------------------------------------------------------------------- */ 71 | panWidth = (int *) malloc( DBFGetFieldCount( hDBF ) * sizeof(int) ); 72 | 73 | for( i = 0; i < DBFGetFieldCount(hDBF); i++ ) 74 | { 75 | char szTitle[12]; 76 | DBFFieldType eType; 77 | 78 | switch ( DBFGetFieldInfo( hDBF, i, szTitle, &nWidth, &nDecimals )) { 79 | case FTString: 80 | strcpy (ftype, "string");; 81 | break; 82 | 83 | case FTInteger: 84 | strcpy (ftype, "integer"); 85 | break; 86 | 87 | case FTDouble: 88 | strcpy (ftype, "float"); 89 | break; 90 | 91 | case FTInvalid: 92 | strcpy (ftype, "invalid/unsupported"); 93 | break; 94 | 95 | default: 96 | strcpy (ftype, "unknown"); 97 | break; 98 | } 99 | printf ("%15.15s\t%15s (%d,%d)\n",szTitle, ftype, nWidth, nDecimals); 100 | 101 | } 102 | 103 | DBFClose( hDBF ); 104 | 105 | return( 0 ); 106 | } 107 | -------------------------------------------------------------------------------- /Libraries/shapelib/contrib/doc/shpproj.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | shpproj 4 | 5 | 6 | 7 | using the projection tools proj and invproj 8 | we have implemented a shapefile projection utility 9 | 10 | shpproj shp_file new_shp ( -i=in_proj_file | -i="in_params" | -i=geographic ) ( -o=out_info_file | -o="out_params" | -o=geographic ) 11 | 12 | INPUT 13 | Input can come from one of three sources. A projection parameter file, 14 | directly through parameters or geographic. If the shapefile has an associated 15 | prj file, name the same as the shapefile but ending in ".prj" it will be used 16 | by default ignoring all other parameters. If input is omitted it defaults to 17 | geographic, unless the default prj file exists.. 18 | 19 | OUTPUT 20 | Output can come from one of three sources. A projection parameter file, 21 | directly through parameters or geographic. If output is omitted it defaults 22 | to geographic. 23 | 24 | PROJECTION PARAMETER FILE 25 | This file MUST end with the extension ".prj". It has the form of one 26 | projection parameter per line. Parameters can be in any order. 27 | 28 | PROJECTION PARAMETERS 29 | Are the same as used by proj and invproj. 30 | use proj -lP to see available projections 31 | proj -lu to see available units 32 | proj -le to see available ellipsoid 33 | 34 | 35 | USAGE 36 | 37 | the following example projects file rowtest to row3, moving data from Stateplane NAD83 zone 1002 to utm zone 16 in meters 38 | 39 | shpproj rowtest row -i="init=nad83:1002 units=us-ft" -o="proj=utm zone=16 units=m" 40 | 41 | shpproj rowtest row3 -o="proj=utm zone=18 units=m" -i="zone=16 proj=utm units=us-ft" 42 | 43 | shpproj rowtest row3 -o="proj=utm zone=18 units=m" 44 | 45 | shpproj rowtest row3 -i=myfile.prj -o=geographic 46 | shpproj rowtest row3 -is=myfile.prj 47 | 48 | 49 | Datums 50 | Stateplane data can be accessed by the init function 51 | init=nad83:1003 52 | which is of the form 53 | datum:FIPSzone 54 | 55 | To move from NAD27 to NAD83 or otherwise the shpproj utility moves to 56 | geographic coordinates and the back to the desired datum. proj can handle 57 | direct datum to datum conversions but it is umimplemented here. 58 | 59 | for a complete listing of FIPSZones by datum read nad/nad.lst in the PROJ4 60 | library 61 | 62 | 63 | CAUTION 64 | 65 | It is possible to get very poor results for projection values when using 66 | coordinates VERY far away from the intended scope of the projection. 67 | 68 | An example of a poor projection choice would be to move from nad83:1002 69 | (Georgia West) for data in California into utm. The resulting data will be 70 | much less accurate than if it had started as geographic. 71 | 72 | -------------------------------------------------------------------------------- /Libraries/shapelib/contrib/makefile.vc: -------------------------------------------------------------------------------- 1 | 2 | CFLAGS = /Ox /MD /nologo /I.. /IC:\OSGeo4W\include \ 3 | /D_LITTLE_ENDIAN -DPROJ4 4 | 5 | LINKARGS = ..\shapelib_i.lib C:\OSGeo4W\lib\proj_i.lib 6 | 7 | default: all 8 | 9 | all: shpcat.exe shpcentrd.exe shpdxf.exe shpinfo.exe shpproj.exe 10 | 11 | shpcat.exe: shpcat.obj shpgeo.obj 12 | $(CC) $(CFLAGS) shpcat.obj $(LINKARGS) 13 | if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 14 | 15 | shpcentrd.exe: shpcentrd.obj shpgeo.obj 16 | $(CC) $(CFLAGS) shpcentrd.obj shpgeo.obj $(LINKARGS) 17 | if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 18 | 19 | shpproj.exe: shpproj.obj shpgeo.obj 20 | $(CC) $(CFLAGS) shpproj.obj shpgeo.obj $(LINKARGS) 21 | if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 22 | 23 | shpdxf.exe: shpdxf.obj shpgeo.obj 24 | $(CC) $(CFLAGS) shpdxf.obj $(LINKARGS) 25 | if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 26 | 27 | shpinfo.exe: shpinfo.obj shpgeo.obj 28 | $(CC) $(CFLAGS) shpinfo.obj $(LINKARGS) 29 | if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 30 | 31 | clean: 32 | -del *.obj 33 | -del *.exe 34 | -del *.manifest 35 | -------------------------------------------------------------------------------- /Libraries/shapelib/contrib/my_nan.h: -------------------------------------------------------------------------------- 1 | /* `NAN' constant for IEEE 754 machines. 2 | Copyright (C) 1992, 1996 Free Software Foundation, Inc. 3 | This file is part of the GNU C Library. 4 | 5 | The GNU C Library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Library General Public License as 7 | published by the Free Software Foundation; either version 2 of the 8 | License, or (at your option) any later version. 9 | 10 | The GNU C Library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Library General Public License for more details. 14 | 15 | You should have received a copy of the GNU Library General Public 16 | License along with the GNU C Library; see the file COPYING.LIB. If not, 17 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18 | Boston, MA 02111-1307, USA. */ 19 | 20 | #ifndef _GNU_NAN_H 21 | 22 | #define _GNU_NAN_H 1 23 | 24 | 25 | /* hacked to define NAN on Solaris 2.7 if it wasn't defined */ 26 | 27 | /* IEEE Not A Number. */ 28 | 29 | #ifdef _BIG_ENDIAN 30 | # define __nan_bytes { 0x7f, 0xf8, 0, 0, 0, 0, 0, 0 } 31 | #endif 32 | #ifdef _LITTLE_ENDIAN 33 | # define __nan_bytes { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f } 34 | #endif 35 | 36 | #ifdef __GNUC__ 37 | # define NAN \ 38 | (__extension__ ((union { unsigned char __c[8]; \ 39 | double __d; }) \ 40 | { __nan_bytes }).__d) 41 | #else /* Not GCC. */ 42 | static const char __nan[8] = __nan_bytes; 43 | # define NAN (*(const double *) __nan) 44 | #endif 45 | 46 | #endif /* gnu_nan.h */ 47 | -------------------------------------------------------------------------------- /Libraries/shapelib/contrib/shpcat.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 1999, Carl Anderson 3 | * 4 | * This code is based in part on the earlier work of Frank Warmerdam 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a 7 | * copy of this software and associated documentation files (the "Software"), 8 | * to deal in the Software without restriction, including without limitation 9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 10 | * and/or sell copies of the Software, and to permit persons to whom the 11 | * Software is furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included 14 | * in all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22 | * DEALINGS IN THE SOFTWARE. 23 | ****************************************************************************** 24 | * 25 | * shpcat 26 | * 27 | * gcc shpcat.c ../shpopen.o -o shpcat 28 | * 29 | * Utility program to concatenate two shapefiles 30 | * Must be used in concert with dbfcat 31 | * 32 | */ 33 | 34 | #include 35 | #include 36 | #include "shapefil.h" 37 | 38 | int dbfcat_main( int argc, char ** argv ); 39 | 40 | int main( int argc, char ** argv ) 41 | 42 | { 43 | SHPHandle hSHP, cSHP; 44 | int nShapeType, i, nEntities, nShpInFile; 45 | SHPObject *shape; 46 | 47 | /* -------------------------------------------------------------------- */ 48 | /* Display a usage message. */ 49 | /* -------------------------------------------------------------------- */ 50 | if( argc != 3 ) 51 | { 52 | printf( "shpcat from_shpfile to_shpfile\n" ); 53 | exit( 1 ); 54 | } 55 | 56 | /* -------------------------------------------------------------------- */ 57 | /* Open the passed shapefile. */ 58 | /* -------------------------------------------------------------------- */ 59 | hSHP = SHPOpen( argv[1], "rb" ); 60 | 61 | if( hSHP == NULL ) 62 | { 63 | printf( "Unable to open:%s\n", argv[1] ); 64 | exit( 1 ); 65 | } 66 | 67 | SHPGetInfo( hSHP, &nEntities, &nShapeType, NULL, NULL ); 68 | fprintf(stderr,"Opened From File %s, with %d shapes\n",argv[1],nEntities); 69 | 70 | /* -------------------------------------------------------------------- */ 71 | /* Open the passed shapefile. */ 72 | /* -------------------------------------------------------------------- */ 73 | cSHP = SHPOpen( argv[2], "rb+" ); 74 | 75 | if( cSHP == NULL ) 76 | { 77 | printf( "Unable to open:%s\n", argv[2] ); 78 | exit( 1 ); 79 | } 80 | 81 | SHPGetInfo( cSHP, &nShpInFile, NULL, NULL, NULL ); 82 | fprintf(stderr,"Opened to file %s with %d shapes, ready to add %d\n", 83 | argv[2],nShpInFile,nEntities); 84 | 85 | /* -------------------------------------------------------------------- */ 86 | /* Skim over the list of shapes, printing all the vertices. */ 87 | /* -------------------------------------------------------------------- */ 88 | for( i = 0; i < nEntities; i++ ) 89 | { 90 | shape = SHPReadObject( hSHP, i ); 91 | SHPWriteObject( cSHP, -1, shape ); 92 | SHPDestroyObject ( shape ); 93 | 94 | } 95 | 96 | SHPClose( hSHP ); 97 | SHPClose( cSHP ); 98 | 99 | exit( 0 ); 100 | } 101 | -------------------------------------------------------------------------------- /Libraries/shapelib/contrib/shpfix.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 1999, Carl Anderson 3 | * 4 | * This code is based in part on the earlier work of Frank Warmerdam 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a 7 | * copy of this software and associated documentation files (the "Software"), 8 | * to deal in the Software without restriction, including without limitation 9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 10 | * and/or sell copies of the Software, and to permit persons to whom the 11 | * Software is furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included 14 | * in all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22 | * DEALINGS IN THE SOFTWARE. 23 | ****************************************************************************** 24 | * shpfix 25 | * 26 | * 27 | * gcc -c shpfix.c shpopen.c -o shpfix 28 | * 29 | * Utility program to fix nulls and inconsistencies in Shapefiles 30 | * as happens from time to time 31 | * 32 | * Simply load and rewrite each record, parameter fixrex allow user to null 33 | * a particularly nasty record if needed 34 | * 35 | */ 36 | 37 | #include 38 | #include 39 | #include "shapefil.h" 40 | 41 | int main( int argc, char ** argv ) 42 | 43 | { 44 | SHPHandle hSHP, cSHP; 45 | int nShapeType, cShapeType, nEntities, i; 46 | double adBounds[4]; 47 | SHPObject *shape; 48 | int fix_rec; 49 | 50 | /* -------------------------------------------------------------------- */ 51 | /* Display a usage message. */ 52 | /* -------------------------------------------------------------------- */ 53 | if( argc <= 3 ) 54 | { 55 | printf( "shpfix shpfile new_file \n" ); 56 | exit( 1 ); 57 | } 58 | 59 | fix_rec = atoi (argv[3]); 60 | fix_rec --; 61 | 62 | /* -------------------------------------------------------------------- */ 63 | /* Open the passed shapefile. */ 64 | /* -------------------------------------------------------------------- */ 65 | hSHP = SHPOpen( argv[1], "rb+" ); 66 | 67 | if( hSHP == NULL ) 68 | { 69 | printf( "Unable to open:%s\n", argv[1] ); 70 | exit( 1 ); 71 | } 72 | 73 | SHPGetInfo( hSHP, &nEntities, &nShapeType, NULL, NULL ); 74 | 75 | 76 | /* -------------------------------------------------------------------- */ 77 | /* Open the passed shapefile. */ 78 | /* -------------------------------------------------------------------- */ 79 | cSHP = SHPCreate( argv[2], nShapeType ); 80 | 81 | if( cSHP == NULL ) 82 | { 83 | printf( "Unable to open:%s\n", argv[2] ); 84 | exit( 1 ); 85 | } 86 | 87 | SHPGetInfo( cSHP, NULL, &cShapeType, &(adBounds[0]), &(adBounds[2]) ); 88 | 89 | 90 | /* -------------------------------------------------------------------- */ 91 | /* Skim over the list of shapes, printing all the vertices. */ 92 | /* -------------------------------------------------------------------- */ 93 | 94 | for( i = 0; i < nEntities; i++ ) 95 | { 96 | 97 | shape = SHPReadObject( hSHP, i ); 98 | if ( i == fix_rec ) 99 | { shape->nParts = 0; 100 | shape->nVertices = 0; 101 | } 102 | SHPWriteObject( cSHP, -1, shape ); 103 | SHPDestroyObject ( shape ); 104 | 105 | } 106 | 107 | 108 | SHPClose ( hSHP ); 109 | SHPClose ( cSHP ); 110 | } 111 | -------------------------------------------------------------------------------- /Libraries/shapelib/contrib/shpsort.txt: -------------------------------------------------------------------------------- 1 | ============================= ABOUT =========================================== 2 | 3 | The program "shpsort" is a standalone program for sorting shapefiles 4 | on one or more fields (including the pseudofield "SHAPE") and outputing 5 | the results. People may find it useful for forcing drawing order. 6 | 7 | ============================= AUTHOR ========================================== 8 | 9 | Eric G. Miller 10 | California Department of Fish and Game 11 | 2004-06-30 12 | 13 | ============================= USAGE =========================================== 14 | 15 | shpsort {SORT_ORDER;SORT_ORDER...} 16 | 17 | ============================= DETAILS ========================================= 18 | 19 | INFILE The input shapefile 20 | 21 | OUTFILE The output shapefile 22 | 23 | SORT_FIELD Any attribute field of the shapefile, including "SHAPE" 24 | 25 | SORT_ORDER Specify "ASCENDING" or "DESCENDING" for each SORT_FIELD. 26 | This field is optional, and is assumed to be ASCENDING 27 | unless the exact word "DESCENDING" is specified (case 28 | matters). 29 | 30 | When sorting on the "SHAPE" the records are sorted as follows: 31 | 32 | * Null shapes are treated as any other null field and will 33 | sort to the top in ASCENDING mode. A warning is issued 34 | for each null shape encountered. 35 | * POINT, POINTM, POINTZ, MULTIPOINT, MULTIPOINTM, MULTIPOINTZ 36 | and MULTIPATCH are all sorted by the maximum "Y" value of 37 | their envelopes (not particularly useful). 38 | * POLYLINE, POLYLINEZ and POLYLINEM are sorted by total 2d 39 | shape length. 40 | * POLYGON, POLYGONZ and POLYGONM are sorted by the 2d shape 41 | area. Shapes are assumed to be in canonical ordering, so that 42 | the area of interior rings (if any) is subtracted from the 43 | area of exterior rings. 44 | 45 | -------------------------------------------------------------------------------- /Libraries/shapelib/contrib/tests/shpproj.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd tests 4 | 5 | rm test* 6 | shpcreate test point 7 | 8 | shpadd test -83.54949956 34.992401 9 | shpadd test -83.52162155 34.99276748 10 | shpadd test -84.01681518 34.67275985 11 | shpadd test -84.15596023 34.64862437 12 | shpadd test -83.61951463 34.54927047 13 | 14 | dbfcreate test -s fd 30 15 | dbfadd test "1" 16 | dbfadd test "2" 17 | dbfadd test "3" 18 | dbfadd test "4" 19 | dbfadd test "5" 20 | 21 | ../shpproj test test_1 -i=geographic -o="init=nad83:1002 units=us-ft" 22 | ../shpproj test_1 test_2 -o="proj=utm zone=16 units=m" 23 | ../shpproj test_2 test_3 -o=geographic 24 | 25 | shpdump test > test.out 26 | shpdump test_3 > test_3.out 27 | result=`diff test.out test_3.out` 28 | 29 | if [ -z "${result}" ]; then 30 | echo success... 31 | else 32 | echo failure... 33 | fi 34 | 35 | rm test* 36 | 37 | 38 | cd .. 39 | -------------------------------------------------------------------------------- /Libraries/shapelib/makefile.vc: -------------------------------------------------------------------------------- 1 | 2 | #CFLAGS = /DSHPAPI_CALL=__stdcall 3 | CFLAGS = /nologo /Ox /MD /DSHAPELIB_DLLEXPORT 4 | 5 | IMPORT_LIB = shapelib_i.lib 6 | STATIC_LIB = shapelib.lib 7 | DLLNAME = shapelib.dll 8 | LINK_LIB = $(IMPORT_LIB) 9 | 10 | OBJ = shpopen.obj dbfopen.obj shptree.obj safileio.obj 11 | 12 | all: $(STATIC_LIB) $(DLLNAME) \ 13 | shpcreate.exe shpadd.exe shpdump.exe shprewind.exe dbfcreate.exe \ 14 | dbfadd.exe dbfdump.exe shptest.exe shptreedump.exe 15 | 16 | shpopen.obj: shpopen.c shapefil.h 17 | $(CC) $(CFLAGS) -c shpopen.c 18 | 19 | shptree.obj: shptree.c shapefil.h 20 | $(CC) $(CFLAGS) -c shptree.c 21 | 22 | dbfopen.obj: dbfopen.c shapefil.h 23 | $(CC) $(CFLAGS) -c dbfopen.c 24 | 25 | safileio.obj: safileio.c shapefil.h 26 | $(CC) $(CFLAGS) -c safileio.c 27 | 28 | shpcreate.exe: shpcreate.c $(LINK_LIB) 29 | $(CC) $(CFLAGS) shpcreate.c $(LINK_LIB) $(LINKOPT) 30 | if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 31 | 32 | shpadd.exe: shpadd.c $(LINK_LIB) 33 | $(CC) $(CFLAGS) shpadd.c $(LINK_LIB) $(LINKOPT) 34 | if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 35 | 36 | shpdump.exe: shpdump.c $(LINK_LIB) 37 | $(CC) $(CFLAGS) shpdump.c $(LINK_LIB) $(LINKOPT) 38 | if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 39 | 40 | shprewind.exe: shprewind.c $(LINK_LIB) 41 | $(CC) $(CFLAGS) shprewind.c $(LINK_LIB) $(LINKOPT) 42 | if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 43 | 44 | dbfcreate.exe: dbfcreate.c $(LINK_LIB) 45 | $(CC) $(CFLAGS) dbfcreate.c $(LINK_LIB) $(LINKOPT) 46 | if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 47 | 48 | dbfadd.exe: dbfadd.c $(LINK_LIB) 49 | $(CC) $(CFLAGS) dbfadd.c $(LINK_LIB) $(LINKOPT) 50 | if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 51 | 52 | dbfdump.exe: dbfdump.c $(LINK_LIB) 53 | $(CC) $(CFLAGS) dbfdump.c $(LINK_LIB) $(LINKOPT) 54 | if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 55 | 56 | shptest.exe: shptest.c $(LINK_LIB) 57 | $(CC) $(CFLAGS) shptest.c $(LINK_LIB) $(LINKOPT) 58 | if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 59 | 60 | shputils.exe: shputils.c $(LINK_LIB) 61 | $(CC) $(CFLAGS) shputils.c $(LINK_LIB) $(LINKOPT) 62 | if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 63 | 64 | shptreedump.exe: shptreedump.c $(LINK_LIB) 65 | $(CC) $(CFLAGS) shptreedump.c $(LINK_LIB) $(LINKOPT) 66 | if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 67 | 68 | shpdiff.exe: shpdiff.c $(LINK_LIB) 69 | $(CC) $(CFLAGS) shpdiff.c $(LINK_LIB) $(LINKOPT) 70 | if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1 71 | 72 | clean: 73 | -del *.obj 74 | -del *.exe 75 | -del *.lib 76 | -del *.dll 77 | -del *.manifest 78 | 79 | $(STATIC_LIB): $(OBJ) 80 | lib /nologo /out:$(STATIC_LIB) $(OBJ) 81 | 82 | $(IMPORT_LIB): $(DLLNAME) 83 | 84 | $(DLLNAME): $(OBJ) 85 | link /nologo /dll /out:$(DLLNAME) /implib:$(IMPORT_LIB) $(OBJ) 86 | if exist $(DLLNAME).manifest mt /nologo -manifest $(DLLNAME).manifest -outputresource:$(DLLNAME);2 87 | -------------------------------------------------------------------------------- /Libraries/shapelib/makeshape.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Use example programs to create a very simple dataset that 5 | # should display in ARCView II. 6 | # 7 | 8 | ./shpcreate test polygon 9 | ./dbfcreate test.dbf -s Description 30 -n TestInt 6 0 -n TestDouble 16 5 10 | 11 | ./shpadd test 0 0 100 0 100 100 0 100 0 0 + 20 20 20 30 30 30 20 20 12 | ./dbfadd test.dbf "Square with triangle missing" 1.5 2.5 13 | 14 | ./shpadd test 150 150 160 150 180 170 150 150 15 | ./dbfadd test.dbf "Smaller triangle" 100 1000.25 16 | 17 | ./shpadd test 150 150 160 150 180 170 150 150 18 | ./dbfadd test.dbf "" "" "" 19 | 20 | ./shpdump test.shp 21 | ./dbfdump test.dbf 22 | -------------------------------------------------------------------------------- /Libraries/shapelib/mkdist.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ $# -lt 1 ] ; then 4 | echo "Usage: mkdist.sh " 5 | echo " - version number used in name of generated archive." 6 | echo "Example: mkdist.sh 1.1.4" 7 | exit 8 | fi 9 | 10 | VERSION=$1 11 | 12 | rm -rf dist_wrk 13 | mkdir dist_wrk 14 | cd dist_wrk 15 | 16 | REP=:pserver:cvsanon@cvs.maptools.org:/cvs/maptools/cvsroot 17 | if cvs -d $REP co shapelib ; then 18 | echo checkout succeeds. 19 | else 20 | cvs -d $REP login 21 | cvs -d $REP co shapelib 22 | fi 23 | 24 | if [ ! -d shapelib ] ; then 25 | exit 1 26 | fi 27 | 28 | mv shapelib shapelib-$VERSION 29 | 30 | find . -name CVS -type d -exec echo rm -rf {} \; 31 | 32 | tar czvf ../shapelib-$VERSION.tar.gz shapelib-$VERSION 33 | zip -r ../shapelib-$VERSION.zip shapelib-$VERSION 34 | cd .. 35 | rm -rf dist_wrk 36 | 37 | 38 | -------------------------------------------------------------------------------- /Libraries/shapelib/mkinstalldirs: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # mkinstalldirs --- make directory hierarchy 3 | # Author: Noah Friedman 4 | # Created: 1993-05-16 5 | # Public domain 6 | 7 | errstatus=0 8 | 9 | for file 10 | do 11 | set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` 12 | shift 13 | 14 | pathcomp= 15 | for d 16 | do 17 | pathcomp="$pathcomp$d" 18 | case "$pathcomp" in 19 | -* ) pathcomp=./$pathcomp ;; 20 | esac 21 | 22 | if test ! -d "$pathcomp"; then 23 | echo "mkdir $pathcomp" 24 | 25 | mkdir "$pathcomp" || lasterr=$? 26 | 27 | if test ! -d "$pathcomp"; then 28 | errstatus=$lasterr 29 | fi 30 | fi 31 | 32 | pathcomp="$pathcomp/" 33 | done 34 | done 35 | 36 | exit $errstatus 37 | 38 | # mkinstalldirs ends here 39 | -------------------------------------------------------------------------------- /Libraries/shapelib/mkrelease.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # mkrelease.sh - prepares Shapelib source distribution package 4 | # 5 | if [ $# -lt 1 ] ; then 6 | echo "Usage: mkrelease.sh " 7 | echo " - version number used in name of generated archive." 8 | echo 9 | echo "Example: mkrelease 1.3.0beta1" 10 | exit 11 | fi 12 | 13 | # 14 | # Processing script input arguments 15 | # 16 | VERSION=$1 17 | 18 | # 19 | # Checkout Shapelib sources from the repository 20 | # 21 | echo "* Downloading Shapelib sources from CVS..." 22 | rm -rf dist_wrk 23 | mkdir dist_wrk 24 | cd dist_wrk 25 | 26 | cvs -d :pserver:cvsanon@cvs.maptools.org:/cvs/maptools/cvsroot export -D now shapelib 27 | 28 | if [ \! -d shapelib ] ; then 29 | echo "checkout reported an error ..." 30 | echo "perhaps you need to do:" 31 | echo "cvs -d :pserver:cvsanon@cvs.maptools.org:/cvs/maptools/cvsroot login" 32 | cd .. 33 | rm -rf dist_wrk 34 | exit 35 | fi 36 | 37 | # 38 | # Make distribution packages 39 | # 40 | echo "* Making distribution packages..." 41 | 42 | mv shapelib shapelib-${VERSION} 43 | 44 | rm -f ../shapelib-${VERSION}.tar.gz ../shapelib-${VERSION}.zip 45 | 46 | tar cf ../shapelib-${VERSION}.tar shapelib-${VERSION} 47 | gzip -9 ../shapelib-${VERSION}.tar 48 | zip -r ../shapelib-${VERSION}.zip shapelib-${VERSION} 49 | 50 | echo "* Cleaning..." 51 | cd .. 52 | rm -rf dist_wrk 53 | 54 | echo "*** The End ***" 55 | 56 | -------------------------------------------------------------------------------- /Libraries/shapelib/shapelib.def: -------------------------------------------------------------------------------- 1 | LIBRARY shapelib 2 | EXPORTS SHPOpen 3 | SHPCreate 4 | SHPGetInfo 5 | SHPReadObject 6 | SHPWriteObject 7 | SHPDestroyObject 8 | SHPComputeExtents 9 | SHPCreateObject 10 | SHPCreateSimpleObject 11 | SHPClose 12 | SHPWriteHeader 13 | SHPTypeName 14 | SHPPartTypeName 15 | SHPCreateTree 16 | SHPDestroyTree 17 | SHPTreeAddShapeId 18 | SHPTreeTrimExtraNodes 19 | SHPTreeFindLikelyShapes 20 | SHPCheckBoundsOverlap 21 | DBFOpen 22 | DBFCreate 23 | DBFGetFieldCount 24 | DBFGetRecordCount 25 | DBFAddField 26 | DBFGetFieldInfo 27 | DBFReadIntegerAttribute 28 | DBFReadDoubleAttribute 29 | DBFReadStringAttribute 30 | DBFWriteIntegerAttribute 31 | DBFWriteDoubleAttribute 32 | DBFWriteStringAttribute 33 | DBFReadTuple 34 | DBFWriteTuple 35 | DBFCloneEmpty 36 | DBFClose 37 | DBFWriteNULLAttribute 38 | DBFGetFieldIndex 39 | DBFIsAttributeNULL 40 | DBFWriteLogicalAttribute 41 | DBFReadLogicalAttribute 42 | DBFUpdateHeader 43 | DBFGetNativeFieldType 44 | SHPRewindObject 45 | DBFIsRecordDeleted 46 | DBFMarkRecordDeleted 47 | -------------------------------------------------------------------------------- /Libraries/shapelib/stream1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | EG_DATA=/u/www/projects/shapelib/eg_data 4 | 5 | echo ------------------------------------------------------------------------- 6 | echo Test 1: dump anno.shp 7 | echo ------------------------------------------------------------------------- 8 | ./shpdump $EG_DATA/anno.shp | head -250 9 | 10 | echo ------------------------------------------------------------------------- 11 | echo Test 2: dump brklinz.shp 12 | echo ------------------------------------------------------------------------- 13 | ./shpdump $EG_DATA/brklinz.shp | head -500 14 | 15 | echo ------------------------------------------------------------------------- 16 | echo Test 3: dump polygon.shp 17 | echo ------------------------------------------------------------------------- 18 | ./shpdump $EG_DATA/polygon.shp | head -500 19 | 20 | echo ------------------------------------------------------------------------- 21 | echo Test 4: dump pline.dbf - uses new F field type 22 | echo ------------------------------------------------------------------------- 23 | ./dbfdump -m -h $EG_DATA/pline.dbf | head -50 24 | 25 | echo ------------------------------------------------------------------------- 26 | echo Test 5: NULL Shapes. 27 | echo ------------------------------------------------------------------------- 28 | ./shpdump $EG_DATA/csah.dbf | head -150 29 | -------------------------------------------------------------------------------- /Libraries/shapelib/stream2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13; do 4 | echo ----------------------------------------------------------------------- 5 | echo Test 2/$i 6 | echo ----------------------------------------------------------------------- 7 | 8 | ./shptest $i 9 | ./shpdump test${i}.shp 10 | done 11 | 12 | -------------------------------------------------------------------------------- /Libraries/shapelib/stream3.out: -------------------------------------------------------------------------------- 1 | Shapefile Type: Polygon # of Shapes: 3 2 | 3 | File Bounds: (0,0,0,0) 4 | to (180,170,0,0) 5 | 6 | Shape:0 (Polygon) nVertices=9, nParts=2 7 | Bounds:(0,0, 0) 8 | to (100,100, 0) 9 | (0,0, 0) Ring 10 | (100,0, 0) 11 | (100,100, 0) 12 | (0,100, 0) 13 | (0,0, 0) 14 | + (20,20, 0) Ring 15 | (20,30, 0) 16 | (30,30, 0) 17 | (20,20, 0) 18 | 19 | Shape:1 (Polygon) nVertices=4, nParts=1 20 | Bounds:(150,150, 0) 21 | to (180,170, 0) 22 | (150,150, 0) Ring 23 | (160,150, 0) 24 | (180,170, 0) 25 | (150,150, 0) 26 | 27 | Shape:2 (Polygon) nVertices=4, nParts=1 28 | Bounds:(150,150, 0) 29 | to (180,170, 0) 30 | (150,150, 0) Ring 31 | (160,150, 0) 32 | (180,170, 0) 33 | (150,150, 0) 34 | Descriptio TestInt TestDouble 35 | Square with triangle missing 1 2.50000 36 | Smaller triangle 100 1000.25000 37 | (NULL) (NULL) (NULL) 38 | -------------------------------------------------------------------------------- /Libraries/shapelib/web/.cvsignore: -------------------------------------------------------------------------------- 1 | robots.txt 2 | dl 3 | -------------------------------------------------------------------------------- /Libraries/shapelib/web/codepage.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Libraries/shapelib/web/codepage.html -------------------------------------------------------------------------------- /Libraries/shapelib/web/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/Libraries/shapelib/web/index.html -------------------------------------------------------------------------------- /Libraries/shapelib/web/license.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Shapelib License 4 | 5 | 6 | 7 | 8 |

License

9 | 10 | The source for the Shapefile C Library is (c) 1998 Frank Warmerdam, 11 | and released under the following conditions. The intent is that anyone 12 | can do anything with the code, but that I do not assume any liability, nor 13 | express any warranty for this code.

14 | 15 | As of Shapelib 1.2.6 the core portions of the library are made available 16 | under two possible licenses. The licensee can choose to use the code 17 | under either the Library GNU Public License (LGPL) described in 18 | LICENSE.LGPL or under the following MIT style license. Any files in 19 | the Shapelib distribution without explicit copyright license terms 20 | (such as this documentation, the Makefile and so forth) should be 21 | considered to have the following licensing terms. Some auxilary portions 22 | of Shapelib, notably some of the components in the contrib directory 23 | come under slightly different license restrictions. Check the source 24 | files that you are actually using for conditions.

25 | 26 |

Default License Terms

27 | 28 | 29 | Copyright (c) 1999, Frank Warmerdam

30 | 31 | This software is available under the following "MIT Style" license, 32 | or at the option of the licensee under the LGPL (see LICENSE.LGPL). This 33 | option is discussed in more detail in shapelib.html.

34 | 35 | Permission is hereby granted, free of charge, to any person obtaining a 36 | copy of this software and associated documentation files (the "Software"), 37 | to deal in the Software without restriction, including without limitation 38 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 39 | and/or sell copies of the Software, and to permit persons to whom the 40 | Software is furnished to do so, subject to the following conditions:

41 | 42 | The above copyright notice and this permission notice shall be included 43 | in all copies or substantial portions of the Software.

44 | 45 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 46 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 47 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 48 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 49 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 50 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 51 | DEALINGS IN THE SOFTWARE.

52 | 53 | 54 |

Shapelib Modifications

55 | 56 | I am pleased to receive bug fixes, and improvements for Shapelib. Unless 57 | the submissions indicate otherwise I will assume that changes submitted to 58 | me remain under the the above "dual license" terms. If changes are made 59 | to the library with the intention that those changes should be protected by 60 | the LGPL then I should be informed upon submission. Note that I will not 61 | generally incorporate changes into the core of Shapelib that are protected 62 | under the LGPL as this would effectively limit the whole file and 63 | distribution to LGPL terms.

64 | 65 |

Opting for LGPL

66 | 67 | For licensee's opting to use Shapelib under LGPL as opposed to the MIT 68 | Style license above, and wishing to redistribute the software based on 69 | Shapelib, I would ask that all "dual license" modules be updated to 70 | indicate that only the LGPL (and not the MIT Style license) applies. This 71 | action represents opting for the LGPL, and thereafter LGPL terms apply to 72 | any redistribution and modification of the affected modules.

73 | 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /Libraries/shapelib/web/manifest.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Shapefile C Library V1.2 4 | 5 | 6 | 7 | 8 |

Shapelib Manifest

9 | 10 |
    11 |
  • web/index.html: This file - general documentation on the 12 | Shapefile C Library.

    13 | 14 |

  • web/shp_api.html: Documentation 15 | for the API for accessing the .shp/.shx files.

    16 | 17 |

  • web/dbf_api.html: Documentation 18 | for the API for accessing the .dbf attribute files.

    19 | 20 |

  • shpopen.c: C code for access to .shp/.shx vertex files.

    21 | 22 |

  • dbfopen.c: C code for access to .dbf attribute file.

    23 | 24 |

  • shapefil.h: Include file defining all the services of dbfopen.c 25 | and shpopen.c.

    26 | 27 |

  • contrib/: A directory of "in progress" contributed programs 28 | from Carl Anderson.

    29 | 30 |

  • dbfcreate.c: Simple example program for creating a new .dbf file. 31 |

    32 | 33 |

  • dbfadd.c: 34 | Simple example program for adding a record to a .dbf file.

    35 | 36 |

  • dbfdump.c: Simple example program for displaying the contents of 37 | a .dbf file.

    38 | 39 |

  • shpcreate.c: Simple example program for creating a new .shp and 40 | .shx file.

    41 | 42 |

  • shpadd.c: Simple example program for adding a shape to an existing 43 | shape file.

    44 | 45 |

  • shpdump.c: Simple program for dumping all the vertices in a 46 | shapefile with an indicating of the parts.

    47 | 48 |

  • shputils.c: Complex contributed program capable of clipping and 49 | appending 50 | shapefiles as well as a few other things. Type shputils 51 | after building to get a full usage message.

    52 | 53 |

  • Makefile: A simple makefile to compile the library and example 54 | programs.

    55 | 56 |

  • makeshape.sh: A simple script for running some of the example 57 | programs.

    58 | 59 |

  • shptest.c: A simple test harnass to generate each of the supported 60 | types of shapefiles.

    61 | 62 | 63 |

  • shptree.c: Implements a simple quadtree algorithm for fast 64 | spatial searches of shapefiles.

    65 | 66 |

  • shptreedump.c: A simple mainly showing information on quad 67 | trees build using the quad tree api.

    68 | 69 |

  • stream1.sh - A test script, which should produce stream1.out. 70 | Note this will only work if you have the example data downloaded.

    71 | 72 |

  • stream1.out: Expected output of stream1.sh test script.

    73 | 74 |

  • stream2.sh: A test script, which should produce stream2.out.

    75 | 76 |

  • stream2.out: Expected output of stream2.sh test script.

    77 | 78 |

  • pyshapelib-0.1: Prototype contributed Python bindings.

    79 | 80 |

81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /Libraries/shapelib/web/release.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Shapelib Release Notes 4 | 5 | 6 | 7 | 8 |

Shapelib Release Notes

9 | 10 | To get notification of new releases of Shapelib subscribe to 11 | the project at www.freshmeat.net. This is currently the only reliable 12 | way of finding out about new releases since there is no shapelib specific 13 | mailing list.

14 | 15 | Release 1.3.0: 16 |

    17 |
  • Major rework to us application provided hooks for file io, and error reporting (SAHooks). 18 |
  • Added contrib/Shape_PointInPoly.cpp from Marko Podgorsek. 19 |
  • Added shapelib tools documentation from Eduardo Patto Kanegae. 20 |
  • Added dbf deletion support. 21 |
  • Added DBFAddNativeFieldType(). 22 |
  • Added DBFDeleteField(), DBFReorderFields() and DBFAlterFields() to 23 | rework DBF schema. 24 |
  • likely a variety of other changes - it has been eight years since 1.2.10! 25 |
26 | 27 | Release 1.2.10: Added SHPRewindObject() function, and shprewind utility 28 | program. Added FTLogical, DBFReadLogicalAttribute() and 29 | DBFWriteLogicalAttribute() (thanks to Olek Neyman).

30 | 31 | Release 1.2.9: Good support for reading and writing NULL fields 32 | in .dbf files, good support for NULL shapes and addition of the 33 | DBFGetFieldIndex() functions (all contributed by Jim Matthews).

34 | 35 | An upgraded shputils.c has been contributed by Bill Miller. Daniel 36 | Morissette contributed DBFGetNativeFieldType(). Better error checking 37 | for disk errors in dbfopen.c. Various other bug fixes and safety improvements. 38 |

39 | 40 | Release 1.2.8: Added hacked libtool support (supplied by Jan) 41 | and "rpm ready" install logic.

42 | 43 | Release 1.2.7: Fix record size (was 4 bytes too long). Modify 44 | SHPReadObject() to handle null shapes properly. Use atof() instead of 45 | sscanf(). Support .DBF as well as .dbf.

46 | 47 | Release 1.2.6: Now available under old MIT style license, or at the 48 | users option, LGPL. Added the contrib directory of stuff from Carl Anderson 49 | and the shptree.c API for quadtree based spatial searches.

50 | 51 | Release 1.2.5: SHPOpen() now forcably uses "rb" or "r+b" access string 52 | to avoid common mistakes on Windows. Also fixed a serious bug with .dbf 53 | files with a 'F' field type.

54 | 55 | Release 1.2.4: DBFOpen() will now automatically translate a .shp 56 | extension to .dbf for convenience. SHPOpen() will try datasets with lower 57 | and uppercase extension. DBFAddField() now returns the field number, 58 | not TRUE/FALSE.

59 | 60 | Release 1.2.3: Disable writing measures to multi-patches as ArcView 61 | seems to puke on them (as reported by Monika Sester). Add white space 62 | trimming, and string/numeric attribute interchangability in DBF API 63 | as suggested by Steve Lime. Dbfdump was updated to include several 64 | reporting options.

65 | 66 | Release 1.2.2: Added proper support for multipatch (reading and 67 | writing) - this release just for testing purposes.

68 | 69 | Release 1.2 is mostly a rewrite of the .shp/.shx access API to account 70 | for ArcView 3.x 3D shapes, and to encapsulate the shapes in a structure. 71 | Existing code using the shapefile library will require substantial changes 72 | to use release 1.2.

73 | 74 | Release V1.1 has been built on a number of platforms, and used by a 75 | number of people successfully. V1.1 is the first release with the xBase API 76 | documentation.

77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # GTG Makefile 2 | 3 | # Tools 4 | 5 | CPP = /usr/bin/g++ 6 | RM = /bin/rm 7 | 8 | # Setup 9 | 10 | CFLAGS = -g -Wall -fPIC 11 | 12 | LIB_SGP4_DIR = Libraries/sgp4 13 | LIB_SHP_DIR = Libraries/shapelib 14 | 15 | INCLUDES = -I $(LIB_SGP4_DIR)/libsgp4 -I $(LIB_SHP_DIR) 16 | 17 | LIB_SGP4 = $(LIB_SGP4_DIR)/libsgp4/libsgp4.a 18 | LIB_SHP = $(LIB_SHP_DIR)/libshp.a 19 | 20 | LIB_GTG_DIR = Source 21 | LIB_GTG = $(LIB_GTG_DIR)/libgtg.a 22 | 23 | TEST_DIR = test 24 | TEST_CASES_DIR = $(TEST_DIR)/cases 25 | 26 | .PHONY: libs libsgp4 libshp $(LIB_SGP4_DIR) $(LIB_SHP_DIR) $(LIB_GTG_DIR) clean-libs clean-sgp4 clean-shp clean clean-all clean-gtg libgtg gtg test 27 | 28 | # Ground Track Generator 29 | 30 | default: gtg 31 | 32 | gtg: $(LIB_SGP4) $(LIB_SHP) $(LIB_GTG) 33 | $(CPP) $(LIB_GTG) $(LIB_SGP4) $(LIB_SHP) -o $@ 34 | 35 | # Program Library 36 | 37 | $(LIB_GTG): libgtg 38 | 39 | libgtg: $(LIB_GTG_DIR) 40 | 41 | $(LIB_GTG_DIR): 42 | @echo "# Making libgtg..." 43 | @$(MAKE) --directory=$(LIB_GTG_DIR) lib 44 | 45 | # Prerequisite Libraries 46 | 47 | libs: libsgp4 libshp 48 | 49 | $(LIB_SGP4): libsgp4 50 | 51 | $(LIB_SHP): libshp 52 | 53 | libsgp4: $(LIB_SGP4_DIR) 54 | 55 | libshp: $(LIB_SHP_DIR) 56 | 57 | $(LIB_SGP4_DIR): 58 | @echo "# Making libsgp4..." 59 | @$(MAKE) --directory=$(LIB_SGP4_DIR) 60 | 61 | $(LIB_SHP_DIR): 62 | @echo "# Making libshp..." 63 | @$(MAKE) --directory=$(LIB_SHP_DIR) lib 64 | 65 | # Test 66 | 67 | test: gtg 68 | @$(MAKE) --directory=$(TEST_CASES_DIR) test 69 | 70 | # Clean 71 | 72 | clean: clean-gtg 73 | $(RM) -f gtg 74 | 75 | clean-gtg: 76 | $(MAKE) --directory=$(LIB_GTG_DIR) clean 77 | 78 | clean-all: clean clean-libs 79 | 80 | clean-libs: clean-sgp4 clean-shp 81 | 82 | clean-sgp4: 83 | $(MAKE) --directory=$(LIB_SGP4_DIR) clean 84 | 85 | clean-shp: 86 | $(MAKE) --directory=$(LIB_SHP_DIR) clean 87 | -------------------------------------------------------------------------------- /Source/Makefile: -------------------------------------------------------------------------------- 1 | # GTG/Source Makefile 2 | 3 | # Tools 4 | 5 | CPP = /usr/bin/g++ 6 | AR = /usr/bin/ar 7 | RM = /bin/rm 8 | 9 | # Settings 10 | 11 | CFLAGS = -g -Wall -fPIC -Wextra 12 | LIB_SGP4_DIR = ../Libraries/sgp4/libsgp4 13 | LIB_SHP_DIR = ../Libraries/shapelib 14 | INCLUDES = -I $(LIB_SGP4_DIR) -I $(LIB_SHP_DIR) 15 | OBJS = gtg.o gtgtle.o gtgutil.o gtgtrace.o gtgshp.o gtgattr.o 16 | 17 | .PHONY: default lib clean 18 | 19 | # Objects 20 | 21 | default: $(OBJS) 22 | 23 | gtg.o: gtg.cpp gtg.h gtgutil.h gtgtrace.h 24 | $(CPP) $(CFLAGS) $(INCLUDES) -c gtg.cpp 25 | 26 | gtgtle.o: gtgtle.cpp gtgtle.h gtgutil.h 27 | $(CPP) $(CFLAGS) $(INCLUDES) -c gtgtle.cpp 28 | 29 | gtgutil.o: gtgutil.cpp gtgutil.h 30 | $(CPP) $(CFLAGS) $(INCLUDES) -c gtgutil.cpp 31 | 32 | gtgtrace.o: gtgtrace.cpp gtgtrace.h gtgutil.h gtgtle.h gtg.h gtgshp.h gtgattr.h 33 | $(CPP) $(CFLAGS) $(INCLUDES) -c gtgtrace.cpp 34 | 35 | gtgshp.o: gtgshp.cpp gtgshp.h gtg.h gtgutil.h 36 | $(CPP) $(CFLAGS) $(INCLUDES) -c gtgshp.cpp 37 | 38 | gtgattr.o: gtgattr.cpp gtgattr.h gtg.h gtgutil.h 39 | $(CPP) $(CFLAGS) $(INCLUDES) -c gtgattr.cpp 40 | 41 | 42 | # Library 43 | 44 | lib: libgtg.a 45 | 46 | libgtg.a: $(OBJS) 47 | $(AR) r $@ $(OBJS) 48 | 49 | # Clean 50 | 51 | clean: 52 | $(RM) -f $(OBJS) libgtg.a 53 | -------------------------------------------------------------------------------- /Source/gtg.h: -------------------------------------------------------------------------------- 1 | #ifndef _GTG_H_ 2 | #define _GTG_H_ 3 | 4 | #define _GTG_NAME_ "Ground Track Generator" 5 | #define _GTG_PROGRAM_ "gtg" 6 | #define _GTG_VERSION_ "1.0" 7 | 8 | enum output_feature_type { 9 | point, 10 | line 11 | }; 12 | 13 | typedef struct configuration { 14 | char *start; 15 | char *end; 16 | int forceend; 17 | char unit; 18 | double interval; 19 | int steps; 20 | char *basepath; 21 | enum output_feature_type features; 22 | int split; 23 | bool has_observer; 24 | double obslat; 25 | double obslon; 26 | double obsalt; 27 | char *prefix; 28 | char *suffix; 29 | int prj; 30 | bool single; 31 | bool csvMode; 32 | bool csvHeader; 33 | } GTGConfiguration; 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /Source/gtgattr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * gtgattr 3 | * 4 | * Handle initial option configuration of attributes and actual attribute table 5 | * setup and output. 6 | */ 7 | 8 | #ifndef _GTGATTR_H_ 9 | #define _GTGATTR_H_ 10 | 11 | #include 12 | 13 | #include "shapefil.h" 14 | 15 | #include "Eci.h" 16 | #include "CoordTopocentric.h" 17 | #include "CoordGeodetic.h" 18 | #include "Observer.h" 19 | #include "SolarPosition.h" 20 | 21 | /* used to parse attributes specified on command line and as dbf field titles */ 22 | enum attribute_ids { 23 | ATTR_LATITUDE = 0, 24 | ATTR_LONGITUDE, 25 | 26 | ATTR_MAIN_FIRST, 27 | ATTR_TIMEUTC = ATTR_MAIN_FIRST, 28 | ATTR_TIMEUNIX, 29 | ATTR_TIMEMFE, 30 | ATTR_ALTITUDE, 31 | ATTR_RADIUS, 32 | ATTR_VELOCITY, 33 | ATTR_HEADING, 34 | ATTR_POSITION_X, 35 | ATTR_POSITION_Y, 36 | ATTR_POSITION_Z, 37 | ATTR_VELOCITY_X, 38 | ATTR_VELOCITY_Y, 39 | ATTR_VELOCITY_Z, 40 | ATTR_ILLUMINATION, 41 | ATTR_MAIN_LAST = ATTR_ILLUMINATION, 42 | 43 | ATTR_OBS_FIRST, 44 | ATTR_OBS_RANGE = ATTR_OBS_FIRST, 45 | ATTR_OBS_RATE, 46 | ATTR_OBS_ELEVATION, 47 | ATTR_OBS_AZIMUTH, 48 | ATTR_OBS_SOLARELEV, 49 | ATTR_OBS_SOLARAZIM, 50 | ATTR_OBS_LAST = ATTR_OBS_SOLARAZIM, 51 | 52 | ATTR_COUNT 53 | }; 54 | 55 | enum attribute_illumination_type { 56 | ATTR_ILLUMINATION_ILLUMINATED = 0, 57 | ATTR_ILLUMINATION_PENUMBRAL, 58 | ATTR_ILLUMINATION_UMBRAL 59 | }; 60 | 61 | class AttributeWriter { 62 | public: 63 | AttributeWriter(const char *basepath, bool has_observer, double lat, double lon, double alt, bool csvMode, bool csvHeader); 64 | 65 | ~AttributeWriter() {} 66 | 67 | void output(int index, double minutes, const Eci& loc, const CoordGeodetic& geo); 68 | 69 | void close(void); 70 | 71 | private: 72 | DBFHandle dbf_; 73 | FILE *csv_; 74 | Observer *observer_; 75 | SolarPosition *sun_; 76 | }; 77 | 78 | void FlagAllAttributes(bool flag_value, bool except_observer_attributes = false); 79 | bool EnableAttribute(const char *desc); 80 | bool EnableAttributeByID(int id); 81 | 82 | #endif 83 | -------------------------------------------------------------------------------- /Source/gtgshp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * gtgshp 3 | * 4 | * Manage output to shapefile. 5 | */ 6 | 7 | #ifndef _GTGSHP_H_ 8 | #define _GTGSHP_H_ 9 | 10 | #include "Eci.h" 11 | #include "CoordGeodetic.h" 12 | #include "Observer.h" 13 | 14 | #include "shapefil.h" 15 | 16 | class ShapefileWriter 17 | { 18 | public: 19 | 20 | ShapefileWriter(const char *basepath, enum output_feature_type features, bool create_prj); 21 | 22 | ~ShapefileWriter() {} 23 | 24 | /* point output method */ 25 | int output(const CoordGeodetic& geo); 26 | 27 | /* line segment output method */ 28 | int output(const CoordGeodetic& geoStart, const CoordGeodetic& geoEnd, bool split, const Eci& endLoc); 29 | 30 | void close(void); 31 | 32 | private: 33 | 34 | void CreateWGS72prj(const char *basepath); 35 | SHPObject* splitSegment(double lata, double lona, double latb, double lonb, const Eci& loc); 36 | 37 | int shpFormat_; 38 | SHPHandle shp_; 39 | }; 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /Source/gtgtle.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * gtgtle 3 | * 4 | * Parses two-line element sets of data used to compute satellite position and 5 | * velocity according to the SGP4 model. http://celestrak.com/columns/v04n03/ 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #include "Util.h" 15 | #include "Tle.h" 16 | 17 | #include "gtgutil.h" 18 | 19 | #include "gtgtle.h" 20 | 21 | /* 22 | * Load two-line element sets from an input stream. Adds TLEs to tles queue. 23 | * Returns true if any TLEs were loaded, otherwise false. 24 | */ 25 | bool ReadTlesFromStream(std::istream& stream, std::queue& tles) 26 | { 27 | std::string thisLine, prevLine; 28 | Tle *tle = NULL; 29 | bool got_at_least_one_tle = false; 30 | 31 | while (!stream.eof()) { 32 | 33 | // read a line from the stream 34 | getline(stream, thisLine); 35 | 36 | // At least two lines are needed for a TLE. 37 | if (prevLine.empty()) { 38 | prevLine = thisLine; 39 | continue; 40 | } 41 | 42 | // Try to read this and the previous lines as a TLE. 43 | try { 44 | tle = new Tle(prevLine, thisLine); 45 | } catch (TleException &e) { 46 | ; 47 | } 48 | 49 | // Were we able to read these lines as a TLE? 50 | if (tle != NULL) { 51 | 52 | // Yes! Push a copy onto the queue. 53 | got_at_least_one_tle = true; 54 | tles.push(*tle); 55 | 56 | // Empty the temporary TLE bucket. 57 | delete tle; 58 | tle = NULL; 59 | 60 | // Clear this (and thus soon the previous) line to start fresh. 61 | thisLine.clear(); 62 | } 63 | 64 | prevLine = thisLine; 65 | } 66 | 67 | return got_at_least_one_tle; 68 | } 69 | 70 | /* 71 | * Load two-line element sets from a file identified by path. Adds TLEs to tles 72 | * queue. Returns true if any TLEs were loaded, otherwise false. 73 | */ 74 | bool ReadTlesFromPath(const char *path, std::queue& tles) 75 | { 76 | std::ifstream file(path); 77 | if (!file.is_open()) { 78 | Fail("cannot open TLE file: %s\n", path); 79 | } 80 | bool got_some_tles = ReadTlesFromStream(file, tles); 81 | file.close(); 82 | return got_some_tles; 83 | } 84 | 85 | /* 86 | * Load two-line element sets from a string buffer. Adds TLEs to tles queue. 87 | * Returns true if any TLEs were loaded, otherwise false. 88 | */ 89 | bool ReadTlesFromBuffer(const char *buffer, std::queue& tles) 90 | { 91 | std::istringstream bufferstream(buffer); 92 | return ReadTlesFromStream(bufferstream, tles); 93 | } 94 | -------------------------------------------------------------------------------- /Source/gtgtle.h: -------------------------------------------------------------------------------- 1 | /* 2 | * gtgtle 3 | * 4 | * Parses two-line element sets of data used to compute satellite position and 5 | * velocity according to the SGP4 model. http://celestrak.com/columns/v04n03/ 6 | */ 7 | 8 | #ifndef _GTGTLE_H_ 9 | #define _GTGTLE_H_ 10 | 11 | #include 12 | #include 13 | 14 | #include "Tle.h" 15 | 16 | bool ReadTlesFromStream(std::istream& stream, std::queue& tles); 17 | bool ReadTlesFromPath(const char *path, std::queue& tles); 18 | bool ReadTlesFromBuffer(const char *buffer, std::queue& tles); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /Source/gtgtrace.h: -------------------------------------------------------------------------------- 1 | /* 2 | * gtgtrace 3 | * 4 | * Performs the core loop of the program: propagating satellite position 5 | * forward for the specified number of steps from the specified start time. 6 | */ 7 | 8 | #ifndef _GTGTRACE_H_ 9 | #define _GTGTRACE_H_ 10 | 11 | void InitGroundTrace(Tle& tle, DateTime& now, const GTGConfiguration& cfg, const TimeSpan& interval); 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /Source/gtgutil.h: -------------------------------------------------------------------------------- 1 | /* 2 | * gtgutil 3 | * 4 | * Provides utility functions for displaying error, status, and help messages. 5 | */ 6 | 7 | #ifndef _GTGUTIL_H_ 8 | #define _GTGUTIL_H_ 9 | 10 | void SetVerbosity(bool verbose = true); 11 | void FailDetail(const char *file, int lineNumber, const char *errorString, ...); 12 | void Note(const char *noteString, ...); 13 | void Warn(const char *warnString, ...); 14 | void ShowVersion(void); 15 | void ShowHelp(void); 16 | 17 | #define Fail(format, ...) FailDetail(__FILE__, __LINE__, (format), ## __VA_ARGS__) 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /test/cases/01/01.tle: -------------------------------------------------------------------------------- 1 | # # TEME example 2 | # 0 4320 360 3 | 1 00005U 58002B 00179.78495062 .00000023 00000-0 28098-4 0 4753 4 | 2 00005 34.2682 348.7242 1859667 331.7664 19.3264 10.82419157413667 5 | -------------------------------------------------------------------------------- /test/cases/01/01.txt: -------------------------------------------------------------------------------- 1 | 0.00000000 7022.46529323 -1400.08296651 0.03995232 1.893841014 6.405893759 4.534807250 2 | 360.00000000 -7154.03120198 -3783.17682500 -3536.19412291 4.741887409 -4.151817765 -2.093935425 3 | 720.00000000 -7134.59340137 6531.68641318 3260.27186469 -4.113793027 -2.911922039 -2.557327851 4 | 1080.00000000 5568.53901190 4492.06992616 3863.87642001 -4.209106475 5.159719888 2.744852979 5 | 1440.00000000 -938.55923880 -6268.18748806 -4294.02924724 7.536105210 -0.427127707 0.989878080 6 | 1800.00000000 -9680.56121739 2802.47771336 124.10688025 -0.905874102 -4.659467970 -3.227347517 7 | 2160.00000000 190.19796983 7746.96653611 5110.00675409 -6.112325142 1.527008184 -0.139152358 8 | 2520.00000000 5579.55640211 -3995.61396685 -1518.82108879 4.767927482 5.123185302 4.276837355 9 | 2880.00000000 -8650.73082222 -1914.93811531 -3007.03603447 3.067165127 -4.828384068 -2.515322836 10 | 3240.00000000 -5429.79204182 7574.36493779 3747.39305224 -4.999442110 -1.800561422 -2.229392830 11 | 3600.00000000 6759.04583734 2001.58198286 2783.55192578 -2.180993947 6.402085603 3.644723951 12 | 3960.00000000 -3791.44531538 -5712.95617881 -4533.48630701 6.668817493 -2.516382327 -0.082384354 13 | 4320.00000000 -9060.47373583 4658.70952483 813.68673138 -2.232832783 -4.110453490 -3.157345433 14 | -------------------------------------------------------------------------------- /test/cases/02/02.tle: -------------------------------------------------------------------------------- 1 | # ## fig show lyddane fix error with gsfc ver 2 | # -5184 -4896 120 3 | 1 04632U 70093B 04031.91070959 -.00000084 00000-0 10000-3 0 9955 4 | 2 04632 11.4628 273.1101 1450506 207.6000 143.9350 1.20231981 44145 5 | -------------------------------------------------------------------------------- /test/cases/02/02.txt: -------------------------------------------------------------------------------- 1 | -5184.00000000 -29022.65198659 13813.58727454 -5712.80267321 -1.767679555 -3.235618731 -0.395304103 2 | -5064.00000000 -32984.08733180 -11125.77646201 -6803.84417503 0.617181873 -3.379146057 0.085689502 3 | -4944.00000000 -22101.31140765 -31583.64479972 -4838.69877409 2.230212625 -2.166702047 0.426197002 4 | -4896.00000000 -15134.50562684 -36908.83645182 -3490.54838260 2.580788527 -1.524429507 0.504591144 5 | -------------------------------------------------------------------------------- /test/cases/03/03.tle: -------------------------------------------------------------------------------- 1 | # DELTA 1 DEB # near earth normal drag equation 2 | # # perigee = 377.26km, so moderate drag case 3 | # 0 2880 120 4 | 1 06251U 62025E 06176.82412014 .00008885 00000-0 12808-3 0 3985 5 | 2 06251 58.0579 54.0425 0030035 139.1568 221.1854 15.56387291 6774 6 | -------------------------------------------------------------------------------- /test/cases/03/03.txt: -------------------------------------------------------------------------------- 1 | 0.00000000 3988.31075664 5498.96455763 0.89797552 -3.290032373 2.357654671 6.496624745 2 | 120.00000000 -3935.69956200 409.10445850 5471.33271168 -3.374783115 -6.635213108 -1.942059568 3 | 240.00000000 -1675.12733725 -5683.30642828 -3286.21755062 5.282494902 1.508674337 -5.354870297 4 | 360.00000000 4993.62622095 2890.54698000 -3600.40381497 0.347334916 5.707032465 5.070698608 5 | 480.00000000 -1115.08051681 4015.11401174 5326.99562621 -5.524281601 -4.765741442 2.402256112 6 | 600.00000000 -4329.09927300 -5176.70664744 409.64841701 2.858409521 -2.933088394 -6.509688604 7 | 720.00000000 3692.59934622 -976.24546984 -5623.36605696 3.897257510 6.415553560 1.429110475 8 | 840.00000000 2301.83546129 5723.92222855 2814.61298169 -5.110926325 -0.764510009 5.662122403 9 | 960.00000000 -4990.91717381 -2303.43119195 3920.85861038 -0.993436258 -5.967457108 -4.759113496 10 | 1080.00000000 642.27705116 -4332.90041093 -5183.31665126 5.720540599 4.216571911 -2.846575629 11 | 1200.00000000 4719.78367972 4798.06718753 -943.59115491 -2.294859691 3.492501207 6.408335377 12 | 1320.00000000 -3299.17173085 1576.82705064 5678.67585504 -4.460347214 -6.202028016 -0.885877318 13 | 1440.00000000 -2777.14624584 -5663.16263954 -2462.55200172 4.915491722 0.123330228 -5.896492064 14 | 1560.00000000 4992.31517628 1716.62079156 -4287.86286512 1.640718593 6.071570687 4.338796482 15 | 1680.00000000 -8.22443985 4662.21291331 4905.66241706 -5.891013723 -3.593175668 3.365101542 16 | 1800.00000000 -4966.20099448 -4379.59595827 1349.32834950 1.763174944 -3.981453044 -6.343278754 17 | 1920.00000000 2954.49278836 -2080.66246792 -5754.75183696 4.895892863 5.858182498 0.375473409 18 | 2040.00000000 3363.28838816 5559.55667215 1956.05302702 -4.587379500 0.591944643 6.107840696 19 | 2160.00000000 -4856.66929447 -1107.04012912 4557.20827553 -2.304155924 -6.186437234 -3.956552848 20 | 2280.00000000 -497.84520564 -4863.46206732 -4700.81382494 5.960063054 2.996682083 -3.767121954 21 | 2400.00000000 5241.61939653 3910.75723645 -1857.93737532 -1.124833394 4.406214691 6.148161320 22 | 2520.00000000 -2451.38223325 2610.60080220 5729.78806587 -5.366561825 -5.500858684 0.187956900 23 | 2640.00000000 -3791.87451553 -5378.83123823 -1575.83119978 4.266273165 -1.199160307 -6.276151093 24 | 2760.00000000 4730.53868522 524.04731031 -4857.29573725 2.918057378 6.135412435 3.495113915 25 | 2880.00000000 1159.27778528 5056.59985227 4353.49232753 -5.968062655 -2.314791198 4.230724429 26 | -------------------------------------------------------------------------------- /test/cases/04/04.tle: -------------------------------------------------------------------------------- 1 | # MOLNIYA 2-14 # 12h resonant ecc in 0.65 to 0.7 range 2 | # 0 2880 120 3 | 1 08195U 75081A 06176.33215444 .00000099 00000-0 11873-3 0 813 4 | 2 08195 64.1586 279.0717 6877146 264.7651 20.2257 2.00491383225656 5 | -------------------------------------------------------------------------------- /test/cases/04/04.txt: -------------------------------------------------------------------------------- 1 | 0.00000000 2350.65823676 -14783.78885396 -5.85249394 2.722382501 -3.258249392 4.497625857 2 | 120.00000000 15227.48868399 -17855.68500165 25274.91543324 1.079088153 0.874824795 2.485928990 3 | 240.00000000 19755.93080721 -8604.45438728 37519.74766958 0.237937545 1.545947501 0.986766493 4 | 360.00000000 19091.03621457 3102.88434657 39958.03052804 -0.410555886 1.640308366 -0.306476685 5 | 480.00000000 13829.69980837 13972.76989378 32739.16636990 -1.065348655 1.280152264 -1.759772762 6 | 600.00000000 3331.83815649 18393.24881332 12743.48910137 -1.882518854 -0.610905292 -4.039444660 7 | 720.00000000 2624.50945843 -15124.10479525 471.78492267 2.689099022 -3.078974224 4.494386557 8 | 840.00000000 15325.03100339 -17779.04489757 25536.18651564 1.064341478 0.891847802 2.459894124 9 | 960.00000000 19773.54729766 -8462.32808285 37622.35553969 0.229135974 1.550113427 0.967243405 10 | 1080.00000000 19051.06136462 3255.43331639 39923.87249764 -0.418241329 1.639218103 -0.325744307 11 | 1200.00000000 13730.16061310 14092.44392996 32550.81315368 -1.074741253 1.270601561 -1.784705273 12 | 1320.00000000 3148.52885990 18320.33655234 12311.42030614 -1.895428725 -0.677602820 -4.086484432 13 | 1440.00000000 2894.52083212 -15446.17392726 949.07215903 2.655105515 -2.909137301 4.486001106 14 | 1560.00000000 15421.08151398 -17700.54773807 25794.96390980 1.049771765 0.908514448 2.434017844 15 | 1680.00000000 19790.35920241 -8319.59307190 37723.04686120 0.220382073 1.554191067 0.947745761 16 | 1800.00000000 19010.44425507 3408.05292016 39887.72738207 -0.425924536 1.638049516 -0.345055511 17 | 1920.00000000 13629.81534027 14211.27762726 32359.79801425 -1.084186991 1.260826068 -1.809803192 18 | 2040.00000000 2963.88889730 18240.38211821 11874.29428204 -1.908235380 -0.747109846 -4.133947055 19 | 2160.00000000 3160.58722148 -15750.92893732 1425.43863412 2.620648667 -2.748166852 4.473215893 20 | 2280.00000000 15515.60802556 -17620.24479154 26051.22838029 1.035376367 0.924835170 2.408301305 21 | 2400.00000000 19806.33018701 -8176.26316371 37821.80810970 0.211676272 1.558183981 0.928274174 22 | 2520.00000000 18969.15299614 3560.74929658 39849.57956356 -0.433604794 1.636804823 -0.364411370 23 | 2640.00000000 13528.63526639 14329.27755304 32166.08772202 -1.093685657 1.250821976 -1.835070700 24 | 2760.00000000 2777.91539298 18153.11142735 11432.04959447 -1.920906281 -0.819595249 -4.181805220 25 | 2880.00000000 3422.62444156 -16039.24995247 1900.37237796 2.585931697 -2.595517700 4.456673424 26 | -------------------------------------------------------------------------------- /test/cases/05/05.tle: -------------------------------------------------------------------------------- 1 | # MOLNIYA 1-36 ## fig 12h resonant ecc in 0.7 to 0.715 range 2 | # 0 2880 120 3 | 1 09880U 77021A 06176.56157475 .00000421 00000-0 10000-3 0 9814 4 | 2 09880 64.5968 349.3786 7069051 270.0229 16.3320 2.00813614112380 5 | -------------------------------------------------------------------------------- /test/cases/05/05.txt: -------------------------------------------------------------------------------- 1 | 0.00000000 13003.84814201 -2459.28410287 -22.65309646 4.256196691 1.594550490 4.956412533 2 | 120.00000000 19191.47892284 9239.27966577 26584.90797833 -0.624868630 1.325098487 2.496971994 3 | 240.00000000 11331.83467245 16512.03165358 38564.16339498 -1.401504791 0.711424260 0.924476848 4 | 360.00000000 324.12420026 19551.95830106 40555.01861054 -1.593817251 0.127149475 -0.359458769 5 | 480.00000000 -10692.48318438 18056.45883986 33155.98619880 -1.383495521 -0.582021185 -1.744379965 6 | 600.00000000 -17077.98297024 9946.52663223 13884.54935231 0.044118626 -1.852873622 -3.814565558 7 | 720.00000000 13713.13514111 -2190.33173313 841.17849827 3.885635429 1.654830072 4.944767677 8 | 840.00000000 19092.54243954 9447.09304772 27015.17943129 -0.656531922 1.309563817 2.450539914 9 | 960.00000000 11107.26343586 16621.59400463 38721.63017687 -1.410271310 0.698980153 0.891912866 10 | 1080.00000000 69.21033037 19571.55029469 40488.76841363 -1.593990803 0.113959063 -0.390396796 11 | 1200.00000000 -10912.55389430 17963.63670431 32846.99517581 -1.371768833 -0.601475220 -1.782850337 12 | 1320.00000000 -17052.15637634 9635.44196590 13209.94126391 0.129307577 -1.903083859 -3.884078399 13 | 1440.00000000 14361.50604667 -1912.69885177 1701.65242749 3.549253002 1.700124746 4.913825003 14 | 1560.00000000 18988.55071982 9652.56604577 27437.58651399 -0.687087467 1.294164902 2.404702583 15 | 1680.00000000 10881.47248988 16729.35935115 38873.50249642 -1.418777755 0.686553417 0.859482025 16 | 1800.00000000 -185.49404015 19589.12162951 40417.15531279 -1.593980904 0.100683723 -0.421398044 17 | 1920.00000000 -11130.42958315 17867.52967307 32531.26968096 -1.359566980 -0.621246101 -1.821690628 18 | 2040.00000000 -17011.04650738 9315.14507190 12522.94701443 0.220404171 -1.955200673 -3.954770592 19 | 2160.00000000 14954.55962947 -1628.62056789 2555.93855659 3.243521493 1.733502327 4.868795290 20 | 2280.00000000 18879.63232171 9855.75657561 27852.28448879 -0.716587932 1.278898400 2.359436816 21 | 2400.00000000 10654.46639152 16835.36144156 39019.83813324 -1.427025605 0.674141788 0.827176664 22 | 2520.00000000 -439.96478888 19604.69115460 40340.19592966 -1.593781222 0.087321173 -0.452467159 23 | 2640.00000000 -11346.00303918 17768.12336259 32208.78218278 -1.346867396 -0.641343627 -1.860910781 24 | 2760.00000000 -16953.54643512 8985.33406645 11823.43047448 0.318001835 -2.009333032 -4.026588486 25 | 2880.00000000 15497.27201345 -1339.87914997 3401.97231437 2.965110323 1.757372241 4.813568716 26 | -------------------------------------------------------------------------------- /test/cases/06/06.tle: -------------------------------------------------------------------------------- 1 | # SMS 1 AKM # show the integrator problem with gsfc ver 2 | # -1440 -720 60 3 | 1 09998U 74033F 05148.79417928 -.00000112 00000-0 00000+0 0 4480 4 | 2 09998 9.4958 313.1750 0270971 327.5225 30.8097 1.16186785 45878 5 | -------------------------------------------------------------------------------- /test/cases/06/06.txt: -------------------------------------------------------------------------------- 1 | -1440.00000000 -11357.88224880 -35120.23814240 -5411.13183768 3.137905859 -1.011275968 0.267596774 2 | -1380.00000000 313.32824460 -36961.67838574 -4195.84201736 3.292343196 -0.001799203 0.402119985 3 | -1320.00000000 11952.48585217 -35127.45853541 -2563.38374333 3.119766814 1.012384640 0.497216395 4 | -1260.00000000 22403.04895275 -29797.91728621 -675.76603990 2.638317016 1.922670451 0.542660543 5 | -1200.00000000 30642.55494476 -21523.89273819 1278.94384104 1.903250618 2.634399226 0.534361405 6 | -1140.00000000 35900.48409169 -11151.47745361 3109.64701313 0.997205947 3.079897974 0.474666476 7 | -1080.00000000 37732.74152128 289.31472186 4644.07156993 0.016498834 3.225182831 0.371454685 8 | -1020.00000000 36045.75193967 11707.51846698 5745.80560528 -0.942535451 3.069863455 0.236456000 9 | -960.00000000 31076.25999159 22064.05769009 6324.75568800 -1.794138496 2.642029052 0.083370298 10 | -900.00000000 23340.50150333 30461.16706575 6341.17839988 -2.469512110 1.990796982 -0.073766598 11 | -840.00000000 13567.45815281 36204.37225063 5804.62236546 -2.919448230 1.178827012 -0.221762039 12 | -780.00000000 2627.53582447 38839.58673468 4769.45990597 -3.114477703 0.276112340 -0.348996119 13 | -720.00000000 -8536.88744384 38170.77292261 3328.42031444 -3.043886526 -0.644620654 -0.445828488 14 | -------------------------------------------------------------------------------- /test/cases/07/07.tle: -------------------------------------------------------------------------------- 1 | # # Original STR#3 SDP4 test 2 | # 0 1440 360 3 | 1 11801U 80230.29629788 .01431103 00000-0 14311-1 13 4 | 2 11801 46.7916 230.4354 7318036 47.4722 10.4117 2.28537848 13 5 | -------------------------------------------------------------------------------- /test/cases/07/07.txt: -------------------------------------------------------------------------------- 1 | 0.00000000 7469.79712096 427.94020558 5825.83341805 5.109071054 6.446375510 -0.185557549 2 | 360.00000000 -3305.75131398 32415.52326887 -24696.68328548 -1.300832436 -1.150964481 -0.283248804 3 | 720.00000000 14268.19442775 24111.73799492 -4729.37500397 -0.320666779 2.679941560 -2.083865903 4 | 1080.00000000 -9990.61955651 22723.55118318 -23615.94539619 -1.016492816 -2.289855555 0.728778585 5 | 1440.00000000 9784.70394980 33754.68275726 -15033.05335342 -1.094288617 0.923743344 -1.521962093 6 | -------------------------------------------------------------------------------- /test/cases/08/08.tle: -------------------------------------------------------------------------------- 1 | # EUTELSAT 1-F1 (ECS1)## fig lyddane choice in GSFC at 2080 min 2 | # 0 2880 120 3 | 1 14128U 83058A 06176.02844893 -.00000158 00000-0 10000-3 0 9627 4 | 2 14128 11.4384 35.2134 0011562 26.4582 333.5652 0.98870114 46093 5 | -------------------------------------------------------------------------------- /test/cases/08/08.txt: -------------------------------------------------------------------------------- 1 | 0.00000000 34754.28358264 24492.97146450 -6.06782179 -1.730930619 2.453295514 0.608404765 2 | 120.00000000 18274.17746862 38155.36276885 4181.34040554 -2.744010812 1.256386804 0.528628904 3 | 240.00000000 -3011.20832736 41784.70491958 7269.25802358 -3.035627272 -0.270780564 0.309872513 4 | 360.00000000 -23506.05245093 34431.90077334 8446.69119547 -2.529605870 -1.725471901 0.009910402 5 | 480.00000000 -37831.83544650 18039.92124382 7406.83194032 -1.360863629 -2.725437543 -0.292206843 6 | 600.00000000 -42244.16510117 -3081.14237215 4425.71201160 0.162217596 -3.010081229 -0.517299462 7 | 720.00000000 -35604.27578675 -23397.56612627 286.41312596 1.640649687 -2.507310674 -0.606809220 8 | 840.00000000 -19660.28923126 -37600.75673041 -3927.92293128 2.689229801 -1.349986257 -0.537721659 9 | 960.00000000 1418.71766986 -41983.13466591 -7116.33191231 3.035296399 0.159963419 -0.328165123 10 | 1080.00000000 22126.19545941 -35395.51280792 -8445.13977908 2.588103644 1.629333364 -0.032637700 11 | 1200.00000000 37044.05810573 -19548.92760584 -7564.55693994 1.462648817 2.674247823 0.271865706 12 | 1320.00000000 42254.07397367 1418.77166849 -4701.84129487 -0.048324041 3.019582218 0.505586329 13 | 1440.00000000 36373.22501407 22012.57884242 -605.17897743 -1.548881081 2.572313803 0.606858689 14 | 1560.00000000 20933.46134729 36820.40592881 3650.37358302 -2.643606765 1.448377155 0.548675730 15 | 1680.00000000 -10.68124488 41946.27196232 6946.03204725 -3.043360463 -0.056452304 0.346225618 16 | 1800.00000000 -20952.79294135 36046.40526172 8415.94222187 -2.643267263 -1.545281064 0.052970259 17 | 1920.00000000 -36394.99219756 20681.82327088 7676.19912819 -1.550307551 -2.626599261 -0.253765383 18 | 2040.00000000 -42298.17883842 -105.37186436 4924.14607119 -0.053182570 -3.018188092 -0.493519550 19 | 2160.00000000 -37132.87073932 -20866.51748116 883.24184700 1.455566618 -2.619933666 -0.603850632 20 | 2280.00000000 -22262.86511310 -36175.27230174 -3388.70336208 2.582610037 -1.537612088 -0.556316764 21 | 2400.00000000 -1577.95095774 -42035.55162245 -6775.56859878 3.034892442 -0.053803846 -0.363468517 22 | 2520.00000000 19518.51428537 -36913.34054572 -8392.06373294 2.694189433 1.445127930 -0.075468851 23 | 2640.00000000 35508.61661708 -22136.96526722 -7813.46735235 1.647789380 2.567862058 0.232686244 24 | 2760.00000000 42195.40934393 -1562.66790114 -5187.97448910 0.167562539 3.019201519 0.480351734 25 | 2880.00000000 37809.09370477 19420.16417787 -1201.21771020 -1.358976765 2.678369935 0.602253695 26 | -------------------------------------------------------------------------------- /test/cases/09/09.tle: -------------------------------------------------------------------------------- 1 | # SL-6 R/B(2) # Deep space, perigee = 82.48 (<98) for 2 | # # s4 > 20 mod 3 | # 0 1440 120 4 | 1 16925U 86065D 06151.67415771 .02550794 -30915-6 18784-3 0 4486 5 | 2 16925 62.0906 295.0239 5596327 245.1593 47.9690 4.88511875148616 6 | -------------------------------------------------------------------------------- /test/cases/09/09.txt: -------------------------------------------------------------------------------- 1 | 0.00000000 5559.43727616 -11940.41244187 -18.79697104 3.392339977 -1.947003337 4.250804816 2 | 120.00000000 12340.88410825 -2771.42783001 18904.93382602 -0.871126226 2.600676717 0.581624372 3 | 240.00000000 -3383.91153538 7539.08016980 203.39926999 -2.024568009 -4.260236448 -6.856642499 4 | 360.00000000 12805.93034040 -10258.47023188 13780.66404937 0.619360819 1.821362622 2.507274944 5 | 480.00000000 5684.08850559 7198.41605628 15438.90884959 -2.474221838 2.087864706 -2.583346656 6 | 600.00000000 7629.32997381 -12852.04872182 2903.70773525 2.748271533 -0.740039183 4.125311635 7 | 720.00000000 11532.76273951 -858.50796820 19087.34447583 -1.169925764 2.660072892 0.096084926 8 | 840.00000000 -3866.92003335 2605.65333512 -4575.43802175 1.155852787 -8.453067626 -4.685931007 9 | 960.00000000 13055.47672592 -8707.39992140 15538.22738457 0.229942760 2.119309762 2.063300492 10 | 1080.00000000 3498.65116618 8712.16607634 12847.37492240 -2.782066469 1.553061488 -3.553917496 11 | 1200.00000000 9593.46760482 -13022.99951079 6251.44998582 2.072760173 0.278784371 3.778055197 12 | 1320.00000000 10285.98281020 1487.69783898 18824.97302539 -1.530162927 2.662880255 -0.542091792 13 | 1440.00000000 -985.00161448 -5185.87996239 -5744.85846660 4.340568885 -7.267836578 1.777401781 14 | -------------------------------------------------------------------------------- /test/cases/10/10.tle: -------------------------------------------------------------------------------- 1 | # SL-12 R/B # Shows Lyddane choice at 1860 and 4700 min 2 | # 1440 4320 120 3 | 1 20413U 83020D 05363.79166667 .00000000 00000-0 00000+0 0 7041 4 | 2 20413 12.3514 187.4253 7864447 196.3027 356.5478 0.24690082 7978 5 | -------------------------------------------------------------------------------- /test/cases/10/10.txt: -------------------------------------------------------------------------------- 1 | 1440.00000000 -152282.51887367 -5765.57931522 -2303.23806489 -0.861350435 -0.866111972 0.157449052 2 | 1560.00000000 -158054.81373082 -11986.66733753 -1162.93955651 -0.742833159 -0.859318667 0.158801574 3 | 1680.00000000 -163005.69726420 -18145.23418536 -16.18489143 -0.632997223 -0.848983020 0.159230402 4 | 1800.00000000 -167192.10434828 -24218.32122099 1131.01675373 -0.530331666 -0.835773772 0.158906397 5 | 1920.00000000 -170661.27303631 -30187.01891692 2273.70111846 -0.433639714 -0.820157995 0.157952090 6 | 2040.00000000 -173452.69092844 -36035.25227907 3407.65669128 -0.341955717 -0.802462719 0.156456147 7 | 2160.00000000 -175599.53912049 -41748.92445477 4529.21707337 -0.254486993 -0.782914526 0.154482786 8 | 2280.00000000 -177129.78046591 -47315.29289501 5635.10889695 -0.170572154 -0.761665538 0.152078020 9 | 2400.00000000 -178066.99030732 -52722.49922274 6722.33697363 -0.089650596 -0.738810698 0.149273888 10 | 2520.00000000 -178430.99677033 -57959.20158822 7788.09469222 -0.011239684 -0.714399301 0.146091325 11 | 2640.00000000 -178238.37733081 -63014.27504417 8829.69156741 0.065082640 -0.688442568 0.142542103 12 | 2760.00000000 -177502.84466651 -67876.55581176 9844.49226190 0.139691414 -0.660918389 0.138630105 13 | 2880.00000000 -176235.54537873 -72534.61171805 10829.86292634 0.212925440 -0.631773922 0.134352106 14 | 3000.00000000 -174445.28853076 -76976.52497731 11783.12164658 0.285096090 -0.600926458 0.129698142 15 | 3120.00000000 -172138.71615467 -81189.67567292 12701.49034141 0.356494701 -0.568262758 0.124651541 16 | 3240.00000000 -169320.42431365 -85160.51521778 13582.04572254 0.427398973 -0.533636914 0.119188633 17 | 3360.00000000 -165993.04056424 -88874.31894450 14421.66696359 0.498078731 -0.496866646 0.113278115 18 | 3480.00000000 -162157.26146032 -92314.90584282 15216.97754188 0.568801313 -0.457727813 0.106880054 19 | 3600.00000000 -157811.85188098 -95464.31120681 15964.27829648 0.639836829 -0.415946712 0.099944420 20 | 3720.00000000 -152953.60630025 -98302.39429251 16659.46803297 0.711463516 -0.371189566 0.092409057 21 | 3840.00000000 -147577.27054711 -100806.35749969 17297.94689596 0.783973413 -0.323048235 0.084196882 22 | 3960.00000000 -141675.42106034 -102950.14521433 17874.49604847 0.857678545 -0.271020733 0.075212029 23 | 4080.00000000 -135238.29711788 -104703.67785746 18383.12465184 0.932917854 -0.214484433 0.065334514 24 | 4200.00000000 -128253.58010952 -106031.85751642 18816.87124292 1.010065037 -0.152658640 0.054412741 25 | 4320.00000000 -120706.11295546 -106893.25177420 19167.54052895 1.089537362 -0.084551418 0.042252799 26 | -------------------------------------------------------------------------------- /test/cases/11/11.tle: -------------------------------------------------------------------------------- 1 | # MOLNIYA 1-83 # 12h resonant, ecc > 0.715 (negative BSTAR) 2 | # 0 2880 120 3 | 1 21897U 92011A 06176.02341244 -.00001273 00000-0 -13525-3 0 3044 4 | 2 21897 62.1749 198.0096 7421690 253.0462 20.1561 2.01269994104880 5 | -------------------------------------------------------------------------------- /test/cases/11/11.txt: -------------------------------------------------------------------------------- 1 | 0.00000000 -14459.09372225 -4692.54095907 -6.27346066 -3.251849176 -3.281873313 4.007487519 2 | 120.00000000 -19408.32497671 -19139.76681199 23112.06278171 0.508729482 -1.157137331 2.380320385 3 | 240.00000000 -12682.61144505 -23851.70390946 35529.64565351 1.231827382 -0.221857473 1.118585162 4 | 360.00000000 -2770.96440461 -22838.38385433 39495.08724813 1.469061570 0.489358576 -0.023933533 5 | 480.00000000 7684.49939769 -16780.15926170 34686.93644331 1.364111464 1.211008088 -1.385088779 6 | 600.00000000 14556.19454320 -4820.97637819 17157.26479482 0.109199336 2.175725809 -3.854172972 7 | 720.00000000 -15297.69425930 -5550.29328271 1090.12908596 -2.840208154 -3.134932632 3.993209114 8 | 840.00000000 -19287.08235057 -19423.56070279 23757.94351812 0.552644263 -1.112688824 2.325490109 9 | 960.00000000 -12372.71831037 -23890.75863279 35831.49269215 1.246902518 -0.194394291 1.074988099 10 | 1080.00000000 -2395.98184337 -22696.57561420 39483.29615366 1.472686343 0.513457304 -0.069308515 11 | 1200.00000000 8036.34539812 -16454.51691512 34299.34961611 1.351293052 1.239471838 -1.448210764 12 | 1320.00000000 14563.05206903 -4238.95967873 16080.61031881 -0.026520098 2.218535981 -4.012133885 13 | 1440.00000000 -16032.85252482 -6367.75849091 2179.36867726 -2.486304623 -2.995413812 3.956541453 14 | 1560.00000000 -19154.48368894 -19695.54093585 24388.88610959 0.594482430 -1.069499714 2.271448352 15 | 1680.00000000 -12058.92041047 -23922.74828029 36121.40093797 1.261453511 -0.167234591 1.031529882 16 | 1800.00000000 -2020.04682337 -22548.66263520 39459.06514551 1.475922386 0.537568905 -0.114975739 17 | 1920.00000000 8384.74852205 -16121.51201079 33894.39926376 1.337381535 1.268319379 -1.512631767 18 | 2040.00000000 14530.95739156 -3645.32495372 14959.70757671 -0.180449237 2.260915224 -4.179250424 19 | 2160.00000000 -16678.74714950 -7147.20825111 3256.48360290 -2.179162545 -2.863953307 3.905421409 20 | 2280.00000000 -19011.06091293 -19956.06511308 25005.10684123 0.634388421 -1.027494199 2.218157412 21 | 2400.00000000 -11741.35793896 -23947.78048849 36399.40801673 1.275495243 -0.140363286 0.988193914 22 | 2520.00000000 -1643.27565915 -22394.67619885 39422.31495970 1.478763000 0.561702691 -0.160954631 23 | 2640.00000000 8729.38856166 -15781.07866432 33471.73434712 1.322302381 1.297572548 -1.578426935 24 | 2760.00000000 14454.47711236 -3040.26652710 13791.99368271 -0.356188364 2.302217082 -4.356290686 25 | 2880.00000000 -17246.90415896 -7890.96267186 4318.28122837 -1.910239496 -2.740493953 3.845025428 26 | -------------------------------------------------------------------------------- /test/cases/12/12.tle: -------------------------------------------------------------------------------- 1 | # SL-6 R/B(2) # last tle given, decayed 2006-04-04, day 94 2 | # 54.2028672 1440 20 3 | 1 22312U 93002D 06094.46235912 .99999999 81888-5 49949-3 0 3953 4 | 2 22312 62.1486 77.4698 0308723 267.9229 88.7392 15.95744531 98783 5 | -------------------------------------------------------------------------------- /test/cases/12/12.txt: -------------------------------------------------------------------------------- 1 | 54.20286720 306.10478453 -5816.45655525 -2979.55846068 3.950663855 3.415332543 -5.879974329 2 | 74.20286720 3282.82085464 2077.46972905 -5189.17988770 0.097342701 7.375135692 2.900196702 3 | 94.20286720 530.82729176 6426.20790003 1712.37076793 -3.837120395 -1.252430637 6.561602577 4 | 114.20286720 -3191.69170212 170.27219912 5956.29807775 -1.394956872 -7.438073471 -0.557553115 5 | 134.20286720 -1818.99222465 -6322.45146616 681.95247154 3.349795173 -1.530140265 -6.831522765 6 | 154.20286720 2515.66448634 -2158.83091224 -5552.13320544 2.571979660 7.311930509 -1.639865620 7 | 174.20286720 2414.52833211 5749.10150922 -1998.59693165 -2.681032960 3.527589301 6.452951429 8 | 194.20286720 -1877.98944331 3862.27848302 5112.48435863 -3.261489804 -6.026859137 3.433254768 9 | 214.20286720 -3117.36584396 -4419.74773863 3840.85960913 1.545479182 -5.475416581 -5.207913748 10 | 234.20286720 815.32034678 -5231.67692250 -3760.04690353 3.870864200 4.455588552 -5.211082191 11 | 254.20286720 3269.54341810 3029.00081081 -4704.67969714 -0.526711345 6.812157950 3.929825087 12 | 274.20286720 -10.18099755 6026.23341454 2643.50518406 -3.953623254 -2.616070012 6.145637500 13 | 294.20286720 -3320.58819584 -1248.42679943 5563.06017928 -0.637046974 -7.417786044 -2.076120187 14 | 314.20286720 -1025.48974618 -6366.98945782 -911.23559151 3.811771909 0.438071490 -6.829260617 15 | 334.20286720 3003.75996127 -413.85708005 -5706.15591435 1.674350083 7.694169068 0.316915204 16 | 354.20286720 1731.42816981 6258.27676924 -409.32527984 -3.400497806 1.447945424 6.904010052 17 | 374.20286720 -2582.52111459 2024.19020683 5647.55650268 -2.530348121 -7.221719393 1.438141553 18 | 394.20286720 -2440.56848579 -5702.77311876 1934.81094692 2.731792947 -3.350576075 -6.527773339 19 | 414.20286720 1951.22934390 -3423.59443048 -5121.67808199 3.249039133 6.465974362 -3.069806659 20 | 434.20286720 2886.50939357 4888.68626214 -3096.29885992 -1.973162138 4.877039020 5.832414910 21 | 454.20286720 -1276.55532180 4553.26898466 4406.19787373 -3.715146421 -5.320176914 4.418210777 22 | 474.20286720 -3181.54698043 -3831.29976503 4096.80242790 1.114159970 -6.104773578 -4.829967400 23 | -------------------------------------------------------------------------------- /test/cases/13/13.tle: -------------------------------------------------------------------------------- 1 | # SL-6 R/B(2) # 12h resonant ecc in the > 0.715 range 2 | # 0 2880 120 3 | 1 22674U 93035D 06176.55909107 .00002121 00000-0 29868-3 0 6569 4 | 2 22674 63.5035 354.4452 7541712 253.3264 18.7754 1.96679808 93877 5 | -------------------------------------------------------------------------------- /test/cases/13/13.txt: -------------------------------------------------------------------------------- 1 | 0.00000000 14702.75233943 -1452.94972222 -16.05864661 4.423776015 1.628152002 4.114711413 2 | 120.00000000 25421.02766388 9333.67794626 23600.18219550 0.051450555 1.213483216 2.429868811 3 | 240.00000000 21620.32754016 16119.12259307 36390.55149216 -0.964093307 0.685817435 1.177703216 4 | 360.00000000 12718.19413607 19255.14633272 40894.83112799 -1.458106384 0.180235562 0.071707849 5 | 480.00000000 1265.16529152 18456.04379940 37041.37694890 -1.675419637 -0.436301646 -1.201160851 6 | 600.00000000 -10067.94125526 11904.46229367 21734.07224731 -1.245613758 -1.543800254 -3.324843962 7 | 720.00000000 10916.18847051 -2577.84812258 -2969.01737290 6.075739477 1.347202818 3.895416489 8 | 840.00000000 25335.66841874 8391.02587944 21772.92767119 0.222573594 1.272407091 2.581232528 9 | 960.00000000 22320.34543863 15568.80342847 35489.30186655 -0.893180362 0.737626933 1.292228023 10 | 1080.00000000 13794.52592595 19084.41507722 40799.81840699 -1.420925488 0.235786316 0.185733531 11 | 1200.00000000 2509.53045578 18743.11681332 37861.12200921 -1.668641151 -0.360349190 -1.052967157 12 | 1320.00000000 -9092.95463699 12978.89162535 24039.70775806 -1.378063213 -1.373281170 -3.014546002 13 | 1440.00000000 5642.30964782 -3296.65190517 -5433.18328551 8.507771997 0.412202509 2.538688642 14 | 1560.00000000 25116.25385852 7406.01978928 19833.85434133 0.416844002 1.332137765 2.739814259 15 | 1680.00000000 22965.90177526 14980.14495048 34504.53794143 -0.817044047 0.789514925 1.408352492 16 | 1800.00000000 14842.35354844 18872.21132525 40622.31909137 -1.380992497 0.290324973 0.298500230 17 | 1920.00000000 3747.62126224 18974.27920533 38574.95384420 -1.657581968 -0.287906861 -0.910880606 18 | 2040.00000000 -8033.87939805 13934.80426458 26131.26778570 -1.474739658 -1.222812193 -2.737754384 19 | 2160.00000000 -1294.85535055 -2816.01338727 -5876.15310129 9.878321681 -1.975920361 -1.919725922 20 | 2280.00000000 24743.93779087 6378.41128016 17777.56903461 0.640012498 1.392441717 2.906508061 21 | 2400.00000000 23552.89656565 14353.21421291 33435.10068854 -0.735092168 0.841576425 1.526421604 22 | 2520.00000000 15859.55574635 18619.35727201 40363.24491529 -1.338235517 0.343983310 0.410301483 23 | 2640.00000000 4976.40243876 19152.05054208 39187.13015519 -1.642689583 -0.218543818 -0.774100741 24 | 2760.00000000 -6913.03985810 14785.27213529 28030.84885053 -1.545597008 -1.088212920 -2.487868688 25 | 2880.00000000 -7328.66510807 -609.02929818 -2731.24798188 6.173198708 -3.631464604 -5.960443976 26 | -------------------------------------------------------------------------------- /test/cases/14/14.tle: -------------------------------------------------------------------------------- 1 | # ARIANE 44L+ R/B # Lyddane bug at <= 70 min for atan2(), 2 | # # no quadrant fix 3 | # 0 1440 120 4 | 1 23177U 94040C 06175.45752052 .00000386 00000-0 76590-3 0 95 5 | 2 23177 7.0496 179.8238 7258491 296.0482 8.3061 2.25906668 97438 6 | -------------------------------------------------------------------------------- /test/cases/14/14.txt: -------------------------------------------------------------------------------- 1 | 0.00000000 -8782.74712207 26.97684012 -2.07637832 -3.854411878 -7.665383323 0.946375584 2 | 120.00000000 -1679.20646086 -31549.25912597 3891.49185078 2.023312658 -2.152278131 0.264999078 3 | 240.00000000 12331.04923637 -38980.43947373 4804.04168441 1.763163054 -0.103183141 0.012150238 4 | 360.00000000 22778.47467701 -34351.71335727 4228.19056215 1.067538341 1.351492461 -0.167176203 5 | 480.00000000 26200.64788639 -19495.09254092 2392.25886043 -0.313040839 2.807240839 -0.346229787 6 | 600.00000000 8929.50678384 5746.11142600 -713.83228859 -7.022900265 3.032004525 -0.370406407 7 | 720.00000000 -6025.91711082 -25637.25771896 3166.57695996 1.883482033 -3.178926331 0.390984341 8 | 840.00000000 8318.33424563 -38142.14579645 4699.50328216 1.905170762 -0.626616106 0.075896827 9 | 960.00000000 20186.44912502 -36843.39399211 4529.16926554 1.326256350 0.921104790 -0.114762315 10 | 1080.00000000 26308.61450979 -25181.27323408 3083.35166407 0.245735070 2.328689509 -0.287613776 11 | 1200.00000000 19382.58081281 -2719.53890647 316.62459726 -3.004945168 3.900883011 -0.478583691 12 | 1320.00000000 -9666.51355428 -16909.71577339 2096.73214811 1.278357611 -4.740154829 0.583636012 13 | 1440.00000000 4024.30862558 -36058.86961467 4444.89851407 2.007729773 -1.228399894 0.149272562 14 | -------------------------------------------------------------------------------- /test/cases/15/15.tle: -------------------------------------------------------------------------------- 1 | # WIND # STR#3 Kepler failes past about 200 min 2 | # 0 1600 120 3 | 1 23333U 94071A 94305.49999999 -.00172956 26967-3 10000-3 0 15 4 | 2 23333 28.7490 2.3720 9728298 30.4360 1.3500 0.07309491 70 5 | -------------------------------------------------------------------------------- /test/cases/15/15.txt: -------------------------------------------------------------------------------- 1 | 0.00000000 -15168.89191618 -27058.30154782 -14952.52842868 3.146509902 3.003939881 1.603560588 2 | 120.00000000 -13611.91519286 3506.98510426 2529.91556241 -7.277325337 -1.044723205 -0.326527039 3 | 240.00000000 -47062.93515772 -5590.56890474 -1421.49277114 -3.628573072 -1.279338442 -0.597507251 4 | 360.00000000 -69322.30812224 -13994.02998806 -5401.02346249 -2.822069949 -1.148265373 -0.552582718 5 | 480.00000000 -87561.44396849 -21603.46521146 -9078.38167175 -2.402338830 -1.052874086 -0.513642570 6 | 600.00000000 -103448.97281465 -28627.93461516 -12509.97099029 -2.128900549 -0.980402479 -0.482361933 7 | 720.00000000 -117716.65087934 -35197.90015958 -15742.75679057 -1.930118681 -0.922503835 -0.456636681 8 | 840.00000000 -130767.28714911 -41398.81805124 -18810.40567482 -1.775814755 -0.874498585 -0.434914268 9 | 960.00000000 -142852.31345053 -47290.27361607 -21737.50567364 -1.650679990 -0.833590049 -0.416165036 10 | 1080.00000000 -154141.91549971 -52915.91943291 -24542.59847985 -1.545974185 -0.797994306 -0.399693955 11 | 1200.00000000 -164758.02823839 -58308.98222222 -27240.08268483 -1.456278328 -0.766510902 -0.385016064 12 | 1320.00000000 -174791.78514296 -63495.52416855 -29841.42041494 -1.378021110 -0.738296440 -0.371781854 13 | 1440.00000000 -184313.55942834 -68496.48588361 -32355.92698665 -1.308735423 -0.712737245 -0.359732112 14 | 1560.00000000 -193379.12526330 -73329.02679521 -34791.30520946 -1.246651872 -0.689373696 -0.348669784 15 | 1600.00000000 -196307.65446891 -74904.98630869 -35586.66109535 -1.227321528 -0.682010380 -0.345174302 16 | -------------------------------------------------------------------------------- /test/cases/16/16.tle: -------------------------------------------------------------------------------- 1 | # ARIANE 42P+3 R/B ## fig Lyddane bug at > 280.5 min for AcTan() 2 | # 0 720 20 3 | 1 23599U 95029B 06171.76535463 .00085586 12891-6 12956-2 0 2905 4 | 2 23599 6.9327 0.2849 5782022 274.4436 25.2425 4.47796565123555 5 | -------------------------------------------------------------------------------- /test/cases/16/16.txt: -------------------------------------------------------------------------------- 1 | 0.00000000 9891.23005871 37.79332266 -0.99877163 3.556503639 6.456954049 0.783732921 2 | 20.00000000 11930.05154187 7343.31833276 886.65117889 0.307913840 5.532439990 0.672952214 3 | 40.00000000 11319.45947638 13225.31545868 1602.64422092 -1.152112296 4.285636613 0.521961269 4 | 60.00000000 9436.02148040 17690.25494120 2146.87808291 -1.907800153 3.179735423 0.387730417 5 | 80.00000000 6870.03833445 20912.05740024 2540.12778265 -2.323720525 2.207225653 0.269547237 6 | 100.00000000 3931.71851378 23025.85778307 2798.63760635 -2.542473366 1.327049539 0.162497056 7 | 120.00000000 815.47980150 24120.72310182 2933.13056243 -2.626385790 0.504525840 0.062398109 8 | 140.00000000 -2335.03160572 24248.69316259 2949.86750437 -2.601784901 -0.287913265 -0.034084370 9 | 160.00000000 -5394.38543049 23431.50957015 2851.44723572 -2.473980513 -1.073778783 -0.129801074 10 | 180.00000000 -8232.92747681 21663.74302357 2637.17731756 -2.230465689 -1.875324651 -0.227455949 11 | 200.00000000 -10693.17916010 18912.96958974 2303.08953605 -1.835679522 -2.715607714 -0.329856471 12 | 220.00000000 -12552.98892276 15118.48969890 1841.77891033 -1.212509951 -3.618341874 -0.439898651 13 | 240.00000000 -13449.60669854 10195.32279827 1242.88203881 -0.189589625 -4.595945175 -0.559122165 14 | 260.00000000 -12687.10834627 4084.87788574 499.22268173 1.663102841 -5.559409474 -0.676772874 15 | 280.00000000 -8675.53010623 -2822.26856311 -341.81551323 5.512513007 -5.552735712 -0.676699666 16 | 300.00000000 1149.25824822 -6410.63588668 -779.78996647 9.692203851 1.385621845 0.167335997 17 | 320.00000000 9540.91888404 -532.41187069 -65.75990189 3.927328628 6.460648862 0.785802027 18 | 340.00000000 11866.74670711 6863.66036875 833.81497642 0.452633869 5.633106749 0.685341883 19 | 360.00000000 11373.86735397 12861.11125140 1563.56554695 -1.087813097 4.374635451 0.532261349 20 | 380.00000000 9545.28177867 17423.46668602 2118.78354324 -1.876470009 3.253743572 0.395858526 21 | 400.00000000 7006.27633063 20727.26863582 2520.82969047 -2.308465180 2.270595429 0.276188820 22 | 420.00000000 4081.45772250 22912.52309924 2786.68194280 -2.536245457 1.383727350 0.168222944 23 | 440.00000000 968.87411555 24072.83933419 2927.70460305 -2.626240003 0.557331894 0.067613494 24 | 460.00000000 -2184.48600140 24263.07416367 2950.56699312 -2.606622118 -0.236612208 -0.029041602 25 | 480.00000000 -5252.68953490 23507.63533624 2858.24965896 -2.484020705 -1.021853980 -0.124624541 26 | 500.00000000 -8107.13052831 21803.63605251 2650.42861268 -2.247293231 -1.820623772 -0.221830855 27 | 520.00000000 -10593.37456426 19121.35214559 2323.53552410 -1.862989691 -2.655753945 -0.323424772 28 | 540.00000000 -12495.93965785 15403.07320931 1870.62912302 -1.258299374 -3.550785420 -0.432246750 29 | 560.00000000 -13467.04326433 10566.34396426 1281.81521359 -0.272560566 -4.519662083 -0.549945819 30 | 580.00000000 -12848.67250733 4547.59325836 549.61930845 1.492495561 -5.489011947 -0.667480644 31 | 600.00000000 -9156.11325952 -2338.03767907 -287.05508391 5.124765342 -5.651836500 -0.686322083 32 | 620.00000000 274.80984218 -6498.59231167 -790.23960286 9.781571116 0.576971487 0.073381096 33 | 640.00000000 9163.79842907 -1093.00643505 -129.68395376 4.317963833 6.439540454 0.785189600 34 | 660.00000000 11792.56750297 6383.17593584 780.80248711 0.604478392 5.732186261 0.697664652 35 | 680.00000000 11422.41406845 12495.50378426 1524.33983554 -1.021267192 4.463562851 0.542605216 36 | 700.00000000 9650.35773937 17155.13062416 2090.56743016 -1.844323477 3.327537004 0.403984055 37 | 720.00000000 7138.97715481 20540.53925122 2501.38155046 -2.292865094 2.333532804 0.282788112 38 | -------------------------------------------------------------------------------- /test/cases/17/17.tle: -------------------------------------------------------------------------------- 1 | # ITALSAT 2 # 24h resonant GEO, inclination > 3 deg 2 | # 0 1440 120 3 | 1 24208U 96044A 06177.04061740 -.00000094 00000-0 10000-3 0 1600 4 | 2 24208 3.8536 80.0121 0026640 311.0977 48.3000 1.00778054 36119 5 | -------------------------------------------------------------------------------- /test/cases/17/17.txt: -------------------------------------------------------------------------------- 1 | 0.00000000 7545.34906944 41264.39947699 -4.46719300 -3.027004406 0.559694692 0.208024876 2 | 120.00000000 -14278.26804386 39473.20866110 1425.06590077 -2.893484402 -1.044628363 0.179823913 3 | 240.00000000 -32215.34476266 26925.58208258 2466.69535620 -1.973662911 -2.358769179 0.102830830 4 | 360.00000000 -41411.91406474 7067.58763735 2839.12459594 -0.522522148 -3.029022055 -0.001743644 5 | 480.00000000 -39406.91008336 -14704.85264226 2443.61611567 1.066102867 -2.879029877 -0.105588235 6 | 600.00000000 -26760.47175426 -32507.23079626 1388.20855397 2.365664432 -1.951734632 -0.180853228 7 | 720.00000000 -6886.87232698 -41528.34229002 -42.16330535 3.027271698 -0.495572307 -0.207324134 8 | 840.00000000 14847.99019002 -39307.03588219 -1461.02977428 2.869933171 1.099268632 -0.177657170 9 | 960.00000000 32545.34200616 -26408.65949260 -2482.86896803 1.930771473 2.401000639 -0.099515383 10 | 1080.00000000 41363.76547261 -6310.56313293 -2827.49441163 0.460642135 3.051548610 0.006108476 11 | 1200.00000000 38863.39064453 15511.65208304 -2398.47834230 -1.139361992 2.867918769 0.110333537 12 | 1320.00000000 25711.28270594 33081.65565501 -1312.07387616 -2.428148976 1.898125129 0.184395684 13 | 1440.00000000 5513.50442380 41588.66922166 133.98005808 -3.050568931 0.410139763 0.207892357 14 | -------------------------------------------------------------------------------- /test/cases/18/18.tle: -------------------------------------------------------------------------------- 1 | # AMC-4 ## fig low incl, show incl shift with 2 | # ## gsfc version from 240 to 1440 min 3 | # -1440 1440 120 4 | 1 25954U 99060A 04039.68057285 -.00000108 00000-0 00000-0 0 6847 5 | 2 25954 0.0004 243.8136 0001765 15.5294 22.7134 1.00271289 15615 6 | -------------------------------------------------------------------------------- /test/cases/18/18.txt: -------------------------------------------------------------------------------- 1 | -1440.00000000 8126.79632005 -41366.71534394 2.84047401 3.017573661 0.592621449 0.000682687 2 | -1320.00000000 27772.95271894 -31719.19114366 7.24654968 2.313814555 2.025384223 0.000490308 3 | -1200.00000000 39935.40246231 -13524.28447328 9.75080131 0.986776347 2.912147549 0.000158774 4 | -1080.00000000 41339.29593087 8314.33232469 9.62304560 -0.605726041 3.014251214 -0.000223651 5 | -960.00000000 31609.18516919 27913.88674942 6.84082955 -2.034723618 2.304589236 -0.000552839 6 | -840.00000000 13367.41446416 39997.06560469 2.11098437 -2.915627436 0.974511005 -0.000737041 7 | -720.00000000 -8473.52726038 41311.16844953 -3.30828568 -3.011471409 -0.617904813 -0.000722304 8 | -600.00000000 -28032.82543302 31502.03017039 -7.94035704 -2.296412117 -2.044089121 -0.000508111 9 | -480.00000000 -40042.77875459 13209.59744860 -10.49076536 -0.962715501 -2.920030975 -0.000148777 10 | -360.00000000 -41266.60263788 -8640.75922096 -10.20754668 0.630676673 -3.009545407 0.000260123 11 | -240.00000000 -31371.89123818 -28162.76552567 -7.10149575 2.054505966 -2.288120618 0.000607018 12 | -120.00000000 -13022.90579953 -40095.08976672 -1.96190916 2.924859550 -0.949921346 0.000794716 13 | 0.00000000 8835.93033625 -41221.12628398 3.84215191 3.006950714 0.644340640 0.000767609 14 | 120.00000000 28313.52320935 -31237.76127045 8.72575900 2.278697631 2.064802495 0.000528068 15 | 240.00000000 40161.80476522 -12836.80546881 11.32041698 0.936639654 2.928647944 0.000137147 16 | 360.00000000 41190.63832794 9022.62121849 10.85654622 -0.657370265 3.003402039 -0.000300949 17 | 480.00000000 31125.60440254 28452.24129439 7.38928613 -2.073971149 2.269325393 -0.000666637 18 | 600.00000000 12679.18225675 40220.56672338 1.80214637 -2.931919956 0.924331814 -0.000857513 19 | 720.00000000 -9181.09352855 41159.66516074 -4.41701543 -3.000426985 -0.669493808 -0.000816874 20 | 840.00000000 -28569.20142997 31016.29874699 -9.57107147 -2.260999431 -2.083202184 -0.000550331 21 | 960.00000000 -40263.47943526 12520.40538407 -12.21541451 -0.912461494 -2.936131493 -0.000125763 22 | 1080.00000000 -41112.10846367 -9347.79016084 -11.56153845 0.682239903 -2.998285131 0.000343806 23 | 1200.00000000 -30883.76165286 -28697.12417493 -7.71008842 2.093480778 -2.252522965 0.000730182 24 | 1320.00000000 -12332.65581387 -40312.74825467 -1.64466731 2.940734230 -0.899577762 0.000924973 25 | 1440.00000000 9542.26960941 -41063.42831946 5.01820746 2.995444457 0.695855892 0.000869999 26 | -------------------------------------------------------------------------------- /test/cases/19/19.tle: -------------------------------------------------------------------------------- 1 | # INTELSAT 902 # negative incl at 9313 min then 2 | # # 270 deg Lyddane bug at 37606 min 3 | # 9300 9400 60 4 | 1 26900U 01039A 06106.74503247 .00000045 00000-0 10000-3 0 8290 5 | 2 26900 0.0164 266.5378 0003319 86.1794 182.2590 1.00273847 16981 6 | -------------------------------------------------------------------------------- /test/cases/19/19.txt: -------------------------------------------------------------------------------- 1 | 9300.00000000 40967.44115512 -9911.13779471 18.46896771 0.723130918 2.989554425 -0.000076842 2 | 9360.00000000 42135.80622008 1067.57060294 17.54144000 -0.077756298 3.074782284 -0.000421556 3 | 9400.00000000 41305.84568040 8392.87956059 16.25689528 -0.612122539 3.014197269 -0.000636219 4 | -------------------------------------------------------------------------------- /test/cases/20/20.tle: -------------------------------------------------------------------------------- 1 | # COSMOS 1024 DEB # 12h resonant ecc in 0.5 to 0.65 range 2 | # 0 2880 120 3 | 1 26975U 78066F 06174.85818871 .00000620 00000-0 10000-3 0 6809 4 | 2 26975 68.4714 236.1303 5602877 123.7484 302.5767 2.05657553 67521 5 | -------------------------------------------------------------------------------- /test/cases/20/20.txt: -------------------------------------------------------------------------------- 1 | 0.00000000 -14505.22808388 -21617.88087546 6.39596827 2.212743509 1.159373042 3.020461462 2 | 120.00000000 7308.16639274 6069.56608601 6806.96331764 1.301337828 5.325314648 -4.785642701 3 | 240.00000000 -3884.53071215 11965.58185280 -25082.07507441 -2.146961123 -1.372170094 -2.579928115 4 | 360.00000000 -16787.59378333 -729.74788925 -34298.05326797 -1.386386444 -1.908024380 -0.221340934 5 | 480.00000000 -23524.78012083 -13626.89711711 -30246.48603594 -0.462567311 -1.586542350 1.268960587 6 | 600.00000000 -22888.84171625 -22209.80971708 -16772.40376185 0.704602569 -0.671563269 2.432168948 7 | 720.00000000 -11644.22615669 -19858.99084950 3570.42737997 2.626539272 1.815433416 2.960972280 8 | 840.00000000 7664.51194211 11159.36028139 350.23303944 -0.585253381 3.195379673 -5.749618395 9 | 960.00000000 -6372.77547918 10209.73827343 -27841.18998846 -2.050579836 -1.582799965 -2.076320787 10 | 1080.00000000 -18348.19045195 -2973.34350119 -34393.84336077 -1.243342294 -1.892238427 0.060068943 11 | 1200.00000000 -23980.24174999 -15433.93607907 -28617.77809618 -0.294655998 -1.483316741 1.477956209 12 | 1320.00000000 -21920.32857522 -22852.51280231 -13788.06546189 0.945712948 -0.429341061 2.596772629 13 | 1440.00000000 -8263.84357646 -17213.10336121 6964.74726827 3.082144262 2.665728141 2.712880305 14 | 1560.00000000 6283.95083723 13811.73985413 -6321.04868849 -1.616730620 1.383670995 -5.358213453 15 | 1680.00000000 -8735.13351075 8248.80149849 -30038.63985096 -1.935470747 -1.724048167 -1.631297099 16 | 1800.00000000 -19738.37924920 -5187.76100019 -34166.39332275 -1.097527510 -1.860254447 0.324146154 17 | 1920.00000000 -24233.04052251 -17109.43882992 -26745.23158549 -0.119470455 -1.364629264 1.679947716 18 | 2040.00000000 -20652.73674399 -23184.10464152 -10615.45237900 1.209478958 -0.144527238 2.747955275 19 | 2160.00000000 -4334.22599107 -13411.10816311 9867.71314667 3.532773300 3.772642294 2.088838447 20 | 2280.00000000 4070.09880695 14700.56728501 -12250.69042452 -2.054311535 0.203356334 -4.607155896 21 | 2400.00000000 -10954.64958564 6152.18761849 -31736.89028093 -1.809614002 -1.816026376 -1.233365856 22 | 2520.00000000 -20954.68330429 -7354.85820601 -33634.53464545 -0.948654538 -1.813622251 0.573652235 23 | 2640.00000000 -24273.63752134 -18634.18641840 -24636.73791566 0.064433455 -1.228754376 1.875476585 24 | 2760.00000000 -19056.04753551 -23147.31831645 -7273.97791491 1.501006007 0.195048210 2.879043869 25 | 2880.00000000 46.74258944 -8144.24990385 11631.88607685 3.780676619 5.106535699 0.714330143 26 | -------------------------------------------------------------------------------- /test/cases/21/21.tle: -------------------------------------------------------------------------------- 1 | # CBERS 2 # Near Earth, ecc = 8.84E-5 (< 1.0e-4) 2 | # # drop certain normal drag terms 3 | # 0 2880 120 4 | 1 28057U 03049A 06177.78615833 .00000060 00000-0 35940-4 0 1836 5 | 2 28057 98.4283 247.6961 0000884 88.1964 271.9322 14.35478080140550 6 | -------------------------------------------------------------------------------- /test/cases/21/21.txt: -------------------------------------------------------------------------------- 1 | 0.00000000 -2715.28237486 -6619.26436890 -0.01341443 -1.008587273 0.422782003 7.385272942 2 | 120.00000000 -1816.87920942 -1835.78762132 6661.07926465 2.325140071 6.655669329 2.463394512 3 | 240.00000000 1483.17364291 5395.21248786 4448.65907172 2.560540387 4.039025766 -5.736648561 4 | 360.00000000 2801.25607158 5455.03931334 -3692.12865695 -0.595095864 -3.951923117 -6.298799125 5 | 480.00000000 411.09332812 -1728.99769152 -6935.45548811 -2.935970964 -6.684085058 1.492800886 6 | 600.00000000 -2506.52558454 -6628.98655095 -988.07784497 -1.390577189 -0.556164143 7.312736468 7 | 720.00000000 -2090.79884266 -2723.22832193 6266.13356577 1.992640665 6.337529519 3.411803080 8 | 840.00000000 1091.80560222 4809.88229503 5172.42897894 2.717483546 4.805518977 -5.030019896 9 | 960.00000000 2811.14062300 5950.65707171 -2813.23705390 -0.159662742 -3.121215491 -6.775341949 10 | 1080.00000000 805.72698304 -812.16627907 -7067.58483969 -2.798936020 -6.889265977 0.472770873 11 | 1200.00000000 -2249.59837532 -6505.84890714 -1956.72365062 -1.731234729 -1.528750230 7.096660885 12 | 1320.00000000 -2311.57375798 -3560.99112891 5748.16749600 1.626569751 5.890482233 4.293545048 13 | 1440.00000000 688.16056594 4124.87618964 5794.55994449 2.810973665 5.479585563 -4.224866316 14 | 1560.00000000 2759.94088230 6329.87271798 -1879.19518331 0.266930672 -2.222670878 -7.119390567 15 | 1680.00000000 1171.50677137 125.82053748 -7061.96626203 -2.605687852 -6.958489749 -0.556333225 16 | 1800.00000000 -1951.43708473 -6251.71945821 -2886.95472355 -2.024131483 -2.475214272 6.741537478 17 | 1920.00000000 -2475.70722288 -4331.90569958 5117.31234925 1.235823539 5.322743371 5.091281211 18 | 2040.00000000 281.46097848 3353.51057103 6302.87900651 2.840647273 6.047222485 -3.337085992 19 | 2160.00000000 2650.33118860 6584.33434852 -908.29027135 0.675457235 -1.274044972 -7.323921567 20 | 2280.00000000 1501.17226598 1066.31132756 -6918.71472953 -2.361891904 -6.889669974 -1.574718619 21 | 2400.00000000 -1619.73468335 -5871.14051992 -3760.56587072 -2.264093975 -3.376316601 6.254622256 22 | 2520.00000000 -2581.04202505 -5020.05572531 4385.92329047 0.829668458 4.645048038 5.789262667 23 | 2640.00000000 -119.22080627 2510.90620488 6687.45615459 2.807575712 6.496549689 -2.384136661 24 | 2760.00000000 2486.23806726 6708.18210028 80.43349580 1.057274905 -0.294294027 -7.384689123 25 | 2880.00000000 1788.42334580 1990.50530957 -6640.59337726 -2.074169091 -6.683381288 -2.562777776 26 | -------------------------------------------------------------------------------- /test/cases/22/22.tle: -------------------------------------------------------------------------------- 1 | # NAVSTAR 53 (USA 175)# 12h non-resonant GPS (ecc < 0.5 ecc) 2 | # 0 1440 120 3 | 1 28129U 03058A 06175.57071136 -.00000104 00000-0 10000-3 0 459 4 | 2 28129 54.7298 324.8098 0048506 266.2640 93.1663 2.00562768 18443 5 | -------------------------------------------------------------------------------- /test/cases/22/22.txt: -------------------------------------------------------------------------------- 1 | 0.00000000 21705.90675616 -15320.74559030 -3.71266738 1.304452352 1.816340588 3.162077755 2 | 120.00000000 18618.46930719 3161.73674551 18832.36226373 -2.075731563 2.838444677 1.586770698 3 | 240.00000000 -3003.31913618 18519.85202096 18944.60400051 -3.375481275 1.033218770 -1.558917875 4 | 360.00000000 -21605.59688141 15434.60871293 210.48771462 -1.306475807 -1.816441709 -3.163869351 5 | 480.00000000 -18454.99897741 -3146.41677064 -18684.76214745 2.105604122 -2.860204443 -1.586733005 6 | 600.00000000 3421.63246501 -18512.39318580 -18591.69134806 3.394707744 -1.003630478 1.609613862 7 | 720.00000000 21856.77380870 -15103.68270008 383.12623065 1.248441169 1.855442496 3.161599171 8 | 840.00000000 18362.72655708 3502.06632874 19023.59188094 -2.122281517 2.830604533 1.538117029 9 | 960.00000000 -3409.43252591 18644.46623793 18750.94725847 -3.366877226 0.986584175 -1.607424650 10 | 1080.00000000 -21756.74120417 15217.46695818 -176.62726546 -1.250612991 -1.855918113 -3.163920430 11 | 1200.00000000 -18195.62424785 -3489.44729258 -18875.92200908 2.152907012 -2.852191156 -1.537238235 12 | 1320.00000000 3829.93277207 -18633.45473469 -18391.84497515 3.384822262 -0.955920721 1.658300247 13 | 1440.00000000 22000.86237129 -14881.89514595 769.83131277 1.192077330 1.893990406 3.160109522 14 | -------------------------------------------------------------------------------- /test/cases/23/23.tle: -------------------------------------------------------------------------------- 1 | # COSMOS 2405 # Near Earth, perigee = 127.20 (< 156) s4 mod 2 | # 0 2880 120 3 | 1 28350U 04020A 06167.21788666 .16154492 76267-5 18678-3 0 8894 4 | 2 28350 64.9977 345.6130 0024870 260.7578 99.9590 16.47856722116490 5 | -------------------------------------------------------------------------------- /test/cases/23/23.txt: -------------------------------------------------------------------------------- 1 | 0.00000000 6333.08123128 -1580.82852326 90.69355720 0.714634423 3.224246550 7.083128132 2 | 120.00000000 -3990.93845854 3052.98341907 4155.32700629 -5.909006188 -0.876307966 -5.039131404 3 | 240.00000000 -603.55232010 -2685.13474569 -5891.70274282 7.572519907 -1.975656726 0.121722605 4 | 360.00000000 4788.22345628 782.56169213 4335.14284621 -4.954509026 3.683346464 4.804645839 5 | 480.00000000 -6291.84601644 1547.82790773 -453.67116495 -0.308625588 -3.341538574 -7.082659115 6 | 600.00000000 4480.74573426 -3028.55200375 -3586.94343644 5.320920857 1.199736275 5.626350481 7 | 720.00000000 -446.42460910 2932.28872587 5759.19389758 -7.561000245 1.550975493 -1.374970884 8 | 840.00000000 -3713.79581837 -1382.66125127 -5122.45131133 6.090931625 -3.512629733 -3.467571746 9 | 960.00000000 6058.32017525 -827.47406727 2104.04678642 -1.798403024 3.787067272 6.641439744 10 | 1080.00000000 -5631.73659001 2623.70953647 1766.49125095 -3.216401578 -2.309140958 -6.788609120 11 | 1200.00000000 2776.84991547 -3255.36941952 -4837.19667798 6.748135565 -0.193044825 4.005718697 12 | 1320.00000000 1148.04430855 2486.07343380 5826.34075913 -7.420162295 2.589456382 0.356350006 13 | 1440.00000000 -4527.90871843 -723.29199030 -4527.44608306 5.121674217 -3.909895427 -4.500218556 14 | -------------------------------------------------------------------------------- /test/cases/24/24.tle: -------------------------------------------------------------------------------- 1 | # H-2 R/B # Deep space, perigee = 135.75 (<156) s4 mod 2 | # 0 1440 120 3 | 1 28623U 05006B 06177.81079184 .00637644 69054-6 96390-3 0 6000 4 | 2 28623 28.5200 114.9834 6249053 170.2550 212.8965 3.79477162 12753 5 | -------------------------------------------------------------------------------- /test/cases/24/24.txt: -------------------------------------------------------------------------------- 1 | 0.00000000 -11667.52815707 24942.34701209 26.18986148 -1.596532267 -1.475862585 1.126153796 2 | 120.00000000 -11650.42953501 982.21974004 5519.44926352 3.405775767 -5.181965492 -0.492079796 3 | 240.00000000 5621.01897323 19645.77726452 -7261.20740000 -2.013883242 3.107993558 0.283976869 4 | 360.00000000 -9709.93557012 26304.51148682 -1204.09019945 -1.824548788 -0.931657092 1.113504696 5 | 480.00000000 -14397.55245221 6660.47763197 5594.18855452 1.555835212 -4.680742820 0.297175108 6 | 600.00000000 7714.28145822 15558.66459160 -7341.73961091 -1.646646476 4.071791084 -0.110020507 7 | 720.00000000 -7558.92519521 27033.15945347 -2385.06752976 -2.000037192 -0.393133022 1.078159908 8 | 840.00000000 -15498.48216405 11550.15849566 5054.30257218 0.468949696 -4.029203349 0.679150573 9 | 960.00000000 9168.82629671 10354.98184681 -6869.98302388 -0.880542035 5.225135948 -0.741716681 10 | 1080.00000000 -5275.58604480 27149.51936612 -3494.56043949 -2.130109101 0.150526163 1.021073295 11 | 1200.00000000 -15603.79843674 15640.57153016 4217.28152757 -0.249441650 -3.404924241 0.888261668 12 | 1320.00000000 9300.84628083 3873.01760854 -5474.80370356 0.874759928 6.495046056 -1.887429534 13 | 1440.00000000 -2913.28833454 26662.61055910 -4511.19739608 -2.216776105 0.710474396 0.940683318 14 | -------------------------------------------------------------------------------- /test/cases/25/25.tle: -------------------------------------------------------------------------------- 1 | # XM-3 # 24h resonant geo, incl < 3 deg goes 2 | # # negative around 1130 min 3 | # 0 1440 120 4 | 1 28626U 05008A 06176.46683397 -.00000205 00000-0 10000-3 0 2190 5 | 2 28626 0.0019 286.9433 0000335 13.7918 55.6504 1.00270176 4891 6 | -------------------------------------------------------------------------------- /test/cases/25/25.txt: -------------------------------------------------------------------------------- 1 | 0.00000000 42080.07009992 -2657.12397178 -0.33367434 0.193853404 3.068641231 0.000214821 2 | 120.00000000 37744.64835003 18793.43416915 1.06443961 -1.370354542 2.752445068 0.000184939 3 | 240.00000000 23241.64659482 35181.51273714 2.00067596 -2.565351750 1.694836553 0.000113969 4 | 360.00000000 2478.13936526 42092.98069883 2.30264737 -3.069295980 0.180756362 0.000025863 5 | 480.00000000 -18952.89452071 37666.54367376 1.98924762 -2.746507866 -1.381968634 -0.000054204 6 | 600.00000000 -35278.98215906 23094.64350232 1.24089547 -1.683948671 -2.572454554 -0.000106857 7 | 720.00000000 -42102.59710084 2302.17478675 0.32806131 -0.167785146 -3.070060257 -0.000123100 8 | 840.00000000 -37585.42565020 -19110.36811141 -0.47723840 1.393635871 -2.740713795 -0.000105402 9 | 960.00000000 -22943.76564664 -35375.04320390 -0.97962253 2.579715629 -1.673057774 -0.000065341 10 | 1080.00000000 -2121.40423984 -42110.13805050 -1.10630560 3.070893206 -0.154646956 -0.000018858 11 | 1200.00000000 19272.42902674 -37500.91245246 -0.91040725 2.734788456 1.405466396 0.000019220 12 | 1320.00000000 35474.25832684 -22788.92171599 -0.53491592 1.661931747 2.586951609 0.000039639 13 | 1440.00000000 42119.41724651 -1937.62703909 -0.15239993 0.141385401 3.071502096 0.000040858 14 | -------------------------------------------------------------------------------- /test/cases/26/26.tle: -------------------------------------------------------------------------------- 1 | # MINOTAUR R/B # Sub-orbital case - Decayed 2005-11-29 2 | # #(perigee = -51km), lost in 50 minutes 3 | # 0 60 5 4 | 1 28872U 05037B 05333.02012661 .25992681 00000-0 24476-3 0 1534 5 | 2 28872 96.4736 157.9986 0303955 244.0492 110.6523 16.46015938 10708 6 | -------------------------------------------------------------------------------- /test/cases/26/26.txt: -------------------------------------------------------------------------------- 1 | 0.00000000 -6131.82730457 2446.52815529 -253.64211034 -0.144920228 0.995100963 7.658645067 2 | 5.00000000 -5799.24256135 2589.14811119 2011.54515100 2.325207364 -0.047125672 7.296234071 3 | 10.00000000 -4769.05061968 2420.46580562 4035.30855837 4.464585796 -1.060923209 6.070907874 4 | 15.00000000 -3175.45157340 1965.98738086 5582.12569608 6.049639376 -1.935777558 4.148607019 5 | 20.00000000 -1210.19024802 1281.54541294 6474.68172773 6.920746273 -2.580517337 1.748783868 6 | 25.00000000 896.73799533 447.12357305 6607.22400507 6.983396282 -2.925846168 -0.872655207 7 | 30.00000000 2896.99663535 -440.04738595 5954.92675487 6.211488246 -2.926949815 -3.433959806 8 | 35.00000000 4545.78970168 -1273.55952872 4580.16512984 4.656984233 -2.568711513 -5.638510954 9 | 40.00000000 5627.43299372 -1947.94282470 2634.16714929 2.464141047 -1.873985161 -7.195743032 10 | 45.00000000 5984.72318535 -2371.37691610 349.87996208 -0.121276950 -0.911981546 -7.859613894 11 | 50.00000000 5548.43325922 -2480.16469245 -1979.24314528 -2.763269534 0.199691915 -7.482796996 12 | -------------------------------------------------------------------------------- /test/cases/27/27.tle: -------------------------------------------------------------------------------- 1 | # SL-14 DEB # Last stage of decay - lost in under 420 min 2 | # 0 440 20 3 | 1 29141U 85108AA 06170.26783845 .99999999 00000-0 13519-0 0 718 4 | 2 29141 82.4288 273.4882 0015848 277.2124 83.9133 15.93343074 6828 5 | -------------------------------------------------------------------------------- /test/cases/27/27.txt: -------------------------------------------------------------------------------- 1 | 0.00000000 421.67840566 -6673.68977960 111.64141875 1.005040158 0.202389826 7.645732427 2 | 20.00000000 931.83479291 -1046.87503731 6515.86420077 -0.296696187 7.620774935 1.245735897 3 | 40.00000000 -86.20388468 6275.48262620 2197.96611721 -1.116468909 2.526639328 -7.243610343 4 | 60.00000000 -960.37473724 3225.75436830 -5751.25000763 -0.097496863 -6.738766966 -3.778344058 5 | 80.00000000 -256.62544523 -5146.22374234 -4237.66898372 1.074223795 -4.892310534 5.872454569 6 | 100.00000000 865.80538825 -5064.16771479 4232.92803755 0.481787581 5.013863992 5.866464602 7 | 120.00000000 558.85965422 3358.43669529 5688.94611912 -0.908695994 6.667117921 -3.857607996 8 | 140.00000000 -673.62934072 6174.72023388 -2319.73573691 -0.794012654 -2.778233017 -7.200589946 9 | 160.00000000 -784.72948170 -1303.43147597 -6464.09999318 0.636315123 -7.570767618 1.439088586 10 | 180.00000000 403.70914550 -6621.67148093 123.52490545 1.008599675 0.216555679 7.676166469 11 | 200.00000000 916.25183197 -912.03463579 6478.15924657 -0.300185386 7.677938586 1.102750233 12 | 220.00000000 -106.95567265 6294.67568868 1933.89928968 -1.111507172 2.252669748 -7.373931455 13 | 240.00000000 -946.34775370 2841.23370667 -5873.32131691 -0.047724190 -6.988797581 -3.387151482 14 | 260.00000000 -188.97523454 -5416.07027797 -3750.37803983 1.091262783 -4.403186677 6.304092517 15 | 280.00000000 883.10510187 -4491.84596522 4703.45351459 0.383312651 5.676383151 5.317392970 16 | 300.00000000 445.66363916 4072.83008159 5081.57103430 -0.984928194 6.090721914 -4.802866296 17 | 320.00000000 -755.66013707 5565.25621882 -3310.47661480 -0.658366490 -4.038916861 -6.665482887 18 | 340.00000000 -644.66934736 -2602.72992008 -5937.54764688 0.806004625 -7.146635809 3.037264105 19 | 360.00000000 581.80244823 -6219.86152627 1754.13284580 0.869697613 2.205903252 7.466200796 20 | 380.00000000 779.64842774 1078.12907945 6302.56867799 -0.599204158 7.738334427 -1.265273001 21 | 400.00000000 -406.41998227 6386.58222574 -394.79936887 -1.009286995 -0.536898360 -7.811445281 22 | 420.00000000 -853.97251918 168.91860645 -6340.04630952 0.396940959 -7.862569711 -0.273828184 23 | -------------------------------------------------------------------------------- /test/cases/28/28.tle: -------------------------------------------------------------------------------- 1 | # SL-12 DEB # Near Earth, perigee = 212.24 < 220 2 | # # simplified drag eq 3 | # 0 1440 120 4 | 1 29238U 06022G 06177.28732010 .00766286 10823-4 13334-2 0 101 5 | 2 29238 51.5595 213.7903 0202579 95.2503 267.9010 15.73823839 1061 6 | -------------------------------------------------------------------------------- /test/cases/28/28.txt: -------------------------------------------------------------------------------- 1 | 0.00000000 -5566.59512819 -3789.75991159 67.60382245 2.873759367 -3.825340523 6.023253926 2 | 120.00000000 4474.27915495 -1447.72286142 4619.83927235 4.712595822 5.668306153 -2.701606741 3 | 240.00000000 1922.17712474 5113.01138342 -4087.08470203 -6.490769651 -0.522350158 -3.896001154 4 | 360.00000000 -6157.93546882 -2094.70798790 -1941.63730960 0.149900661 -5.175192523 5.604262034 5 | 480.00000000 2482.64052411 -3268.45944555 5146.38006190 6.501814698 4.402848754 -0.350943511 6 | 600.00000000 4036.26455287 4827.43347201 -2507.99063955 -5.184409515 1.772280695 -5.331390168 7 | 720.00000000 -5776.81371622 -118.64155319 -3641.22052418 -2.539917207 -5.622701582 4.403125405 8 | 840.00000000 67.98699487 -4456.49213473 4863.71794283 7.183809420 2.418917791 2.015642495 9 | 960.00000000 5520.62207038 3782.38203554 -596.73193161 -3.027966069 3.754152525 -6.013506363 10 | 1080.00000000 -4528.05104455 1808.46273329 -4816.99727762 -4.808419763 -5.185789345 2.642104494 11 | 1200.00000000 -2356.61468078 -4852.51202272 3856.53816184 6.688446735 0.118520958 4.021854210 12 | 1320.00000000 6149.65800134 2173.59423261 1369.29488733 -0.345832777 5.109857861 -5.842951828 13 | 1440.00000000 -2629.55011449 3400.98040158 -5344.38217129 -6.368548448 -3.998963509 0.577253064 14 | -------------------------------------------------------------------------------- /test/cases/29/29.tle: -------------------------------------------------------------------------------- 1 | # # Original STR#3 SGP4 test 2 | # 0 1440 120 3 | 1 88888U 80275.98708465 .00073094 13844-3 66816-4 0 87 4 | 2 88888 72.8435 115.9689 0086731 52.6988 110.5714 16.05824518 1058 5 | -------------------------------------------------------------------------------- /test/cases/29/29.txt: -------------------------------------------------------------------------------- 1 | 0.00000000 2328.96975262 -5995.22051338 1719.97297192 2.912073281 -0.983417956 -7.090816210 2 | 120.00000000 1020.69234558 2286.56260634 -6191.55565927 -3.746543902 6.467532721 1.827985678 3 | 240.00000000 -3226.54349156 3503.70977525 4532.80979343 1.000992116 -5.788042888 5.162585826 4 | 360.00000000 2456.10706534 -6071.93855503 1222.89768554 2.679390040 -0.448290811 -7.228792155 5 | 480.00000000 787.16457349 2719.91800946 -6043.86662025 -3.759883839 6.277439314 2.397897864 6 | 600.00000000 -3110.97648030 3121.73026235 4878.15217036 1.244916056 -6.124880425 4.700576353 7 | 720.00000000 2567.56229695 -6112.50383923 713.96374435 2.440245751 0.098109002 -7.319959258 8 | 840.00000000 556.05661780 3144.52288201 -5855.34636179 -3.754660143 6.044752775 2.957941672 9 | 960.00000000 -2982.47940539 2712.61663711 5192.32330472 1.475566773 -6.427737014 4.202420227 10 | 1080.00000000 2663.08964352 -6115.48290885 196.40072867 2.196121564 0.652415093 -7.362824152 11 | 1200.00000000 328.54999674 3557.09490552 -5626.21427212 -3.731193288 5.769341172 3.504058731 12 | 1320.00000000 -2842.06876758 2278.42343492 5472.33437150 1.691852635 -6.693216335 3.671022712 13 | 1440.00000000 2742.55398832 -6079.67009123 -326.39012649 1.948497651 1.211072678 -7.356193131 14 | -------------------------------------------------------------------------------- /test/cases/30/30.lib.txt: -------------------------------------------------------------------------------- 1 | 0.00000000 -12908.67135870 8084.56464378 22887.74960008 -0.076981979 0.252652062 1.837356358 2 | 5.00000000 793.64064527 3156.83753103 27737.11494479 0.805043877 -0.301718305 1.497105611 3 | 10.00000000 12473.93690454 -7231.32356547 24653.58006326 1.076855844 -0.829532887 0.739262216 4 | 15.00000000 17669.28912870 -18942.69336347 14019.65470474 0.841553159 -1.010301461 0.024520846 5 | 20.00000000 21196.99960812 -35760.50482803 -6675.08412157 0.555745977 -0.796215357 -0.271968232 6 | -------------------------------------------------------------------------------- /test/cases/30/30.rsr.txt: -------------------------------------------------------------------------------- 1 | 0.00000000 -12908.67135870 8084.56464378 22887.74960008 -0.076981979 0.252652062 1.837356358 2 | 300.000000 836.36198558 3131.21861830 27739.12500595 0.806969092 -0.303613357 1.495581060 3 | 600.000000 12529.16240012 -7305.76672566 24606.25882463 1.077046921 -0.832176467 0.734844393 4 | 900.000000 17680.27781737 -19040.50274272 13889.53302171 0.838850492 -1.010897050 0.019845764 5 | 1200.000000 23876.96955477 -37275.65263893 -8113.95104473 0.589108130 -0.767768418 -0.260379679 6 | 7 | -------------------------------------------------------------------------------- /test/cases/30/30.tle: -------------------------------------------------------------------------------- 1 | # # check error code 4 2 | # 0 150 5 3 | 1 33333U 05037B 05333.02012661 .25992681 00000-0 24476-3 0 1534 4 | 2 33333 96.4736 157.9986 9950000 244.0492 110.6523 4.00004038 10708 5 | -------------------------------------------------------------------------------- /test/cases/30/30.txt: -------------------------------------------------------------------------------- 1 | 0.00000000 -12905.21267523 8080.08696393 22896.82650994 -0.077127609 0.253459883 1.836049206 2 | 5.00000000 805.95992226 3166.75967906 27740.24154253 0.804765423 -0.299547022 1.496286220 3 | 10.00000000 12495.54388507 -7210.36845802 24653.30468498 1.077103547 -0.827111007 0.739458841 4 | 15.00000000 17698.77858093 -18919.10217010 14020.57165229 0.842397422 -1.008770940 0.025168905 5 | 20.00000000 21040.79051442 -35586.94800797 -6562.06891897 0.554205976 -0.797264864 -0.272837933 6 | -------------------------------------------------------------------------------- /test/cases/31/31.tle: -------------------------------------------------------------------------------- 1 | # # try and check error code 2 but this 2 | # 0 1440 1 3 | 1 33334U 78066F 06174.85818871 .00000620 00000-0 10000-3 0 6809 4 | 2 33334 68.4714 236.1303 5602877 123.7484 302.5767 0.00001000 67521 5 | -------------------------------------------------------------------------------- /test/cases/31/31.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/test/cases/31/31.txt -------------------------------------------------------------------------------- /test/cases/32/32.tle: -------------------------------------------------------------------------------- 1 | # # try to check error code 3 looks like ep never goes below zero, tied close to ecc 2 | 0 1440 20 3 | 1 33335U 05008A 06176.46683397 -.00000205 00000-0 10000-3 0 2190 4 | 2 33335 0.0019 286.9433 0000004 13.7918 55.6504 1.00270176 4891 5 | -------------------------------------------------------------------------------- /test/cases/33/33.tle: -------------------------------------------------------------------------------- 1 | # SL-12 R/B # Shows Lyddane choice at 1860 and 4700 min 2 | # 1844000 1845100 5 3 | 1 20413U 83020D 05363.79166667 .00000000 00000-0 00000+0 0 7041 4 | 2 20413 12.3514 187.4253 7864447 196.3027 356.5478 0.24690082 7978 5 | -------------------------------------------------------------------------------- /test/cases/Makefile: -------------------------------------------------------------------------------- 1 | # GTG/test/cases Makefile 2 | 3 | # Tools 4 | 5 | TCLSH = /usr/bin/tclsh 6 | DIFF = /usr/bin/diff 7 | 8 | DBFDUMP_DIR = ../../Libraries/shapelib 9 | DBFDUMP = $(DBFDUMP_DIR)/dbfdump 10 | 11 | # Scripts 12 | 13 | TEST_SCRIPT = test.tcl 14 | 15 | # Files 16 | 17 | TESTLOG_GTG = test-gtg.txt 18 | TESTLOG_LIB = test-library.txt 19 | TESTLOG_REF = test-reference.txt 20 | 21 | .PHONY: test 22 | 23 | test: $(DBFDUMP) 24 | @echo "Running tests..." 25 | @$(TCLSH) $(TEST_SCRIPT) $(DBFDUMP) $(TESTLOG_GTG) 26 | @$(DIFF) -q $(TESTLOG_GTG) $(TESTLOG_LIB) 27 | @echo "... completed tests OK." 28 | 29 | $(DBFDUMP): 30 | @$(MAKE) --directory=$(DBFDUMP_DIR) dbfdump 31 | -------------------------------------------------------------------------------- /test/cases/README.md: -------------------------------------------------------------------------------- 1 | ## Subdirectory Contents 2 | 3 | Each numbered directory contains a test case from [*Revisiting Spacetrack Report 3*](http://celestrak.com/publications/AIAA/2006-6753/) (*RSR3*). Here is a key to the contents of each case directory: 4 | 5 | - `.tle` - The two-line element set for the test case, as given in Appendix D ("Test Case Listing") of *RSR3* and the file `SGP4-VER.TLE` distributed with the *RSR3* sample code. 6 | - `.ref.txt` - The reference output for the test case, as given in Appendix E ("Test Case Results Listing") of *RSR3*. 7 | - `.rsr.txt` - The reference output for the test case, as generated by the `testcpp` program included with *RSR3*. Offset times given in seconds instead of minutes. Otherwise, identical to `.ref.txt` except for two instances of off-by-one discrepancies in low-precision digits. 8 | - `.lib.txt` - The output of the SGP4++ library, as generated by the included `runtest` program. **Note that the output of `runtest` differs slightly from the reference `testcpp` output as generated on the same computer with the same compiler.** This discrepancy is presently unaccounted for. 9 | - `.txt` - The test output generated by the `gtg` test script. Identical to `.lib.txt`. 10 | 11 | Intermediate files generated by the test script: 12 | 13 | - `.shp` - Shapefile geometry. 14 | - `.shx` - Shapefile index. 15 | - `.dbf` - Shapefile attribute table. 16 | - `.dbf.txt` - Text listing of attribute table generated with `dbfdump`. 17 | - `.log` - Log of `--verbose` messages generated by `gtg`. 18 | 19 | ## Contents 20 | 21 | The reference output and test output for each test case is also aggregated in these files: 22 | 23 | - `test-reference.txt` contains the concatenation of all `.ref.txt` files. 24 | - `test-rsr.txt` contains the concatenation of all `.rsr.txt` files. 25 | - `test-library.txt` contains the concatenation of all `.lib.txt` files. 26 | - `test-gtg.txt` contains the concatenation of all `gtg` test output files (`.txt`). 27 | 28 | -------------------------------------------------------------------------------- /test/cases/difftable.tcl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tclsh 2 | 3 | if {$argc != 2} { 4 | puts stderr "usage: difftable.tcl afile bfile" 5 | puts stderr " difftable.tcl test-library.txt test-reference.txt" 6 | exit 1 7 | } 8 | 9 | if {[catch {open [lindex $argv 0]} afile]} { 10 | puts stderr $afile 11 | exit 1 12 | } 13 | set alines [split [read -nonewline $afile] "\n"] 14 | close $afile 15 | 16 | if {[catch {open [lindex $argv 1]} bfile]} { 17 | puts stderr $bfile 18 | exit 1 19 | } 20 | set blines [split [read -nonewline $bfile] "\n"] 21 | close $bfile 22 | 23 | foreach aline $alines bline $blines { 24 | 25 | set alen [llength $aline] 26 | set blen [llength $bline] 27 | 28 | if {$alen == $blen} { 29 | if {$alen > 1} { 30 | 31 | set line [list] 32 | 33 | foreach av $aline bv $bline { 34 | 35 | # count digits after . to determine precision 36 | # assume precision of both fields is the same 37 | set prec [string length [lindex [split $av .] 1]] 38 | 39 | set diff [expr {$av - $bv}] 40 | lappend line [format "%.*f" $prec $diff] 41 | } 42 | 43 | puts $line 44 | 45 | } else { 46 | # matching line size with just one field 47 | # assume to be the test case number 48 | puts $aline 49 | } 50 | } else { 51 | # mismatched line size; just print line from file a 52 | puts $aline 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /test/cases/test.tcl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tclsh 2 | 3 | # test number, start time, end time, and interval 4 | # based on Appendix D - Test Case Listing - of "Revisiting Spacetrack Report 3" 5 | set tests { 6 | {01 epoch epoch+4320m 360m} 7 | {02 epoch-5184m epoch-4896m 120m} 8 | {03 epoch epoch+2880m 120m} 9 | {04 epoch epoch+2880m 120m} 10 | {05 epoch epoch+2880m 120m} 11 | {06 epoch-1440m epoch-720m 60m} 12 | {07 epoch epoch+1440m 360m} 13 | {08 epoch epoch+2880m 120m} 14 | {09 epoch epoch+1440m 120m} 15 | {10 epoch+1440m epoch+4320m 120m} 16 | {11 epoch epoch+2880m 120m} 17 | {12 epoch+54.2028672m epoch+1440m 20m} 18 | {13 epoch epoch+2880m 120m} 19 | {14 epoch epoch+1440m 120m} 20 | {15 epoch epoch+1600m 120m} 21 | {16 epoch epoch+720m 20m} 22 | {17 epoch epoch+1440m 120m} 23 | {18 epoch-1440m epoch+1440m 120m} 24 | {19 epoch+9300m epoch+9400m 60m} 25 | {20 epoch epoch+2880m 120m} 26 | {21 epoch epoch+2880m 120m} 27 | {22 epoch epoch+1440m 120m} 28 | {23 epoch epoch+2880m 120m} 29 | {24 epoch epoch+1440m 120m} 30 | {25 epoch epoch+1440m 120m} 31 | {26 epoch epoch+60m 5m} 32 | {27 epoch epoch+440m 20m} 33 | {28 epoch epoch+1440m 120m} 34 | {29 epoch epoch+1440m 120m} 35 | {30 epoch epoch+150m 5m} 36 | {31 epoch epoch+1440m 1m} 37 | {32 epoch epoch+1440m 20m} 38 | {33 epoch+1844000m epoch+1845100m 5m} 39 | } 40 | 41 | # dumpfilePath - path to a text file created by dbfdump 42 | # casefilePath - path for reformatted version of dumpfile 43 | # testfile - file handle for cumulative test log 44 | proc reformatresults {dumpfilePath casefilePath testfile} { 45 | 46 | # read contents of attribute table dump 47 | if {[catch {open $dumpfilePath} dumpfile]} { 48 | error $dumpfile 49 | } 50 | set fc [read -nonewline $dumpfile] 51 | close $dumpfile 52 | 53 | # convert file contents to list of lines, ignoring header line 54 | set lines [lreplace [split $fc \n] 0 0] 55 | 56 | 57 | if {[catch {open $casefilePath w} casefile]} { 58 | error $casefile 59 | } 60 | 61 | # rewrite the dumpfile contents to the casefile & cumulative testfile, 62 | foreach line $lines { 63 | foreach {fid date time utc mfe xpos ypos zpos xvel yvel zvel} $line {} 64 | set rec [list $mfe $xpos $ypos $zpos $xvel $yvel $zvel] 65 | puts $casefile $rec 66 | puts $testfile $rec 67 | } 68 | 69 | puts $testfile "" 70 | close $casefile 71 | } 72 | 73 | if {$argc == 0} { 74 | # if path to dbfdump is not specified on CLI, assume it is in system PATH 75 | set dbfdumpPath dbfdump 76 | set gtglogPath test-gtg.txt 77 | } elseif {$argc == 2} { 78 | set dbfdumpPath [lindex $argv 0] 79 | set gtglogPath [lindex $argv 1] 80 | } else { 81 | puts stderr "usage: $argv0 [dbfdumpPath logfilePath]" 82 | exit 1 83 | } 84 | 85 | # path to dbfdump from within each case subfolder 86 | set dbfdump [file join .. $dbfdumpPath] 87 | 88 | if {[catch {open $gtglogPath w} testlog]} { 89 | puts stderr $testlog 90 | exit 1 91 | } 92 | 93 | set testdir [pwd] 94 | 95 | foreach test $tests { 96 | 97 | cd $testdir 98 | 99 | foreach {id start end interval} $test {} 100 | 101 | cd $id 102 | 103 | # clean up previous output 104 | if {[catch {exec rm -f $id.shp $id.shx $id.dbf $id.log $id.dbf.txt $id.txt} err]} { 105 | puts stderr "$id - cleanup error: $err" 106 | } 107 | 108 | # run this test case with gtg 109 | # status messages logged to .log file 110 | if {[catch {exec ../../../gtg \ 111 | --input $id.tle \ 112 | --output $id \ 113 | --attributes mfe time xposition yposition zposition xvelocity yvelocity zvelocity \ 114 | --start $start \ 115 | --end $end \ 116 | --forceend \ 117 | --interval $interval \ 118 | --verbose > $id.log} err]} { 119 | puts stderr "$id - gtg: $err" 120 | } 121 | 122 | # convert the output .dbf attribute table to .dbf.txt text 123 | # dbfdump is a shapelib utility 124 | if {[catch {exec $dbfdump $id.dbf > $id.dbf.txt} err]} { 125 | puts stderr "$id - dbfdump: error" 126 | } 127 | 128 | # tidy up the .dbf.txt attribute table text dump to match plain .txt key format 129 | # appends reformatted text table to cumulative test-gtg.txt as well 130 | puts $testlog $id 131 | if {[catch {reformatresults $id.dbf.txt $id.txt $testlog} err]} { 132 | puts stderr "$id - reformat: $err" 133 | } 134 | 135 | } 136 | 137 | close $testlog 138 | exit 0 139 | -------------------------------------------------------------------------------- /test/images/README.md: -------------------------------------------------------------------------------- 1 | Test Images 2 | =========== 3 | 4 | This directory contains various samples images of `gtg` output displayed on maps. 5 | -------------------------------------------------------------------------------- /test/images/comparison.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/test/images/comparison.png -------------------------------------------------------------------------------- /test/images/elevation-trace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/test/images/elevation-trace.png -------------------------------------------------------------------------------- /test/images/iss-orthographic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/test/images/iss-orthographic.png -------------------------------------------------------------------------------- /test/images/iss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/test/images/iss.png -------------------------------------------------------------------------------- /test/images/iss2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/test/images/iss2.png -------------------------------------------------------------------------------- /test/images/ls83.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/test/images/ls83.png -------------------------------------------------------------------------------- /test/iss.dbf: -------------------------------------------------------------------------------- 1 | _]A WALTITUDEN  380.651561 379.925952 379.310969 378.818619 378.459478 378.242484 378.174754 378.261429 378.505560 378.908020 379.467466 380.180339 381.040896 382.041291 383.171689 384.420417 385.774145 387.218097 388.736288 390.311773 391.926924 393.563699 395.203929 396.829599 398.423118 399.967589 401.447053 402.846723 404.153189 405.354598 406.440813 407.403534 408.236387 408.934991 409.496976 409.921980 410.211611 410.369369 410.400549 410.312107 410.112502 409.811513 409.420039 408.949878 408.413492 407.823763 407.193748 406.536427 405.864458 405.189940 404.524192 403.877541 403.259141 402.676814 402.136913 401.644228 401.201912 400.811454 400.472676 400.183772 399.941378 399.740676 399.575529 399.438637 399.321727 399.215756 399.111129 398.997934 398.866179 398.706031 398.508055 398.263443 397.964235 397.603516 397.175605 396.676210 396.102565 395.453539 394.729703 393.933383 393.068663 392.141370 391.159010 390.130684 389.066964 387.979744 386.882063 385.787896 384.711930 383.669321 382.675435 381.745580 380.894732 -------------------------------------------------------------------------------- /test/iss.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/test/iss.shp -------------------------------------------------------------------------------- /test/iss.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anoved/Ground-Track-Generator/fce7be46552bbfa62abf6c9b9ae7dcb8287ea1ab/test/iss.shx -------------------------------------------------------------------------------- /test/options/README.md: -------------------------------------------------------------------------------- 1 | Options Tests 2 | ============= 3 | 4 | The `test.tcl` script in this directory contains pseudocode for a set of test cases intended to verify that `gtg` handles various combinations of command line options correctly. The present set of test cases is incomplete; checking all possible combinations of options would require very many test cases indeed. 5 | -------------------------------------------------------------------------------- /test/options/iss.tle: -------------------------------------------------------------------------------- 1 | ISS (ZARYA) 2 | 1 25544U 98067A 12085.20387446 .00017924 00000-0 22587-3 0 2432 3 | 2 25544 51.6423 183.0335 0016084 193.8608 250.6436 15.59550052764921 4 | -------------------------------------------------------------------------------- /test/options/stations.tle: -------------------------------------------------------------------------------- 1 | ISS (ZARYA) 2 | 1 25544U 98067A 12085.20387446 .00017924 00000-0 22587-3 0 2432 3 | 2 25544 51.6423 183.0335 0016084 193.8608 250.6436 15.59550052764921 4 | TIANGONG 1 5 | 1 37820U 11053A 12085.11275463 .00036897 00000-0 29607-3 0 5924 6 | 2 37820 42.7855 201.5276 0008377 354.6898 3.8117 15.70273266 27945 7 | SOYUZ-TMA 22 8 | 1 37877U 11067A 12083.55687500 .00016134 00000-0 20449-3 0 1132 9 | 2 37877 51.6414 191.3107 0016257 187.9708 3.6628 15.59483176 20341 10 | SOYUZ-TMA 03M 11 | 1 38036U 11078A 12083.55687500 .00016134 00000-0 20449-3 0 849 12 | 2 38036 51.6414 191.3107 0016257 187.9708 3.6628 15.59483176 14511 13 | PROGRESS-M 14M 14 | 1 38073U 12004A 12083.55687500 .00016134 00000-0 20449-3 0 570 15 | 2 38073 51.6414 191.3107 0016257 187.9708 3.6628 15.59483176 8997 16 | ATV-3 (EDOARDO AMALDI) 17 | 1 38096U 12010A 12085.45839880 -.00447747 77697-4 -10260-2 0 112 18 | 2 38096 51.6287 182.4585 0016218 179.6194 275.6790 15.96237384 368 19 | -------------------------------------------------------------------------------- /test/options/test.tcl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tclsh 2 | 3 | package require Tcl 8.5 4 | 5 | set gtg ../../gtg 6 | 7 | 8 | # TLE input methods - single TLE 9 | 10 | #exec $gtg iss.tle 11 | #exec $gtg < iss.tle 12 | #exec $gtg --input iss.tle 13 | #exec $gtg --tle "ISS (ZARYA) \n1 25544U 98067A 12085.20387446 .00017924 00000-0 22587-3 0 2432\n2 25544 51.6423 183.0335 0016084 193.8608 250.6436 15.59550052764921" 14 | 15 | # in all the above cases, output goes to a shapefile in the current direct named for the TLE NORAD number (25544 in the case of ISS) 16 | 17 | # --output with a single source tle specifies entire base path 18 | #exec $gtg --output foo iss.tle 19 | 20 | # --prefix with a single source tle uses prefix+tlenumber as basename (foo25544) 21 | #exec $gtg --prefix foo iss.tle 22 | 23 | # 25544bar 24 | #exec $gtg --suffix bar iss.tle 25 | 26 | # foo25544bar 27 | #exec $gtg --prefix foo --suffix bar iss.tle 28 | 29 | # subdir/ exists, but --output is only basename, so output is subdir.shp/shx/dbf 30 | #exec $gtg --output subdir iss.tle 31 | 32 | # --prefix and --suffix are ignored if --output is given with a single TLE 33 | #exec $gtg --output subdir --prefix foo iss.tle 34 | 35 | # stations contains multiple tles; each written to cwd, using NORAD number as basename 36 | # 25544, 37820, 37877, 38036, 38073, 38096 37 | #exec $gtg stations.tle 38 | 39 | # fails; with multiple tle, --output is expected to be a directory 40 | #exec $gtg --output foo stations.tle 41 | 42 | # subdir exists; output is written to that dir with NORAD number as basename 43 | #exec $gtg --output subdir stations.tle 44 | 45 | # outputs all with foo prefix to cwd 46 | #exec $gtg --prefix foo stations.tle 47 | 48 | # written to subdir/ with foo prefix 49 | #exec $gtg --output subdir --prefix foo stations.tle 50 | 51 | #exec $gtg --output subdir --suffix bar stations.tle 52 | 53 | #exec $gtg --output subdir --prefix foo --suffix bar stations.tle 54 | 55 | # a wgs-72 prj file should accompany each output shapefile 56 | #exec $gtg --output subdir --prj stations.tle 57 | 58 | # shape 46 is split over dateline 59 | #exec $gtg --input iss.tle --features line 60 | #exec $gtg --input iss.tle --features line --split --suffix split 61 | #shpdump 25544.shp > 25544.dump 62 | #shpdump 25544split.shp > 25544split.dump 63 | #diff 25544.dump 25544split.dump 64 | 65 | # forceend outputs a record exactly at --end. 66 | # 67 | #exec $gtg --input iss.tle --start epoch --end epoch+10m --interval 1m --attributes mfe 68 | #exec $gtg --input iss.tle --start epoch --end epoch+10m --interval 1m --forceend --suffix forced --attributes mfe 69 | #exec $gtg --input iss.tle --prefix b --start epoch --end epoch+9.5m --interval 1m --attributes mfe 70 | #exec $gtg --input iss.tle --prefix b --start epoch --end epoch+9.5m --interval 1m --forceend --suffix forced --attributes mfe 71 | -------------------------------------------------------------------------------- /test/solar/Makefile: -------------------------------------------------------------------------------- 1 | CPP = /usr/bin/g++ 2 | CFLAGS = -g -Wall -fPIC -Wextra 3 | LIB_SGP4_DIR = ../../Libraries/sgp4/libsgp4 4 | LIB_SGP4 = $(LIB_SGP4_DIR)/libsgp4.a 5 | INCLUDES = -I $(LIB_SGP4_DIR) 6 | 7 | # -lrt required on linux for libsgp4's use of clock_gettime 8 | solarposition: solarposition.o $(LIB_SGP4) 9 | $(CPP) solarposition.o $(LIB_SGP4) -lrt -o $@ 10 | 11 | solarposition.o: solarposition.cpp 12 | $(CPP) $(CFLAGS) $(INCLUDES) -c solarposition.cpp 13 | -------------------------------------------------------------------------------- /test/solar/solarposition.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * solarposition 3 | * 4 | * This program prints the current julian date, the current greenwich sidereal 5 | * time (earth rotation in radians), and current location of the sun, expressed 6 | * in Earth-centered inertial coordinate system kilometers. (w is direct radius) 7 | * It is intended as a reference for other ECI solar position implementations. 8 | */ 9 | 10 | #include 11 | #include "DateTime.h" 12 | #include "SolarPosition.h" 13 | #include "Vector.h" 14 | 15 | int main(void) { 16 | SolarPosition sp; 17 | DateTime date = DateTime::Now(); 18 | Eci solar_eci = sp.FindPosition(date); 19 | Vector pos_eci = solar_eci.Position(); 20 | double julianDate = date.ToJulian(); 21 | double gsidereal = date.ToGreenwichSiderealTime(); 22 | 23 | printf("d: %lf\n", julianDate); 24 | printf("g: %lf\n", gsidereal); 25 | printf("x: %lf\n", pos_eci.x); 26 | printf("y: %lf\n", pos_eci.y); 27 | printf("z: %lf\n", pos_eci.z); 28 | printf("w: %lf\n", pos_eci.w); 29 | 30 | return 0; 31 | } 32 | --------------------------------------------------------------------------------