rwb@vi.ri.cmu.edu (Bob Berger) (09/16/90)
Posting-number: Volume 14, Issue 95 Submitted-by: rwb@vi.ri.cmu.edu (Bob Berger) Archive-name: n3emo-orbit/patch01 The following patch file fixes a few minor bugs in version 3.7 of my satellite orbit simulator, producing version 3.9. Just feed this message to patch. Bob N3EMO Index: orbit.c 4a5,11 > 4/2/1990 v3.9 Misc bug fixes. Changed ElementSet and > EpochRev to unsigned longs in nasa.c. Allow > satellite names with spaces in mode.dat. > > 3/15/1990 v3.8 Stop assigning single character abbreviations > after the 62nd satellite. > 97c104 < char VersionStr[] = "N3EMO Orbit Simulator v3.7"; --- > char VersionStr[] = "N3EMO Orbit Simulator v3.9"; 151,156c158,173 < printf(" %c) %s",satchar,&str[11]); < if (satchar == 'z') < satchar = 'A'; < else if (satchar == 'Z') < satchar = '0'; < else satchar++; --- > printf("\t"); > if (satchar != 0) > printf("%c) ",satchar); > else > printf(" "); > printf("%s",&str[11]); > if (satchar) > { > if (satchar == 'z') > satchar = 'A'; > else if (satchar == 'Z') > satchar = '0'; > else if (satchar == '9') > satchar = 0; > else satchar++; > } 366,367c383,384 < if (sscanf(str,"Satellite: %s",str) == 1 < && cstrcmp(SatName,str) == 0) --- > if (strncmp(str,"Satellite: ",11) == 0) > if (cstrncmp(SatName,&str[11],strlen(SatName)) == 0) Index: nasa.c 12c12,13 < int LineNum,SatNum,ElementSet,EpochRev; --- > int LineNum,SatNum; > unsigned long ElementSet,EpochRev; 49c50 < sscanf(line1,"%*2c%5d%*10c%2lf%12lf%10lf%*21c%5d", --- > sscanf(line1,"%*2c%5d%*10c%2lf%12lf%10lf%*21c%5lu", 55c56 < sscanf(line2,"%*8c%8lf%8lf%7lf%8lf%8lf%11lf%5d", --- > sscanf(line2,"%*8c%8lf%8lf%7lf%8lf%8lf%11lf%5lu", 65c66 < fprintf(OutFile,"Element set: %d\n",ElementSet); --- > fprintf(OutFile,"Element set: %lu\n",ElementSet); 73c74 < fprintf(OutFile,"Epoch rev: %d\n",EpochRev); --- > fprintf(OutFile,"Epoch rev: %lu\n",EpochRev);