Строительный блокнот  Изменение диапазона приемника 

1 2 3 [ 4 ] 5 6 7 8 9 10 11 12 13 14

АЗИМУТАЛЬНАЯ ICAPTA

в практике любительской радиосвязи нередко возникает необходимость определить азимут и расстояние до корреспондента. Материалы о том, как это сделать, неоднократно публиковались в журнале Радио . В них приводились и программы для расчета указанных параметров на микрокалькуляторах, и рассматривались методики построения вручную азимутальных карт

Сегодня, используя персональные компьютеры, можно значительно упрос

тить процесс создания таких карт.Пред-лагаемая программа дает возможность построить азимутальную карту мира с центром в любой заданной точке (см. рисунок). Она написана на языке С в соответствии со Стандартом ANSI С. Это позволяет переносить ее на любые типы машин, оснащенные компилятором языка С. Для использования программы в UNlX-подобной среде и, в частности, в MS DOS в программу введен интерфейс командной строки. При


Az. eq. proj.: lat 56 Ion 38



#include<stdio h> /* Programmed by UV3AHL. Moscow 1992 */

#include<stdlib.h>

#include<m3th.h>

#mclude<floath>

#define CMDUNE

/* Macros for Epson FX & IBM standards */ define set-LHn) puto(27,fp>,puto(Ox33,fp>,putc((n),fp); #define LHn) puto(27,fp>,putoCJ,fp):puto((n),fp>, #define SCXn) puto(27,fp>,putcCK,fp);puto((n)%256,fph\ putc((n)/256,fp),

#define CR() puto( 13,fp>, /* carriage return */ mt getb( unsigned int lon,unsigned mt lat); int getdot( double x.double y); const double PI - 3.141592653589793; const unsigned int MDATA(10131 -

/*0*/0,63996,1023,0,0,1023,57344,65523.15,0.64512,15,53198.

/*13*/32767,0,0,16368,14336,65343,511.0,49152.255,65504,

/*24*/65535,55,0,65280,49283,62463.65535,l,0,4092,65410,

/*35*/65375,49151,15,61440,6207,32639,65533,65535,1,65472.

/*45*/64608,58367,65535,8191,0.50175,64240,65415,65535,

/*54*/511,64512,50959Д 6375,65535,65535,7,16368,64412.

ЛбЗ*/65023,65535,4095,49152,8447,65534,65505,65535,63,

/*72*/65280,63491,40959,65535,65535,0,4092,65504,65151,

/*81*/65535,1023,61440,63,53247,65529,65535,7,65472,64512,

/*91*/59263,65535,2047,32768,1023,65520,65501,65535,15,

/*100*/65024,49167,63487,65503,1023,0,16376,65280,65503.

/*109*/65533,15,49152,255,65528,61439,63,0,654О8,57347,

Л119*/65535,32767,1024,0,4094,65472.65535,255,62,63488,

/*129*/63,61438.65535,64515,0,65520,64512,65311,959,248,

/*139*/49152,1023,32752,65523,6,0,65280,61455,56831,495,

/*149*/0.0,16380,65508,65535.7,0,61440.37119,65533,4095,

Л160/0,0,65472,62019,6553 5,31,0,0,4095,65480.8191,0,

/*172*/0,63488,12351,65535,127,0,0,65504,64576,65535,1,

/*183*/0,32768.1023.65529,2047,0,0,65024,62479,65535,63,

/*194*/0,512.16376,65472,65535,1,0,49152,255,65535,8191,

Л205*/0,0,65280,64515,65535,1023,0,0,4092,65520,65535,

/*216*/31,0,63488,49215,65535,32767.0,0,65504,65280,65535,

/*227*/799,0,32768,1023,65532,32767.0,0,65280,61455,65535,

/*238*/255,0,0,16380,65504,65535,1,0,61440,33023,65535,

/ 249*/1023.0,0,65472,65027,65535,15,0.0,4095,65531,65535,

/*261*/0,0.64512,64575,65535,2047,0,0,65520,65456,65535,

/ 272*/3135,0.49152,33791,65535,65535,111,0.65280.65039. /*282*/65535,59391,7,0,16380,65528,65535,16191,0,61440, /*292*/57599,65535,65535,225,0,65472,65283,65535,991.5, /*302*/0,4095,65532.65535,4878,0,64512,61503,65535,1023, /*312*/94.0.65520,65408,65535,30723,1025,49152,1023,65532, /*322*/4095,2544.510,65280,61455,65535,61503,63491,7,16380, /*332*/65472.32767,14624,8160,61440,255,65535,29687,49264, /*341*/63,65472,64515,8191,36608,65411,0,4095,65520,63. /*351*/56,1023,64512,49215,65535,7,64512,15,65520,65280. /*361*/3583,0,8176,49152,1023,65528,227,61568,127,65280. /*371*/5735936863,1,65478,1,16380,65408,575,12288,8190. /*381*/61440,33023,32766,12,59584,127,65472,64003,14591. /*390*/0,65415.1,4095,57336,121,48128,4095,64512,57407, /*400*/16191,0,65520,127,65520,65408,128.32768,65521,49159. /*410*/1023,1022,0,3072.8191,65024,63503.15,0,63520,15, /*421*/16376,16256,0,0,8128,57344,255,254,0,0,30,65408. /*433*/63491,11,0,0,0,4094.63456.0,0,0,61440.32831,511, /*446*/0,0,0,65472,65024,3,0,0,0,1023,2032,0,0,0,31744, /*461*/49167,23,0,0,0,15856,7936,0,0,0,49154,240.124,0, Л475*/0,3072,33280,61443,1,0,0,48,3592,1984,0,0,24576, /*488*/0.56,15,0,0,224.57344.15360,0,0,0,1,896.248,0,0, /*504*/0,0,57358,1,0,0,0,14336,1920,0,0,0,0,224.24,0,0, /*521*/0,32768,24579,0,0.0,0,3584,896,0,0.0.0,56,0,0,0, /*538*/0,57344,21504,0,0,0,0,896,2544,0,0,0,16384.49166. /*552*/47,0,0,0,14592,49024,0,0,0,0,224,1022,0,0.0,32768, /*568*/б3491,7,0,0,0,3 584,8160,32768,0,0,32768.32824.127, /*581*/0.0,0,57856.65024,0,0,0,0,896,504,0,0,0,24576,49166, /*597*/7.0,0,0,14720,7936,0,0,0,0.230.124,0,0.0,39936, /*613*/61443,1,0,0,0,3696,4032.0,0,0,49152,57,63,0,0,0, /*629*/59136,64512,1,0,0,0,924,8176,0,0,0,28672,49166. /*642*/127,0,0,0,14784,65280,1,0.0.а231,8188,0,0.0,38912. /*658*/62467767,0,0.0,3696,65520,63,0,0,49152 53305,65535, /*671*/3,0,0,59136.65344,4095,0,0,0,924,65535.255.0,0, /*685*/28672,64526,65535,7.0,0,14784,65520.16383,0.0.0, /*697*/33011.65535,383.0.0,52224,65283,65535,7,0,0.3888. /*709*/65528,16383.0.0.16384.51262.65535.1023,0,0,63744. /*720*/65056,65535,15,0,033760,65510,32767,0,032768. /*731*/48143,65535,511.0,0,16224,65512.32767,7.0.32768. /*742*/61693,65535,6271,0,0,62976,65475,65534,192,0,0, /*753*/4056,62463,50175,3,0,0,64575,65479,7951.0,0,65152. /*765*/7152,16382.96,0,0,58366.63743,33023.7.0,63488.65423,



Л777*/65507.5679,0,0,16352.766,49151.14400.0,32768,30975, /*788*/65027.1567,1009,0,65024.64739.16383.64528,127 0 /*798*/36856,65523.16447.65528.32769,61455.3641532767 /*806*/57856,4095.16352,65472,65144.511,65480,65151,33279. /*815*/58367,65529,1,65534.65535,65031,51087,2043,63488, /*824*/65535,5119,16380,60958.31,65504,65535,61507,30975, /*833*/20376,32768,65535.2047,65504,8643,444,65024,65535, /*842*/32775.36765.57 407.3,65504.8191.772,65087,3968.32768, /*852*/65535,63,64524,2040,48,64512,32767,0,58352,32895, /*862*/0,65520,255.49152,65423.3.3г768,65535,1,16128,8190, /*873*/0,63488,1023,0,63740,127,0,65504,3,61440,65507, /*884*/1.32768,2047,0,36800,2047,0,64512,31,0,65087,15, /*896*/0,16352,0,63488,8184,0,49152,127,0,58336,63,0.7680, /*909*/0,32768,65423,0,0,56,0.16128,1022.0,0,0,0,63742, /*923*/7,0,0,0,63488,8163,0,0.0.0,36832,127,0,0,0,32768. /*939*/65087,1,0.0.0,65024.8184.0,0,0.0.58364.71,0,0,0. /*955*/61440,1935,3.0,0.0,16320,1028,32768,25,0.32768, /*967*/4351.16,65280,0,0.65024.16451.0,2046.0,0,4088,0, , /*980*/64512.63,0.61440,63,58240,65533,1,0,65472,0,63367, /*992*/2047,0,0,1023.32256.65534,31.0,64512,15,64504,32767, /*1004*/0,0,16368.32768,65279.511,0.49152,255),

float Rmax = 2.\J* radius of copy m inches*/ float la - 56; /* latitude of MOSCOW */ float lo - 38; /* longitude of MOSCOW */ floatwl; /* latitude*/ float w2;

float cl,c2, /*cl-sinwl c2 = C05Wl*/

mt gett](unsigned lon,unsigned lat)

