1 /* atlc - arbitrary transmission line calculator, for the analysis of
2 transmission lines are directional couplers.
4 Copyright (C) 2002. Dr. David Kirkby, PhD (G8WRB).
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.
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.
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,
21 Dr. David Kirkby, e-mail drkirkby at gmail.com
25 /* The program create_bmp_for_rect_in_rect is a pre-processor for atlc. It produces bitmaps of rectangular
26 inner and rectangular outer */
38 #include "definitions.h"
39 #include "exit_codes.h"
42 double DD, ww, hh, xx, yy, Er1, Er2;
43 int D, w, h, x, y, W, H;
46 int lowest=2500, highest=10000;
49 extern int main(int argc, char **argv) /* Read parameters from command line here */
51 int bmp_size=DEFAULT_BMP_SIZE;
53 struct transmission_line_properties not_used;
54 FILE *image_data_fp=stdout;
56 not_used.W=1; /* Keeps SGI's MipsPro compiler happy */
58 while((q=get_options(argc,argv,"b:f:v")) != -1)
62 bmp_size=atol(my_optarg);
65 /* By default bitmap image goes to stdout, but we can send to a file
66 with the -f option. */
67 if((image_data_fp=fopen(my_optarg,"wb"))==NULL)
69 fprintf(stderr,"Can't write to %s. Exiting ...\n",my_optarg);
70 exit_with_msg_and_exit_code("",CANT_OPEN_FOR_WRITING);
78 printf("read a ? exiting\n");
80 /*usage_create_bmp_for_rect_in_circ();*/
81 fprintf(stderr,"SORRY create_bmp_for_rect_in_circ IS NOT YET WORKING, SO HAS BEEN DISABLED. IT\n");
82 exit_with_msg_and_exit_code("BE ENABLED ON A FORTHCOMING VERSION",PROGRAM_NOT_IMPLEMENTED);
83 if(argc-my_optind == 6)
85 DD=atof(argv[my_optind]);
86 ww=atof(argv[my_optind+1]);
87 hh=atof(argv[my_optind+2]);
88 xx=atof(argv[my_optind+3]);
89 yy=atof(argv[my_optind+4]);
90 Er1=atof(argv[my_optind+5]);
91 check_parameters_of_create_bmp_for_rect_in_circ();
92 convert_create_bmp_for_rect_in_circ_dimensions_to_integers(bmp_size);
93 write_bitmap(image_data_fp, not_used);
96 usage_create_bmp_for_rect_in_circ();