home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume14 / n3emo-orbit / patch01 next >
Encoding:
Text File  |  1990-09-15  |  2.3 KB  |  87 lines

  1. Newsgroups: comp.sources.misc
  2. X-UNIX-From: Bob.Berger@vi.ri.cmu.edu
  3. organization: Carnegie-Mellon University, CS/RI
  4. subject: v14i095: Patch to orbit3.7
  5. from: rwb@vi.ri.cmu.edu (Bob Berger)
  6. Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  7.  
  8. Posting-number: Volume 14, Issue 95
  9. Submitted-by: rwb@vi.ri.cmu.edu (Bob Berger)
  10. Archive-name: n3emo-orbit/patch01
  11.  
  12. The following patch file fixes a few minor bugs in  version 3.7 of my
  13. satellite orbit simulator, producing version 3.9.
  14.  
  15. Just feed this message to patch.
  16.  
  17. Bob  N3EMO
  18.  
  19.  
  20. Index: orbit.c
  21. 4a5,11
  22. >     4/2/1990    v3.9 Misc bug fixes. Changed ElementSet and
  23. >             EpochRev to unsigned longs in nasa.c. Allow
  24. >             satellite names with spaces in mode.dat.
  25. >     3/15/1990    v3.8 Stop assigning single character abbreviations
  26. >             after the 62nd satellite.
  27. 97c104
  28. < char VersionStr[] = "N3EMO Orbit Simulator  v3.7";
  29. ---
  30. > char VersionStr[] = "N3EMO Orbit Simulator  v3.9";
  31. 151,156c158,173
  32. <         printf("    %c) %s",satchar,&str[11]);
  33. <         if (satchar == 'z')
  34. <         satchar = 'A';
  35. <                else if (satchar == 'Z')
  36. <            satchar = '0';
  37. <                 else satchar++;
  38. ---
  39. >         printf("\t");
  40. >         if (satchar != 0)
  41. >         printf("%c) ",satchar);
  42. >          else
  43. >         printf("   ");
  44. >         printf("%s",&str[11]);
  45. >         if (satchar)
  46. >         {
  47. >         if (satchar == 'z')
  48. >             satchar = 'A';
  49. >                    else if (satchar == 'Z')
  50. >               satchar = '0';
  51. >              else if (satchar == '9')
  52. >                satchar = 0;
  53. >                      else satchar++;
  54. >         }
  55. 366,367c383,384
  56. <     if (sscanf(str,"Satellite: %s",str) == 1
  57. <         && cstrcmp(SatName,str) == 0)
  58. ---
  59. >      if (strncmp(str,"Satellite: ",11) == 0)
  60. >        if (cstrncmp(SatName,&str[11],strlen(SatName)) == 0)
  61. Index: nasa.c
  62. 12c12,13
  63. <     int LineNum,SatNum,ElementSet,EpochRev;
  64. ---
  65. >     int LineNum,SatNum;
  66. >     unsigned long ElementSet,EpochRev;
  67. 49c50
  68. <     sscanf(line1,"%*2c%5d%*10c%2lf%12lf%10lf%*21c%5d",
  69. ---
  70. >     sscanf(line1,"%*2c%5d%*10c%2lf%12lf%10lf%*21c%5lu",
  71. 55c56
  72. <     sscanf(line2,"%*8c%8lf%8lf%7lf%8lf%8lf%11lf%5d",
  73. ---
  74. >     sscanf(line2,"%*8c%8lf%8lf%7lf%8lf%8lf%11lf%5lu",
  75. 65c66
  76. <     fprintf(OutFile,"Element set: %d\n",ElementSet);
  77. ---
  78. >     fprintf(OutFile,"Element set: %lu\n",ElementSet);
  79. 73c74
  80. <     fprintf(OutFile,"Epoch rev: %d\n",EpochRev);
  81. ---
  82. >     fprintf(OutFile,"Epoch rev: %lu\n",EpochRev);
  83.  
  84.  
  85.