Imported Upstream version 4.6.0
[debian/atlc] / src / non_gui / usage_find_optimal_dimensions_for_microstrip_coupler.c
1 /* atlc - arbitrary transmission line calculator, for the analysis of
2 transmission lines are directional couplers. 
3
4 Copyright (C) 2002. Dr. David Kirkby, PhD (G8WRB).
5
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; either package_version 2
9 of the License, or (at your option) any later package_version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
19 USA.
20
21 Dr. David Kirkby, e-mail drkirkby at ntlworld.com 
22
23 */
24
25 #include "config.h"
26
27 #ifdef HAVE_STDLIB_H
28 #include <stdlib.h>
29 #endif  
30
31 #include "definitions.h"
32 #include "exit_codes.h"
33
34 void usage_find_optimal_dimensions_for_microstrip_coupler(void)
35 {
36       fprintf(stderr,"Usage: find_optimal_dimensions_for_microstrip_coupler [-s smin] [-S smax] [-t sstep] [-w wmin] [-W wmax] [-x wstep] [-g gmin] [-G GMAX] [-i gstep] h t Er1 Er2 Zodd_required Zeven_required output_filename\n\n");
37       fprintf(stderr,"Version %s\n",PACKAGE_VERSION);
38       fprintf(stderr,"where h and t are all, in mm, all in inches or all in ..;   Zodd_required and Zeven are in Ohms\n");
39       fprintf(stderr,"(they *must* use the same units. Non-integers allowed for all parameters)\n");
40       fprintf(stderr,"Options are:\n");
41       fprintf(stderr,"  -C              Print copyright, licencing and distribution information.\n");
42       /*fprintf(stderr,"  -b bmp_size     Sets the size of the bitmap used by 'atlc', in the range 1 to 15 (default %d).\n",DEFAULT_BMP_SIZE); */
43       fprintf(stderr,"  -s gmin         Sets the minimum gap between the two coupled lines (default = %f)\n", DEFAULT_SMIN);
44       fprintf(stderr,"  -s gmax         Sets the maximum gap between the two coupled lines (default = %f)\n", DEFAULT_SMAX);
45       fprintf(stderr,"  -i gstep        Sets the stepsize used for interations between gmin and gmax (default = %f)\n", DEFAULT_SSTEP);
46       fprintf(stderr,"  -g gmin         Sets the minimum gap between the coupled lines and the groundplane (default = %f)\n", DEFAULT_GMIN);
47       fprintf(stderr,"  -G gmax         Sets the maximum gap between the coupled lines and the groundplane (default = %f)\n", DEFAULT_GMAX);
48       fprintf(stderr,"  -i gmin         Sets the stepsize used between gmain and max (default = %f)\n", DEFAULT_GSTEP);
49       fprintf(stderr,"  -w wstep        Sets the minimum width of the coupled lines (default = %f)\n", DEFAULT_WMIN);
50       fprintf(stderr,"  -W Wstep        Sets the maximum width of the coupled lines (default = %f)\n", DEFAULT_WMAX);
51       fprintf(stderr,"  -x Wstep        Sets the stepsize used between wmin and wmax (default = %f)\n", DEFAULT_WSTEP);
52       fprintf(stderr,"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG  ^\n");
53       fprintf(stderr,"G                                                                       G  |\n");
54       fprintf(stderr,"G                                                                       G  |\n");
55       fprintf(stderr,"G        Dielectric, permittivity=Er1 (usually 1.0)                     G  |\n");
56       fprintf(stderr,"G                                                                       G  |\n");
57       fprintf(stderr,"G    c's denonte the copuled transmission lines of width w.             G  |\n");
58       fprintf(stderr,"G    t   is the thickness of the copper of the PCB (typically 0.035 mm) G  |\n");
59       fprintf(stderr,"G    h   is the thickness of the dielectric ( ~1.593 mm for 1.6 mm PCB) G  |\n");
60       fprintf(stderr,"G |  g   is the gap between the coupled lines and the groundplane.      G  |\n");
61       fprintf(stderr,"G |  s   is the spacing between the two coupled lines.                  G  |\n");
62       fprintf(stderr,"G |  This is NOT drawn to scale (W and H are shown far too small )      G  H\n");
63       fprintf(stderr,"G |                                                                     G  |\n");
64       fprintf(stderr,"G v                <--g--><--w--><----s----><--w--><--g-->              G  |\n");
65       fprintf(stderr,"GGGGGGGGGGGGGGGGGGG       ccccccc           ccccccc       GGGGGGGGGGGGGGG  |\n");
66       fprintf(stderr,"GGGGGGGGGGGGGGGGGGG.......ccccccc...........ccccccc.......GGGGGGGGGGGGGGG  |\n");
67       fprintf(stderr,"G.^................................................^....................G  |\n");
68       fprintf(stderr,"G.|................................................|....................G  |\n");
69       fprintf(stderr,"G.|t........Dielectric, permittivity=Er2...........h....................G  |\n");
70       fprintf(stderr,"G.|............(3.7 for FR4 PCB)...................|....................G  |\n");
71       fprintf(stderr,"G..................................................V....................G  |\n");
72       fprintf(stderr,"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG  |\n");
73       fprintf(stderr,"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG. v\n");
74       fprintf(stderr,"<-----------------------------------W----------------------------------->\n\n");
75       fprintf(stderr,"E.g. \nfind_optimal_dimensions_for_microstrip_coupler 1.593 0.035 1 3.7 15 180 best.txt\n\n");
76       exit_with_msg_and_exit_code("",PROGRAM_CALLED_WITH_WRONG_NUMBER_OF_ARGUMENTS); 
77 }