From a56a4018cc2b5aabf6ea4f9f013ff83f057c0def Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Thu, 21 Sep 2017 13:19:14 -0400 Subject: [PATCH] Fixed what's-this problem with eph2tle.txt with comments --- eph2tle.cpp | 3 ++- eph2tle.txt | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/eph2tle.cpp b/eph2tle.cpp index d4705fb6..604359c4 100644 --- a/eph2tle.cpp +++ b/eph2tle.cpp @@ -590,7 +590,8 @@ int main( const int argc, const char **argv) fprintf( ofile, "# Made by eph2tle, compiled " __DATE__ " " __TIME__ "\n"); fprintf( ofile, "# Run at %s#\n", ctime( &t0)); while( fgets_trimmed( buff, sizeof( buff), ifile)) - fprintf( ofile, "%s\n", buff); + if( *buff != ';') + fprintf( ofile, "%s\n", buff); fclose( ifile); ifile = fopen( argv[1], "rb"); if( !ifile) diff --git a/eph2tle.txt b/eph2tle.txt index acf4bb3b..1def713e 100644 --- a/eph2tle.txt +++ b/eph2tle.txt @@ -1,3 +1,9 @@ +; Any line starting with ';' is treated as a comment. This file +; is read by 'eph2tle' (see 'eph2tle.cpp') as boilerplate to be put +; at the start of all TLE files. +; +; +; # The following TLEs (Two-Line Elements) were generated by fitting # a numerically-integrated ephemeris, based on the orbit given below, # to the SDP4/SGP4 models. Each TLE is good for the interval between