A patch to use a larger database of satellites with
predict (http://www.qsl.net/kd2bd/predict.html).

--- predict-2.2.3/predict.c	2006-05-15 01:19:56.000000000 +0200
+++ predict-2.2.3-bigger-db/predict.c	2010-10-31 22:54:45.139925467 +0100
@@ -119,6 +119,8 @@
 #define VISIBLE_FLAG           0x002000
 #define SAT_ECLIPSED_FLAG      0x004000
 
+#define NUMBER_OF_SATELLITES	512
+
 struct	{  char line1[70];
 	   char line2[70];
 	   char name[25];
@@ -137,7 +139,7 @@ struct	{  char line1[70];
 	   double nddot6;
   	   double bstar;
 	   long orbitnum;
-	}  sat[24];
+	}  sat[NUMBER_OF_SATELLITES];
 
 struct	{  char callsign[17];
 	   double stnlat;
@@ -159,7 +161,7 @@ struct	{  char name[25];
 	   unsigned char dayofweek[10];
 	   int phase_start[10];
 	   int phase_end[10];
-	}  sat_db[24];
+	}  sat_db[NUMBER_OF_SATELLITES];
 
 /* Global variables for sharing data among functions... */
 
@@ -186,16 +188,16 @@ unsigned char val[256];
 /* The following variables are used by the socket server.  They
    are updated in the MultiTrack() and SingleTrack() functions. */
 
-char	visibility_array[24], tracking_mode[30];
+char	visibility_array[NUMBER_OF_SATELLITES], tracking_mode[30];
 
-float	az_array[24], el_array[24], long_array[24], lat_array[24],
-	footprint_array[24], range_array[24], altitude_array[24],
-	velocity_array[24], eclipse_depth_array[24], phase_array[24],
-	squint_array[24];
+float	az_array[NUMBER_OF_SATELLITES], el_array[NUMBER_OF_SATELLITES], long_array[NUMBER_OF_SATELLITES], lat_array[NUMBER_OF_SATELLITES],
+	footprint_array[NUMBER_OF_SATELLITES], range_array[NUMBER_OF_SATELLITES], altitude_array[NUMBER_OF_SATELLITES],
+	velocity_array[NUMBER_OF_SATELLITES], eclipse_depth_array[NUMBER_OF_SATELLITES], phase_array[NUMBER_OF_SATELLITES],
+	squint_array[NUMBER_OF_SATELLITES];
 
-double	doppler[24], nextevent[24];
+double	doppler[NUMBER_OF_SATELLITES], nextevent[NUMBER_OF_SATELLITES];
 
-long	aos_array[24], orbitnum_array[24];
+long	aos_array[NUMBER_OF_SATELLITES], orbitnum_array[NUMBER_OF_SATELLITES];
 
 unsigned short portbase=0;
 
@@ -2081,7 +2083,7 @@ char *predict_name;
 
 			/* Do a simple search for the matching satellite name */
 
-			for (i=0; i<24; i++)
+			for (i=0; i<NUMBER_OF_SATELLITES; i++)
 			{
 				if ((strncmp(satname,sat[i].name,25)==0) || (atol(satname)==sat[i].catnum))
 				{
@@ -2110,7 +2112,7 @@ char *predict_name;
 
 			/* Do a simple search for the matching satellite name */
 
-			for (i=0; i<24; i++)
+			for (i=0; i<NUMBER_OF_SATELLITES; i++)
 			{
 				if ((strncmp(satname,sat[i].name,25)==0) || (atol(satname)==sat[i].catnum))
 				{
@@ -2137,7 +2139,7 @@ char *predict_name;
 
 			/* Do a simple search for the matching satellite name */
 
-			for (i=0; i<24; i++)
+			for (i=0; i<NUMBER_OF_SATELLITES; i++)
 			{
 				if ((strncmp(satname,sat[i].name,25)==0) || (atol(satname)==sat[i].catnum))
 				{
@@ -2158,7 +2160,7 @@ char *predict_name;
 		{
 			buff[0]=0;
 
-			for (i=0; i<24; i++)
+			for (i=0; i<NUMBER_OF_SATELLITES; i++)
 			{
 				if (sat[i].name[0]!=0)
 					strcat(buff,sat[i].name);
@@ -2735,7 +2737,7 @@ char ReadDataFiles()
 
 	if (fd!=NULL)
 	{
-		while (x<24 && feof(fd)==0)
+		while (x<NUMBER_OF_SATELLITES && feof(fd)==0)
 		{
 			/* Initialize variables */
 
@@ -2805,7 +2807,7 @@ char ReadDataFiles()
 
 				/* Search for match */
 
-				for (y=0, match=0; y<24 && match==0; y++)
+				for (y=0, match=0; y<NUMBER_OF_SATELLITES && match==0; y++)
 				{
 					if (catnum==sat[y].catnum)
 						match=1;
@@ -2976,7 +2978,7 @@ void SaveTLE()
 
 	fd=fopen(tlefile,"w");
 
-	for (x=0; x<24; x++)
+	for (x=0; x<NUMBER_OF_SATELLITES; x++)
 	{
 		/* Convert numeric orbital data to ASCII TLE format */
 
@@ -3079,9 +3081,9 @@ char *string;
 					/* Scan for object number in datafile to see
 					   if this is something we're interested in */
 
-					for (i=0; (i<24 && sat[i].catnum!=atol(SubString(line1,2,6))); i++);
+					for (i=0; (i<NUMBER_OF_SATELLITES && sat[i].catnum!=atol(SubString(line1,2,6))); i++);
 
-					if (i!=24)
+					if (i!=NUMBER_OF_SATELLITES)
 					{
 						/* We found it!  Check to see if it's more
 						   recent than the data we already have. */
@@ -3166,10 +3168,10 @@ char *string;
 						mvprintw(19,21,"  Only 1 satellite was updated.");
 					else
 					{
-						if (savecount==24)
+						if (savecount==NUMBER_OF_SATELLITES)
 							mvprintw(19,21,"  All satellites were updated!");
 						else
-							mvprintw(19,21,"%3u out of 24 satellites were updated.",savecount);
+							mvprintw(19,21,"%3u out of %u satellites were updated.",savecount,NUMBER_OF_SATELLITES);
 					}
 				}
 
@@ -5416,10 +5418,10 @@ void MultiTrack()
 
 	int		x, y, z, ans;
 
-	unsigned char	satindex[24], inrange[24], sunstat=0, ok2predict[24];
+	unsigned char	satindex[NUMBER_OF_SATELLITES], inrange[NUMBER_OF_SATELLITES], sunstat=0, ok2predict[NUMBER_OF_SATELLITES];
 
-	double		aos[24], aos2[24], temptime,
-			nextcalctime=0.0, los[24], aoslos[24];
+	double		aos[NUMBER_OF_SATELLITES], aos2[NUMBER_OF_SATELLITES], temptime,
+			nextcalctime=0.0, los[NUMBER_OF_SATELLITES], aoslos[NUMBER_OF_SATELLITES];
 
 	if (xterm)
 		fprintf(stderr,"\033]0;PREDICT: Multi-Satellite Tracking Mode\007");
@@ -5437,7 +5439,7 @@ void MultiTrack()
 
 	printw(" Satellite  Az   El %s  %s  Range  | Satellite  Az   El %s  %s  Range   ",(io_lat=='N'?"LatN":"LatS"),(io_lon=='W'?"LonW":"LonE"),(io_lat=='N'?"LatN":"LatS"),(io_lon=='W'?"LonW":"LonE"));
 
-	for (x=0; x<24; x++)
+	for (x=0; x<NUMBER_OF_SATELLITES; x++)
 	{
 		if (Geostationary(x)==0 && AosHappens(x)==1 && Decayed(x,0.0)!=1)
 			ok2predict[x]=1;
@@ -5452,7 +5454,7 @@ void MultiTrack()
 
 	do
 	{
-		for (z=0; z<24; z++)
+		for (z=0; z<NUMBER_OF_SATELLITES; z++)
 		{
 			y=z/2;
 
@@ -5607,7 +5609,7 @@ void MultiTrack()
 		{
 			/* Bubble sort the AOS times */
 
-			for (z=22; z>=0; z--)
+			for (z=NUMBER_OF_SATELLITES-2; z>=0; z--)
 				for (y=0; y<=z; y++)
 					if (aos2[y]>=aos2[y+1])
 					{
@@ -5627,7 +5629,7 @@ void MultiTrack()
 			mvprintw(20,31,"---------------");
 			attrset(COLOR_PAIR(3)|A_BOLD);
 
-			for (x=0, y=0, z=-1; x<21 && y!=3; x++)
+			for (x=0, y=0, z=-1; x<NUMBER_OF_SATELLITES-3 && y!=3; x++)
 			{
 				if (ok2predict[satindex[x]] && aos2[x]!=0.0)
 				{
@@ -5931,7 +5933,7 @@ char *string, *outputfile;
  
 	/* Do a simple search for the matching satellite name */
 
-	for (z=0; z<24; z++)
+	for (z=0; z<NUMBER_OF_SATELLITES; z++)
 	{
 		if ((strcmp(sat[z].name,satname)==0) || (atol(satname)==sat[z].catnum))
 		{
@@ -6046,7 +6048,7 @@ char *string, *outputfile;
 
 	/* Do a simple search for the matching satellite name */
 
-	for (z=0; z<24; z++)
+	for (z=0; z<NUMBER_OF_SATELLITES; z++)
 	{
 		if ((strcmp(sat[z].name,satname)==0) || (atol(satname)==sat[z].catnum))
 		{
