~ubuntu-branches/ubuntu/precise/yagiuda/precise

« back to all changes in this revision

Viewing changes to src/usage_optimise.c

  • Committer: Bazaar Package Importer
  • Author(s): Joop Stakenborg
  • Date: 2005-08-22 20:20:13 UTC
  • Revision ID: james.westby@ubuntu.com-20050822202013-mhhxp4xirdxrdfx1
Tags: upstream-1.19
ImportĀ upstreamĀ versionĀ 1.19

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifdef HAVE_STDLIB_H
 
2
#include <stdlib.h>
 
3
#endif
 
4
#include <stdio.h>
 
5
#include <string.h>
 
6
#include "yagi.h"
 
7
 
 
8
extern double percent;
 
9
extern double  Zo;
 
10
extern struct performance_data max;
 
11
 
 
12
void usage_optimise(char *str)
 
13
        {
 
14
 
 
15
                fprintf(stderr,"\nYagi-Uda antenna analysis programs, version %.2f\n", version());
 
16
                fprintf(stderr,"Written by Dr. David Kirkby Ph.D. G8WRB (email:david.kirkby@onetel.net)\n");
 
17
                fprintf(stderr, "\nUSAGE: %s  [options] filename iterations.\n\n", str);
 
18
                fprintf(stderr,"The default behaviour of 'optimise' is to optimise the Yagi description \ncontained in the file 'filename', adjusting the lengths and positions of just \nthe parasitic elements upto %.2f%% each time, to achieve a better gain, vswr and F/B ratio, but not bothering to go beyond reasonable limits currently set at:\n",percent);
 
19
                fprintf(stderr,"  F/B ratio > %.1f dB\n", max.fb);
 
20
                fprintf(stderr,"  %f < Rin < %f \n", Zo-max.r, Zo+max.r);
 
21
                fprintf(stderr,"  | Xin | < %.2f Ohms\n", max.x);
 
22
                fprintf(stderr,"  VSWR < %.2f:1\n", max.swr);
 
23
                fprintf(stderr,"This will continue for the number of iterations specified in 'iterations' or \nuntil a file called 'stop' is created in the current directory.\n");
 
24
                fprintf(stderr,"These are a number of options for 'optimise' which can adjust such things as:\n");
 
25
                fprintf(stderr," -gx=GA, -ox = improve all, -Wx = weighted\n");
 
26
                fprintf(stderr," -gx or ox or -Wx where x=1(G),2(FB),4(R),8(X),16(VSWR),32 (SL)\n"); 
 
27
                fprintf(stderr," -f, -p, -r, -s, -x Set reasonable values of F/B, pattern cleanliness, R, VSWR and X\n");
 
28
                fprintf(stderr," -F, -G, P, -R -S and -X Set weights of F/B, gain , pattern cleanliness, resistance, VSWR and reactance, (all need -W or -g flags)\n");
 
29
                fprintf(stderr,"There are many many more options. See man page, optimise.doc, or optimise.ps. Sensible use of these options will give you a decent Yagi.\n"); 
 
30
                exit(1);
 
31
        }
 
32