1 #ifdef HAVE_STDLIB_H
2 #include <stdlib.h>
3 #endif
4 #include <stdio.h>
5 #include <errno.h>
6 #include "yagi.h"
7 #include <errno.h>
8 
9 /* Since there are a large number of parametres set in the header file
10 and 'optimise.c', I've added a function to print the lot. This will
11 be more accurate than putting them in the man page, since that tends
12 to get out of date */
13 
14 extern double  percent;
15 extern double Zo, boom_factor;
16 extern struct performance_data max,weight;
17 
show_all_optimise_parameters(char * exefile,struct flags flag)18 void show_all_optimise_parameters(char *exefile,struct flags flag)
19 {
20 	int choice=flag.oflg;
21 	printf("%s version %.2f\n", exefile,version() );
22 	printf("Zo=%f Ohms \n", Zo);
23 	printf("Acceptable VSWR < %.3f:1\n", max.swr);
24 	printf("Acceptable FB > %.3f dB\n", max.fb);
25 	printf("Acceptable reactance < %.3f Ohms\n", max.x);
26 	printf("Acceptable resistance %.3f < R < %.3f Ohms\n", Zo-max.r, Zo+max.r);
27 	printf("Maximum percentage change between each iteration is %.6f%%\n", percent);
28 	printf("weight_gain=%.4f weight_fb=%.5f weight_swr=%.4f\n", weight.gain, weight.fb, weight.swr);
29 	printf("Type of elements moved/adjusted is %d\n", flag.eflg);
30 	printf("Default choice of optimisation method is %d\n", choice);
31 	printf("Boom will not extend by more than %.3f%%\n", boom_factor);
32 
33 #ifdef DEBUG
34 	if(errno)
35 	{
36 		fprintf(stderr,"Errno =%d in showopt.c\n", errno);
37 		exit(1);
38 	}
39 #endif
40 }
41 
42