c program do liczenia obni¿enia horyzontu i jego krzywizny w funkcji wysokoœci

	Implicit real*8 (a-h,o-z)
	Dimension H(11),gammat(6),proc(6),g(6),gp(6)
	data H/10.,100.,1000.,10000., 25000.,50000.,100000., 500000.,
     & 1.d6,5d6,1.d7/,Rz/6371000./,pi/3.1415926536d0/
	& gammat/30.,60.,90.,120.,150.,175./

	Rz = Rz*7./6	! uwzglêdnienie refrakcji do Tab. 2
	wsp=180*60/pi
c	print*,wsp*dsqrt(2/Rz) ! 1.926127705

c	print*,"  H, d1.926', alfa', d, r, rp, g', %"
	print'(1x,a10,i9,6i13)','  H',(int(gammat(i)),i=1,6)

	do 2,i=1,11!,9
	alfa=dacos(Rz/(Rz+H(i)))    ! obni¿enie horyzontu
c	delh=dsqrt(2d0/Rz)*wsp*dsqrt(H(i))
	delh=1.926*dsqrt(H(i))		! obi¿enie - wzór przybli¿ony

	d = dsqrt(2*H(i)*Rz + H(i)**2)	! odleg³oœæ horyzontu
c	d = Rz*dtan(alfa) 			! to samo

	do 1,j=1,6
	gamma0=gammat(j)*pi/180
	gamma=min(gamma0,pi - 2*alfa) ! gdy pole widzenia wiêksze od œrednicy równole¿nika
	r = d*dcos(alfa)	!= Rz*dsin(alfa)	! rzut odleg³oœci na p³aszcz. hor.
	rtmp=dcos(alfa)**2-dsin(gamma/2)**2
		if(rtmp.lt.0.) then
	rtmp= 0.	! dcos(alfa)**2
		endif 
	rp =d*dsqrt(rtmp)		! odleg³oœæ œrodka ciêciwy od pionu
	alfap=dacos(rp/(d*dcos(gamma/2))) ! k¹t widzenia œrodka ciêciwy wzglêdem pionu
c	alfap=dasin(min(1d0,dsin(alfa)/dcos(gamma/2))) !te¿ dobre
	g(j)=alfap-alfa		! k¹t widzenia odleg³oœci tego œrodka od horyzontu
cc	gp(j)=dasin(min(1d0,dsin(alfa)/dcos(gamma/2)))
cc     & - dasin(dsqrt(1-(Rz/(Rz+H(i)))**2)) ! To samo
	sinDalfa=dsqrt(H(i))/dcos(gamma/2)/(Rz+H(i))*dsqrt(H(i)+2*Rz)* 
     & ( Rz/(Rz+H(i)) - dsqrt(dcos(gamma/2)**2-dsin(alfa)**2) ) ! to samo do gamma<œrednicy
	gp(j)=dasin(sinDalfa) !min(1d0*dcos(gamma/2),)
c przybl.
	gp(j)= !dsqrt(H(i)*2/Rz)/dcos(gamma/2)*(1-dcos(gamma/2))
     & dsqrt(2*H(i)/Rz)*(1/dcos(gamma/2)-1)
1	proc(j)=g(j)/gamma*100	! stosunek tego k¹ta do k¹ta widzenia ciêciwy w %
c	print'(1x,i10,2f7.1,i10,2i8,2f7.1)',int(H(i)),delh,wsp*alfa,
c     & int(d),int(r),int(rp),g*wsp,proc
	print'(1x,i10,6(f9.3,f7.3))',int(H(i)),(g(k)*wsp,proc(k),k=1,6)
c
	print'(1x,i10,6(f9.3,f7.3))',int(H(i)),(gp(k)*wsp,proc(k),k=1,6)
 
2	continue

	end

c	Dla gamma = 90 stopni
c         H, d1.926', alfa', d, r, rp, g', % 
c        10    6.1    6.1     11288   11288    7981    2.5    0.0
c       100   19.3   19.3     35696   35695   25240    8.0    0.1
c      1000   60.9   60.9    112884  112867   79796   25.2    0.5
c     10000  192.6  192.5    357099  356539  251715   79.9    1.5
c     25000  304.5  304.1    564955  562747  396354  126.5    2.3
c     50000  430.7  429.3    799749  793522  556666  179.4    3.3
c    100000  609.1  605.2   1133225 1115713  776347  255.2    4.7
c    500000 1361.9 1319.6   2573130 2385884 1543355  599.2   11.1
c   1000000 1926.0 1811.6   3707020 3204100 1842623  908.5   16.8
c  10000000 6090.5 4025.9  15080450 5868765       0 1374.1   50.0
c 10000000019260.0 5194.0 106180035 6359562       0  206.0   50.0