{register unsigned bn,

bn. 90*(Ion/2) +(lat/2);

return (( M0ATA(bn 4 (bn&0xF))&l),

int getdot(double x.double y)

(double pirrmax ,R2,n,S.C;

register unsigned int fl,

X +. Rmax * PI/1000; у += Rmax * PI / 1000. R = sqrt(x*x + y*y>,pirrmax = PI*R/Rmax, S = sin(pirrmax);C = cos(pirrmax); iK R > Rmax) /* border */ fif(x*x<0 00061 y*y <0.0006) return 0;

return ((R - Rmax) > 0 11 (R - Rmax) < 0 03) 0 1J

iK pirrmax > 0 001) 22 = c2 * С - cl * у * S / R.

else return 0, /* center of copy */

if(Z2>0 999) return 0, /* north pole */

<Ш<-0 999) return 1, /* south pole */

Fl . atan2(x*S, c2 * у * S + cl * R * 0) + w2 + 4 * PI,

fl = flooKFI*180/PI)+ 1440,

return getb(fiS6360,flooKacos(Z2)* 180/PI)>, ]

main(int argc,char *argy4])

{int Lj.width.heigth. /* width of hardcopy in dots*/ FILE *fp,char byte.k, float x,y

printfC\nCircle worid map(c) UV3AHL, 1992 >,

#ifdefCMDLINE

printf( \nSyntax filename lat lon radius,cmlH ), if(argc>l)la = atof(argv(lJ): if(argo2) lo = atof(argv(21); if(argo3) Rmax - atof(argv(3)/2 54, printl(\nlatitude =. % 3f\nlongitude = % 3f\nradius = % 3f\ cm\n .la,lo,Rmax*2 54).if(la>90 I la<-90 I lo<-180 lo\ >180)(prinH( \n%s Invalid coordinates ,argv(0),exit(l)j\ pnnH(-\nAre you sureY/N) ); i = getcW), if( 11= Г \ && 11= V) exiKO), #endif

wl = PI/2.0 - Pl*la/180.0w2 - lo*PI/180.0 + 2*PI; cl -sin(wl),c2 = cos(wl); if((fp = fopen( PRN ,Vb )) - NULL) printlCerror ); CR(>. seULF(0); /* OR & 0/216 inch line spacing */ width = ceil(2*Rmax*60) + 120, heigth = ceil(Rmax*144)+140, width 1= OxF, foi(i = 0,i<heigth/8;i++) /* new line */

CR(),LF(24);SD(width); /* single graph density */ foi() = Oj<width,++) I /*пе*/

byte . 0 X - (i - width/2)/60 0. foi(l< = 0,l 8,l<++)l у = ( - к - heigth/2 + i * 8 ) / 72 0,

byte h getdoKx.y) к putc(byte Oxla 7 OxOa byte.fp);/*DONT PRINT 0xlA*/)

set LF(36),CR() fprintf(fp,AtA2 eq pro) lat %-4 Of Ion %-4 Of \n,la,lo) putc(12,fp).putc(7fp):putc(7,fp),putc(7fp)/*FF and BEL*/

fclose(fp), I



1 2 3 [ 4 ] 5 6 7 8 9 10 11 12 13 14