{ "metadata": { "name": "S3-C6" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": "Photogrammetry" }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.1,Page 281" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\nDa=184.32;\nDb=95.84;\nAx=-115.0\nBy=-115.0;\n\n#calculation\nphi=atan(Ax/By);\nAB=sqrt(Ax**2+By**2);\ntheta=acos((Da**2+AB**2-Db**2)/2/Da/AB);\nalpha=phi-theta;\nxc=Da*cos(alpha)-115.0;\nyc=-Da*sin(alpha);\n\n#result\nprint \"the coordiantes in mm x is\",round(xc),\"y is\",round(yc,2)", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "the coordiantes in mm x is 64.0 y is -43.72\n" } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.2,Page 290" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\nf=0.152;\nH=1800;#elevation of topmost point\nh=300;#elevation of ground\n\n#calculation\nS=f/(H-h);\n\n#result\nprint \"scale of photograph in 1 in\",round(1/S)", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "scale of photograph in 1 in 9868.0\n" } ], "prompt_number": 8 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.3,Page 290" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\nf=0.150 #focal length\nh1=1500.0;#elevation A\nh2=1200.0;#elevation B\nh3=1000.0;#elevation C\nH=3000.0;#height\n\n#calculation\nhav=1.0/3*(h1+h2+h3);\nS1=f/(H-h1);\nS2=f/(H-h2);\nS3=f/(H-h3);\nSav=f/(H-hav);\n\n#result\nprint \"scale of point 1 in 1 in\",round(1/S1);\nprint \"scale of point 2 in 1 in\",round(1/S2);\nprint \"scale of point 3 in 1 in\",round(1/S3);\nprint \"average scale in 1 in\",round(1/Sav);", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "scale of point 1 in 1 in 10000.0\nscale of point 2 in 1 in 12000.0\nscale of point 3 in 1 in 13333.0\naverage scale in 1 in 11778.0\n" } ], "prompt_number": 13 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.4,Page 292" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\nab=188.0;\nAB=120;\nSm=1.0/20000;\n\n#calculation\nS=ab/AB*Sm;\n\n#result\nprint \"scale of photograph in 1 in\",round(1/S)", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "scale of photograph in 1 in 12766.0\n" } ], "prompt_number": 15 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.5,Page 295" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\nxa=45.35;\nxb=-40.16;\nf=152.4;#focal length\nH=1500.0;#actual height\nha=200.0;#height A\nhb=150.0;#height B\nya=38.41;\nyb=-45.65;\n\n#calculation\nXa=xa*(H-ha)/f;\nYa=ya*(H-hb)/f;\nXb=xb*(H-ha)/f;\nYb=yb*(H-hb)/f;\nAB=sqrt((Xb-Xa)**2+(Yb-Ya)**2);\n\n#result\nprint \"distance of AB in m\",round(AB,3)", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "distance of AB in m 1042.361\n" } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.6,Page298" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\nd=62.4;#displacement\nH=250.0;#height of datum\nr=115.4;#image distance\n\n#calculation\nh=H*d/r;\n\n#result\nprint \"height of chimney in m\",round(h,3)", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "height of chimney in m 135.182\n" } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.7,Page 299" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\nra=88.25;#image distance of A\nrb=81.23;#image distance of B\nrc=68.14;#image distance of C\nH=2000.0;\nha=255;\nhb=200;\nhc=145;\nf=0.1524;\n\n#calculation\naa=ra*ha/H;\nbb=rb*hb/H;\ncc=rc*hc/H;\nS=f/H;\n\n#result\nprint \"relief distance of A in mm\",round(aa,2)\nprint \"relief distance of B in mm\",round(bb,2)\nprint \"relief distance of C in mm\",round(cc,2)\nprint \"scale of photograph in 1 in\",round(1/S)", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "relief distance of A in mm 11.25\nrelief distance of B in mm 8.12\nrelief distance of C in mm 4.94\nscale of photograph in 1 in 13123.0\n" } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.8,Page 300" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\nf=0.1524;#focal length\nS=0.08251/1000;#scale\n\n#calculation\nH=f/S;\n\n#result\nprint \"flying height in m\",round(H,3)", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "flying height in m 1847.049\n" } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.9,Page 300" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\nimport numpy as np\n\n#solving the quadratic polynomial in H\n#0=0.4064-365.929H-289685.07\ncoeff=[0.4064, -365.929,-289685.926];\nH=np.roots(coeff);\n\n#result\nprint \"height required in m\",round(H[0],2)", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "height required in m 1407.02\n" } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.10,Page 309" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\nS=1.0/10000;#scale\nA=500.0;#area\npw=0.3;\nl=0.23;\nw=0.23;\n\n#calculation\na=(1-0.6)*(1-pw)*l*w/S**2/1000/1000;\nN=A/a;\n\n#result\nprint \"no. of photographs taken\",round(N)", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "no. of photographs taken 338.0\n" } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.11,Page 310" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\nL=25.0e3;\nk=0.23e4;#l/s=w/s;\npl=0.6;\npw=0.3;\nW=20.0e3;\n\n#calculation\nN=((L/((1-pl)*k)+1))*((W/((1-pw)*k)+1)+1);\n\n#result\nprint \"no. of photographs taken\",round(N)", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "no. of photographs taken 406.0\n" } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.12,Page 310" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\nf=0.1524;#focal length\nS=1.0/10000;#scale\npw=0.3;#side lap\nw=0.23;#format width\npl=0.6;\nl=0.23;\n\n#calculation\nW=(1-pw)/S*w;\nH=f/S+300;\nN2=30/W+1;\nN2=round(N2)\nL=(1-pl)*1/S*l/1000;\nT=3600*L/240.0;\nAd=T*240e3/60.0/60.0;#adjusted ground distance\nN1=40.0e3/Ad+1;\nN1=round(N1)\nN=N1*N2;\n\n#result\nprint \"height over datum in m\",H\nprint \"no. of flight strips\",round(N2-1)\nprint \"length of each photograph cover in km\",round(L,3)\nprint \"exposure time in s\",round(T)\nprint \"no. of photographs taken\",round(N)", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "height over datum in m 1824.0\nno. of flight strips 0.0\nlength of each photograph cover in km 0.92\nexposure time in s 14.0\nno. of photographs taken 44.0\n" } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.12b,Page 317" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\nt=3.0/180*pi;\nya=82.25;\nxa=-62.45;\ns=220;\nf=152.4;#focal length\nH=2500.0e3;\nh=500.0e3;\n\n#calculation\ntheta=s-180;\nya_dash=xa*sin(theta*pi/180)+ya*cos(theta*pi/180)+f*tan(t)\nS=(f/cos(t)-ya_dash*sin(t))/(H-h);\n\n#result\nprint \"scale of photograph in 1 in\",round(1/S)", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "scale of photograph in 1 in 13246.0\n" } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.13,Page 319" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\nt=3*pi/180;\nxa=-62.45;\nxb=78.25;\nf=152.4;#focal length\nH=2500.0;#actual height\nhb=800#height B\nha=500.0;#height A\nya=82.25;\nyb=-41.15;\ns=220.0;\n\n#calculation\ntheta=s-180;\nya1=xa*sin(theta*pi/180)+ya*cos(theta*pi/180)+f*tan(t); # ya'\nxa1=xa*cos(theta*pi/180)-ya*sin(theta*pi/180); #xa'\nxb1=xb*cos(theta*pi/180)-yb*sin(theta*pi/180); #xb'\nyb1=xb*sin(theta*pi/180)+yb*cos(theta*pi/180)+f*tan(t); # yb'\nXa=xa1*(H-ha)/(f/cos(t)-ya1*sin(t));\nXb=xb1*(H-hb)/(f/cos(t)-yb1*sin(t));\nYa=ya1*cos(t)*(H-ha)/(f/cos(t)-ya1*sin(t));\nYb=yb1*cos(t)*(H-hb)/(f/cos(t)-yb1*sin(t));\nAB=sqrt((Xb-Xa)**2+(Yb-Ya)**2);\n\n#result\nprint \"distance of AB in m\",round(AB,3)\n", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "distance of AB in m 2307.753\n -100.708756369 78.25 82.25 -41.15 0.642787609687\n" } ], "prompt_number": 12 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.14,Page 324" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\nri=95.0;\nf=152.4;\nt=3*pi/180;\nl=50*pi/180;\n\n#calculation\ndt=ri**2*sin(t)*cos(l)**2/(f-ri*sin(t)*cos(l));\n \n#result\nprint \"tilt displacement of the image in mm\",round(dt,2)", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "tilt displacement of the image in mm 1.31\n" } ], "prompt_number": 10 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.15,Page 351" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\nd=230.0;#square side\nf=152.4#focal length\npl=0.6;\n\n#calculation\nk=(1-pl)*d/f;\nV=k/0.15;\n\n#result\nprint \"vertical exaggeration is\",round(V,2)", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "vertical exaggeration is 4.02\n" } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.16,Page 360" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\nxa=51.23;\nxb=91.48;\nya=48.33;\nyb=-51.63;\nf=152.4;#focal length\nB=425.0;#actual height\nhb=842.86#height B\nha=820.97;#height A\nr1=10.42;\nr2=9.67;\nb1=89.12;#b'\nb=89.43;\nra=11.62;\nrb=14.53;\n\n#calculation\nC=0.5*((b1-r1)+(b-r2))\npa=C+ra;\npb=C+rb;\nXa=B*xa/pa;\nXb=xb*B/pb;\nYa=ya*B/pa;\nYb=yb*B/pb;\nAB=sqrt((Xb-Xa)**2+(Yb-Ya)**2);\n\n#result\nprint \"distance of AB in m\",round(AB,3)", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "distance of AB in m 492.28\n" } ], "prompt_number": 13 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.17,Page 363" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\nC=79.0;\nra=11.42;#elevarion in image\nrb=15.65;#elevarion in image\nhb=651;#height of B\nH=1500;#height\n\n#calculation\ndelp=ra-rb;#pa=ra+c and pb=rb+c so ra-rb=pa-pb\npa=ra+C;\nha=hb+delp/pa*(H-hb);\n\n#result\nprint \"height of A in m\",round(ha,3)", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "height of A in m 611.282\n" } ], "prompt_number": 11 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.18,Page 364" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\nB=741.0;\nf=152.4;\npa=94.32;\nha=325;\n\n#calculation\nH=ha+B*f/pa;\n\n#result\nprint \"height in m\",round(H,3)", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "height in m 1522.29\n" } ], "prompt_number": 12 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.19,Page 364" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\nH=1632.0;\nf=152.4;#focal length\npa=82.75;\nha=283;\n\n#calculation\nB=pa/f*(H-ha);\n\n#result\nprint \"width of air base in m\",round(B,3)", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "width of air base in m 732.479\n" } ], "prompt_number": 13 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.20,Page 377" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\nalpha=50.0;\nbeta=46.0;\nf=300.0;\nxa=24.0;\nxb=30.0;\nbeta=46.0;\n\n#calculation\ndela=xa/f;\ndelb=xb/f;\nA=alpha+dela*180/pi; #angle A\nB=beta-delb*180/pi; #angle B\nD=180-A-B;\nAD=1300.0*sin(B*pi/180)/sin(D*pi/180);\nY=6/(sqrt(xa**2+f**2))*AD;\nRD=60.12+Y;\n\n#result\nprint \"distance of AD in m\",round(AD,2)\nprint \"RL of D in m\",round(RD,2)", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "distance of AD in m 843.34\nRL of D in m 76.93\n" } ], "prompt_number": 14 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.21,Page 378" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\nf=152.4;\nL=120;#length\nx1=40.0;\nx2=-90.0;\n\n#calculation\nX=f*L/(x1-x2);\nY=L*x1/(x1-x2);\nh=X*(30-20)/f;\n\n#result\nprint \"the coordinates of D in m is X=\",round(X,2),\"Y =\",round(Y,2);\nprint \"elevation of D in m\",round(h,2)", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "the coordinates of D in m is X= 140.68 Y = 36.92\nelevation of D in m 9.23\n" } ], "prompt_number": 15 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.22,Page 380" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\ndef deg_to_dms(deg):\n d = int(deg)\n md = abs(deg - d) * 60\n m = int(md)\n sd = (md - m) * 60\n sd=round(sd,2)\n return [d, m, sd]\nf=150.4;\nxc=-32.43;\nxd=9.52;\n\n#calculation\nthc=atan(xc/f);\nthd=atan(xd/f);\nth=thd-thc;\nth=th*180/pi;\nAz=325+15.0/60+th;\nAz=deg_to_dms(Az);\n\n#result\nprint \"Azimuth of D in deg,min,sec respectively\",Az", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "Azimuth of D in deg,min,sec respectively [341, 2, 23.9]\n" } ], "prompt_number": 16 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.23,Page 382" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\ndef deg_to_dms(deg):\n d = int(deg)\n md = abs(deg - d) * 60\n m = int(md)\n sd = (md - m) * 60\n sd=round(sd,2)\n return [d, m, sd]\nBC=66.0;\nAC=81.6;\nxb=3.0;\nya=1.25;\nxa=3.3;\ntheta=23+43.0/60;\n\n#calcualtions\nf=(xa+xb)/2/tan(theta*pi/180)+sqrt((xa+xb)**2/4/(tan(theta*pi/180))**2+xa*xb);\naa=atan(ya/sqrt(xa**2+f**2))\nVa=AC*tan(aa);\nab=atan(-1.87/sqrt(xa**2+f**2));\nVb=-BC*tan(ab);\n\n#result\nprint \"focal length in cm\",round(f,2)\nprint \"horizontal distance in m\",round(Vb+Va,2)\n", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "focal length in cm 15.0\nhorizontal distance in m 14.68\n" } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.24,Page 383" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\ndef deg_to_dms(deg):\n d = int(deg)\n md = abs(deg - d) * 60\n m = int(md)\n sd = (md - m) * 60\n sd=round(sd,2)\n return [d, m, sd]\nEab=300.0;#average elevation\nf=152.4;\nxa=28.4;\nxb=-22.5;\nya=24.5;\nyb=38.4;\nHa=2322.0;\nha=400.0;\nhb=200.0;\nab=61.05;\nAB=810;\n\n#calculation\nHa=300+AB/ab*f;\nXa=round((Ha-ha)/f*xa,2);\nXb=round((Ha-ha)/f*xb,2);\nYa=round((Ha-hb)/f*ya,2);\nYb=round((Ha-hb)/f*yb,2);\nAB=sqrt((Xa-Xb)**2+(Ya-Yb)**2);\nH=300+810/AB*(Ha-Eab);\nXa=(H-ha)/f*xa;\nXb=(H-ha)/f*xb;\nYa=(H-hb)/f*ya;\nYb=(H-hb)/f*yb;\nAB1=sqrt((Xa-Xb)**2+(Ya-Yb)**2);\n\n#result\nprint \"Xb is calculated wrong in the book that resulted in the error\"\nprint \"length AB in m\", round(AB,2)\nprint \"corrected length AB in m\", round(AB1,2)\nprint \"flying height in m\",round(H,3)\n\n", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "length AB in m 670.47\ncorrected length AB in m 816.12\nflying height in m 2742.807\n" } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.25,Page 386" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\ndef deg_to_dms(deg):\n d = int(deg)\n md = abs(deg - d) * 60\n m = int(md)\n sd = (md - m) * 60\n sd=round(sd,2)\n return [d, m, sd]\nAB=300.0;\nab=102.4;\nf=152.4;#focal length\nhab=320.0;\nd=7.8;\nr=75.4;\n\nH=hab+AB/ab*f;\nh=d*H/r;\n\n#result\nprint \"height difference in m\",round(h,2)", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "height difference in m 79.29\n" } ], "prompt_number": 12 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.26,Page 386" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\ndef deg_to_dms(deg):\n d = int(deg)\n md = abs(deg - d) * 60\n m = int(md)\n sd = (md - m) * 60\n sd=round(sd,2)\n return [d, m, sd]\nf=152.4;\nb=74.25;\nht=100.0;\nH=700.0;#flying height\n\n#calculation\nB=b*H/f;\npb=f*B/H;\npt=f*B/(H-ht);\ndelp=pt-pb;\nht=delp/pt*(H);\n\n#result\nprint \"error due to parallax in mm\",round(delp,2)\nprint \"height of chimney in m\",round(ht,2)", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "error due to parallax in mm 12.38\nheight of chimney in m 100.0\n" } ], "prompt_number": 14 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.27,Page 387" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\ndef deg_to_dms(deg):\n d = int(deg)\n md = abs(deg - d) * 60\n m = int(md)\n sd = (md - m) * 60\n sd=round(sd,2)\n return [d, m, sd]\nB=180.0;\nf=120.0;\npa=54.32\npb=46.35;\n\n#calculation\ndelH=B*f/pa/pb*(pa-pb);\n\n#result\nprint \"height difference in m\",round(delH,2)", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "height difference in m 68.38\n" } ], "prompt_number": 17 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 6.28,Page 387" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nfrom math import pi,sqrt,acos,asin,atan,cos,sin,tan\nL1=30000.0;\npl=0.6;\nk=12000.0*0.2;#=l/S and w/S\npw=0.3;\nW1=24000;\n\n#calculation\nN=round(((L1/((1-pl)*k)+1)+1))*round(((W1/((1-pw)*k)+1)+1));\nNf=N/33-1;#flight strips\ngd=(1-pl)*k;#grounf distance\nI=gd/(200e3)*60.0*60.0;#exposure interval\nad=round(I)/60.0/60*200e3;#actual distance\n\n#result\nprint \"no. of photographs taken\",round(N)\nprint \"no. of flight strips\",Nf\nprint \"ground distance in m\",round(gd,2)\nprint \"exposure interval in s\", round(I)\nprint \"actual distance in m\",round(ad,2)", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "no. of photographs taken 528.0\nno. of flight strips 15.0\nground distance in m 960.0\nexposure interval in s 17.0\nactual distance in m 944.44\n" } ], "prompt_number": 35 } ], "metadata": {} } ] }