c Bez refrakcji
c        H      30           60           90          120          150          175
c        10    0.215  0.012    0.942  0.026    2.523  0.047    6.091  0.085   17.443  0.194  133.586  1.272
c       100    0.679  0.038    2.980  0.083    7.978  0.148   19.262  0.268   55.164  0.613  423.533  4.034
c      1000    2.149  0.119    9.423  0.262   25.232  0.467   60.925  0.846  174.587  1.940 1376.866 13.113
c     10000    6.798  0.378   29.817  0.828   79.873  1.479  193.094  2.682  556.754  6.186 5207.513 50.000
c     25000   10.755  0.598   47.190  1.311  126.506  2.343  306.462  4.256  893.239  9.925 5095.949 50.000
c     50000   15.227  0.846   66.845  1.857  179.419  3.323  436.178  6.058 1296.663 14.407 4970.706 50.000
c    100000   21.583  1.199   94.841  2.634  255.202  4.726  624.995  8.680 1949.681 21.663 4794.849 50.000
c    500000   49.122  2.729  217.722  6.048  599.177 11.096 1590.568 22.091 4080.427 50.000 4080.427 50.000
c   1000000   70.994  3.944  318.478  8.847  908.532 16.825 3588.399 50.000 3588.399 50.000 3588.399 50.000
c   5000000  186.880 10.382 1026.103 28.503 2044.530 50.000 2044.530 50.000 2044.530 50.000 2044.530 50.000
c  10000000  323.542 17.975 1374.149 50.000 1374.149 50.000 1374.149 50.000 1374.149 50.000 1374.149 50.000

c Z refrakcj¹
c         H       30           60           90          120          150          175
c        10    0.199  0.011    0.872  0.024    2.336  0.043    5.639  0.078   16.149  0.179  123.671  1.178
c       100    0.629  0.035    2.759  0.077    7.387  0.137   17.833  0.248   51.071  0.567  391.953  3.733
c      1000    1.989  0.111    8.724  0.242   23.360  0.433   56.403  0.783  161.615  1.796 1268.865 12.084
c     10000    6.293  0.350   27.602  0.767   73.936  1.369  178.706  2.482  514.758  5.720 5221.775 50.000
c     25000    9.956  0.553   43.679  1.213  117.075  2.168  283.473  3.937  824.055  9.156 5118.438 50.000
c     50000   14.093  0.783   61.858  1.718  165.974  3.074  403.082  5.598 1191.248 13.236 5002.366 50.000
c    100000   19.969  1.109   87.724  2.437  235.881  4.368  576.439  8.006 1771.047 19.678 4839.222 50.000
c    500000   45.336  2.519  200.619  5.573  549.706 10.180 1432.856 19.901 4172.935 50.000 4172.935 50.000
c   1000000   65.324  3.629  291.989  8.111  823.550 15.251 2560.017 35.556 3708.818 50.000 3708.818 50.000
c   5000000  168.189  9.344  868.699 24.131 2202.917 50.000 2202.917 50.000 2202.917 50.000 2202.917 50.000
c  10000000  282.143 15.675 1514.244 50.000 1514.244 50.000 1514.244 50.000 1514.244 50.000 1514.244 50.000

c j.w ale w drugim wierszu liczone wg wzoru przybli¿onego
c         H       30           60           90          120          150          175
c        10    0.199  0.011    0.872  0.024    2.336  0.043    5.639  0.078   16.149  0.179  123.671  1.178
c        10    0.199  0.011    0.872  0.024    2.336  0.043    5.639  0.078   16.149  0.179  123.641  1.178
c       100    0.629  0.035    2.759  0.077    7.387  0.137   17.833  0.248   51.071  0.567  391.953  3.733
c       100    0.629  0.035    2.759  0.077    7.386  0.137   17.832  0.248   51.067  0.567  390.988  3.733
c      1000    1.989  0.111    8.724  0.242   23.360  0.433   56.403  0.783  161.615  1.796 1268.865 12.084
c      1000    1.989  0.111    8.724  0.242   23.358  0.433   56.391  0.783  161.488  1.796 1236.411 12.084
c     10000    6.293  0.350   27.602  0.767   73.936  1.369  178.706  2.482  514.758  5.720 5221.775 50.000
c     10000    6.291  0.350   27.587  0.767   73.865  1.369  178.325  2.482  510.669  5.720 3262.890 50.000
c     25000    9.956  0.553   43.679  1.213  117.075  2.168  283.473  3.937  824.055  9.156 5118.438 50.000
c     25000    9.946  0.553   43.619  1.213  116.790  2.168  281.956  3.937  807.439  9.156 3164.457 50.000
c     50000   14.093  0.783   61.858  1.718  165.974  3.074  403.082  5.598 1191.248 13.236 5002.366 50.000
c     50000   14.066  0.783   61.686  1.718  165.166  3.074  398.746  5.598 1141.891 13.236 3056.320 50.000
c    100000   19.969  1.109   87.724  2.437  235.881  4.368  576.439  8.006 1771.047 19.678 4839.222 50.000
c    100000   19.893  1.109   87.238  2.437  233.580  4.368  563.912  8.006 1614.878 19.678 2908.426 50.000
c    500000   45.336  2.519  200.619  5.573  549.706 10.180 1432.856 19.901 4172.935 50.000 4172.935 50.000
c    500000   44.481  2.519  195.069  5.573  522.301 10.180 1260.947 19.901 2347.866 50.000 2347.866 50.000
c   1000000   65.324  3.629  291.989  8.111  823.550 15.251 2560.017 35.556 3708.818 50.000 3708.818 50.000
c   1000000   62.906  3.629  275.869  8.111  738.645 15.251 1783.248 35.556 1992.092 50.000 1992.092 50.000
c   5000000  168.189  9.344  868.699 24.131 2202.917 50.000 2202.917 50.000 2202.917 50.000 2202.917 50.000
c   5000000  140.662  9.344  616.863 24.131  986.817 50.000  986.817 50.000  986.817 50.000  986.817 50.000
c  10000000  282.143 15.675 1514.244 50.000 1514.244 50.000 1514.244 50.000 1514.244 50.000 1514.244 50.000
c  10000000  198.927 15.675  595.059 50.000  595.059 50.000  595.059 50.000  595.059 50.000  595.059 50.000
c
c