Commit 7d2103ca authored by Iain R. Learmonth's avatar Iain R. Learmonth

Imported Upstream version 1.1+git2016090501

parent 34c7b77b
*.o
*~
*.d
.deps
autom4te.cache/
config.status
config.log
Makefile.in
Makefile
aclocal.m4
configure
gsmc
gsmc.1
gsmc has been developed by
- Lapo Pieri
via A. dei Corbizi, 9
I-50127 FIRENZE (ITALY)
via delle Ortensie, 22
I-50142 FIRENZE (ITALY)
Phone +39 055 410209
ik5nax@amsat.org
lapo_pieri@virgilio.it
Phone +39 055 706881
ik5nax<REMOVETHIS>AT<REMOVETHIS>radioteknos.it
and thanks to:
- Johannes van der Horst
jvdhorst@cs.sun.ac.za
jvdhorst<REMOVETHIS>AT<REMOVETHIS>cs.sun.ac.za
for large review of code
- Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
for submitting patch for new version of autoconf/automake
This diff is collapsed.
First released version --> gsmc 1.0
## Process this file with automake to produce Makefile.in
bin_PROGRAMS=gsmc
gsmc_SOURCES= autotune.c calc.c dataconv.c draw.c main.c print.c widget.c autotune.h calc.h dataconv.h draw.h main.h print.h widget.h
INCLUDES=@PACKAGE_CFLAGS@
LIBS=@PACKAGE_LIBS@
gsmc_CFLAGS = $(AM_CFLAGS) $(GTK_CFLAGS) -W -Wall -Wimplicit-function-declaration -Wextra
gsmc_LDADD = $(AM_LDADD) $(GTK_LIBS) -lm
EXTRA_DIST=gsmc.1.in gtkrc TODO
man_MANS=gsmc.1
\ No newline at end of file
man_MANS=gsmc.1
This diff is collapsed.
gsmc
====
A GTK Smith Chart Calulator for RF impedance matching
A GTK Smith Chart Calculator for RF impedance matching
gsmc is a simple smith chart calculator used for automatic calculation in
radio frequency impedance matching.
Many good program for doing this job are available for non free OS or are non
free themself; so getting what I retain the best characteristic from each of
Many good program doing this job are available for non free OS or are non
free themself; so getting what I retain the best features from each of
thes that I've seen in the past I decided to write one and release it under
GNU/GPL license.
Program is under development: help is needed and welcomed; in my hope it
gsmc is under development: help is needed and welcomed; in my hope it
will be the first part of a suite of rf designing tool all to be released
under GPL. Write me if you are interested; my experience in write software
is limitated, neither I have knolwedge in building up large and distributed
under GPL. Write me if you are interested; my experience in coding is
modest, neither I have knolwedge in building up large and distributed
software project.
Prior to gsmc I wrote xsmc a very similar program that run under X and use
direct Xlib call, his aspect is not particular user friendly.
For using gsmc reading the manual (man gsmc) should be enough...
To use gsmc read the manual (man gsmc), should be enough...
Have nice matching!
......
GTK Smith Chart Calculator for RF impedance matching
- transmission line specified in meter and with attenuation
- improve autotune
Patchs and mods are welcome!
Lapo
\ No newline at end of file
gsmc TODO list
==============
- fix code insecurity
- transmission line specified in meter and with attenuation
- improve autotune (with Q control)
- add ideal transformer
- add mutual inductor
- (?) add ser/par LC block
- other file format (spice? qucs?)
- update manpage
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* GSMC - A GTK Smith Chart Calulator for RF impedance matching
*
* (c) by Lapo Pieri IK5NAX 2003-2004,
* and Johannes van der Horst
* (c) by Lapo Pieri IK5NAX 2003-2016,
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......@@ -18,8 +17,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Send bugs reports, comments, critique, etc, to ik5nax@amsat.org or
* lapo_pieri@virgilio.it
* Send bugs reports, comments, critique, etc, to
*
* lapo_CHANGE_THIS_AT_CHANGE_THIS_radioteknos.it
* ik5nax_CHANGE_THIS_AT_CHANGE_THIS_radioteknos.it
*/
......@@ -27,9 +28,11 @@
#include <gdk/gdk.h>
#include <stdio.h>
#include <math.h>
#include <unistd.h>
#include "main.h"
#include "calc.h"
#include "draw.h"
#include "autotune.h"
#include <unistd.h>
extern SMCDATA smcdata;
......@@ -68,7 +71,7 @@ float weigthfu(void){
*/
void autotune(void){
int i, j;
float r, oldr, wf;
float r, oldr;
for(i=1; i<=smcdata.ne; i++){
if(smcdata.ELlocked[i]==1)
......
/*
* GSMC - A GTK Smith Chart Calulator for RF impedance matching
*
* (c) by Lapo Pieri IK5NAX 2003-2004,
* and Johannes van der Horst
* (c) by Lapo Pieri IK5NAX 2003-2016,
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......@@ -18,8 +17,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Send bugs reports, comments, critique, etc, to ik5nax@amsat.org or
* lapo_pieri@virgilio.it
* Send bugs reports, comments, critique, etc, to
*
* lapo_CHANGE_THIS_AT_CHANGE_THIS_radioteknos.it
* ik5nax_CHANGE_THIS_AT_CHANGE_THIS_radioteknos.it
*/
void autotune(void);
......
/*
* GSMC - A GTK Smith Chart Calulator for RF impedance matching
*
* (c) by Lapo Pieri IK5NAX 2003-2004,
* and Johannes van der Horst
* (c) by Lapo Pieri IK5NAX 2003-2016,
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......@@ -18,8 +17,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Send bugs reports, comments, critique, etc, to ik5nax@amsat.org or
* lapo_pieri@virgilio.it
* Send bugs reports, comments, critique, etc, to
*
* lapo_CHANGE_THIS_AT_CHANGE_THIS_radioteknos.it
* ik5nax_CHANGE_THIS_AT_CHANGE_THIS_radioteknos.it
*/
......
/*
* GSMC - A GTK Smith Chart Calulator for RF impedance matching
*
* (c) by Lapo Pieri IK5NAX 2003-2004,
* and Johannes van der Horst
* (c) by Lapo Pieri IK5NAX 2003-2016,
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......@@ -18,8 +17,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Send bugs reports, comments, critique, etc, to ik5nax@amsat.org or
* lapo_pieri@virgilio.it
* Send bugs reports, comments, critique, etc, to
*
* lapo_CHANGE_THIS_AT_CHANGE_THIS_radioteknos.it
* ik5nax_CHANGE_THIS_AT_CHANGE_THIS_radioteknos.it
*/
......
#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.
scriptversion=2005-05-14.22
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand `-c -o'.
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file `INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
esac
ofile=
cfile=
eat=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as `compile cc -o foo foo.c'.
# So we strip `-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no `-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# `.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
# Create the lock directory.
# Note: use `[/.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
This diff is collapsed.
......@@ -4,29 +4,16 @@
AC_PREREQ(2.57)
AC_INIT(gsmc, 1.0, ik5nax@amsat.org)
AC_CONFIG_SRCDIR([calc.c])
AM_INIT_AUTOMAKE(gsmc, 1.0, ik5nax@amsat.org)
AM_INIT_AUTOMAKE
# Checks for programs.
AC_PROG_CC
pkg_modules="gtk+-2.0"
PKG_CHECK_MODULES(PACKAGE,[$pkg_modules])
#AM_PROG_CC_C_O
AC_SUBST(PACKAGE_CFLAGS)
AC_SUBST(PACKAGE_LIBS)
# Checks for libraries.
LIBS=" "
PKG_LIB2=`pkg-config --libs gtk+-2.0`
PKG_LIB=""
for i in $PKG_LIB2 ; do
case $i in
-l*) PKG_LIB="$i $PKG_LIB" ;;
-L*) LIBS="$i $LIBS" ;;
esac
done
for i in $PKG_LIB ; do
j=${i#'-l'}
AC_CHECK_LIB($j,main)
done
PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES([GTK], [gtk+-2.0])
# Checks for header files.
AC_HEADER_STDC
......
/*
* GSMC - A GTK Smith Chart Calulator for RF impedance matching
*
* (c) by Lapo Pieri IK5NAX 2003-2004,
* and Johannes van der Horst
* (c) by Lapo Pieri IK5NAX 2003-2016,
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......@@ -18,8 +17,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Send bugs reports, comments, critique, etc, to ik5nax@amsat.org or
* lapo_pieri@virgilio.it
* Send bugs reports, comments, critique, etc, to
*
* lapo_CHANGE_THIS_AT_CHANGE_THIS_radioteknos.it
* ik5nax_CHANGE_THIS_AT_CHANGE_THIS_radioteknos.it
*/
......
/*
* GSMC - A GTK Smith Chart Calulator for RF impedance matching
*
* (c) by Lapo Pieri IK5NAX 2003-2004,
* and Johannes van der Horst
* (c) by Lapo Pieri IK5NAX 2003-2016
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......@@ -18,8 +17,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Send bugs reports, comments, critique, etc, to ik5nax@amsat.org or
* lapo_pieri@virgilio.it
* Send bugs reports, comments, critique, etc, to
*
* lapo_CHANGE_THIS_AT_CHANGE_THIS_radioteknos.it
* ik5nax_CHANGE_THIS_AT_CHANGE_THIS_radioteknos.it
*/
float psdec(char *);
......
/*
* GSMC - A GTK Smith Chart Calulator for RF impedance matching
*
* (c) by Lapo Pieri IK5NAX 2003-2004,
* and Johannes van der Horst
* (c) by Lapo Pieri IK5NAX 2003-2016,
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......@@ -18,8 +17,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Send bugs reports, comments, critique, etc, to ik5nax@amsat.org or
* lapo_pieri@virgilio.it
* Send bugs reports, comments, critique, etc, to
*
* lapo_CHANGE_THIS_AT_CHANGE_THIS_radioteknos.it
* ik5nax_CHANGE_THIS_AT_CHANGE_THIS_radioteknos.it
*/
......@@ -270,7 +271,10 @@ void drawchart(void) {
if(fabs(X)>QZ) {
sa=thetaonX(smcdata.rerhoIP[i-1], smcdata.imrhoIP[i-1], X)*180/M_PI;
ea=thetaonX(smcdata.rerhoIP[i], smcdata.imrhoIP[i], X)*180/M_PI;
if(ea<0.) ea+=360; if(sa<0.) sa+=360;
if(ea<0.)
ea+=360;
if(sa<0.)
sa+=360;
drawX(X, sa, ea-sa);
}
else
......@@ -279,7 +283,10 @@ void drawchart(void) {
else if(smcdata.ELtype[i]=='l' || smcdata.ELtype[i]=='c') {
sa=thetaonR(smcdata.rerhoIP[i-1], smcdata.imrhoIP[i-1], R)*180/M_PI;
ea=thetaonR(smcdata.rerhoIP[i], smcdata.imrhoIP[i], R)*180/M_PI;
if(ea<0.) ea+=360; if(sa<0.) sa+=360;
if(ea<0.)
ea+=360;
if(sa<0.)
sa+=360;
drawR(R, sa, ea-sa);
}
break;
......@@ -333,7 +340,10 @@ void drawchart(void) {
rho2z(smcdata.rerhoIP[i], smcdata.imrhoIP[i], &R, &X);
sa=thetaonR(smcdata.rerhoIP[i-1], smcdata.imrhoIP[i-1], R)*180/M_PI;
ea=thetaonR(smcdata.rerhoIP[i], smcdata.imrhoIP[i], R)*180/M_PI;
if(ea<0.) ea+=360; if(sa<0.) sa+=360;
if(ea<0.)
ea+=360;
if(sa<0.)
sa+=360;
drawR(R, sa, ea-sa);
break;
......@@ -598,7 +608,7 @@ void showcircdesc(void) {
else{
gtk_text_buffer_insert_with_tags(GTK_TEXT_BUFFER(txtcircbuff),
&tep,
t, -1, NULL);
t, -1, NULL, NULL);
gtk_text_buffer_get_bounds(txtcircbuff, &dummy, &tep);
}
......
/*
* GSMC - A GTK Smith Chart Calulator for RF impedance matching
*
* (c) by Lapo Pieri IK5NAX 2003-2004,
* and Johannes van der Horst
* (c) by Lapo Pieri IK5NAX 2003-2016,
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......@@ -18,8 +17,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Send bugs reports, comments, critique, etc, to ik5nax@amsat.org or
* lapo_pieri@virgilio.it
* Send bugs reports, comments, critique, etc, to
*
* lapo_CHANGE_THIS_AT_CHANGE_THIS_radioteknos.it
* ik5nax_CHANGE_THIS_AT_CHANGE_THIS_radioteknos.it
*/
......
......@@ -357,19 +357,20 @@ Auxiliary window for error reporting instead of stderr.
.SH COPYING
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at
the Free Software Foundation; either version 3 of the License, or (at
your option) any later version.
.SH AUTHOR
Lapo Pieri (IK5NAX)
Home address: via A. dei Corbizi 9 I-50127 Firenze Italy
Phone: +39 055 410209
e-mail: ik5nax@amsat.org, lapo_pieri@virgilio.it
website: www.qsl.net/ik5nax
Home address: via delle Ortensie, 22 I-50142 Firenze Italy
Phone: +39 055 706881
e-mail: ik5nax@radioteknos.it
website: www.qsl.net/ik5nax ; www.radioteknos.it
.SH SEE ALSO
.BR spice3 (?),
.BR gnucap (1),
.BR ngspice (1)
.BR ngspice (1),
.BR qucs (1)
/usr/share/automake/install-sh
\ No newline at end of file
This diff is collapsed.
/*
* GSMC - A GTK Smith Chart Calulator for RF impedance matching
*
* (c) by Lapo Pieri IK5NAX 2003-2004,
* and Johannes van der Horst
* (c) by Lapo Pieri IK5NAX 2003-2016,
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......@@ -18,8 +17,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Send bugs reports, comments, critique, etc, to ik5nax@amsat.org or
* lapo_pieri@virgilio.it
* Send bugs reports, comments, critique, etc, to
*
* lapo_CHANGE_THIS_AT_CHANGE_THIS_radioteknos.it
* ik5nax_CHANGE_THIS_AT_CHANGE_THIS_radioteknos.it
*/
......@@ -32,6 +33,7 @@
#include <unistd.h>
#include <math.h>
#include <time.h>
#include <string.h>
#include "main.h"
#include "widget.h"
#include "calc.h"
......@@ -91,7 +93,7 @@ int main(int argc, char **argv) {
gtk_rc_parse("/root/.gsmc/gtkrc");
}
topwindow=gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_set_usize(GTK_WIDGET(topwindow), 600, 550);
gtk_widget_set_usize(GTK_WIDGET(topwindow), 600, 600);
gtk_widget_set_name(topwindow, "topwindow");
gtk_window_set_title(GTK_WINDOW(topwindow), "GSMC - Smith Chart Calculator");
gtk_signal_connect(GTK_OBJECT(topwindow), "delete_event",
......@@ -115,9 +117,9 @@ int main(int argc, char **argv) {
| | |
2+--------------------------+---------------+
| | |
| | |
| Circuit description | Entry |
| | dialog |
| | (spare) |
| Circuit description | maybe entry |
| | dialog??? |
| | |
| | |
3+--------------------------+---------------+
......@@ -148,7 +150,7 @@ int main(int argc, char **argv) {
tdscw=gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(tdscw),
GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
gtk_widget_set_usize(GTK_WIDGET(tdscw), 400, 90);
gtk_widget_set_usize(GTK_WIDGET(tdscw), 400, 140);
txtcircbuff=gtk_text_buffer_new(NULL);
gtk_text_buffer_set_text(txtcircbuff, "", 0);
......@@ -238,7 +240,7 @@ gint mdw_configure_event(GtkWidget *widget,
if(widget->allocation.height<scdim)
scdim=widget->allocation.height;
mainpixmap=gdk_pixmap_new(widget->window, scdim, scdim, -1);
mainpixmap=gdk_pixmap_new(widget->window, scdim+1, scdim+1, -1);
gdk_draw_rectangle(mainpixmap,
widget->style->white_gc,
TRUE,
......@@ -435,8 +437,7 @@ void savegw(char *b) {
void loadgw(char *b) {
FILE *gwd;
char buff[101], c;
float v;
char buff[101];
int i;
if((gwd=fopen(b, "r"))==NULL) {
......@@ -475,14 +476,14 @@ void loadgw(char *b) {
}
for(i=0; i<=smcdata.ne; i++)
if(fscanf(gwd, "%x %g %g %g %x", &smcdata.ELtype[i], &smcdata.ELval0[i],
&smcdata.ELval1[i], &smcdata.ELval2[i], &smcdata.ELplace[i])!=5)
{
if(fscanf(gwd, "%x %g %g %g %x",
(int*)&smcdata.ELtype[i], &smcdata.ELval0[i],
&smcdata.ELval1[i], &smcdata.ELval2[i],
(int*)&smcdata.ELplace[i])!=5){
fprintf(stderr, "Error reading file %s\n", b);
restart(NULL, NULL); return;
}
}
fclose(gwd);
recalc(); drawchart(); showtextstat(); showcircdesc();
}
/*
* GSMC - A GTK Smith Chart Calulator for RF impedance matching
*
* (c) by Lapo Pieri IK5NAX 2003-2004,
* and Johannes van der Horst
* (c) by Lapo Pieri IK5NAX 2003-2016,
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......@@ -18,16 +17,19 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Send bugs reports, comments, critique, etc, to ik5nax@amsat.org or
* lapo_pieri@virgilio.it
* Send bugs reports, comments, critique, etc, to
*
* lapo_CHANGE_THIS_AT_CHANGE_THIS_radioteknos.it
* ik5nax_CHANGE_THIS_AT_CHANGE_THIS_radioteknos.it
*/
/*---------------------------------------------------------------------------
Definitions & Constants
---------------------------------------------------------------------------*/
#define NEL 32 /* Max number of network elements (???) */
#define QZ 0.05 /* Quasi-Zero: to draw arc as lines */
#define __VERSION "1.1" /* Current version */
#define __VERSION "1.2" /* Current version */
#define SPTYPE_UNDEF 0
#define SPTYPE_Z 1
......@@ -65,7 +67,7 @@ typedef struct maindata{
float imrhoCU; /* Imaginary part of reflection coefficient at cursor */
/* Start Point */
char SPtype; /* Type of start point supplyed */
int SPtype; /* Type of start point supplyed */
float reentrySP;/* Real part of start point impedance [ohm] */
float imentrySP;/* Imaginary part of start point impedance [ohm] */
......@@ -112,4 +114,4 @@ gint mdw_expose_event(GtkWidget *, GdkEventExpose *, gpointer),
void writespice(char *);
void removene(void);
void loadgw(char *b), savegw(char *b);