mirror of
https://github.com/stevenhowes/ctenna.git
synced 2026-05-26 15:53:28 +01:00
Add files via upload
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
ctenna: main.o hb9cv.o jpole.o
|
||||
gcc -o ctenna main.o hb9cv.o jpole.o
|
||||
ctenna: main.o hb9cv.o jpole.o groundplane.c
|
||||
gcc -o ctenna main.o hb9cv.o jpole.o groundplane.c
|
||||
|
||||
main.o: main.c
|
||||
gcc -c main.c
|
||||
@@ -8,4 +8,7 @@ hb9cv.o: hb9cv.c
|
||||
gcc -c hb9cv.c
|
||||
|
||||
jpole.o: jpole.c
|
||||
gcc -c jpole.c
|
||||
gcc -c jpole.c
|
||||
|
||||
groundplane.o: groundplane.c
|
||||
gcc -c groundplane.c
|
||||
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_project_file>
|
||||
<FileVersion major="1" minor="6" />
|
||||
<Project>
|
||||
<Option title="ctenna" />
|
||||
<Option execution_dir="../Constenna" />
|
||||
<Option pch_mode="2" />
|
||||
<Option compiler="gcc" />
|
||||
<Build>
|
||||
<Target title="Debug">
|
||||
<Option output="bin/Debug/Constenna" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj/Debug/" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-g" />
|
||||
</Compiler>
|
||||
</Target>
|
||||
<Target title="Release">
|
||||
<Option output="bin/Release/ctenna_win10_amd64" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj/Release/" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-O2" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-s" />
|
||||
</Linker>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall" />
|
||||
</Compiler>
|
||||
<Unit filename="Makefile" />
|
||||
<Unit filename="groundplane.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="groundplane.h" />
|
||||
<Unit filename="hb9cv.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="hb9cv.h" />
|
||||
<Unit filename="jpole.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="jpole.h" />
|
||||
<Unit filename="main.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Extensions />
|
||||
</Project>
|
||||
</CodeBlocks_project_file>
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
Lambda/4 Groundplane Antanna Calculator
|
||||
Copyright (C) 2021 Thomas Kummer
|
||||
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 3 of the License, 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, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "groundplane.h"
|
||||
|
||||
void gp_calc(float *f, float *unit_factor, float *lambda, float *l1, float *l2){
|
||||
*lambda = ( 29971000 / *f ) / 100;
|
||||
*l1 = (0.96 * *lambda * 0.25) * *unit_factor;
|
||||
*l2 = (0.96 * *lambda * 0.28) * *unit_factor;
|
||||
}
|
||||
|
||||
void gp_print(float *f, float *unit_factor, float *lambda, float *l1, float *l2, int *unit_index){
|
||||
printf(" Calculated for %f mHz\n", *f);
|
||||
printf("\n");
|
||||
printf(" Vertical Radiator %f ", *l1); switch(*unit_index){ case 1: printf("mm\n"); break; case 2: printf("inch\n"); break; };
|
||||
printf(" Radials %f ", *l2); switch(*unit_index){ case 1: printf("mm\n"); break; case 2: printf("inch\n"); break; };
|
||||
printf("\n");
|
||||
printf("\n");
|
||||
printf(" O\n");
|
||||
printf(" I\n");
|
||||
printf(" I\n");
|
||||
printf(" Radiator I\n");
|
||||
printf(" I\n");
|
||||
printf(" I\n");
|
||||
printf(" I\n");
|
||||
printf(" I\n");
|
||||
printf(" ___|___ \n");
|
||||
printf(" /' | '\\ \n");
|
||||
printf(" \\.__|__./ \n");
|
||||
printf(" /| 50 |\\ \n");
|
||||
printf(" / | Ohm | \\ \n");
|
||||
printf(" Radial / ~~~~~~~~~ \\ \n");
|
||||
printf(" / \\ \n");
|
||||
printf(" / \\ \n");
|
||||
printf("\n");
|
||||
printf(" 3 - 6 radials are usual \n");
|
||||
printf("\n");
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
Copyright (C) 2021 Thomas Kummer
|
||||
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 3 of the License, 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, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GROUNDPLANE_H_
|
||||
#define GROUNDPLANE_H_
|
||||
|
||||
void gp_calc();
|
||||
void gp_print();
|
||||
|
||||
#endif // GROUNDPLANE_H_
|
||||
@@ -15,11 +15,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#include <stdio.h>
|
||||
#include "hb9cv.h"
|
||||
#include "jpole.h"
|
||||
#include "jpole.h"
|
||||
#include "groundplane.h"
|
||||
//#include <stdlib.h>
|
||||
|
||||
void clear_scr(void){
|
||||
printf("\033[H"); //brings cursor home
|
||||
//printf("\033[H"); //brings cursor home
|
||||
printf("\x1b[2J"); //clears screen
|
||||
}
|
||||
|
||||
@@ -105,7 +106,10 @@ int main(){
|
||||
jpole_calc(&f, &unit_factor,&lambda, &l1, &l2, &l3, &l4, &raddiam);
|
||||
jpole_print(&f ,&unit_factor, &lambda, &l1, &l2, &l3, &l4, &raddiam, &unit_index);
|
||||
break;
|
||||
case 4: printf("Not yet"); break;
|
||||
case 4: clear_scr();
|
||||
gp_calc(&f, &unit_factor,&lambda, &l1, &l2);
|
||||
gp_print(&f ,&unit_factor, &lambda, &l1, &l2, &unit_index);
|
||||
break;
|
||||
case 5: clear_scr();
|
||||
hb9cv_calc(&f ,&unit_factor, &lambda, &l1, &l2, &l3, &l4, &l5, &bdiam, &raddiam);
|
||||
hb9cv_print(&f ,&unit_factor, &lambda, &l1, &l2, &l3, &l4, &l5, &bdiam, &raddiam, &unit_index);
|
||||
|
||||
Reference in New Issue
Block a user