summaryrefslogtreecommitdiff
path: root/Surveying_Volume_3
diff options
context:
space:
mode:
authorhardythe12014-07-25 12:29:42 +0530
committerhardythe12014-07-25 12:29:42 +0530
commit9dd9b5240afe729a557c6ae683da0b31555a3860 (patch)
tree8058968e04159f02f98d46dbc664fe12a963b16e /Surveying_Volume_3
parentcc0f90b966a13e6edc60165bc4d4d36844af4f2b (diff)
downloadPython-Textbook-Companions-9dd9b5240afe729a557c6ae683da0b31555a3860.tar.gz
Python-Textbook-Companions-9dd9b5240afe729a557c6ae683da0b31555a3860.tar.bz2
Python-Textbook-Companions-9dd9b5240afe729a557c6ae683da0b31555a3860.zip
removing unwated
Diffstat (limited to 'Surveying_Volume_3')
-rwxr-xr-xSurveying_Volume_3/Chapter1.ipynb83
-rwxr-xr-xSurveying_Volume_3/Chapter1_1.ipynb83
-rwxr-xr-xSurveying_Volume_3/Chapter3.ipynb104
-rwxr-xr-xSurveying_Volume_3/Chapter4.ipynb970
-rwxr-xr-xSurveying_Volume_3/Chapter5.ipynb398
-rwxr-xr-xSurveying_Volume_3/Chapter6.ipynb629
-rwxr-xr-xSurveying_Volume_3/Chapter_1_.ipynb3834
-rwxr-xr-xSurveying_Volume_3/Chapter_2.ipynb1006
-rwxr-xr-xSurveying_Volume_3/README.txt10
-rwxr-xr-xSurveying_Volume_3/screenshots/chapter1.pngbin112592 -> 0 bytes
-rwxr-xr-xSurveying_Volume_3/screenshots/chapter4.pngbin122796 -> 0 bytes
-rwxr-xr-xSurveying_Volume_3/screenshots/chapter5.pngbin213035 -> 0 bytes
-rwxr-xr-xSurveying_Volume_3/screenshots/solved_example.png.PNGbin54057 -> 0 bytes
-rwxr-xr-xSurveying_Volume_3/screenshots/solved_example_2.png.PNGbin24587 -> 0 bytes
-rwxr-xr-xSurveying_Volume_3/screenshots/solved_example_3.png.PNGbin31657 -> 0 bytes
15 files changed, 0 insertions, 7117 deletions
diff --git a/Surveying_Volume_3/Chapter1.ipynb b/Surveying_Volume_3/Chapter1.ipynb
deleted file mode 100755
index 015050ae..00000000
--- a/Surveying_Volume_3/Chapter1.ipynb
+++ /dev/null
@@ -1,83 +0,0 @@
-{
- "metadata": {
- "name": "S3-C1"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": "Electronic Distance Measurement"
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 1.1,Page 22"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nT=273+25.0#temperature \np=752.0;#pressure mm Hg\nNo=294.0e-6;\nns=1.000284;\nD1=1438.254;#recorded distance in m\nh=263.42-243.25;#height difference in m\nR=6370e3;#radius of earth in m\n\n#calculation\nn=1+No*(273/T)*(p/760);\nD=D1*ns/n;\ncg=-h**2/2/D;\nHm=263.42/2+243.25/2;\nD=D+cg;\nch=-D*Hm/R\nEL=D+ch;\n\n#result\nprint \"equivalent length in m\",round(EL,3)",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "equivalent length in m 1438.081\n"
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 1.2,Page 22"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nT=273+18.8;#temperature\np=713;\ne=3;\nc=299792.5e3;#speed of light in km/s\nf=11e6;#frequency in Hz\n\n#calculation\nn=1+(103.49/T*(p-e)+86.26/T*(1+5748.0/T)*e)/1e6;\nV=c/n;\nl=V/f;\n\n#result\nprint \"wavelenght of light in m\",round(l,3)",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "27.247 wavelenght of light in m\n"
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 1.3,Page 23"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nT=273.0+30.0;#temperature\nl=0.85;#wavelength in m\np=752.4;\nc=299792.5e3;#speed of light in km/s\nf=24e6;#frequency in Hz\n\n#calculation\nno=1+(287.604+4.8864/l**2+0.068/l**4)/1e6;\nns=1+(no-1)*273/T*p/760;\nV=c/ns;\nl=V/f;\n\n#result\nprint \"wavelength of light in m\",round(l,3)",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "wavelenght of light in m 12.488\n"
- }
- ],
- "prompt_number": 1
- }
- ],
- "metadata": {}
- }
- ]
-} \ No newline at end of file
diff --git a/Surveying_Volume_3/Chapter1_1.ipynb b/Surveying_Volume_3/Chapter1_1.ipynb
deleted file mode 100755
index 015050ae..00000000
--- a/Surveying_Volume_3/Chapter1_1.ipynb
+++ /dev/null
@@ -1,83 +0,0 @@
-{
- "metadata": {
- "name": "S3-C1"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": "Electronic Distance Measurement"
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 1.1,Page 22"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nT=273+25.0#temperature \np=752.0;#pressure mm Hg\nNo=294.0e-6;\nns=1.000284;\nD1=1438.254;#recorded distance in m\nh=263.42-243.25;#height difference in m\nR=6370e3;#radius of earth in m\n\n#calculation\nn=1+No*(273/T)*(p/760);\nD=D1*ns/n;\ncg=-h**2/2/D;\nHm=263.42/2+243.25/2;\nD=D+cg;\nch=-D*Hm/R\nEL=D+ch;\n\n#result\nprint \"equivalent length in m\",round(EL,3)",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "equivalent length in m 1438.081\n"
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 1.2,Page 22"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nT=273+18.8;#temperature\np=713;\ne=3;\nc=299792.5e3;#speed of light in km/s\nf=11e6;#frequency in Hz\n\n#calculation\nn=1+(103.49/T*(p-e)+86.26/T*(1+5748.0/T)*e)/1e6;\nV=c/n;\nl=V/f;\n\n#result\nprint \"wavelenght of light in m\",round(l,3)",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "27.247 wavelenght of light in m\n"
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 1.3,Page 23"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nT=273.0+30.0;#temperature\nl=0.85;#wavelength in m\np=752.4;\nc=299792.5e3;#speed of light in km/s\nf=24e6;#frequency in Hz\n\n#calculation\nno=1+(287.604+4.8864/l**2+0.068/l**4)/1e6;\nns=1+(no-1)*273/T*p/760;\nV=c/ns;\nl=V/f;\n\n#result\nprint \"wavelength of light in m\",round(l,3)",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "wavelenght of light in m 12.488\n"
- }
- ],
- "prompt_number": 1
- }
- ],
- "metadata": {}
- }
- ]
-} \ No newline at end of file
diff --git a/Surveying_Volume_3/Chapter3.ipynb b/Surveying_Volume_3/Chapter3.ipynb
deleted file mode 100755
index 4c4c37ac..00000000
--- a/Surveying_Volume_3/Chapter3.ipynb
+++ /dev/null
@@ -1,104 +0,0 @@
-{
- "metadata": {
- "name": "S3-C3"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": "Trilateration"
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 3.1,Page 47"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos\nAB=25145.32;\nR=6370.0e3;#radius of earth\nha=325.14;\n\n#calculation\ntheta=AB*cos(3+9.0/60+40.0/3600)/R;\nAB_dash=AB/sin(pi/2+theta/2)*sin(pi/2-theta/2-(3+9.0/60+40.0/3600)*pi/180);\nCD=AB_dash-AB_dash*ha/R;\nS=CD+CD**3/24.0/R**2;\n\n#result\nprint \"sea level length in m\",round(S,3)",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "sea level length in m 25108.53\n"
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": "Example 3.2,Page 50"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,asin\nAB=31325.14\nR=6370.0e3;#radius of earth\nha=1582.15;\nh=2669.17\n\n#calculation\nAB_dash=AB-h**2/2/AB;\ntheta=2*asin(AB_dash/2/R);\nAB_dash=AB-(h*sin(theta/2)+h**2/AB/2)\nCD=AB_dash-AB_dash*ha/R;\nS=CD+CD**3/24.0/R**2;\n\n#result\nprint \"sea level length in m\",round(S,3)",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "sea level length in m 31197.163\n"
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 3.3,Page 53"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin, acos\nAB=1525.456;\nBC=2176.945;\nCD=1697.435;\nAD=2401.435;\nAC=3073.845;\nBD=2483.115;\n\n#calculation\n#alpha=A and beta=B and those are angles\nA1=acos((CD**2+AC**2-AD**2)/(2*CD*AC));\nA1=A1*180/pi;\nA2=acos((AD**2+BD**2-AB**2)/(2*AD*BD));\nA2=A2*180/pi;\nA3=acos((AB**2+AC**2-BC**2)/(2*AB*AC));\nA3=A3*180/pi;\nA4=acos((BC**2+BD**2-CD**2)/(2*BC*BD));\nA4=A4*180/pi;\nB1=acos((CD**2+BD**2-BC**2)/(2*CD*BD));\nB1=B1*180/pi;\nB2=acos((AD**2+AC**2-CD**2)/(2*AD*AC));\nB2=B2*180/pi;\nB3=acos((AB**2+BD**2-AD**2)/(2*AB*BD));\nB3=B3*180/pi;\nB4=acos((AC**2+BC**2-AB**2)/(2*AC*BC));\nB4=B4*180/pi;\ne1=360-A1-A2-A3-A4-B1-B2-B3-B4;#error\ne2=A1+B1-A3-B3;#error\ne3=A2+B2-A4-B4;#error\n#angle update\nA1=A1+e1/8-e2/4;\nA3=A3+e1/8+e2/4;\nB1=B1+e1/8-e2/4;\nB3=B3+e1/8+e2/4;\nA2=A2+e1/8-e3/4;\nB2=B2+e1/8-e3/4;\nA4=A4+e1/8+e3/4;\nB4=B4+e1/8+e3/4;\n#updating sides\nAD=1525.456*sin(B3*pi/180)/sin(A2*pi/180);\nBD=1525.456*sin(A3*pi/180+B3*pi/180)/sin(A2*pi/180);\nAC=1525.456*sin(A4*pi/180+B3*pi/180)/sin(B4*pi/180);\nBC=1525.456*sin(A3*pi/180)/sin(B4*pi/180);\nCD=BC*sin(A4*pi/180)/sin(B1*pi/180)\n\n#result\n\nprint \"equation for B2 is wrong\"\nprint \"corrected length of AD in m \",round(AD,3)\nprint \"corrected length of AC in m \",round(AC,3)\nprint \"corrected length of BD in m \",round(BD,3)\nprint \"corrected length of BC in m \",round(BC,3)\nprint \"corrected length of CD in m \",round(CD,3)\n",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "27.5965629411\nequation for B2 is wrong\ncorrected length of AD in m 2401.251\ncorrected length of AC in m 3073.446\ncorrected length of BD in m 2413.581\ncorrected length of BC in m 2176.758\ncorrected length of CD in m 1697.416\n"
- }
- ],
- "prompt_number": 25
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 3.4,Page 59"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,log,sin\n#angles found by cosine law\n#alpha=A and beta=B and those are angles\nA1=45.801596;\nA2=40.605250;\nA3=50.143258;\nA4=43.077646;\nB1=48.779868;\nB2=44.141587;\nB3=49.733152;\nB4=37.737035;\n\n#calculation\ne1=360-A1-A2-A3-A4-B1-B2-B3-B4;#error\n#angle update\nA1=A1+e1/8;\nA3=A3+e1/8;\nB1=B1+e1/8;\nB3=B3+e1/8;\nA2=A2+e1/8;\nB2=B2+e1/8;\nA4=A4+e1/8;\nB4=B4+e1/8;\nE2=log(sin(A1*pi/180),10)*log(sin(A2*pi/180),10)*log(sin(A3*pi/180),10)*log(sin(A4*pi/180),10)-log(sin(B1*pi/180),10)*log(sin(B2*pi/180),10)*log(sin(B3*pi/180),10)*log(sin(B4*pi/180),10);\nc3=E2/17.1;\nc4=E2/17.0;\nA1=A1-c3;\nB1=B1+c3;\n\n#result\nprint \"corrected angle A1 in degrees\",A1,\"corrected angle B1 in degrees\",B1",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "corrected angle A1 in degrees 45.7991704812 corrected angle B1 in degrees 48.7774455188\n"
- }
- ],
- "prompt_number": 2
- }
- ],
- "metadata": {}
- }
- ]
-} \ No newline at end of file
diff --git a/Surveying_Volume_3/Chapter4.ipynb b/Surveying_Volume_3/Chapter4.ipynb
deleted file mode 100755
index f2b5c7ec..00000000
--- a/Surveying_Volume_3/Chapter4.ipynb
+++ /dev/null
@@ -1,970 +0,0 @@
-{
- "metadata": {
- "name": "S3-C4"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": "Principles of Field Astronomy"
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.1,Page 81"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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]\ntheta=25+14.0/60;\nR=6370.0;\n\n#calculation\nAB=cos(theta*pi/180)*(16+10.0/60)\ndis=2*pi*R*AB/360.0;\n\n#result\nprint \"distance of AB in m \",round(dis,3)",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "distance of AB in m 1625.863\n"
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.2,Page 81"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nimport numpy as np\nfrom scipy import linalg\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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]\nLongA=52+24.0/60;\nLongB=55+30.0/60;\nlatA=18+10.0/60;\nlatB=15.0;\nR=6370.0;#radius of earth\n\n#calculation\nP=LongB-LongA;\nPA=90-latA;\nPB=90-latB;\nAB=acos(cos(PB*pi/180)*cos(PA*pi/180)+sin(PB*pi/180)*sin(PA*pi/180)*cos(P*pi/180));\ndis=AB*R;\n#solving for A\na = np.array([[0.5,0.5], [0.5,-0.5]])\nb = np.array([atan(cos((PB/2-PA/2)*pi/180)/tan(P*pi/180)/cos((PB/2+PA/2)*pi/180))*180/pi,atan(sin((PB/2-PA/2)*pi/180)/tan(P*pi/180)/sin((PB/2+PA/2)*pi/180))*180/pi])\nx = np.linalg.solve(a, b)\nA=x[0];\nA=deg_to_dms(A);\n\n#result\nprint \"distance of AB in km \",round(dis,2)\nprint \"direction of B to A in deg min sec\",A",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "distance of AB in km 482.72\ndirection of B to A in deg min sec [117, 8, 30.72]\n"
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.3,Page 83"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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=40.0;\np=6.0;\n\n#calculation\na=pi/2-asin(cos(b*pi/180)*cos(p*pi/180));\nBC=a*180/pi-b;\nBC=BC*1.853*60;\nB=asin(sin(b*pi/180)/sin(a))\nB=deg_to_dms(B*180/pi);\n\n#result\nprint \"distance BC in km\",round(BC,2)\nprint \"angle of B deg min sec\",B",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "distance BC in km 41.43\nangle of B deg min sec [82, 53, 56.83]\n"
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.4,Page 105"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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]\ncoal=90.0-28.0-24.0/60;#coaltitude\ncola=90.0-48.0-30.0/60;#colatitude\n\n\n#calculation\ndelta=pi/2-acos((cos(coal*pi/180)*cos(cola*pi/180)+sin(coal*pi/180)*sin(cola*pi/180)*cos(50*pi/180)));\nH=acos(cos(coal*pi/180)/(sin(cola*pi/180)*cos(delta))-tan(delta)/tan(cola*pi/180));\nH=deg_to_dms(H*180/pi); \ndelta=deg_to_dms(delta*180/pi); \n\n#result\nprint \"H in deg min sec\",H\nprint \"declination in deg mi sec\",delta",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "H in deg min sec [99, 7, 55.94]\ndelta in deg mi sec [46, 57, 38.26]\n"
- }
- ],
- "prompt_number": 25
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.5,Page 107"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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]\ndelta=22+45.0/60;\ntheta=55.0;\nH=45+15.0/60;\n\n#calculation\nalpha=asin((cos(H*pi/180)+tan(theta*pi/180)*tan(delta*pi/180))*cos(theta*pi/180)*cos(delta*pi/180));\nalpha=alpha*180/pi;\nA=acos(sin(delta*pi/180)/(cos(theta*pi/180)*cos(alpha*pi/180))-tan(alpha*pi/180)*tan(theta*pi/180));\nA=deg_to_dms(360-A*180/pi);\n\n#result\nprint \"azimuth in deg mi sec\",A",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "azimuth in deg mi sec [244, 40, 8.11]\n"
- }
- ],
- "prompt_number": 17
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.6,Page 109"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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]\ncoal=42.0;\ncode=100+40.0/60;#co-declination\n\n#calculation\nalpha=pi/2-acos((cos(coal*pi/180)*cos(code*pi/180)+sin(coal*pi/180)*sin(code*pi/180)*cos(35*pi/180)));\nA=acos((cos(code*pi/180)-cos(coal*pi/180)*cos(pi/2-alpha))/(sin(coal*pi/180)*sin(pi/2-alpha)));\nA=deg_to_dms(A*180/pi);\nalpha=deg_to_dms(alpha*180/pi);\n\n#result\nprint \"azimuth in deg min sec\",A\nprint \"alpha in deg min sec\",alpha",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "azimuth in deg mi sec [142, 1, 26.46]\nalpha in deg min sec [23, 38, 48.21]\n"
- }
- ],
- "prompt_number": 33
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.7,Page 113"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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]\ntheta=33+42.0/60+34.0/3600;\ndelta=81+55.0/60+14.0/3600;\n\n#calculation\nH1=acos(tan(theta*pi/180)/tan(delta*pi/180));\nH1=deg_to_dms(360-H1*180/pi);\nalpha=asin(sin(theta*pi/180)/sin(delta*pi/180));\nalpha=deg_to_dms(alpha*180/pi);\nA=asin(cos(delta*pi/180)/cos(theta*pi/180));\nA=deg_to_dms(A*180/pi);\n\n\n#result\nprint \"azimuth in deg min sec\",A\nprint \"alpha in deg min sec\",alpha\nprint \"hour angle in deg min sec\",H1",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "azimuth in deg min sec [9, 43, 37.11]\nalpha in deg min sec [34, 5, 36.7]\nhour angle in deg min sec [275, 26, 3.85]\n"
- }
- ],
- "prompt_number": 41
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.8,Page 114"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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]\nalpha=0.0;\ntheta=25+45.0/60;\n\n#calculation\ndelta=asin(sin(alpha)/sin(theta*pi/180));\n\n#result\nprint \"declination in degrees\",delta",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "declination in degrees 0.0\n"
- }
- ],
- "prompt_number": 42
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.9,Page 116"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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]\ncola=90.0-49.0;#colatitude\ncode=90.0+19.0;#codeclination\n\n#calculation\nA1=acos((cos(code*pi/180)-cos(cola*pi/180)*cos(pi/2))/sin(cola*pi/180)/sin(pi/2));\nA1=deg_to_dms(360-A1*180/pi);\nH=acos((0-cos(cola*pi/180)*cos(code*pi/180))/sin(cola*pi/180)*sin(code*pi/180));\nH=deg_to_dms(H*180/pi)\n\n#result\nprint \"azimuth in deg min sec\",A1\nprint \"hour angle in deg min sec\",H",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "azimuth in deg min sec [240, 14, 52.45]\nhour angle in deg min sec [69, 15, 38.0]\n"
- }
- ],
- "prompt_number": 18
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.10,Page 120"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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]\n#part1\ndelta=38+15.0/60;\ntheta=25+10.0/60;\n\n#calculation\nz=delta-theta;\nalpha=90-z;\nz=deg_to_dms(z);\nalpha=deg_to_dms(alpha);\n\n#result\nprint \"zenith distance in deg min sec\",z\nprint \"altitude in deg min sec\",alpha\n\n#part2\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\ndelta=22+40.0/60;\ntheta=25+10.0/60;\n\n#calculation\nz=-delta+theta;\nalpha=90-z;\nz=deg_to_dms(z);\nalpha=deg_to_dms(alpha);\n\n#result\nprint \"zenith distance in deg min sec\",z\nprint \"altitude in deg min sec\",alpha\n\n#part3\ndef deg_to_dms(deg):\n d = int(deg)\n md = abs(deg - d) * 60\n m = int(md+1)\n sd = (md - m) * 60\n sd=round(sd,2)\n return [d, m, sd]\ndelta=70+20.0/60;\ntheta=25+10.0/60;\n\n#calculation\nz=delta-theta;\nz=deg_to_dms(z);\n\n\n#result\nprint \"zenith distance in deg min sec\",z\n\n",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "zenith distance in deg min sec [13, 4, 60.0]\naltitude in deg min sec [76, 55, 0.0]\nzenith distance in deg min sec [2, 30, 0.0]\naltitude in deg min sec [87, 30, 0.0]\nzenith distance in deg min sec [45, 10, -0.0]\n"
- }
- ],
- "prompt_number": 20
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.11,Page 122"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\ntheta=42+50.0/60;\ndelta=83+40.0/60;\n\n#calculation\nz=180-delta-theta;\nalpha=90-z;\nz=deg_to_dms(z);\nalpha=deg_to_dms(alpha);\n\n#result\nprint \"zenith distance in deg min sec\",z\nprint \"altitude in deg min sec\",alpha",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "zenith distance in deg min sec [53, 29, 60.0]\naltitude in deg min sec [36, 30, 0.0]\n"
- }
- ],
- "prompt_number": 21
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.12,Page 133"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\n#part1\ndol=110-82-30.0/60; #differnce in longitude\nST=18+35.0/60+10.0/3600;#standard time\n\n#calculation\nLMT=ST+dol/15.0;\nLMT=deg_to_dms(LMT);\n\n#result\nprint \"LMT in hr min sec\",LMT\n\n#part2\ndol=82+30.0/60+30; #differnce in longitude\nST=18+35.0/60+10.0/3600;#standard time\n\n#calculation\nLMT=ST-dol/15.0;\nLMT=deg_to_dms(LMT);\n\n#result\nprint \"LMT in hr min sec\",LMT\n\n#part1\ndol=82+30.0/60-30; #differnce in longitude\nST=18+35.0/60+10.0/3600;#standard time\n\n#calculation\nLMT=ST-dol/15.0;\nLMT=deg_to_dms(LMT);\n\n#result\nprint \"LMT in hr min sec\",LMT",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "LMT in hr min sec [20, 25, 10.0]\nLMT in hr min sec [11, 5, 10.0]\nLMT in hr min sec [15, 5, 10.0]\n"
- }
- ],
- "prompt_number": 66
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.13,Page 134"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\n#part1\nLMT=8+30.0/60+15.0/3600;\nLong=45+30.0/60;\n\n#calculation\nGMT=LMT+Long/15.0;\nGMT=deg_to_dms(GMT)\n\n#result\nprint \"GMT in hr min sec (AM)\",GMT\n\n\n#part2\nLMT=6+40.0/60+10.0/3600;\nLong=55+30.0/60;\n\n#calculation\nGMT=LMT-Long/15.0;\nGMT=deg_to_dms(GMT)\n\n#result\nprint \"GMT in hr min sec (PM)\",GMT",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "GMT in hr min sec (AM) [11, 32, 15.0]\nGMT in hr min sec (PM) [2, 58, 10.0]\n"
- }
- ],
- "prompt_number": 71
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.14,Page 134"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\n#part1\nGMT=20+30.0/60+15.0/3600;\nLong=82+30.0/60;\n\n#calculation\nLMT=GMT+Long/15.0-24;\nLMT=deg_to_dms(LMT);\n\n#result\nprint \"LMT in hr min sec (next day)\",LMT\n\n#part1\nGMT=20+30.0/60+15.0/3600;\nLong=120.0;\n\n#calculation\nLMT=GMT-Long/15.0;\nLMT=deg_to_dms(LMT);\n\n#result\nprint \"LMT in hr min sec (same day)\",LMT",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "LMT in hr min sec (next day) [2, 0, 15.0]\nLMT in hr min sec (same day) [12, 30, 15.0]\n"
- }
- ],
- "prompt_number": 74
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.15,Page 135"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\n#part1\nRA=6+15.0/60+20.0/3600;\nHA=8+10.0/60+30.0/3600;\n\n#calculation\nLST=RA+HA;\nLST=deg_to_dms(LST);\n\n#result\nprint \"LST in hr min sec\",LST\n\n#part2\nRA=8+40.0/60+15.0/3600;\nHA=3+50.0/60+20.0/3600;\n\n#calculation\nLST=RA-HA;\nLST=deg_to_dms(LST);\n\n#result\nprint \"LST in hr min sec\",LST\n",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "LST in hr min sec [14, 25, 50.0]\nLST in hr min sec [4, 49, 55.0]\n"
- }
- ],
- "prompt_number": 76
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.16,Page 135"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\n#part1\nLHA=6+30.0/60+10.0/3600;\n\n#calculation\nLAT=LHA+12;\nLAT=deg_to_dms(LAT);\n\n#result\nprint \"LAT in hr min sec\",LAT;\n\n#part2\nLHA=18+40.0/60+20.0/3600;\n\n#calculation\nLAT=LHA+12-24;\nLAT=deg_to_dms(LAT);\n\n#result\nprint \"LAT in hr min sec\",LAT;",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "LAT in hr min sec [18, 30, 10.0]\nLAT in hr min sec [6, 40, 20.0]\n"
- }
- ],
- "prompt_number": 78
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.17,Page 136"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\nLong=60.0;\nLHA=5+30.0/60+20.0/3600;\n\n#calculation\nGMT=LHA+12-Long/15.0;\nGMT=deg_to_dms(GMT);\n\n#result\nprint \"GMT in hr min sec\",GMT\n",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "GMT in hr min sec [13, 30, 20.0]\n"
- }
- ],
- "prompt_number": 79
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.18,Page 138"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\n#parta\nGMT=0;\nET=10.0/60+1.8/3600;\n\n#calculaion\nGAT=GMT+ET;\nGAT=deg_to_dms(GAT);\n\n#result\nprint \"GAT in hr min sec\",GAT\n\n#partb\nGMT=0;\nET=-13.0/60-28.5/3600;\n\n#calculaion\nGAT=GMT+ET+24;\nGAT=deg_to_dms(GAT);\n\n#result\nprint \"GAT in hr min sec\",GAT",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "GAT in hr min sec [0, 10, 1.8]\nGAT in hr min sec [23, 46, 31.5]\n"
- }
- ],
- "prompt_number": 81
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.19,Page 138"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\nET1=-3.0/60-51.4/3600; #ET at april 2\nET2=-3.0/60-33.5/3600; #ET at april 3\n\n#calculation\ndET=(ET2-ET1)*18.0/24; #change in ET\nET=ET1+dET;\nET=deg_to_dms(ET);\n\n#result\nprint \"ET (-ve) in hr min s\",ET",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "ET in hr min s [0, 3, 37.97]\n"
- }
- ],
- "prompt_number": 83
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.20,Page 138"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\nLAT=15+12.0/60+40.0/3600;\nLong=20+3.0/60;\nGMN=5.0/60+10.65/3600;\n\n#calculation\nGAT=LAT+Long/15.0;\ne1=(GAT-12)*0.22/3600+GMN;\nLAT=GAT+e1-Long/15.0;\nLAT=deg_to_dms(LAT);\n\n#result\nprint \"LAT in hr min sec\",LAT\n",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "LAT in hr min sec [15, 17, 51.65]\n"
- }
- ],
- "prompt_number": 84
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.21,Page 139"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\nLong=56+35.0/60;\nLMT=7+15.0/60+25.0/3600;\nGMN=3.0/60+54.0/3600;\n\n#calculation\nGMT=LMT-Long/15.0;\ne1=GMN+(12-GMN)*0.25/3600;\nLAT=GMT+Long/15.0+e1;\nLAT=deg_to_dms(LAT);\n\n#result\nprint \"LAT in hr min sec\",LAT\n",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "LAT in hr min sec [7, 19, 21.98]\n"
- }
- ],
- "prompt_number": 86
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.22,Page 142"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\nST=7+15.0/60+30.0/3600;\n\n#calculation\ntr=9.8296/3600*ST;\nST=ST-tr;\nST=deg_to_dms(ST);\n\n#result\nprint \"solar mean time in hr min sec\",ST",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "solar mean time in hr min sec [7, 14, 18.65]\n"
- }
- ],
- "prompt_number": 87
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.23,Page 142"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\nST=7+45.0/60+50.0/3600;\n\n#calculation\ntr=9.8565/3600*ST;\nST=ST+tr;\nST=deg_to_dms(ST);\n\n#result\nprint \"solar mean time in hr min sec\",ST",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "solar mean time in hr min sec [7, 47, 6.52]\n"
- }
- ],
- "prompt_number": 90
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.24,Page 143"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#finding LST\n\n#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\nLong=140+35.0/60+20.0/3600;\nGST=13+15.0/60+30.0/3600;\n\n#calculation\nLST=GST+9.8565/3600*Long/15.0;\nLST=deg_to_dms(LST);\n\n#result\nprint \"LST in deg min sec\",LST\n\n#part2\nLong=160+45.0/60+30.0/3600;\nGST=13+15.0/60+30.0/3600;\n\n#calculation\nLST=GST-9.8565/3600*Long/15.0;\nLST=deg_to_dms(LST);\n\n#result\nprint \"LST in deg min sec\",LST",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "LST in deg min sec [13, 17, 2.38]\nLST in deg min sec [13, 13, 44.37]\n"
- }
- ],
- "prompt_number": 93
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.25,Page 145"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\nLong=75.0;\nGST=15+55.0/60+13.0/3600;\nLMT=11.0;\n\n#calculation\nLST=GST+Long/15.0*9.8565/3600+LMT+9.8565/3600*LMT;\nLST=LST-24;\nLST=deg_to_dms(LST);\n\n#result\nprint \"LST of next day in deg min sec\",LST",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "LST of next day in deg min sec [2, 57, 50.7]\n"
- }
- ],
- "prompt_number": 95
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.26,Page 145"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\nLong=75.0;\nGST=5+25.0/60+15.0/3600;\nLMT=5.0+40.0/60;\n\n#calculation\nLST=GST-Long/15.0*9.8565/3600+LMT+9.8565/3600*(LMT);\nLST=deg_to_dms(LST);\n\n#result\nprint \"LST of next day in deg min sec\",LST",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "LST of next day in deg min sec [11, 5, 21.57]\n"
- }
- ],
- "prompt_number": 96
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.27,Page 146"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\nLong=75.0;\nGST=11+45.0/60+10.0/3600;\nLST=26+35.0/60+42.0/3600;\n\n#calculation\nLMM=GST+Long/15*9.8565/3600;\nLMT=LST-LMM-(LST-LMM)*9.8296/3600;\nLMT=deg_to_dms(LMT-12)\n\n#result\nprint \"LMT in hr min sec (PM)\",LMT \n\n",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "LMT in hr min sec (PM) [2, 47, 16.96]\n"
- }
- ],
- "prompt_number": 97
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.28,Page 147"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\nLong=90.0;\nGST=9+15.0/60+14.0/3600;\nLST=31+35.0/60+12.0/3600;\n\n#calculation\nLMM=GST-Long/15*9.8565/3600;\nLMT=LST-LMM-(LST-LMM)*9.8296/3600;\nLMT=deg_to_dms(LMT-12)\n\n#result\nprint \"LMT in hr min sec (PM)\",LMT",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "LMT in hr min sec (PM) [10, 17, 17.46]\n"
- }
- ],
- "prompt_number": 100
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.29,Page 149"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\nLong=150.0;\nGST=12+25.0/60+15.0/3600;\nLST=30+15.0/60+10.0/3600;\nLMN=18+15.0/60+10.0/3600;\n\n#calculation\nLMM=GST+Long/15*9.8565/3600;\nLMT=LMN-LMM-(LMN-LMM)*9.8296/3600;\nLMT=deg_to_dms(LMT)\n\n#result\nprint \"LMT in hr min sec (PM)\",LMT\n\n#part2\nLMM=GST+Long/15*9.8565/3600;\nLMT=LST-LMM-(LST-LMM)*9.8296/3600;\nLMT=deg_to_dms(LMT-12)\n\n#result\nprint \"LMT in hr min sec (AM)\",LMT",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "LMT in hr min sec (PM) [5, 47, 19.38]\nLMT in hr min sec (AM) [5, 45, 21.42]\n"
- }
- ],
- "prompt_number": 102
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.30,Page 150 "
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\ntheta=35+15.0/60+20.0/3600;\ndelta=88+15.0/60+45.0/3600;\nRA=1+45.0/60+15.0/3600;\n\n#calculation\nH=acos(tan(theta*pi/180)/tan(delta*pi/180));\nH=H*180/pi/15;\nLST=RA+H;\nLST=deg_to_dms(LST);\n\n#result\nprint \"LST in hr min sec\",LST",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "LST in hr min sec [7, 40, 20.12]\n"
- }
- ],
- "prompt_number": 103
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.31,Page 151"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\nRA=22+25.0/60+10.0/3600;\nST=14+45.0/60;#sidereal time\nLong=90.0;\nGMT=27+15.0/60;\nLMN=15+21.0/60+15.0/3600;\n\n#calculation\nMT=12+24-GMT+Long/15;#mean time interval\nacc=9.8565/3600*MT;\nHA=LMN-acc-MT;\nLST=HA+24-RA;\nLST=deg_to_dms(LST);\n\n#result\nprint \"LST in hr min sec\",LST\n",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "LST in hr min sec [2, 8, 39.62]\n"
- }
- ],
- "prompt_number": 105
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.32,Page 152"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\nLong=60;\nGMT=11+15.0/60+20.0/3600;\n\n#calculation\nLMT=GMT-Long/15*9.8296/3600;\nLMT=deg_to_dms(LMT);\n\n#result\nprint \"LMT in hr min sec \",LMT\n\n#part2\nLong=45;\nGMT=11+15.0/60+20.0/3600;\n\n#calculation\nLMT=GMT+Long/15*9.8296/3600;\nLMT=deg_to_dms(LMT);\n\n#result\nprint \"LMT in hr min sec \",LMT\n",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "LMT in hr min sec [11, 14, 40.68]\nLMT in hr min sec [11, 15, 49.49]\n"
- }
- ],
- "prompt_number": 107
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": "Example 4.33,Page 153"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#finding LMT\n\n#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\nLong=75;\nGMT=6+18.0/60+20.0/3600;\nLST=10+25.0/60+15.0/3600;\n\n#calculation\nLMT=GMT+Long/15*9.8296/3600;\nLST=LST-9.8296/3600*LST;\nLMT=LMT+LST;\nLMT=deg_to_dms(LMT);\n\n#result\nprint \"LMT in hr min sec \",LMT",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "LMT in hr min sec [16, 42, 41.72]\n"
- }
- ],
- "prompt_number": 111
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.34,Page 154"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\nGST=7+35.0/60+40.0/3600;\n\n#calculation\nGMT=24-GST-(24-GST)*9.8296/3600;\nGMT=deg_to_dms(GMT);\n\n#result\nprint \"GMT in hr min sec\",GMT",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "GMT in hr min sec [16, 21, 38.74]\n"
- }
- ],
- "prompt_number": 112
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": "Example 4.34,Page 154"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#finding LMT\n\n#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\nLong=120.0;\nGMT=12+3.0/60+24.6/3600;\n\n#calculation\nLMT=GMT-17.8/24*Long/15.0/3600;\nLMT=deg_to_dms(LMT);\n\n#result\nprint \"LMT of LAN in hr min sec\",LMT\n\n#part2\nLong=45;\nGMT=12+3.0/60+24.6/3600;\n\n#calculation\nLMT=GMT+17.8/24*Long/15.0/3600;\nLMT=deg_to_dms(LMT);\n\n#result\nprint \"LMT of LAN in hr min sec\",LMT",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "LMT of LAN in hr min sec [12, 3, 18.67]\nLMT of LAN in hr min sec [12, 3, 26.83]\n"
- }
- ],
- "prompt_number": 114
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.35,Page 156"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\n#one of the 2 solution\nf0=5+1.9/60;\nn=0.25;\ndel0=0;\ndel1=-0.1;\nd2=23.0;#del1/2\n\n#calculation\nfn=f0+n*d2/60+n*(n-1)/2*(del1+del0)/60;\nfn=deg_to_dms(fn)\n\n#result\nprint \"sun declination in deg min sec\",fn",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "sun declination in deg min sec [5, 7, 39.56]\n"
- }
- ],
- "prompt_number": 117
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.36,Page 157"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\nalt=23+40.0/60;\nazi=145.0;\nlat=50.0;\n\n#calculation\ndelta=pi/2-acos(cos(pi/2-lat*pi/180)*cos(pi/2-alt*pi/180)+sin(pi/2-lat*pi/180)*sin(pi/2-alt*pi/180)*cos(azi*pi/180));\nH=acos((cos(pi/2-alt*pi/180)-cos(pi/2-lat*pi/180)*cos(pi/2-delta))/sin(pi/2-lat*pi/180)*sin(pi/2-delta))\nH=deg_to_dms(360-H*180/pi);\ndelta=deg_to_dms(delta*180/pi);\n\n#result\nprint \"there is a calculation mistake in calculating H in the book\"\nprint \"declination in deg min sec\",delta\nprint \"hour angle in deg min sec\",H",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "declination in deg min sec [-10, 3, 51.85]\nhour angle in deg min sec [325, 4, 44.11]\n"
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.37,Page 158"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\nalt=25+30.0/60;\nazi=45.0;\nlat=42.0;\n\n#calculation\ndelta=pi/2-acos(cos(pi/2-lat*pi/180)*cos(pi/2-alt*pi/180)+sin(pi/2-lat*pi/180)*sin(pi/2-alt*pi/180)*cos(azi*pi/180));\nH=acos((cos(pi/2-alt*pi/180)-cos(pi/2-lat*pi/180)*cos(pi/2-delta))/sin(pi/2-lat*pi/180)*sin(pi/2-delta))\nH=deg_to_dms(H*180/pi);\ndelta=deg_to_dms(delta*180/pi);\n\n#result\nprint \"declination in deg min sec\",delta\nprint \"hour angle in deg min sec\",H",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "declination in deg min sec [49, 40, 22.06]\nhour angle in deg min sec [93, 58, 30.79]\n"
- }
- ],
- "prompt_number": 122
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.38,Page 158"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#finding hour angle,azimuth\n\n#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\ndelta=21.0*pi/180+25.0/60*pi/180;\nlat=25+40.0/60;\n\n#calculation\nH=acos((0-cos(pi/2-lat*pi/180)*cos(pi/2-delta))/sin(pi/2-lat*pi/180)*sin(pi/2-delta));\nA=acos(cos(pi/2-delta)/sin(pi/2-lat*pi/180));\nH=deg_to_dms(360-H*180/pi);\nA=deg_to_dms(A*180/pi);\n\n#result\nprint \"hour angle in deg min sec\",H\nprint \"azimuth in deg min sec\",A",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "hour angle in deg min sec [260, 35, 53.78]\nazimuth in deg min sec [66, 6, 4.59]\n"
- }
- ],
- "prompt_number": 130
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.39,Page 161"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#finding latitude\n\n#initialisation of variable\nimport numpy as np\nfrom scipy import linalg\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\n#calculation\nA=np.array([[1,1],[1,-1]]);\nb=np.array([[90],[0]]);\nx=np.linalg.solve(A,b);\n\n#result\nprint \"latitude in degrees\",x[0]",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "latitude in degrees [ 45.]"
- },
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "\n"
- }
- ],
- "prompt_number": 131
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.40,Page 161"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#finding altitude\n\n#initialisation of variable\nimport numpy as np\nfrom scipy import linalg\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\ntheta=53+20.0/60;\ndelta=53+20.0/60;\n\n#calculation\nalpha=theta+delta-90;\nalpha=deg_to_dms(alpha);\n\n#result\nprint \"altitude in deg min sec\",alpha",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "altitude in deg min sec [16, 40, 0.0]\n"
- }
- ],
- "prompt_number": 132
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.41,Page 162"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#finding GAT\n\n#initialisation of variable\nimport numpy as np\nfrom scipy import linalg\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\nGMT=18+30.0/60;\nET=1.0/60+25.4/3600-0.67*6.5/3600;\n\n#calculation\nGAT=GMT+ET;\nGAT=deg_to_dms(GAT)\n\n#result\nprint \"GAT in hr min sec\",GAT",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "GAT in hr min sec [18, 31, 21.05]\n"
- }
- ],
- "prompt_number": 133
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.42,Page 163"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#finding LMT\n\n#initialisation of variable\nimport numpy as np\nfrom scipy import linalg\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\nLong=30.0;\nGAT=13+15.0/60+10.0/3600;\nET=6.0/60+15.35/3600+0.3/3600*1.25278;\n\n#calculation\nLMT=GAT+ET-Long/15.0;\nLMT=deg_to_dms(LMT);\n\n#result\nprint \"LMT in hr min sec\",LMT",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "LMT in hr min sec [11, 21, 25.73]\n"
- }
- ],
- "prompt_number": 134
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.43,Page 163"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#finding LHA\n\n#initialisation of variable\nimport numpy as np\nfrom scipy import linalg\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\nLong=45.0;\nE=11+55.0/60+5.0/3600-1.5/6*17.0/3/3600;\n\n#calculation\nGMT=14+40.0/60+Long/15.0;\nGHA=GMT+E;\nLHA=GHA-24-Long/15;\nLHA=deg_to_dms(LHA);\n\n#result\nprint \"LHA of the sun in hr min sec\",LHA\n",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "LHA of the sun in hr min sec [2, 35, 3.58]\n"
- }
- ],
- "prompt_number": 135
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 4.44,Page 164"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#finding GMT\n\n#initialisation of variable\nimport numpy as np\nfrom scipy import linalg\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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 if sd==60:\n m=m+1;\n sd=0;\n \n sd=round(sd,2)\n return [d, m, sd]\nE=11+55.0/60+24.0/3600+0.5/3600*(2+40.0/60+21.2/3600);\nGHA=8+35.0/60+45.2/3600;\n\n#calculation\nGMT=GHA+24-E;\nGMT=deg_to_dms(GMT);\n\n#result\nprint \"GMT in hr min sec\",GMT",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "GMT in hr min sec [20, 40, 19.86]\n"
- }
- ],
- "prompt_number": 136
- }
- ],
- "metadata": {}
- }
- ]
-} \ No newline at end of file
diff --git a/Surveying_Volume_3/Chapter5.ipynb b/Surveying_Volume_3/Chapter5.ipynb
deleted file mode 100755
index 4d4ee9e6..00000000
--- a/Surveying_Volume_3/Chapter5.ipynb
+++ /dev/null
@@ -1,398 +0,0 @@
-{
- "metadata": {
- "name": "S3-C5"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": "Uses Of Field Astronomy in surveying"
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 5.1,Page 174"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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]\n#printing result in degree minute and seconds respectively\nl1=11.5;\nl2=13.5;\nr1=8.5;\nr2=6.5;\nalpha=3+15.0/60+28.0/3600;\nOB=121+45.0/60+18.0/3600;\nOA=43+25.0/60+20.51/3600;\n\n#calculation\ngamma=(l1+l2)/4-(r1+r2)/4;\ne=gamma*tan(alpha*pi/180)/3600; #correction\nCH=OB-OA-e;\nCH=deg_to_dms(CH);\n\n#result\nprint \"corrected horizontal angle in deg,min,sec respectively\",CH",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "corrected horizontal angle in deg,min,sec respectively [78, 19, 57.35]\n"
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 5.2,Page 184"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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]\nalpha=30+32.0/60+18.0/3600;#latitude\nd=16.0/60+2.85/3600; #diameter of sun\n\n#calculation\nC1=-58.0/3600/tan(alpha*pi/180); \nC2=8.8/3600*cos(alpha*pi/180); \nC3=d; \nCL=alpha+C1+C2+C3;\nCL=deg_to_dms(CL);\n\n#result\nprint \"corrected latutude in deg,min,sec respectively\",CL",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "corrected latutude in deg,min,sec respectively [30, 46, 50.12]\n"
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 5.3,Page 184"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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]\nalpha=40+52.0/60+10.0/3600;#latitude\n\n#calculation\nC1=-58.0/3600/tan(alpha*pi/180);\nCL=alpha+C1;\nCL=deg_to_dms(CL);\n\n#result\nprint \"corrected latutude in deg,min,sec respectively\",CL",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "corrected latutude in deg,min,sec respectively [40, 51, 2.97]\n"
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 5.4,Page 197"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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]\nLMT=21+23.0/60+05.0/3600; #local chronometer time\nLong=65.0+19.0/60; #longitude\nGST=13+15.0/60+20.0/3600;\nRA=9+32.0/60+15.0/3600;\nLong2=82.0+30.0/60; #longitude of India\n\n#calculation\ne1=Long/15*9.8565/3600; #error\nSIT=RA+24-GST+e1; #sidereal time interval after LMM\ne2=SIT*9.8296/3600; #error\nMI=SIT-e2; #mean interval after LMM\nLMT=LMT-(Long2-Long)/15.0;\nCE=MI-LMT;\nCE=deg_to_dms(CE);\n\n#result\nprint \"chronometer error in hours,min,sec respectively\",CE",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "chronometer error in hours,min,sec respectively [0, 0, 2.56]\n"
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 5.5,Page 198"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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]\nMST=12+32.0/60+15.0/3600; #mean sidereal time\nRA=15+45.0/60+10.0/3600;\ntheta=55+14.0/60+20.0/3600;#latitude\ndelta=15+24.0/60+30.0/3600;#declination\nalpha=35+44.0/60+10.0/3600;#zenith deistance\n\n#calculation\nc=90-theta;\np=90-delta;\nz=90-alpha;\nH=acos(cos(z*pi/180)/sin(c*pi/180)/sin(p*pi/180)-1/(tan(p*pi/180)*tan(c*pi/180)))\nH=H/15*180/pi;\nLST=RA-H;\nCE=MST-LST;\nCE=deg_to_dms(CE);\n\n#result\nprint \"chronometer error in hours,min,sec respectively\",CE",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "chronometer error in hours,min,sec respectively [0, 0, 12.94]\n"
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 5.6,Page 199"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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]\nLMTe=6+34.0/60+18.0/3600;# LMT east\nLMTw=8+58.0/60+2.0/3600; # LMT west\nRA=16+11.0/60+25.0/3600;\nLong=125+33.0/60;\nGST=8+25.0/60+14.0/3600;\n\n#calculation\ne1=Long/15*9.8565/3600; #error\nSIT=RA-GST+e1; #sidereal time interval after LMM\ne2=SIT*9.8296/3600;\nMI=SIT-e2; #mean time interval after LMM\nLMTav=(LMTe+LMTw)/2; #mean LMT\nCE=LMTav-MI;\nCE=deg_to_dms(CE);\n\n#result\nprint \"chronometer error in slower side in hours,min,sec respectively\",CE",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "chronometer error in slower side in hours,min,sec respectively [0, 0, 6.9]\n"
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 5.7,Page 204"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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]\nLMM=15+9.0/60+5.21/3600;# mean LMT\nGMT=10+9.0/60+3.76/3600;\nLong=75.0;#longitude\nalpha=42+30.0/60+42.0/3600;\ntheta=34+48.0/60+12.0/3600;\ndelta=15+36.0/60+48.0/3600;\n\n#calculation\nH=acos(sin(alpha*pi/180)/cos(theta*pi/180)/cos(delta*pi/180)-(tan(delta*pi/180)*tan(theta*pi/180)))\nH=H/15*180/pi;\nGAT=12+H-Long/15;\nLMT=GAT+Long/15-5.0/60-40.0/3600;\nCE=LMM-LMT;\nCE=deg_to_dms(CE);\n\n#result\nprint \"chronometer error in slower side in hours,min,sec respectively\",CE",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "[0, 0, 1.45] chronometer error in slower side in hours,min,sec respectively\n"
- }
- ],
- "prompt_number": 23
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 5.8,Page 219"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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]\nd=5+1.0/60+50.0/3600;\ndel1=75+14.0/60+20.0/3600;\ndel2=70+12.0/60+30.0/3600;\n\n#calculation\nk=cos(del1*pi/180)/cos(del2*pi/180);\nA2=pi/2-atan((cos(d*pi/180)-k)/sin(d*pi/180));\nA2=A2*180/pi;\nA2=120+15.0/60+10.0/3600-A2;\nCR=360-A2;\nA2=deg_to_dms(A2);\nCR=deg_to_dms(CR);\n\n#result\nprint \"azimuth of angle R in degree,minites,seconds respectively\",A2\nprint \"true bearing of CR in degree,minites,seconds respectively\",CR",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "azimuth of angle R in degree,minites,seconds respectively [100, 27, 40.0]\ntrue bearing of CR in degree,minites,seconds respectively [259, 32, 20.0]\n"
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 5.9,Page 223"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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]\na=26.0/60+51.0/3600;\np=56.0/60+5.1/3600;#polar distance\n\n#calculation\nH=acos(a/p);\nA=p*sin(H)/cos(30.75694*pi/180);\nCR=25+35.0/60+40.0/3600-A;\nCR=deg_to_dms(CR);\n\n#result\nprint \"azimuth of angle CR in degree,minites,seconds respectively\",CR",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "azimuth of angle CR in degree,minites,seconds respectively [24, 38, 22.01]\n"
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 5.10,Page 227 "
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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]\nLong=75.0;#longitude\nGST=11+40.0/60+32.4/3600;\nRA=12+25.0/60+18.35/3600;\nGMT=15+45.0/60+25.3/3600;\ndelta=22+6.0/60+32.5/3600;\n\n#calculation\ne1=Long/15*9.8565/3600;\nLSTofLMM=GST-e1;\nLMT=GMT+Long/15;\nSIT=LMT+LMT*9.8565/3600;#sidereal time interval\nLHA=SIT+LSTofLMM;\nH=RA+24-LHA;\nH=H*15;\nB=atan(tan(delta*pi/180)*tan(H*pi/180));\nB=B*180/pi;\nA=atan(tan(H*pi/180)*cos(B*pi/180)/sin((B-32-15.0/60)*pi/180))\nA=A*180/pi;\nTB=360+A-135-15.0/60-20.0/3600;\nTB=deg_to_dms(TB);\n\n#result\nprint \"true bearing TB in degree,minites,seconds respectively\",TB\nprint \"there is slight difference in the answers due to rounding off error in the book\"",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "true bearing TB in degree,minites,seconds respectively [313, 17, 36.07]\nthere is slight difference in the answers due to rounding off error in the book\n"
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 5.11,Page 237"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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]\nz=51+47.0/60+18.0/3600;#zenith distance\np=88+57.0/60+57.0/3600;#polar distance\nc=61+27.0/60+55.0/3600;#co-latitude\n\n#calculation\ns=(z+p+c)/2;\nA=2*atan(sqrt(sin((s-z)*pi/180)/sin(s*pi/180)*sin((s-c)*pi/180)/sin((s-p)*pi/180)));\nA=A*180/pi;\nTB=360-A-165-18.0/60-20.0/3600;\nTB=deg_to_dms(TB);\n\n#result\nprint \"true bearing TB in degree,minites,seconds respectively\",TB",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "true bearing TB in degree,minites,seconds respectively [80, 59, 47.52]\n"
- }
- ],
- "prompt_number": 8
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 5.12,Page 241"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#finding latitude\n\n#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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]\nz2=90-40-13.0/60-15.0/3600;\ndel2=12+15.0/60+30.0/3600;#declination of star\n\n#calculation\ntheta=z2+del2;\ntheta=deg_to_dms(theta);\n\n#result\nprint \"altitude in degree,minites,seconds respectively\",theta",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "altitude in degree,minites,seconds respectively [62, 2, 15.0]\n"
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 5.13,Page 244"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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]\nalpha1=30+45.0/60+25.0/3600;\nalpha2=40+48.0/60+30.0/3600;\n\n#calculation\ne1=-58/3600/tan(alpha1*pi/180); #error 1\ne2=-58/3600/tan(alpha2*pi/180); #error 2\ntheta=(alpha1+alpha2+e1+e2)/2;\ntheta=deg_to_dms(theta)\n\n#result\nprint \"latitude in degree,minites,seconds respectively\",theta",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "latitude in degree,minites,seconds respectively [34, 21, 48.1]\n"
- }
- ],
- "prompt_number": 10
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 5.14,Page 258"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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]\nZP=37+29.0/60+40.0/3600;#colatitde\nZM=56+24.0/60+50.0/3600;#coaltitude\nPM=67+54.0/60+24.0/3600;#codeclination\n\n#calculation\nA1=acos((cos(PM*pi/180)-cos(ZP*pi/180)*cos(ZM*pi/180))/(sin(ZP*pi/180)*sin(ZM*pi/180)));\nA1=A1*180/pi;\nA=360-A1;\nA=deg_to_dms(A);\n\n#result\nprint \"azimuth of sun in degree,minites,seconds respectively\",A",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "azimuth of sun in degree,minites,seconds respectively [262, 53, 12.16]\n"
- }
- ],
- "prompt_number": 11
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 5.15,Page 259"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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]\ntheta=54+30.0/60;#latitude\ndelta=62+12.0/60+21.0/3600;#declination\n\n#calculation\nalpha=asin(sin(theta*pi/180)/sin(delta*pi/180));\nA1=acos(tan(theta*pi/180)/tan(alpha));\nA1=A1*180/pi;\nTB=360-A1-65-18.0/60-42.0/3600;\nTB=deg_to_dms(TB);\nalpha=deg_to_dms(alpha*180/pi);\nH=atan(tan(theta*pi/180)/tan(delta*pi/180));\nH=deg_to_dms(H*180/pi);\n\n#result\nprint \"true bearing in degree,minites,seconds respectively\",TB\nprint \"altitude in degree,minites,seconds respectively\",alpha\nprint \"hour angle in degree,minites,seconds respectively\",H",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "true bearing in degree,minites,seconds respectively [241, 16, 19.55]\naltitude in degree,minites,seconds respectively [66, 58, 7.13]\nhour angle in degree,minites,seconds respectively [36, 27, 49.32]\n"
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 5.16,Page 261"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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]\nalpha=44+12.0/60+30.0/3600;\nd=15.0/60+45.86/3600;#diameter correction\nLong=7+20.0/60+15.0/3600;#longitude\n\n#calculation\nalpha=alpha+d-58/3600/tan(alpha)+8.8/3600*cos(alpha);\nGAT=Long/15;\ne2=6.82/3600*GAT;\ndelta=22+18.0/60+12.8/3600+e2;\ntheta=delta+90-alpha;\ntheta=deg_to_dms(theta);\n\n#result\nprint \"altitude in degree,minites,seconds respectively\",theta",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "[67, 49, 51.7] altitude in degree,minites,seconds respectively\n"
- }
- ],
- "prompt_number": 47
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 5.17,Page 262"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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]\nGMT=16+22.0/60+55.0/3600;\nET=3.0/60+43.0/3600;\nc=90-42-20.0/60;\np=90-18-45.0/60-50.0/60;\nz=90-43-38.0/60;\n\n#calculation\nH=acos(cos(z*pi/180)/sin(c*pi/180)/sin(p*pi/180)-1/tan(c*pi/180)*1/tan(p*pi/180));\nH=H*180/pi;\nLAT=12-H/15;\nLMT=LAT-ET;\nLong=GMT-LMT;\nLong=Long*15;\nLong=deg_to_dms(Long);\n\n#result\nprint \"Longitude in degree,minites,seconds respectively\",Long",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "Longitude in degree,minites,seconds respectively [114, 50, 53.21]\n"
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": "Example 5.18,Page 263"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "#initialisation of variable\nfrom math import pi,tan,sqrt,sin,cos,acos,atan,asin\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]\nalpha=21+35.0/60+30.0/3600;#mean observed altitude\nC=(4.5+5.5-3.5-2.5)/4*15.0/3600;\nc=44+30.0/60;#colatitude\nz=68+26.0/60+34.0/3600;#coaltitude\np=94+4.0/60+15.0/3600;#codeclination\ns=(c+p+z)/2;\n\n#calculation\ncr=-58/3600/tan(alpha);#correction refraction\ncp=8.8/3600*cos(alpha);#correction parallax\nalpha=alpha+C+cr+cp; #corrected altitude\nA=2*atan(sqrt(sin((s-z)*pi/180)/sin(s*pi/180)*sin((s-c)*pi/180)/sin((s-p)*pi/180)));\nA=A*180/pi;\nMh=(121+45.0/60+20.0/3600+122+47.0/60)/2;#mean horizontal angle\nAZ=360-Mh-A;\nAZ=deg_to_dms(AZ);\n\n#result\nprint \"Azimuth from north(clockwise) in degree,minites,seconds respectively\",AZ",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "[117, 0, 19.45] Azimuth from north(clockwise) in degree,minites,seconds respectively\n"
- }
- ],
- "prompt_number": 55
- }
- ],
- "metadata": {}
- }
- ]
-} \ No newline at end of file
diff --git a/Surveying_Volume_3/Chapter6.ipynb b/Surveying_Volume_3/Chapter6.ipynb
deleted file mode 100755
index 3fb19c9c..00000000
--- a/Surveying_Volume_3/Chapter6.ipynb
+++ /dev/null
@@ -1,629 +0,0 @@
-{
- "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": {}
- }
- ]
-} \ No newline at end of file
diff --git a/Surveying_Volume_3/Chapter_1_.ipynb b/Surveying_Volume_3/Chapter_1_.ipynb
deleted file mode 100755
index da68e1c2..00000000
--- a/Surveying_Volume_3/Chapter_1_.ipynb
+++ /dev/null
@@ -1,3834 +0,0 @@
-{
- "metadata": {
- "name": "",
- "signature": "sha256:4905c8953e99a0af987b7c0ce644a5ad7cb3e945c4ca11d9468aa082d89ca9a1"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "FIELD ASTRONOMY"
- ]
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.1, Page 30"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin\n",
- "#part1\n",
- "a =40; # longitude of A\n",
- "b =73; # longitude of B\n",
- "\n",
- "#calculation\n",
- "dol =b-a; # difference of longitude\n",
- "\n",
- "#result\n",
- "print \" difference of longitude is in degrees\",round(dol);\n",
- "\n",
- "#part2\n",
- "a =20; # longitude of A\n",
- "b =150; # longitude of B\n",
- "\n",
- "#calculation\n",
- "dol =b-a; # difference of longitude\n",
- "\n",
- "#result\n",
- "print \" difference of longitude is in degrees \",round(dol);\n",
- "\n",
- "#part3\n",
- "a =-20; # longitude of A\n",
- "b =50; # longitude of B\n",
- "\n",
- "#calculation\n",
- "dol =b-a; # difference of longitude\n",
- "\n",
- "#result\n",
- "print \" difference of longitude is in degrees\",round(dol);\n",
- "\n",
- "#part4\n",
- "a =-40; # longitude of A\n",
- "b =150; # longitude of B\n",
- "\n",
- "#calculation\n",
- "dol =360-(b-a); # difference of longitude\n",
- "\n",
- "#result\n",
- "print \" difference of longitude is in degrees\",round(dol);"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " difference of longitude is 33.0\n",
- " difference of longitude is 130.0\n",
- " difference of longitude is 70.0\n",
- " difference of longitude is 170.0\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.2.1,Page 31"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos\n",
- "latA =28.0+42.0/60.0; # latitude of A\n",
- "lonA =31.0*60.0+12.0; # longitude of A\n",
- "latB =28.0+42.0/60.0; # latitude of B\n",
- "lonB =47.0*60.0+24.0; # longitude of B\n",
- "\n",
- "#calculation\n",
- "d=( lonB - lonA )*cos( latA /180* pi);\n",
- "\n",
- "#result\n",
- "print \" distance between A & B in (km) \",round(d *1.852,3)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " distance between A & B in (km) 1578.989\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.2.2,Page 31"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos\n",
- "latA =12.0+36.0/60.0; # latitude of A\n",
- "lonA =115.0*60.0+6.0; # longitude of A\n",
- "latB =12.0+36.0/60.0; # latitude of B\n",
- "lonB =-150.0*60.0-24.0; # longitude of B\n",
- "\n",
- "#calculation\n",
- "d=( 360*60+lonB - lonA )*cos( latA /180* pi);\n",
- "\n",
- "#result\n",
- "print \" distance between A & B in (km) \",round(d *1.852,3) "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " distance between A & B in (km) 10247.946\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.3,Page 31"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "latA =15;\n",
- "latB =12.0+6.0/60.0;\n",
- "lonA =50.0+12.0/60.0;\n",
- "lonB =54.0;\n",
- "Re =6370.0; # radius of earth\n",
- "\n",
- "#calculation\n",
- "b=(90 - latA )*pi /180;\n",
- "a=(90 - latB )*pi /180;\n",
- "P=( lonB - lonA )*pi /180;\n",
- "p= acos ( cos (P)*sin(a)* sin (b)+ cos (a)*cos(b)); #spherical triangle law\n",
- "x= atan ( cos (a/2-b/2)/ cos (a/2+b /2) * tan (pi /2-P /2) );#spherical triangle law \n",
- "y= atan ( sin (a/2-b/2)/ sin (a/2+b /2) * tan (pi /2-P /2) ); #spherical triangle law\n",
- "dol =pi -x-y;\n",
- "dol=dol*180/pi;\n",
- "a= dol *3600 %60;\n",
- "b= ((dol *3600 -a)%3600) /60;\n",
- "c=( dol *3600 - b*60 -a) /3600;\n",
- "\n",
- "#result\n",
- "print \" distance from A to B in (km) \",round(p*Re,3);\n",
- "print \" direction of B from A towards east of south \",round(a,3),\"seconds\",b,\"minutes\",c,\"degrees\";\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " distance from A to B in (km) 522.104\n",
- " direction of B from A towards east of south 35.16 seconds 19.0 minutes 52.0 degrees\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.4,Page 33"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan,asin\n",
- "def 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]\n",
- "latA =45.0;\n",
- "a1=45.0+13.108/60;\n",
- "p =(300.0/60.0) *pi /180; # side AB\n",
- "b=(90 - latA )*pi /180; # side PA\n",
- "\n",
- "# calculation\n",
- "a= acos ( cos (p)*cos(b)); # side BP\n",
- "BC=a *180/ pi - latA ;\n",
- "d=BC *1.852*60;\n",
- "B=asin(sin(latA*pi/180)/sin(a1*pi/180));\n",
- "B=deg_to_dms(B*180/pi);\n",
- "\n",
- "\n",
- "#result\n",
- "print \" distance of BC in (km)\",round(d,3)\n",
- "print \"the angle in deg,min,sec is\",B"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " distance of BC in (km) 24.181\n",
- "the angle in deg,min,sce is [85, 0, 33.27]\n"
- ]
- }
- ],
- "prompt_number": 27
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.6.1,Page 37"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "delta =42+15.0/60; # declination of star\n",
- "theta =26+40.0/60; # lattude of star\n",
- "\n",
- "#caculation\n",
- "zend =90.0 - theta -90+ delta ;\n",
- "alt =90.0 - zend ;\n",
- "\n",
- "#for zenith distance\n",
- "#a= zend *3600 %60;\n",
- "b= ((zend *3600 )%3600) /60;\n",
- "c=( zend *3600 - b*60 -a) /3600;\n",
- "print \" zenith distance \",round(a,3),\"seconds\",b,\"minutes\",c,\"degrees\";\n",
- "\n",
- "#for altitude\n",
- "a= alt *3600 %60;\n",
- "b= ((alt *3600 -a)%3600) /60;\n",
- "c=( alt *3600 - b*60 -a) /3600;\n",
- "print \" altitude of star \",round(a,3),\"seconds\",b,\"minutes\",c,\"degrees\";\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " zenith distance 0.0 seconds 35.0 minutes 15.0 degrees\n",
- " altitude of star 0.0 seconds 25.0 minutes 74.0 degrees\n"
- ]
- }
- ],
- "prompt_number": 13
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.6.2,Page 36"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "delta =23+20.0/60; # declination of star\n",
- "theta =26+40.0/60; # lattude of star\n",
- "\n",
- "#caculation\n",
- "zend =90.0 + theta -90- delta ;\n",
- "alt =90.0 - zend ;\n",
- "\n",
- "#for zenith distance\n",
- "a= zend *3600 %60;\n",
- "b= ((zend *3600 -a)%3600) /60;\n",
- "c=( zend *3600 - b*60 -a) /3600;\n",
- "print \" zenith distance \",round(a,3),\"seconds\",b,\"minutes\",c,\"degrees\";\n",
- "\n",
- "#for altitude\n",
- "\n",
- "b= ((alt *3600 )%3600) /60;\n",
- "c=( alt *3600 - b*60 -a) /3600;\n",
- "print \" altitude of star \",round(a,3),\"seconds\",b,\"minutes\",c,\"degrees\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " zenith distance 0.0 seconds 20.0 minutes 3.0 degrees\n",
- " altitude of star 0.0 seconds 40.0 minutes 86.0 degrees\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.6.3,Page 37"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "delta =65+40.0/60; # declination of star\n",
- "theta =26+40.0/60; # lattude of star\n",
- "\n",
- "#caculation\n",
- "zend =90.0 - theta -90+ delta ;\n",
- "alt =90.0 - zend ;\n",
- "\n",
- "#for zenith distance\n",
- "a= zend *3600 %60;\n",
- "b= ((zend *3600 -a)%3600) /60;\n",
- "c=( zend *3600 - b*60 -a) /3600;\n",
- "print \" zenith distance \",round(a,3),\"seconds\",b,\"minutes\",c,\"degrees\";\n",
- "\n",
- "#for altitude\n",
- "a= alt *3600 %60;\n",
- "b= ((alt *3600 -a)%3600) /60;\n",
- "c=( alt *3600 - b*60 -a) /3600;\n",
- "print \" altitude of star \",round(a,3),\"seconds\",b,\"minutes\",c,\"degrees\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " zenith distance 0.0 seconds 0.0 minutes 39.0 degrees\n",
- " altitude of star 0.0 seconds 0.0 minutes 51.0 degrees\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.7,Page 37"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "delta =85+20.0/60; # declination of star\n",
- "theta =46+50.0/60; # lattude of star\n",
- "\n",
- "#caculation\n",
- "zend =90.0 - theta +90- delta ;\n",
- "alt =90.0 - zend ;\n",
- "\n",
- "#for zenith distance\n",
- "\n",
- "b= ((zend *3600 )%3600) /60;\n",
- "c=( zend *3600 - b*60 -a) /3600;\n",
- "print \" zenith distance \",round(a,3),\"seconds\",b,\"minutes\",c,\"degrees\";\n",
- "\n",
- "#for altitude\n",
- "a= alt *3600 %60;\n",
- "b= ((alt *3600 -a)%3600) /60;\n",
- "c=( alt *3600 - b*60 -a) /3600;\n",
- "print \" altitude of star \",round(a,3),\"seconds\",b,\"minutes\",c,\"degrees\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " zenith distance 0.0 seconds 50.0 minutes 47.0 degrees\n",
- " altitude of star 0.0 seconds 10.0 minutes 42.0 degrees\n"
- ]
- }
- ],
- "prompt_number": 10
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.8,Page 38"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "delta =56+10.0/60; # declination of star\n",
- "theta =56+10.0/60; # lattude of star\n",
- "\n",
- "#caculation\n",
- "zend =90.0 - theta +90- delta ;\n",
- "alt =90.0 - zend ;\n",
- "\n",
- "#for zenith distance\n",
- "a= zend *3600 %60;\n",
- "b= ((zend *3600-a )%3600) /60;\n",
- "c=( zend *3600 - b*60 -a) /3600;\n",
- "print \" zenith distance \",round(a,3),\"seconds\",b,\"minutes\",c,\"degrees\";\n",
- "\n",
- "#for altitude\n",
- "#a= alt *3600 %60;\n",
- "b= ((alt *3600 )%3600) /60;\n",
- "c=( alt *3600 - b*60 -a) /3600;\n",
- "print \" altitude of star \",round(a,3),\"seconds\",b,\"minutes\",c,\"degrees\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " zenith distance 0.0 seconds 40.0 minutes 67.0 degrees\n",
- " altitude of star 0.0 seconds 20.0 minutes 22.0 degrees\n"
- ]
- }
- ],
- "prompt_number": 15
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.9,Page 38"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "import numpy as np\n",
- "a=np.array([[1.0,-1.0],[1.0,1.0]])\n",
- "b=np.array([59.0/3,332.0/3])\n",
- "\n",
- "#calculation\n",
- "x=np.linalg.solve(a,b);\n",
- "\n",
- "#result\n",
- "print\"declination of star in (degrees)\",round(x[0],3);\n",
- "print\"latitude of the place of observation (degrees)\",x[1];"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "declination of star in (degrees) 65.167\n",
- "latitude of the place of observation (degrees) 45.5\n"
- ]
- }
- ],
- "prompt_number": 22
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.10,Page 39"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "theta =20+30.0/60;\n",
- "H =42+6.0/60; # hour angle\n",
- "delta =50.0;\n",
- "\n",
- "\n",
- "# in triangle ZPM\n",
- "\n",
- "#calculation\n",
- "PZ =(90 - delta )*pi /180;\n",
- "H=H*pi /180;\n",
- "PM =(90 - theta )*pi /180;\n",
- "ZM= acos (( cos (PZ)* cos (PM)+sin(PM)*sin(PZ)* cos (H)));\n",
- "alpha =pi /2- ZM;\n",
- "alpha = alpha *180/ pi;\n",
- "A =(( cos(PM)-cos (PZ)* cos (ZM))/ sin (PZ)/sin(ZM));\n",
- "\n",
- "if A <0:\n",
- " A=-A;\n",
- " A=acos(A)\n",
- " A=180-A*180/pi;\n",
- " \n",
- "\n",
- "#for altitude\n",
- "alt=alpha;\n",
- "a= alt *3600 %60;\n",
- "b=((alt *3600-a )%3600) /60;\n",
- "c=( alt *3600 - b*60 -a) /3600;\n",
- "print \" altitude of star \",round(a,3),\"seconds\",b,\"minutes\",c,\"degrees\";\n",
- "\n",
- "\n",
- "#for azimuth \n",
- "a= A *3600 %60;\n",
- "b= ((A *3600-a )%3600) /60;\n",
- "c=( A *3600 - b*60 -a) /3600;\n",
- "print\" azimuth of star in (degrees ) westwards \",round(a,3),\"seconds\",b,\"minutes\",c,\"degrees\";\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " altitude of star 36.75 seconds 38.0 minutes 45.0 degrees\n",
- " azimuth of star in (degrees ) westwards 25.551 seconds 4.0 minutes 116.0 degrees\n"
- ]
- }
- ],
- "prompt_number": 32
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.11,Page 40"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "theta = -8 -30.0/60;\n",
- "H =322.0; # hour angle\n",
- "delta =50;\n",
- "\n",
- "\n",
- "# in triangle ZPM\n",
- "\n",
- "#calculation\n",
- "PZ =(90 - delta )*pi /180;\n",
- "H =2* pi -H*pi /180;\n",
- "PM =(90 - theta )*pi /180;\n",
- "ZM= acos (( cos (PZ)* cos (PM)+sin(PM)*sin(PZ)* cos (H)));\n",
- "alpha =pi /2- ZM;\n",
- "alpha=alpha*180/pi;\n",
- "A =(( cos(PM)-cos (PZ)* cos (ZM))/ sin (PZ)/sin(ZM));\n",
- "\n",
- "if A <0:\n",
- " A=-A;\n",
- " A=acos(A)\n",
- " A=180-A*180/pi;\n",
- " \n",
- "#result\n",
- "#for altitude\n",
- "alt=alpha;\n",
- "a= alt *3600 %60;\n",
- "b=((alt *3600-a )%3600) /60;\n",
- "c=( alt *3600 - b*60 -a) /3600;\n",
- "print \" altitude of star \",round(a,3),\"seconds\",b,\"minutes\",c,\"degrees\";\n",
- "\n",
- "\n",
- "#for azimuth \n",
- "a= A *3600 %60;\n",
- "b= ((A *3600-a )%3600) /60;\n",
- "c=( A *3600 - b*60 -a) /3600;\n",
- "print\" azimuth of star in (degrees ) eastwards \",round(a,3),\"seconds\",b,\"minutes\",c,\"degrees\";\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " altitude of star 48.256 seconds 48.0 minutes 22.0 degrees\n",
- " azimuth of star in (degrees ) eastwards 22.798 seconds 39.0 minutes 138.0 degrees\n"
- ]
- }
- ],
- "prompt_number": 31
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.12,Page 42"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "alpha =22+36.0/60; # altitude of star\n",
- "A =42.0 # azimuth angle\n",
- "delta =40.0; # latitude of observer\n",
- "\n",
- "# in triangle ZPM\n",
- "\n",
- "#calculation\n",
- "PZ =(90 - delta )*pi /180;\n",
- "A=A*pi /180;\n",
- "ZM =(90 - alpha )*pi /180;\n",
- "PM= acos (( cos (PZ)* cos (ZM)+sin(ZM)*sin(PZ)* cos (A)));\n",
- "theta =pi /2- PM\n",
- "theta=theta*180/pi;\n",
- "H =(( cos(ZM)-cos (PZ)* cos (PM))/ sin (PZ)/sin(PM));\n",
- "if H <0:\n",
- " H=-H;\n",
- " H=acos(H)\n",
- " H=180-H*180/pi;\n",
- " \n",
- "\n",
- "#result\n",
- "#for declination \n",
- "alt=theta;\n",
- "a= alt *3600 %60;\n",
- "b=((alt *3600-a )%3600) /60;\n",
- "c=( alt *3600 - b*60 -a) /3600;\n",
- "print \" declination of star \",round(a,3),\"seconds\",b,\"minutes\",c,\"degrees\";\n",
- "\n",
- "#for hour angle\n",
- "a= H *3600 %60;\n",
- "b= ((H *3600-a )%3600) /60;\n",
- "c=( H *3600 - b*60 -a) /3600;\n",
- "print\" hour angle of star \",round(a,3),\"seconds\",b,\"minutes\",c,\"degrees\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " declination of star 12.44 seconds 35.0 minutes 50.0 degrees\n",
- " hour angle of star 5.342 seconds 21.0 minutes 103.0 degrees\n"
- ]
- }
- ],
- "prompt_number": 34
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.13,Page 42"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "alpha =21+30.0/60; # a l t i t u d e o f s t a r\n",
- "A =140.0 # azimuth a n g l e\n",
- "delta =48.0; # l a t i t u d e o f o b s e r v e r\n",
- "\n",
- "#calculation\n",
- "PZ =(90 - delta )*pi /180;\n",
- "A=A*pi /180;\n",
- "ZM =(90 - alpha )*pi /180;\n",
- "PM =( cos(PZ)*cos(ZM)+ sin (ZM)* sin (PZ)* cos (A));\n",
- "\n",
- "if PM <0:\n",
- " PM=-PM\n",
- " PM=acos(PM)\n",
- " PM=180-PM*180/pi;\n",
- "\n",
- "H= acos (( cos (ZM)-cos(PZ)*cos(PM*pi /180) )/ sin (PZ)/sin (PM*pi /180) );\n",
- "H =2* pi -H;\n",
- "H=H*180/pi;\n",
- "\n",
- "#result\n",
- "#for declination \n",
- "alt=PM-90;\n",
- "a= alt *3600 %60;\n",
- "b=((alt *3600-a )%3600) /60;\n",
- "c=( alt *3600 - b*60 -a) /3600;\n",
- "print \" declination of star southwards \",round(a,3),\"seconds\",b,\"minutes\",c,\"degrees\";\n",
- "\n",
- "#for hour angle\n",
- "a= H *3600 %60;\n",
- "b= ((H *3600-a )%3600) /60;\n",
- "c=( H *3600 - b*60 -a) /3600;\n",
- "print\" hour angle of star \",round(a,3),\"seconds\",b,\"minutes\",c,\"degrees\";"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " declination of star southwards 12.098 seconds 48.0 minutes 11.0 degrees\n",
- " hour angle of star 22.619 seconds 20.0 minutes 322.0 degrees\n"
- ]
- }
- ],
- "prompt_number": 44
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.14,Page 43"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def 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]\n",
- "# part 1\n",
- "delta =22+12.0/60;\n",
- "theta =42+30.0/60;\n",
- "\n",
- "#calculation\n",
- "ZP =(90 - theta )*pi /180;\n",
- "PM =(90 - delta )*pi /180;\n",
- "A= acos ( cos (PM)/sin(ZP));\n",
- "H=180 - acos ( tan (pi /2- ZP)*tan(pi /2- PM)) *180/ pi\n",
- "A=deg_to_dms(A*180/ pi);\n",
- "H=deg_to_dms(H/15);\n",
- "\n",
- "#result\n",
- "print \" azimuth of setting sun in ( degrees,min,second) \",A\n",
- "print \" suns hour angle in ( hr,min,second ) : \",H\n",
- "\n",
- "#part 2\n",
- "delta = -22 -12/60;\n",
- "theta =42+30.0/60;\n",
- "\n",
- "#calculation\n",
- "ZP =(90 - theta )*pi /180;\n",
- "PM =(90 - delta )*pi /180;\n",
- "A= acos ( cos (PM)/sin(ZP));\n",
- "H=180 - acos ( tan (pi /2- ZP)*tan(pi /2- PM)) *180/ pi\n",
- "A=deg_to_dms(A*180/ pi);\n",
- "H=deg_to_dms(H/15);\n",
- "\n",
- "#result\n",
- "print \" azimuth of setting sun in ( degrees,min,second) \",A\n",
- "print \" suns hour angle in ( hr,min,second ) : \",H"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " azimuth of setting sun in ( degrees,min,second) [59, 10, 14.72]\n",
- " suns hour angle in ( hr,min,second ) : [7, 27, 50.23]\n",
- " azimuth of setting sun in ( degrees,min,second) [120, 32, 13.17]\n",
- " suns hour angle in ( hr,min,second ) : [4, 33, 4.97]\n"
- ]
- }
- ],
- "prompt_number": 10
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.15,Page 44"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "delta =22+12.0/60;\n",
- "theta =42+30.0/60;\n",
- "ef 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]\n",
- "\n",
- "#calculation\n",
- "ZP =(90 - theta )*pi /180;\n",
- "PM =(90 - delta )*pi /180;\n",
- "A= acos ( cos (PM)/sin(ZP));\n",
- "H=180 - acos ( tan (pi /2- ZP)*tan(pi /2- PM)) *180/ pi\n",
- "A=deg_to_dms(180-A*180/ pi);\n",
- "H=deg_to_dms(H/15);\n",
- "\n",
- "#result\n",
- "print \" azimuth of setting sun in ( degrees,min,second) \",A\n",
- "print \" suns hour angle in ( hr,min,second ) : \",H\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " azimuth of setting sun in ( degrees,min,second) [120, 49, 45.28]\n",
- " suns hour angle in ( hr,min,second ) : [7, 27, 50.23]\n"
- ]
- }
- ],
- "prompt_number": 11
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.16,Page 61"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "time = -3 -28.41/60; # greenwich time at july 1 1951\n",
- "change = -11.82/60;\n",
- "def 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]\n",
- "\n",
- "#calculation\n",
- "c12 = change/24*12 # change of time in 12 hours\n",
- "tch =time +c12;\n",
- "tch=deg_to_dms(tch/60);\n",
- "\n",
- "#result\n",
- "print \" greenwich mean time error in 12 th hour(-ve) in( deg,min,sec) \",tch\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " greenwich mean time error in 12 th hour(-ve) in( deg,min,sec) [0, 3, 34.32]\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.17,Page 61"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = (md - m) * 60\n",
- " return [d, m, sd]\n",
- "#printing result in degree minute and seconds respectively \n",
- "GMN = -14*60 -10;\n",
- "changeET =1*1.5;\n",
- "\n",
- "#calculation\n",
- "neterr =GMN+ changeET ;\n",
- "GAT = time + neterr ;\n",
- "GAT=GAT+10*3600+30*60;\n",
- "hr= round ( GAT /3600) ;\n",
- "b=GAT -hr *3600;\n",
- "mi= round (b /60 -1);\n",
- "c=GAT -hr *3600 - mi *60;\n",
- "\n",
- "#result\n",
- "print hr,\"hour\",mi,\"minutes\",c,\"seconds of GAT\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "10.0 hour 15.0 minutes 48.0265 seconds of GAT\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.18,Page 62"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "#part1\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = (md - m) * 60\n",
- " return [d, m, sd]\n",
- "A =50+12.0/60+48.0/3600;\n",
- "time =A /15*3600\n",
- "\n",
- "#calculation\n",
- "hr= round ( time /3600) ;\n",
- "b=time -hr *3600;\n",
- "mi= round (b /60 -1);\n",
- "c=time -hr *3600 - mi *60;\n",
- "\n",
- "#result\n",
- "print hr,\"hour\",mi,\"minutes\",c,\"seconds of angles\"\n",
- "\n",
- "#part 2\n",
- "#initialisation of variable\n",
- "A =8+18.0/60+6.0/3600;\n",
- "time =A /15*3600\n",
- "\n",
- "#calculation\n",
- "hr= round ( time /3600-1) ;\n",
- "b=time -hr *3600;\n",
- "mi= round (b /60 );\n",
- "c=time -hr *3600 - mi *60;\n",
- "\n",
- "#result\n",
- "print hr,\"hour\",mi,\"minutes\",c,\"seconds of angles\"\n",
- "\n",
- "#part 3\n",
- "#initialisation of variable\n",
- "A =258+36.0/60+30.0/3600;\n",
- "time =A /15*3600\n",
- "\n",
- "#calculation\n",
- "hr= round ( time /3600) ;\n",
- "b=time -hr *3600;\n",
- "mi= round (b /60 );\n",
- "c=time -hr *3600 - mi *60;\n",
- "\n",
- "#result\n",
- "print hr,\"hour\",mi,\"minutes\",c,\"seconds of angles\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "3.0 hour 20.0 minutes 51.2 seconds of angles\n",
- "-0.0 hour 33.0 minutes 12.4 seconds of angles\n",
- "17.0 hour 14.0 minutes 26.0 seconds of angles\n"
- ]
- }
- ],
- "prompt_number": 21
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.19,Page 62"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#part1\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "A =4+34.0/60+13.0/3600;\n",
- "\n",
- "#calculation\n",
- "angle =A *15;\n",
- "angle=deg_to_dms(angle);\n",
- "\n",
- "#result\n",
- "print \"angle in degree,minute,second respectively\",angle\n",
- "\n",
- "#part 2\n",
- "#initialisation of variable\n",
- "A =18+11.0/60+38.0/3600;\n",
- "\n",
- "#calculation\n",
- "angle =A *15;\n",
- "angle=deg_to_dms(angle);\n",
- "\n",
- "#result\n",
- "print \"angle in degree,minute,second respectively\",angle\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "angle in degree,minute,second respectively [68, 33, 15.0]\n",
- "angle in degree,minute,second respectively [272, 54, 30.0]\n"
- ]
- }
- ],
- "prompt_number": 15
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.20.a,Page 64"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "longP =20 # longitude of the place\n",
- "longSM =82+30.0/60; # longitude of standard meridion\n",
- "\n",
- "#calculation\n",
- "dolong =longSM - longP ; # difference in longitude\n",
- "dot = dolong /15.0; # difference in time\n",
- "LMT =20+24.0/60+6.0/3600 - dot ;\n",
- "LMT=deg_to_dms(LMT)\n",
- "\n",
- "#result\n",
- "print \"LMT in hours,minute,second respectively\",LMT"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[16, 14, 6.0] Local mean time in hours,minute,second respectively\n"
- ]
- }
- ],
- "prompt_number": 10
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.20.b,Page 64"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "longP =-20 # longitude of the place\n",
- "longSM =82+30.0/60; # longitude of standard meridion\n",
- "\n",
- "#calculation\n",
- "dolong =longSM - longP ; # difference in longitude\n",
- "dot = dolong /15.0; # difference in time\n",
- "LMT =20+24.0/60+6.0/3600 - dot ;\n",
- "LMT=deg_to_dms(LMT)\n",
- "\n",
- "#result\n",
- "print \"LMT in hours,minute,second respectively\",LMT"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[13, 34, 6.0] Local mean time in hours,minute,second respectively\n"
- ]
- }
- ],
- "prompt_number": 11
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.21.a,Page 64"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "LMT =9+40.0/60+12.0/3600;\n",
- "longP = -42 -36.0/60;\n",
- "\n",
- "#calculation\n",
- "dot = longP /15;\n",
- "GMT =LMT -dot;\n",
- "GMT=deg_to_dms(GMT);\n",
- "\n",
- "#result\n",
- "print \"GMT in hours,minute,second respectively\",GMT"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[12, 30, 36.0] GMT in hours,minute,second respectively\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.21.b,Page 64"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "LMT =4+32.0/60+10.0/3600;\n",
- "longP = -56 -32.0/60;\n",
- "\n",
- "#calculation\n",
- "dot = longP /15;\n",
- "GMT =LMT +dot;\n",
- "GMT=deg_to_dms(GMT);\n",
- "\n",
- "#result\n",
- "print \"GMT in hours,minute,second respectively\",GMT"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[0, 46, 2.0] GMT in hours,minute,second respectively\n"
- ]
- }
- ],
- "prompt_number": 14
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.22,Page 65"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "#part1\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "GCT =18+40.0/60+12.0/3600; # greenwich civil time\n",
- "longP =72+30.0/60; # longitude of the place\n",
- "\n",
- "#calculation\n",
- "dot = longP /15.0;\n",
- "LMT = GCT +dot;\n",
- "LMT=deg_to_dms(LMT);\n",
- "\n",
- "#result\n",
- "print \"LMT in hours,minute,second respectively\",LMT\n",
- "\n",
- "#part 2\n",
- "#initiallisation of variable\n",
- "GCT =18+40.0/60+12.0/3600; # greenwich civil time\n",
- "longP =-72-30.0/60; # longitude of the place\n",
- "\n",
- "#calculation\n",
- "dot = longP /15.0;\n",
- "LMT = GCT +dot;\n",
- "LMT=deg_to_dms(LMT);\n",
- "\n",
- "#result\n",
- "print \"LMT in hours,minute,second respectively\",LMT\n",
- "\n",
- "#part 3\n",
- "#initialisation of variable\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg);\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d-24, m, sd]\n",
- "GCT =18+40.0/60+12.0/3600; # greenwich civil time\n",
- "longP =110+32.0/60; # longitude of the place\n",
- "\n",
- "#calculation\n",
- "dot = longP /15.0;\n",
- "LMT = GCT +dot;\n",
- "LMT=deg_to_dms(LMT);\n",
- "\n",
- "#result\n",
- "print \"LMT of next day in hours,minute,second respectively\",LMT"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "LMT in hours,minute,second respectively [23, 30, 12.0]\n",
- "LMT in hours,minute,second respectively [13, 50, 12.0]\n",
- "LMT of next day in hours,minute,second respectively [2, 2, 20.0]\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.23,Page 66"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "LMT =10+20.0/60+30.0/3600; # local mean time\n",
- "longP =102+30.0/60; # longitude of the place\n",
- "\n",
- "#calculation\n",
- "dot = longP /15;\n",
- "GMT =LMT -dot;\n",
- "mGMN =12 - GMT ; #mean time interval\n",
- "i= mGMN *0.32/3600; # increase in mGMN\n",
- "ETGMN =5.0/60+4.35/3600;\n",
- "ch=i+ ETGMN ; # change in GMT\n",
- "GMT =ch+GMT;\n",
- "LMT = GMT +dot;\n",
- "LMT=deg_to_dms(LMT);\n",
- "\n",
- "#result\n",
- "print \"LMT in hours,minute,second respectively\",LMT"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[10, 25, 37.07] LMT in hours,minute,second respectively\n"
- ]
- }
- ],
- "prompt_number": 27
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.24,Page 67"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "LMT =15+12.0/60+40.0/3600; # local mean time\n",
- "longP = -20 -30.0/60; # longitude of the place\n",
- "\n",
- "#calculation\n",
- "dot = longP /15;\n",
- "GMT =LMT -dot;\n",
- "mGMN =12 - GMT ; #mean time interval\n",
- "i= mGMN *0.32/3600; # increase in mGMN\n",
- "ETGMN =5.0/60+4.35/3600;\n",
- "ch=i+ ETGMN ; # change in GMT\n",
- "GMT =ch+GMT;\n",
- "LMT = GMT +dot;\n",
- "LMT=deg_to_dms(LMT);\n",
- "\n",
- "#result\n",
- "print \"LMT in hours,minute,second respectively\",LMT"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[15, 17, 42.89] LMT in hours,minute,second respectively\n"
- ]
- }
- ],
- "prompt_number": 29
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.25,Page 70"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "time =4+20.0/60+30.0/3600;\n",
- "\n",
- "#calculation\n",
- "accn = time *9.8565/3600; # acceleration\n",
- "stime = time + accn ; # sidereal time\n",
- "stime=deg_to_dms(stime);\n",
- "\n",
- "#result\n",
- "print \"sidereal time in hours,minute,second respectively\",stime"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[4, 21, 12.79] sidereal time in hours,minute,second respectively\n"
- ]
- }
- ],
- "prompt_number": 30
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.26,Page 71"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "stime =8+40.0/60+50.0/3600;\n",
- "\n",
- "#calcculation\n",
- "accn =-time *9.8565/3600; # acceleration\n",
- "mtime = stime + accn ; # mean time\n",
- "mtime=deg_to_dms(mtime);\n",
- "\n",
- "#result\n",
- "print \"mean time in hours,minute,second respectively\",mtime"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[8, 40, 7.21] mean time in hours,minute,second respectively\n"
- ]
- }
- ],
- "prompt_number": 32
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 1.27,Page 72"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "longP = -160 -30.0/60 -30.0/3600; # longitude of the place\n",
- "GST =16+30.0/60+12.0/3600; # standard time\n",
- "\n",
- "#calculation\n",
- "dot = longP /15; # difference in time\n",
- "i= dot *9.8565/3600; # error\n",
- "LST =GST -i;\n",
- "LST=deg_to_dms(LST);\n",
- "\n",
- "#result\n",
- "print \"LST of LMM in hours,minute,second respectively\",LST\n",
- "\n",
- "#part 2\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "longP = 160 +30.0/60 +30.0/3600; # longitude of the place\n",
- "GST =16+30.0/60+12.0/3600; # standard time\n",
- "\n",
- "#calculation\n",
- "dot = longP /15; # difference in time\n",
- "i= dot *9.8565/3600; # error\n",
- "LST =GST -i;\n",
- "LST=deg_to_dms(LST);\n",
- "\n",
- "#result\n",
- "print \"LST of LMM in hours,minute,second respectively\",LST\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[16, 31, 57.47] LST of LMM in hours,minute,second respectively\n",
- "[16, 28, 26.53] LST of LMM in hours,minute,second respectively\n"
- ]
- }
- ],
- "prompt_number": 34
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.28,Page 73"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "longP =85+20.0/60; # longitude of the place\n",
- "GST =6+30.0/60; # standard time\n",
- "GMN =6+32.0/60+12.0/3600;\n",
- "\n",
- "#calculation\n",
- "dot = longP /15; # difference in time\n",
- "i= dot *9.8565/3600; # error\n",
- "LST =GMN -i; #LST at L .M.N\n",
- "i2=GST *9.8565/3600; # error in GST\n",
- "LST2 =GST+i2;\n",
- "LST = LST + LST2 # lst at L .M.N\n",
- "LST=deg_to_dms(LST);\n",
- "\n",
- "#result\n",
- "print \"LST in hours,minute,second respectively\",LST"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[13, 2, 19.99] LST in hours,minute,second respectively\n"
- ]
- }
- ],
- "prompt_number": 38
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.29,Page 75"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "longP =112+20.0/60+15.0/3600; # longitude of the place\n",
- "GST =8+10.0/60+28.0/3600; #GST at GMM\n",
- "lst =18+28.0/60+12.0/3600; \n",
- "\n",
- "#calculation\n",
- "dot = longP /15; \n",
- "i= dot *9.8565/3600; # error\n",
- "LST = GST +i; #LST at L .M.N\n",
- "LMM =lst -LST;\n",
- "i2=LMM *9.8565/3600; # error in LMM\n",
- "LMT =LMM -i2; # local mean time\n",
- "LMT=deg_to_dms(LMT);\n",
- "\n",
- "#result\n",
- "print \"LMT in hours,minute,second respectively\",LMT"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[10, 14, 48.91] LMT in hours,minute,second respectively\n"
- ]
- }
- ],
- "prompt_number": 40
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.30,Page 76"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "longP =85+20.0/60; # longitude of the place\n",
- "GST =18+30.0/60; # standard time\n",
- "gst =6+32.0/60+12.0/3600; #GST at GMN\n",
- "\n",
- "#calculation\n",
- "dot = longP /15; \n",
- "GMT =GST -dot -12;\n",
- "i= GMT *9.8565/3600; # error\n",
- "GMT = GMT +i; # SI time\n",
- "LST = GMT +dot+ gst ; #LST at LMT\n",
- "LST=deg_to_dms(LST);\n",
- "\n",
- "#result\n",
- "print \"LST in hours,minute,second respectively\",LST"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[13, 2, 19.99] LST in hours,minute,second respectively\n"
- ]
- }
- ],
- "prompt_number": 42
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.31,Page 78"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "longP =112+20.0/60+15.0/3600; # longitude of the place\n",
- "GST =8+10.0/60+28.0/3600; #GST at GMM\n",
- "lst =18+28.0/60+12.0/3600; # local sidereal time\n",
- "\n",
- "#clculation\n",
- "dot = longP /15; \n",
- "gmm = lst +dot - GST ; # SI at GMM\n",
- "i= gmm *9.8565/3600; # error\n",
- "gmm =gmm -i; #LST at L .M.N\n",
- "LMT =gmm -dot; # local mean time\n",
- "LMT=deg_to_dms(LMT);\n",
- "\n",
- "#result\n",
- "print \"LMT in hours,minute,second respectively\",LMT\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[10, 14, 48.7] LMT in hours,minute,second respectively\n"
- ]
- }
- ],
- "prompt_number": 44
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.32,Page 79"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#part 1\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "longP =162+30.0/60+15.0/3600; # longitude of the place\n",
- "GST =10+30.0/60+15.0/3600; #GST at GMM\n",
- "RA =22+11.0/60+30.0/3600; # local sidereal time\n",
- "\n",
- "#calculation\n",
- "dot = longP /15; \n",
- "i= dot *9.8565/3600; # e r r o r\n",
- "gmm = GST +i; #LST at L .M.N\n",
- "lmn =RA -gmm; # SI o f LMN\n",
- "i2=lmn *9.8565/3600; # error 2\n",
- "LMT =lmn -i2;\n",
- "LMT1=deg_to_dms(LMT);\n",
- "\n",
- "#result\n",
- "print \"LMT observed at upper transit in hours,minute,second respectively\",LMT1\n",
- "\n",
- "#part 2\n",
- "#initialisation of variable\n",
- "i3 =12*9.8565/3600; # retardation\n",
- "\n",
- "#calculation\n",
- "LMT = LMT +12 - i3;\n",
- "LMT=deg_to_dms(LMT);\n",
- "\n",
- "#result\n",
- "print \"LMT observed at lower transit in hours,minute,second respectively\",LMT"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "LMT observed at upper transit in hours,minute,second respectively [11, 37, 33.31]\n",
- "LMT observed at lower transit in hours,minute,second respectively [23, 35, 35.04]\n"
- ]
- }
- ],
- "prompt_number": 16
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.33,Page 80"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "longP =60+30.0/60; # longitude of the place\n",
- "GST =7+30.0/60+48.6/3600; #GST at GMM\n",
- "RA =17+28.0/60 +40.0/1600;\n",
- "\n",
- "#calculation\n",
- "dot = longP /15; \n",
- "i= dot *9.8565/3600; # error\n",
- "gmm =GST -i; #LST at L .M.N\n",
- "LMT =RA -gmm; # local mean time\n",
- "i2=LMT*9.8296/3600;\n",
- "GMT=LMT-i2-longP/15;\n",
- "LMT=deg_to_dms(LMT);\n",
- "GMT=deg_to_dms(GMT);\n",
- "\n",
- "#result\n",
- "print \"LMT in hours,minute,second respectively\",LMT\n",
- "print \"GMT in hours,minute,second respectively\",GMT"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "LMT in hours,minute,second respectively [9, 59, 21.15]\n",
- "GMT in hours,minute,second respectively [5, 55, 42.96]\n"
- ]
- }
- ],
- "prompt_number": 42
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.34,Page 82"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "GMT=13+21.0/60+54.0/3600; #GMT of the place\n",
- "LongA=40+30.0/60; #longitude of A\n",
- "LongB=-40-30.0/60; #longitude of B\n",
- "\n",
- "#calculation\n",
- "delA=LongA/15.0*9.8296/3600;#error\n",
- "delB=LongB/15.0*9.8296/3600;#error\n",
- "GA=GMT+delA;\n",
- "GA=deg_to_dms(GA);\n",
- "GB=GMT+delB;\n",
- "GB=deg_to_dms(GB);\n",
- "\n",
- "#result\n",
- "print \"corected time of A in hours,minute,second respectively\",GA\n",
- "print \"corected time of B in hours,minute,second respectively\",GB"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "corected time of A in hours,minute,second respectively [13, 22, 20.54]\n",
- "corected time of B in hours,minute,second respectively [13, 21, 27.46]\n"
- ]
- }
- ],
- "prompt_number": 17
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.35,Page 83"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "GMT=7+12.0/60+28.0/3600; #GMT of the place\n",
- "Long=50+30.0/60; #longitude \n",
- "LMT=11+30.0/60+12.0/3600; \n",
- "\n",
- "#calculation\n",
- "delA=LongA/15.0*9.8296/3600;#error\n",
- "delB=LMT*9.8296/3600;#error\n",
- "LA=GMT+delA; #LMT at transit\n",
- "LMT=LMT-delB;\n",
- "LMT=LMT+LA;\n",
- "LMT=deg_to_dms(LMT);\n",
- "\n",
- "#result\n",
- "print \"LMT in hours,minute,second respectively\",LMT"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "LMT in hours,minute,second respectively [18, 41, 13.47]\n"
- ]
- }
- ],
- "prompt_number": 41
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.36,Page 84"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "GST=8+25.0/60+25.0/3600;\n",
- "\n",
- "#calculation\n",
- "GMT=24-GST;\n",
- "i=GMT*9.8296/3600;\n",
- "GMT=GMT-i;\n",
- "GMT=deg_to_dms(GMT);\n",
- "\n",
- "#result\n",
- "print \"GMT in hours,minute,second respectively\",GMT"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "GMT in hours,minute,second respectively [15, 32, 1.89]\n"
- ]
- }
- ],
- "prompt_number": 43
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.37,Page 85"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "GMT=12+03.0/60+46.09/3600; #GMT of the place\n",
- "LongA=-130.0; #longitude of A\n",
- "LongB=49.0; #longitude of B\n",
- "\n",
- "#calculation\n",
- "delA=LongA/15.0*11.71/24/3600;\n",
- "delB=LongB/15.0*11.71/24/3600;\n",
- "LMTA=GMT+delA;\n",
- "LMTA=deg_to_dms(LMTA);\n",
- "LMTB=GMT+delB;\n",
- "LMTB=deg_to_dms(LMTB);\n",
- "\n",
- "#result\n",
- "print \"LMT at A on July 2 in hours,minute,second respectively\",LMTA\n",
- "print \"LMT at B on July 2 in hours,minute,second respectively\",LMTB"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[12, 3, 41.86] LMT at A in hours,minute,second respectively\n",
- "[12, 3, 47.68] LMT at B in hours,minute,second respectively\n"
- ]
- }
- ],
- "prompt_number": 17
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.38,Page 86"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "Lat=50+30.0/60; # latitude of place\n",
- "Dec=74+22/60; #declination of place\n",
- "RA=14+50.0/60+52.0/3600;\n",
- "\n",
- "#calculation\n",
- "H=acos(tan(Lat*pi/180)/tan(Dec*pi/180));\n",
- "H=H*180/pi;\n",
- "H=H/15.0;\n",
- "LST=H+RA;\n",
- "LST=deg_to_dms(LST);\n",
- "\n",
- "#result \n",
- "print \"LST in hours,minute,second respectively\",LST"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[19, 29, 26.59] LST in hours,minute,second respectively\n"
- ]
- }
- ],
- "prompt_number": 20
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.39,Page 87"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "Long=120+30.0/60; #langitude\n",
- "GST=14+30.0/60+28.25/3600;\n",
- "GMT=2+5.0/60;\n",
- "LMN=12.0;\n",
- "LST=14+31.0/60+47.43/3600;\n",
- "RA=23+20.0/60+20.0/3600;\n",
- "\n",
- "#calculation\n",
- "e1=Long*15.0*9.8565/3600;\n",
- "GST=GST+e1;\n",
- "LMT=GMT+24-8-2.0/60;\n",
- "LMM=LMN+24-LMT; #mean LMN\n",
- "e2=LMM*9.8565/3600;\n",
- "LMM=LMM+e2;\n",
- "LST=LST+24-LMM;\n",
- "HA=LST-RA+24;\n",
- "HA=deg_to_dms(HA);\n",
- "\n",
- "#result\n",
- "print \"HA in hours,minutes,seconds respectively\",HA"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[21, 11, 30.51] HA in hours,minutes,seconds respectively\n"
- ]
- }
- ],
- "prompt_number": 21
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.40,Page 86"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "Long=75+28.0/60; #langitude\n",
- "LMT=5+30.0/60;\n",
- "GST=20+15.0/60+32.58/3600;\n",
- "\n",
- "#calculation\n",
- "e1=Long/15.0*9.8565/3600;\n",
- "GST=GST+e1;\n",
- "e2=LMT*9.8565/3600;\n",
- "LMT=LMT+e2;\n",
- "HA=GST+LMT;\n",
- "HAMS=HA-LMT-12+e2;\n",
- "HA=deg_to_dms(HA);\n",
- "HAMS=deg_to_dms(HAMS);\n",
- "\n",
- "#result\n",
- "print \"HA in hours,minutes,seconds respectively\",HA\n",
- "print \"HAMS in hours,minutes,seconds respectively\",HAMS\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "HA in hours,minutes,seconds respectively [25, 47, 16.38]\n",
- "HAMS in hours,minutes,seconds respectively [8, 17, 16.38]\n"
- ]
- }
- ],
- "prompt_number": 40
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.41,Page 90"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "Long=45.0; #langitude\n",
- "del1=1067.2/3600;\n",
- "del2=1083.9/3600;\n",
- "del3=1100.3/3600;\n",
- "f0=-16-14.0/60-24.0/3600;\n",
- "\n",
- "#calculation\n",
- "n=(10-Long/15)/24.0;\n",
- "Del0=del2-del1;\n",
- "Del1=del3-del2;\n",
- "fn=-f0+n*del2+n*(n-1)/4*(Del0+Del1)\n",
- "fn=deg_to_dms(fn);\n",
- "\n",
- "#result\n",
- "print \"sun's declination in hours,minutes,seconds respectively\",fn"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "sun's declination in hours,minutes,seconds respectively [16, 19, 38.43]\n"
- ]
- }
- ],
- "prompt_number": 39
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.42,Page 101"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "aziA =32+41.0/60+30.0/3600; # azimuth o f A\n",
- "aziB =110+28.0/60+42.0/3600; # azimuth o f B\n",
- "vaA =10+21.0/60+12.0/3600; # vertical angle of A\n",
- "vaB = -2 -18.0/60 -30.0/3600; # vertical angle o f B\n",
- "lA1 =11;\n",
- "lB1 =11.5;\n",
- "rA1 =7.5;\n",
- "rB1 =7;\n",
- "lB2 =10;\n",
- "lA2 =10.5;\n",
- "rB2 =7.5;\n",
- "rA2 =8;\n",
- "d =20;\n",
- "# partA\n",
- "#calculation\n",
- "sigl =lA1+ lA2 ;\n",
- "sigr =rA1+ rA2 ;\n",
- "b= sigl /4*d- sigr /4*d;\n",
- "i= tan( vaA );\n",
- "caziA = aziA +i *29.95/3600;\n",
- "caziA1=deg_to_dms(caziA);\n",
- "\n",
- "#result\n",
- "print \"corrected azimuth of A in (degrees,minutes,seconds)\",caziA1\n",
- "\n",
- "#part2 \n",
- "#calculation\n",
- "i= tan( vaB );\n",
- "caziB = aziB +i*b /3600;\n",
- "ha=caziB - caziA;\n",
- "caziB=deg_to_dms(caziB);\n",
- "ha=deg_to_dms(ha);\n",
- "\n",
- "#result\n",
- "print \"corrected azimuth of B in (degrees,minutes,seconds)\",caziB\n",
- "print \"horizontal difference of angle between A & B in (degrees,minutes,seconds)\",ha\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "corrected azimuth of A in (degrees,minutes,seconds) [32, 42, 10.04]\n",
- "corrected azimuth of B in (degrees,minutes,seconds) [110, 29, 15.02]\n",
- "horizontal difference of angle between A & B in (degrees,minutes,seconds) [77, 47, 4.98]\n"
- ]
- }
- ],
- "prompt_number": 38
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.43,Page 102"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "v1 =18+36.0/60+48.0/3600; # vertical angle 1\n",
- "v2 =18+35.0/60+56.0/3600; # vertical angle 2\n",
- "slm =28+36.0/60+20.0/3600; # altitude of sun measured\n",
- "ds =15.0/60+59.35/3600; # dia of sun\n",
- "\n",
- "#calculation\n",
- "mv =( v1+v2) /2; #mean vertical angle\n",
- "i=v1 -v2; # error\n",
- "sl=slm+i; #new altitude of sun\n",
- "sl=sl+ds;\n",
- "ir = -57.0/3600/( tan( slm *pi /180+26* pi /180/3600) );#error due to refraction\n",
- "sl=sl+ir;\n",
- "ip =8.8/3600* cos( slm *pi /180+26* pi /180/3600);# error due to parallex\n",
- "sl=sl+ip;\n",
- "sl=deg_to_dms(sl);\n",
- "\n",
- "#result\n",
- "print \"corrected altitude in (deg,min,sec) respectively\",sl"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[28, 51, 34.59] corrected altitude in (deg,min,sec) respectively\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.44,Page 115"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "long =4+30.0/60;\n",
- "i= long *9.8565/3600; # longitude\n",
- "gst =14+38.0/60+12.0/3600; #GST on GMM\n",
- "lst =gst -i; #LST on LMM\n",
- "RA =7+36.0/60+21.24/3600;\n",
- "\n",
- "#calculation\n",
- "LST =RA;\n",
- "SI=LST - lst +24;\n",
- "LCT =17+56.0/60+8.86/3600 -1; # local chronometer time\n",
- "i2=SI *9.8296/3600;\n",
- "LMM =SI -i2;\n",
- "ce=LCT - LMM ;\n",
- "\n",
- "#result\n",
- "print \" chronometer error in (s)\",round(ce *3600,2)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "2.19 chronometer error in (s)\n"
- ]
- }
- ],
- "prompt_number": 17
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Exampe 1.45,Page 116"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "c =90 -36 -30.0/60 -30.0/3600; # co latitude\n",
- "p =90 -16 -12.0/60 -18.4/3600; # co declination\n",
- "z =90 -30 -12.0/60 -30.0/3600; # co altitude\n",
- "s=(p+z+c) /2;\n",
- "\n",
- "#calculation\n",
- "s1=s-c;\n",
- "s2=s-p;\n",
- "s3=s-z;\n",
- "H =2* atan ( sqrt (sin(s1*pi /180) * sin (s2*pi /180) / sin (s*pi/180) / sin (s3*pi /180) ));\n",
- "H=H *180/ pi;\n",
- "H=24 -H /15;\n",
- "LST =H +5+18.0/60+12.45/3600 -24;\n",
- "ce =1+2.0/60+5.25/3600 - LST ;\n",
- "\n",
- "#result\n",
- "print \" chronometer error in (s)\",round (ce *3600+2,2)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "19.34 chronometer error in (s)\n"
- ]
- }
- ],
- "prompt_number": 21
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 1.46,Page 118"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "c =90 -36 -40.0/60 -30.0/3600; # co latitude\n",
- "p =90 -17 -26.0/60 -42.1/3600; # co declination\n",
- "z =90 -36 -14.0/60 -16.8/3600; # co altitude\n",
- "\n",
- "#calculation\n",
- "s=(p+z+c) /2;\n",
- "s1=s-c;\n",
- "s2=s-p;\n",
- "s3=s-z;\n",
- "H =2* atan ( sqrt (sin(s1*pi /180) * sin (s2*pi /180) / sin(s*pi/180) / sin (s3*pi /180) ));\n",
- "H=H *180/ pi;\n",
- "H=H /15;\n",
- "i =12 -11 -56.0/60 -22.8/3600; # error in time\n",
- "LAT =15+49.0/60+40.6/3600; # local actual time\n",
- "GAT =LAT -H;\n",
- "GMT =GAT -i;\n",
- "LMT = GMT +H;\n",
- "ce =15+49.0/60+12.6/3600 - LMT;\n",
- "ce=deg_to_dms(ce)\n",
- "\n",
- "#result\n",
- "print \" chronometer error in (s)\",ce"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " chronometer error in (s) [0, 3, 9.2]\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.47,Page 119"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "RA =17+12.0/60+48.0/3600;\n",
- "gst =9+26.0/60+12.0/3600; #GST on GMN\n",
- "long =138.0/15+45.0/15/60; # l o n g i t u d e\n",
- "lst =- long *9.85645/3600+9+26.0/60+12.0/3600; #LST on LMN\n",
- "LST =17+12.0/60+48.0/3600; # local sidereal time\n",
- "\n",
- "#calculation\n",
- "SI=LST - lst ;\n",
- "MI=-SI *9.8296/3600+ SI;\n",
- "LCT =7+47.0/60+2.0/3600; # local chronometer time\n",
- "ce=LCT -MI;\n",
- "\n",
- "#result\n",
- "print \" chronometer error in (s)\",round(ce *3600,2) "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " chronometer error in (s) 11.52\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.48,Page 145"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#part 1\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan,asin\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "theta =54+30.0/60; # l o g i t u d e\n",
- "delta =62+12.0/60+21.0/3600; # d e c l i n a t i o n\n",
- "\n",
- "#calculation\n",
- "lat = asin (sin( theta *pi /180) /sin( delta *pi /180) );\n",
- "lat = lat *180/ pi;\n",
- "lat=deg_to_dms(lat);\n",
- "\n",
- "#result\n",
- "print \"Latitude in (deg,min,sec)\",lat;\n",
- "\n",
- "#part 2\n",
- "#initialisation of variable\n",
- "A =53+25.0/60; # azimuth of star\n",
- "h =65+18.0/60+42.0/3600; # horizontal angle\n",
- "\n",
- "#calculation\n",
- "A=A+h;\n",
- "A=360-A;\n",
- "A=deg_to_dms(A);\n",
- "\n",
- "#result\n",
- "print \"Azimuth in (deg,min,sec)\",A;\n",
- "\n",
- "#part 3 \n",
- "#initialisation of variable\n",
- "lst =4+39.0/60+6.5/3600; #LST o f LMN\n",
- "LST =10+58.0/60+38.0/3600+2+49.0/60+25.3/3600; #LST of observation\n",
- "\n",
- "#calculation\n",
- "LMN =LST -lst;\n",
- "i= LMN *9.8565/3600; # e r r o r\n",
- "LMT =LMN -i;\n",
- "LMT=deg_to_dms(LMT)\n",
- "\n",
- "#results\n",
- "print \"LMT in (hr,min,sec)\",LMT;"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[66, 58, 7.13] Latitude in (deg,min,sec)\n",
- "[241, 16, 18.0] Azimuth in (deg,min,sec)\n",
- "[9, 7, 26.62] LMT in (hr,min,sec)\n"
- ]
- }
- ],
- "prompt_number": 34
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.49,Page 148"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#part 1\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan,asin\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "theta =53+32.0/60; # logitude\n",
- "delta =56+42.0/60+53.2/3600; # declination\n",
- "lat = asin (sin ( theta *pi /180) /sin( delta *pi /180) );\n",
- "lat = lat *180/ pi;\n",
- "lat=deg_to_dms(lat);\n",
- "\n",
- "#result\n",
- "print \"Latitude in (deg,min,sec)\",lat;\n",
- "\n",
- "#part 2\n",
- "#initialisation of variable\n",
- "As= asin ( cos ( delta *pi /180) /cos ( theta *pi /180) ); #azimuth of star\n",
- "h =75+18.0/60+20.0/3600; # angle between line and star\n",
- "\n",
- "#calculation\n",
- "A=h-As *180/ pi;\n",
- "A=360 -A;\n",
- "A=deg_to_dms(A);\n",
- "\n",
- "#result\n",
- "print \"Azimuth in (deg,min,sec)\",A;\n",
- "\n",
- "#part 3\n",
- "#initialisation of variable\n",
- "LST =10+58.0/60+3.9/3600+22+10.0/60+38.5/3600 -24; #LST of observation\n",
- "long =5+40.0/60+18.0/3600; # longitude\n",
- "\n",
- "#calculation\n",
- "i= long *9.8565/3600; # error\n",
- "lst =4+58.0/60+23.84/3600+ i; #LST on LMN\n",
- "LMM =LST -lst;\n",
- "i2=LMM *9.8565/3600; # error in LMM\n",
- "LMT =LMM -i2;\n",
- "LMT=deg_to_dms(LMT)\n",
- "\n",
- "#results\n",
- "print \"LMT in (hr,min,sec)\",LMT;\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Latitude in (deg,min,sec) [74, 9, 33.08]\n",
- "Azimuth in (deg,min,sec) [352, 7, 3.66]\n",
- "LMT in (hr,min,sec) [4, 8, 41.69]\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.50,Page 151"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan,asin\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "Long =(15.0+30.0/60); \n",
- "GMT =19+12.0/60+28.6/3600;\n",
- "GST=10+12.0/60+36.2/3600;\n",
- "RA=10 +12.0/60 +6.3/3600;\n",
- "theta=35.0;\n",
- "delta=20+6.0/60+48.4/3600;\n",
- "\n",
- "#calculation\n",
- "i= Long/15.0 *9.8656/3600; \n",
- "LSTofLMM=GST-i;\n",
- "LMT = GMT + Long/15.0 ;\n",
- "i2=LMT *9.8656/3600; # error in LMT\n",
- "SI = LMT +i2;\n",
- "LST =LSTofLMM+ SI ;\n",
- "H=LST-RA ; # hour angle\n",
- "H=H *15;\n",
- "H=360 -H;\n",
- "B=atan(tan(delta*pi/180)/cos(H*pi/180));\n",
- "B=B*180/pi;\n",
- "x=B-theta; #defined as 'B-theta'\n",
- "As= atan ( tan ((H) *pi /180) * cos((B) *pi /180) / sin ((x)*pi /180) );#calculating azimuth \n",
- "h =36+28.0/60+18.0/3600; # angle between line and star\n",
- "A =180+ As *180/ pi -h; #azimuth\n",
- "A=deg_to_dms(A);\n",
- "\n",
- "#result\n",
- "print \"Azimuth in (deg,min,sec)\",A;\n",
- "print \"there is a miscalculation in the step of calculating As thus resulted in change in answer\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Azimuth in (deg,min,sec) [55, 16, 8.27]\n",
- "there is a miscalculation in the step of calculating As thus resulted in change in answer\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.51,Page 153 "
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan,asin\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "alpha =33+35.0/60+10.0/3600; # altitude\n",
- "ZM =90 - alpha ;\n",
- "delta =22+5.0/60+35.0/3600; # declination\n",
- "PM =90 - delta ;\n",
- "theta =52+30.0/60+20.0/3600; # latitude\n",
- "ZP =90 - theta ;\n",
- "\n",
- "#calculation\n",
- "As= acos (( cos (PM*pi /180) -cos(ZP*pi /180) * cos (ZM*pi/180) )/( sin (ZP*pi /180) *sin(ZM*pi /180) ));\n",
- "h =18+20.0/60+30.0/3600; # angle between line and star\n",
- "A=As *180/ pi+h;\n",
- "A=deg_to_dms(A);\n",
- "\n",
- "#result\n",
- "print \"Azimuth in (deg,min,sec)\",A;"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Azimuth in (deg,min,sec) [115, 27, 19.68]\n"
- ]
- }
- ],
- "prompt_number": 35
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.52,Page 154"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#part 1\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan,asin\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "GAT =5+17.0/60+6.0/60; #GAT \n",
- "delta =17+46.0/60+52.0/3600; # declination\n",
- "\n",
- "#calculation\n",
- "i =37.0/3600* GAT ;\n",
- "delta =delta -i;\n",
- "delta1=deg_to_dms(delta);\n",
- "\n",
- "#result\n",
- "print \"Declination in (deg,min,sec)\",delta1;\n",
- "\n",
- "#part 2\n",
- "#initialisation of variable\n",
- "p=90 - delta ; # co declination\n",
- "altitude =23+15.0/60+20.0/3600; # altitude of sun\n",
- "i2 =2.0/60+12.0/3600; # error due to refraction\n",
- "i3 =8.0/3600; # error due to parallax\n",
- "\n",
- "#calculation\n",
- "altitude = altitude -i2+i3;\n",
- "c =90 -55 -46.0/60 -12.0/3600; # colatitude\n",
- "z=90 - altitude ; # co altitude\n",
- "s=(p+z+c) /2;\n",
- "s1=s-c;\n",
- "s2=s-p;\n",
- "s3=s-z;\n",
- "A =2* atan ( sqrt (sin(s3*pi /180) * sin (s1*pi /180) / sin (s*pi/180) / sin (s2*pi /180) ));\n",
- "A=A *180/ pi;\n",
- "A=deg_to_dms(A);\n",
- "\n",
- "#result\n",
- "print \"Altitude in (deg,min,sec)\",A;"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Declination in (deg,min,sec) [17, 43, 32.82]\n",
- "Altitude in (deg,min,sec) [92, 23, 10.67]\n"
- ]
- }
- ],
- "prompt_number": 34
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.53,Page 156"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan,asin\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "GMT =17+5.0/60+2.0/3600; \n",
- "i =9.8565/3600* GMT;\n",
- "GST =3+12.0/60+12.0/3600;\n",
- "wl =1+18.0/60; # west longitude\n",
- "RA =16+23.0/60+30.0/3600;\n",
- "\n",
- "#calculation\n",
- "H= GMT +i+ GST +wl -RA; # hour angle\n",
- "H=H *15;\n",
- "p =90 -29 -52.0/60;\n",
- "c =90 -52 -8.0/60;\n",
- "z= acos ( cos (H*pi /180) * sin (p*pi /180) *sin(c*pi /180) + cos(p*pi /180) * cos (c*pi /180) );\n",
- "A= asin ( sin (p*pi /180) * sin (H*pi /180) /sin(z));\n",
- "A=A *180/ pi\n",
- "A=deg_to_dms(A);\n",
- "\n",
- "#result\n",
- "print \"Azimuth in (deg,min,sec)\",A;"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Azimuth in (deg,min,sec) [78, 38, 33.24]\n"
- ]
- }
- ],
- "prompt_number": 33
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.54,Page 157"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan,asin\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "c2 =24+30.0/60+20.0/3600;\n",
- "d2 =24+30.0/60+40.0/3600;\n",
- "c3 =25;\n",
- "d3 =25+1.0/60;\n",
- "\n",
- "#calculation\n",
- "alt =( c2+c3+d3+d2)/4;#mean observed altitude\n",
- "il =(10.6 -9.4) /4*15.0/3600; # error \n",
- "alt = alt +il;\n",
- "ir = -57.0/3600/ tan (( alt *pi /180) ); # correction of refraction\n",
- "ip =8.0/3600* cos (alt*pi /180) ; # correction of parallax\n",
- "alt =alt -ir+ip;#altitude corrected\n",
- "z=90 - alt;#ZM\n",
- "delta =1+32.0/60+16.8/3600 -56.2/3600*(3.0/60+1.86/3600) ;#declination of sun\n",
- "p=90 - delta ;#PM\n",
- "c =90 -36 -48.0/60 -30.0/3600;#ZP\n",
- "s=(p+z+c) /2;\n",
- "s1=s-c;\n",
- "s2=s-p;\n",
- "s3=s-z;\n",
- "A =2* atan ( sqrt (sin(s3*pi /180) * sin (s1*pi /180) / sin (s*pi/180) / sin (s2*pi /180) ));#azimuth calculation\n",
- "A=A *180/ pi;\n",
- "A=A +81+59.0/60+10.0/3600;\n",
- "A=360 -A;\n",
- "A=deg_to_dms(A);\n",
- "\n",
- "#result\n",
- "print \"Azimuth in (deg,min,sec)\",A;\n",
- "print \"there is a miscalculation in the step of calculating Azimuth and error due to refrection thus resulted in change in answer\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Azimuth in (deg,min,sec) [170, 1, 36.93]\n",
- "there is a miscalculation in the step of calculating Azimuth and error due to refrection thus resulted in change in answer\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.55,Page 178"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan,asin\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "alpha =65+40.0/60+18.0/3600; # altitude\n",
- "delta =53+12.0/60+10.0/3600; # declination\n",
- "\n",
- "#calculation\n",
- "i =57.0/3600*1/ tan ( alpha *pi /180) ; \n",
- "alpha =alpha -i;\n",
- "z=90 - alpha ; # zenith distance\n",
- "lat =delta -z;\n",
- "lat=deg_to_dms(lat);\n",
- "\n",
- "#result\n",
- "print \"Latitude in (deg,min,sec)\",lat"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[28, 52, 2.23] Latitude in (deg,min,sec)\n"
- ]
- }
- ],
- "prompt_number": 58
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.56,Page 178"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan,asin\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "alpha =64+36.0/60+20.0/3600; # altitude\n",
- "delta =26+12.0/60+10.0/3600; # declination\n",
- "\n",
- "#calculation\n",
- "i =57.0/3600*1/ tan ( alpha *pi /180) ; # error\n",
- "alpha =alpha -i;\n",
- "z=90 - alpha ; # zenith distance\n",
- "lat = delta +z;\n",
- "lat=deg_to_dms(lat);\n",
- "\n",
- "#result\n",
- "print \"Latitude in (deg,min,sec)\",lat"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Latitude in (deg,min,sec) [51, 36, 17.06]\n"
- ]
- }
- ],
- "prompt_number": 31
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.57,Page 178"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan,asin\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "alpha =44+12.0/60+30.0/3600; # altitude\n",
- "longP =75+20.0/60+15.0/3600; # longitude of place\n",
- "delta =22+18.0/60+12.8/3600; # declination of sun\n",
- "\n",
- "#calculation\n",
- "i =57.0/3600*1/ tan ( alpha *pi /180) ; # error\n",
- "i2 =8.78/3600* cos( alpha ); #error due to parallax\n",
- "i3 =15.0/60+45.86/3600; #error due to semi diameter\n",
- "alpha =alpha -i+i2+i3;\n",
- "z=90 - alpha ; # zenith distance\n",
- "delT = longP /15;\n",
- "i4 =6.82/3600* delT ; # error in time\n",
- "delta =i4+ delta ;\n",
- "lat = delta +z;\n",
- "lat=deg_to_dms(lat);\n",
- "\n",
- "#result\n",
- "print \"Latitude in (deg,min,sec)\",lat"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[67, 51, 21.23] Latitude in (deg,min,sec)\n"
- ]
- }
- ],
- "prompt_number": 62
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.58,Page 180"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#for alpha 1\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan,asin\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "theta =80;\n",
- "delta =46+45.0/60+30.0/3600;\n",
- "\n",
- "#calculation\n",
- "alpha1 =90 - theta + delta ;\n",
- "alpha1=deg_to_dms(alpha1);\n",
- "\n",
- "#result\n",
- "print \"alpha1 to the north in (deg,min,sec)\",alpha1\n",
- "\n",
- "#for alpha2\n",
- "#calculation\n",
- "alpha2 = theta +delta -90;\n",
- "alpha2=deg_to_dms(alpha2)\n",
- "\n",
- "#result\n",
- "print \"alpha2 to the south(deg,min,sec)\",alpha2"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[56, 45, 30.0] alpha1 to the north in (deg,min,sec)\n",
- "[36, 45, 30.0] lpha1 to the south(deg,min,sec)\n"
- ]
- }
- ],
- "prompt_number": 69
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.59,Page 181"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan,asin\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "delta1 =20+25.0/60+48.0/3600; # declination of star 1\n",
- "delta2 =79+30.0/60+52.0/3600; # declination of star 2\n",
- "alpha1 =48+18.0/60+12.0/3600; #altitude of star 1\n",
- "alpha2 =47+54.0/60+6.0/3600; #altitude of star 2\n",
- "\n",
- "#calculation\n",
- "r1 =58.0/3600/ tan( alpha1 *pi /180) # error 1\n",
- "r2 =58.0/3600/ tan( alpha2 *pi /180) # error 2\n",
- "lat =90 -( alpha1 - alpha2 ) /2+( delta1 - delta2 ) /2+( r1 -r2)/2;\n",
- "lat=deg_to_dms(lat);\n",
- "\n",
- "#result\n",
- "print \"Latitude in (deg,min,sec)\",lat;\n",
- "print \" there is a miscalculation in the step of calculating (delta1-delta2)/2 so there is a difference in the answer\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Latitude in (deg,min,sec) [60, 15, 24.63]\n",
- " there is a miscalculation in the step of calculating (delta1-delta2)/2 so there is a difference in the answer\n"
- ]
- }
- ],
- "prompt_number": 8
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.60,Page 182"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan,asin\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "alphal =18+36.0/60+40.0/3600; #altitude at lower culmination\n",
- "alphau =59+48.0/60+20.0/3600; #altitude at upper culmination\n",
- "lat =( alphal + alphau )/2;\n",
- "lat1=deg_to_dms(lat);\n",
- "delta =90+ lat - alphau ;\n",
- "delta1=deg_to_dms(delta);\n",
- "\n",
- "\n",
- "#result\n",
- "print \"Latitude in (deg,min,sec)\",lat1;\n",
- "print \"Declination of star in (deg,min,sec)\",delta1"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[39, 12, 30.0] Latitude of star in (deg,min,sec)\n",
- "[69, 24, 10.0] Declination of star in (deg,min,sec)\n"
- ]
- }
- ],
- "prompt_number": 74
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.61,Page 183"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan,asin\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "alpha =40+36.0/60+30.0/3600; # altitude of star\n",
- "delta =10+36.0/60+40.0/3600; # declination of star\n",
- "H =46+36.0/60+20.0/3600; # hour angle of star\n",
- "\n",
- "#calculation\n",
- "n= atan ( tan ( delta *pi /180) /cos(H*pi /180) );\n",
- "lat =n+ acos ( sin ( alpha *pi /180) *sin(n)/ sin ( delta *pi/180) );\n",
- "lat = lat *180/ pi;\n",
- "lat=deg_to_dms(lat);\n",
- "\n",
- "#result\n",
- "print \"Latitude in (deg,min,sec)\",lat;"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[36, 49, 43.99] Latitude in (deg,min,sec)\n"
- ]
- }
- ],
- "prompt_number": 75
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.62,Page 183"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan,asin\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "alpha =42+10.0/60+40.0/3600; # altitude o f sun\n",
- "delta =23+12.0/60+18.6/3600; # declination of sun ' s angle\n",
- "LMT =14+50.0/60;\n",
- "\n",
- "#calculation\n",
- "i =57.0/3600*1/ tan ( alpha *pi /180) ; # error\n",
- "i2 =8.78/3600* cos( alpha ); # correction due to parallax\n",
- "i3 =15.0/60+45.86/3600; # coreection due to semi diamter\n",
- "longP =108+30.0/60; # longitude of place\n",
- "alpha =alpha -i+i2+i3;\n",
- "delT = longP /15; # change in time\n",
- "GMT = LMT + delT ;\n",
- "i4 =1.2/3600* GMT; # error in time\n",
- "H=( GMT -12+ i4 - delT ) *15; # hour angle\n",
- "i5 =10.6/3600* GMT; # error in declination\n",
- "delta = delta +i5;\n",
- "ZM =(90 - alpha )*pi /180;\n",
- "PM =(90+ delta )*pi /180;\n",
- "A= asin ( sin (PM)/sin(ZM)* sin (H*pi /180) );\n",
- "A=pi -A;\n",
- "ZP =2* atan ( sin (A/2+ H*pi /360) / sin (A/2-H*pi /360) *tan(PM/2- ZM /2) );\n",
- "lat =pi /2- ZP;\n",
- "lat = lat *180/ pi +1+6.0/60;\n",
- "lat=deg_to_dms(lat);\n",
- "\n",
- "#result\n",
- "print \"Latitude in (deg,min,sec)\",lat;"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[1, 19, 7.46] Latitude in (deg,min,sec)\n"
- ]
- }
- ],
- "prompt_number": 78
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.63,Page 185"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan,asin\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "delta =15+20.0/60+48.0/3600; # declination of star\n",
- "Int =9+22.0/60+6.0/3600; # interval\n",
- "\n",
- "#calculation\n",
- "dint =Int *9.8565/3600; # change in interval\n",
- "H=( Int+ dint ) *15/2; # hour angle\n",
- "lat = atan (tan( delta *pi /180) /cos(H*pi /180) );\n",
- "lat = lat *180/ pi +5.0/6*16.0/3600;\n",
- "lat=deg_to_dms(lat);\n",
- "\n",
- "#result\n",
- "print \"Latitude in (deg,min,sec)\",lat;"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[39, 22, 1.79] Latitude in (deg,min,sec)\n"
- ]
- }
- ],
- "prompt_number": 79
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.64,Page 186"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan,asin\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "RA =1+41.0/60+48.64/3600;\n",
- "lat =48+36.0/60+40/3600; # latitude\n",
- "delta =88+58.0/60+28.26/3600; # declination of polaris\n",
- "GMM =16+48.0/60+20.86/3600;\n",
- "longP =7+20.0/60; # longitude of place P\n",
- "i1 =51.0/3600; # error due to barometer\n",
- "i2 =1.0/3600; # error due to barometer\n",
- "i3 = -1.0/3600; # error due to temp\n",
- "\n",
- "#calculation\n",
- "lat =lat -i1+i2+i3;\n",
- "delT = longP /15;\n",
- "i4= delT *9.8565/3600;\n",
- "lst = GMM +i4;\n",
- "LMT =20+24.0/60+50.0/3600;\n",
- "i6 =9.8565/3600* LMT ; # e r r o r i n LMT\n",
- "LST = LMT +i6+lst -24;\n",
- "H=LST -RA; # hour a n g l e\n",
- "H=H *15;\n",
- "lat =lat -(90 - delta )*cos(H*pi /180) +.5* sin (1/3600* pi/180) *(90 - delta ) **2*( sin (H*pi /180) )**2* tan ( lat *pi/180) ;\n",
- "lat=deg_to_dms(lat);\n",
- "\n",
- "#result\n",
- "print \"Latitude in (deg,min,sec)\",lat;"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[49, 36, 18.45] Latitude in (deg,min,sec)\n"
- ]
- }
- ],
- "prompt_number": 81
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.65,Page 187"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin,cos,acos,atan,asin\n",
- "def deg_to_dms(deg):\n",
- " d = int(deg)\n",
- " md = abs(deg - d) * 60\n",
- " m = int(md)\n",
- " sd = round((md - m) * 60,2)\n",
- " return [d, m, sd]\n",
- "longP =120 -4 -20.0/60; # longitude of point\n",
- "GST =8+30.0/60+20.0/3600; #GST on GMM\n",
- "delta =6+15.0/60+2.0/3600; # deflection\n",
- "alpha =39+20.0/60+30.0/3600; # altitude\n",
- "theta =56+54.0/60+30.0/3600; # longitude\n",
- "\n",
- "#calculation\n",
- "delT = longP /15;\n",
- "i= delT *9.8565/3600; # error in time\n",
- "lst = GST +i; #LST on LMM\n",
- "LST =19+52.0/60+16.0/3600;\n",
- "RA=LST;\n",
- "LMN =LST -lst;\n",
- "i2=LMN *9.8565/3600; # error in LMN\n",
- "LMN =LMN -i2;\n",
- "OSM =10+55.0/60+30.0/3600; #Observed mean time\n",
- "i3 =1.0/60+25.0/3600; # e r r o r i n obs e r v ed t ime\n",
- "OSM =OSM -i3;\n",
- "LMT = OSM +4.0/15+21.0/60.0/15;\n",
- "I=LMN - LMT ; # interval\n",
- "i4 =1.21/3600; # error in interval\n",
- "I=I+i4;\n",
- "H=I; # hour angle\n",
- "B= cos ( delta *pi /180) * cos ( theta *pi /180) / cos ( alpha *pi/180) ;\n",
- "m =225* H **2*3600**2/2.0/206265.0;\n",
- "lat = alpha +m*B /3600;\n",
- "lat =90 - lat +6+15.0/60+2.0/3600;\n",
- "lat=deg_to_dms(lat);\n",
- "\n",
- "#result\n",
- "print \"Latitude in (deg,min,sec)\",lat;"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "[56, 53, 17.77] Latitude in (deg,min,sec)\n"
- ]
- }
- ],
- "prompt_number": 85
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [],
- "language": "python",
- "metadata": {},
- "outputs": []
- }
- ],
- "metadata": {}
- }
- ]
-} \ No newline at end of file
diff --git a/Surveying_Volume_3/Chapter_2.ipynb b/Surveying_Volume_3/Chapter_2.ipynb
deleted file mode 100755
index f9526973..00000000
--- a/Surveying_Volume_3/Chapter_2.ipynb
+++ /dev/null
@@ -1,1006 +0,0 @@
-{
- "metadata": {
- "name": "",
- "signature": "sha256:ca6f7f2cf84d957176ecf14fb0c306b69df620b66b59adb595e323ae5d6031bb"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "PHOTOGRAPHIC SURVEYING"
- ]
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 2.1, Page 215"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "# Initialization of Variable\n",
- "from math import pi\n",
- "from math import atan\n",
- "f =120.80 # focal length\n",
- "a = -35.52 # elevation of A\n",
- "b =8.48 # elevation of B\n",
- "c =48.26 # elevation of C\n",
- "\n",
- "#calculation\n",
- "alphaa = atan (a/f);\n",
- "alphab = atan (b/f);\n",
- "alphac = atan (c/f);\n",
- "phi =(354+30/60) *pi /180; # azimuth o f camera\n",
- "phia =phi - alphaa -360* pi /180; # azimuth o f a\n",
- "phib = phia + alphab; # azimuth o f b\n",
- "phic = phia + alphac ; # azimuth o f c\n",
- "\n",
- "#result\n",
- "print \" azimuth of a in ( degrees ) \",round(phia /pi *180,2)\n",
- "print \" azimuth of b in ( degrees ) \",round(phib /pi *180,2)\n",
- "print \" azimuth of c in ( degrees ) \",round(phic /pi *180,2)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " azimuth of a in ( degrees ) 10.39\n",
- " azimuth of b in ( degrees ) 14.4\n",
- " azimuth of c in ( degrees ) 32.16\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 2.2,Page 216"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi\n",
- "from math import atan,sin,sqrt\n",
- "f =150.0; # focal length of camera\n",
- "ap =20.2 # elevation of a from p\n",
- "aa1 =16.4; # distace to the right\n",
- "aq =35.2 # elevation of a from q\n",
- "PQ =100.0; # distace of PQ\n",
- "RL =126.845; # r educed level of instrument\n",
- "\n",
- "#calculation\n",
- "alphap = atan (ap/f);\n",
- "alphaq = atan (aq/f);\n",
- "P=pi /3- alphap ; # angle P\n",
- "Q =40* pi /180 - alphaq ; # angle Q\n",
- "A=pi -P-Q; # angle A;\n",
- "AP=PQ* sin (Q)/sin(A);\n",
- "AQ=PQ* sin (P)/sin(A);\n",
- "Pa1 = sqrt (ap **2+ f **2) ;\n",
- "AA1 = aa1 *AP/ Pa1 ;\n",
- "RLa =RL+AA1; # reduced level of A\n",
- "\n",
- "#result\n",
- "print \" distance of AP (m) \",round(AP,2);\n",
- "print \"distance of AQ (m) \",round(AQ,2);\n",
- "print \" reduced level of A in (M) \",round(RLa,2)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " distance of AP (m) 45.9\n",
- "distance of AQ (m) 80.6\n",
- " reduced level of A in (M) 131.82\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 2.3,Page 218"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin\n",
- "theta =(44+30/60) *pi /180; # angle b/w two points\n",
- "x1 =68.24; #distance of 1st point\n",
- "x2 =58.48; #distance of 2nd point\n",
- "\n",
- "#calculation\n",
- "f=( x1+x2)/ tan ( theta ) /2+ sqrt (( x1+x2) **2/4/( tan ( theta ))\n",
- "**2+ x1*x2);\n",
- "\n",
- "#result\n",
- "print \" focal length of lens in (mm) \",round(f,2);"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " focal length of lens in (mm) 156.69\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 2.4, Page 240"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin\n",
- "# part 1\n",
- "\n",
- "H =1200.0;#altitude\n",
- "h =80.0; #elevation of hill\n",
- "f =15.0/100.0;\n",
- "\n",
- "#calculation\n",
- "R80 =f/(H-h);\n",
- "print \" representative fraction of hill is ( time s) \",round(R80,5);\n",
- "\n",
- "# part 2\n",
- "#initialisation of variable\n",
- "h =300.0; #elevation of hill\n",
- "\n",
- "#calculation\n",
- "R300 =f/(H-h);\n",
- "\n",
- "#result\n",
- "print \" representative fraction of hill is ( time s) \",round(R300,5) ;"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " representative fraction of hill is ( time s) 0.00013\n",
- " representative fraction of hill is ( time s) 0.00017\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 2.5,Page 240"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin\n",
- "R =1.0/8000.0;\n",
- "h =1500.0;\n",
- "f =20.0/100.0;\n",
- "\n",
- "#calculation\n",
- "H=h+f/R;\n",
- "\n",
- "#result\n",
- "print \" height above sea level in (m) \",round(H,3);"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " height above sea level in (m) 3100.0\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 2.6,Page 241"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin\n",
- "h =500.0; #elevation of point\n",
- "f =20.0/100.0; # focal length\n",
- "v =8.65/100.0; # vertical distance of photograph\n",
- "ho =2000.0; # horizontal distance of photograph\n",
- "R=v/ho; # representative fraction\n",
- "h1 =800;\n",
- "\n",
- "#calculation\n",
- "H=h+f/R;\n",
- "S=(H-h1)/f /100; # scale of photograph\n",
- "\n",
- "print \" height above sea level in (m) \",round(H,2);\n",
- "print \" 1cm in photograph represents centimetres \",round(S,3)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " height above sea level in (m) 5124.28\n",
- " 1cm in photograph represents centimetres 216.214\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 2.7, Page 241"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin\n",
- "m =1.0/50000.0; #map scale\n",
- "pd =10.16; # photo distance\n",
- "md =2.54; #map distance\n",
- "f =16.0/100.0;\n",
- "h =200;\n",
- "\n",
- "#calculation\n",
- "R=pd/md*m; # representative fraction\n",
- "H=h+f/R;\n",
- "\n",
- "#result\n",
- "print \" height above sea level in (m) \",round(H,3)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " height above sea level in (m) 2200.0\n"
- ]
- }
- ],
- "prompt_number": 7
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 2.8,Page 242"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin\n",
- "f =20 # f o c a l l e n g t h\n",
- "xa =2.65; # x coordinate of a\n",
- "xb = -1.92; # x coordinate of b\n",
- "ya =1.36; # x coordinate of a\n",
- "yb =3.65; # y coordinate of b\n",
- "H =2500.0;\n",
- "ha =500.0; # elevation of a\n",
- "hb =300.0; # elevation of b\n",
- "\n",
- "#calculation\n",
- "Xa =(H-ha)/f*xa;\n",
- "Xb =(H-hb)/f*xb;\n",
- "Ya =(H-ha)/f*ya;\n",
- "Yb =(H-hb)/f*yb;\n",
- "AB= sqrt ((Xa -Xb) **2+( Ya -Yb)**2);\n",
- "\n",
- "#result\n",
- "print \" distance between A & B in (m) \",round(AB,3)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " distance between A & B in (m) 545.213\n"
- ]
- }
- ],
- "prompt_number": 8
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 2.9,Page 243"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin\n",
- "f =20.0 # focal length\n",
- "xa =2.65; # x coordinate of a\n",
- "xb = -1.92; # x coordinate of b\n",
- "ya =1.36; # y coordinate of a\n",
- "yb =3.65; # y coordinate of b\n",
- "ha =500.0; # elevation of a\n",
- "hb =300.0; # elevation of b\n",
- "ABg =545.0;\n",
- "ab =5.112;\n",
- "\n",
- "#calculation\n",
- "hab =ha /2+ hb /2;\n",
- "Happ =hab+ ABg *f/ab\n",
- "Xa =( Happ -ha)/f*xa;\n",
- "Xb =( Happ -hb)/f*xb;\n",
- "Ya =( Happ -ha)/f*ya;\n",
- "Yb =( Happ -hb)/f*yb;\n",
- "AB= sqrt ((Xa -Xb) **2+( Ya -Yb)**2);\n",
- "Hact =ABg/AB *( Happ - hab )+ hab ;\n",
- "\n",
- "#result\n",
- "print \" actual flying height of A & B in (m) \",round(Hact,3);"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " actual flying height of A & B in (m) 2499.706\n"
- ]
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 2.10,Page 243"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin\n",
- "\n",
- "f =20.0/100.0;\n",
- "Sd =1.0/10000.0;\n",
- "h =250.0; # elevation\n",
- "r =6.44;\n",
- "\n",
- "#calculation\n",
- "H=f/Sd;\n",
- "d=r*h/H;\n",
- "\n",
- "#result\n",
- "print \"relief displacement of the point in ( cm) \",round(d,3)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "relief displacement of the point in ( cm) 0.805\n"
- ]
- }
- ],
- "prompt_number": 10
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 2.11,Page 244"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin\n",
- "h =50.0; # elevation\n",
- "H =2500.0 -1250.0;\n",
- "r =6.35;\n",
- "\n",
- "#calculation\n",
- "d=r*h/H;\n",
- "\n",
- "#result\n",
- "print \"releif displacement of the point in ( cm) \",round(d,3)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "releif displacement of the point in ( cm) 0.254\n"
- ]
- }
- ],
- "prompt_number": 11
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 2.12,Page 244"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin\n",
- "f =20.0/100.0; # focal length\n",
- "l =250; #length of line\n",
- "lp =8.5/100.0; #length of line in photograph\n",
- "\n",
- "#calculation\n",
- "H=l*f/lp; # height of camera above datum\n",
- "r =6.46; # distace of image of top o f the towe r\n",
- "d =0.46; # releif displacement\n",
- "h=d*H/r;\n",
- "\n",
- "#result\n",
- "print \" height of tower above its base in (m) \",round(h,2)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "41.89 height of tower above its base in (m) \n"
- ]
- }
- ],
- "prompt_number": 28
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 2.13,Page 267"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin\n",
- "l =20/100; # length of photograph\n",
- "w =20/100; # breadth of photograph\n",
- "Pl =0.6; # longitudinal lap\n",
- "Pw =0.3; # side lap\n",
- "s =100*20;\n",
- "\n",
- "#calculation\n",
- "L=(1 - Pl)*s;\n",
- "W=(1 - Pw)*s;\n",
- "Ar=L*W /1000/1000;\n",
- "N =100/ Ar;\n",
- "A= round (N);\n",
- "\n",
- "#result\n",
- "print \"no . o f photographs to be taken \",A+1;\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "no . o f photographs to be taken 90.0\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 2.14,Page 267"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin\n",
- "Pl =0.6; # longitudinal lap\n",
- "Pw =0.3; # side lap\n",
- "L1 =10000.0;\n",
- "s =100.0*20.0;\n",
- "\n",
- "#calculation\n",
- "L2=L1;\n",
- "N1=L1 /((1 - Pl)*s) +1;\n",
- "A1= round (N1);\n",
- "if N1 -A1 <0:\n",
- " N1=A1;\n",
- "else :\n",
- " N1=A1+1;\n",
- "\n",
- "N2=L2 /((1 - Pw)*s) +1;\n",
- "A2= round (N2);\n",
- "if N2 -A2 <0:\n",
- " N2=A2\n",
- "else :\n",
- " N2=A2+1;\n",
- "\n",
- "N=N1*N2;\n",
- "\n",
- "#result\n",
- "print \"no . of photographs to be taken \",N;"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "no . of photographs to be taken 126.0\n"
- ]
- }
- ],
- "prompt_number": 13
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 2.15,Page 268"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin\n",
- "Pl =0.6; # longitudinal lap\n",
- "Pw =0.3; # side lap\n",
- "L1 =12500.0;\n",
- "s =100.0*20.0;\n",
- "L2 =8000.0;\n",
- "\n",
- "#calculation\n",
- "N1=L1 /((1 - Pl)*s) +1;\n",
- "A1= round (N1);\n",
- "if N1 -A1 <0:\n",
- " N1=A1;\n",
- "else :\n",
- " N1=A1+1;\n",
- "\n",
- "N2=L2 /((1 - Pw)*s) +1;\n",
- "A2= round (N2);\n",
- "if N2 -A2 <0:\n",
- " N2=A2\n",
- "else :\n",
- " N2=A2+1;\n",
- "\n",
- "N=N1*N2;\n",
- "\n",
- "#result\n",
- "print \"no . of photographs to be taken \",N;"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "no . of photographs to be taken 119.0\n"
- ]
- }
- ],
- "prompt_number": 14
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 2.16,Page 268"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "#part1\n",
- "from math import pi,tan,sqrt,sin\n",
- "f =30.0/100.0; # focal length\n",
- "h =400.0; #elevation of datum\n",
- "r =12000.0; # ratio\n",
- "s =120.0*20.0;\n",
- "L2 =24000.0;\n",
- "L1 =30000.0;\n",
- "Pl =0.6; # longitudinal lap\n",
- "Pw =0.3; # side lap\n",
- "\n",
- "#calculation\n",
- "H=h+r*f;\n",
- "\n",
- "#result\n",
- "print \" height above datum in (m) \",round(H,2);\n",
- "\n",
- "# part 2\n",
- "#calculation\n",
- "W=(1 - Pw)*s;\n",
- "\n",
- "#result\n",
- "print \" ground width covered in each photograph (m) \",round(W,2);\n",
- "\n",
- "# part 3\n",
- "N2=L2 /((1 - Pw)*s) +1;\n",
- "A2= round (N2);\n",
- "if N2 -A2 <0:\n",
- " N2=A2\n",
- "else :\n",
- " N2=A2+1;\n",
- "\n",
- "#result\n",
- "print \"no . of flights required \",N2;\n",
- "\n",
- "#part 4-9\n",
- "#calculation\n",
- "Asf =L2 /(N2 -1) ; # actual spacing between flights\n",
- "Sfl = Asf /600; # spacing of flight lines\n",
- "gd =(1 - Pl)*s; # ground distance\n",
- "Ei=gd /55.5; # exposure interval\n",
- "Ei= round (Ei);\n",
- "Ags =55.56* Ei;# adgusted ground distance\n",
- "N1=L1/ Ags +1;\n",
- "A1= round (N1);\n",
- "if N1 -A1 <0:\n",
- " N1=A1;\n",
- "else :\n",
- " N1=A1+1;\n",
- "N=N1*N2;\n",
- "\n",
- "#result\n",
- "print \"actual spacing in m\",Asf\n",
- "print \"spacing of flight lines in cm\",round(Sfl,2)\n",
- "print \"exposure interval in s\",Ei\n",
- "print \"adjusted ground distance in m\",round(Ags)\n",
- "print \"no . of photographs to be taken per flight line\",N1\n",
- "print \"no . of photographs to be taken \",N;"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " height above datum in (m) 4000.0\n",
- " ground width covered in each photograph (m) 1680.0\n",
- "no . of flights required 16.0\n",
- "actual spacing in m 1600.0\n",
- "spacing of flight lines in cm 2.67\n",
- "exposure interval in s 17.0\n",
- "adjusted ground distance in m 945.0\n",
- "no . of photographs to be taken per flight line 33.0\n",
- "no . of photographs to be taken 528.0\n"
- ]
- }
- ],
- "prompt_number": 15
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 2.17,Page 301"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin\n",
- "f =150.0/1000.0; # focal length\n",
- "r =20000.0; #ratio\n",
- "Pl =0.6; # longitudinal lap\n",
- "l =23.0/100.0; # l e n g t h\n",
- "w =23.0/100.0; # width\n",
- "\n",
- "#calculation\n",
- "B=(1 - Pl)*l*r; # base length\n",
- "H=f*r;\n",
- "h =0;\n",
- "dh =(H-h) **2/ B/f *0.1/1000;\n",
- "\n",
- "#result\n",
- "print \" error in height in (m) \",round(dh,3)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " error in height in (m) 3.261\n"
- ]
- }
- ],
- "prompt_number": 16
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 2.18,Page 302"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin\n",
- "H =600.0;\n",
- "f =150.0/1000.0;\n",
- "b =6.375/100.0;\n",
- "h1 =0.0;\n",
- "h2 =120.0; # height of chimney\n",
- "\n",
- "#calculation\n",
- "s=H/f;\n",
- "B=s*b; # datum elevation\n",
- "p1=B*f *1000/(H-h1);\n",
- "p2=B*f *1000/(H-h2);\n",
- "delp =p2 -p1;\n",
- "delh =H* delp /1000/( b+ delp /1000) ;\n",
- "\n",
- "#result\n",
- "print \" parallax height of the chimney in (m)\",round(delh,3)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " parallax height of the chimney in (m) 120.0\n"
- ]
- }
- ],
- "prompt_number": 17
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 2.19,Page 303"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "from math import pi,tan,sqrt,sin\n",
- "B =200.0;\n",
- "f =120.0;\n",
- "p2 =52.52; # parallax for top pole\n",
- "p1 =48.27; # parallax for bottom pole\n",
- "\n",
- "#calculation\n",
- "delh =(p2 -p1)/p2/p1*B*f;\n",
- "\n",
- "#result\n",
- "print \" difference in elevation of two points in (m) \",round(delh,3)\n",
- "print \"there is again a miscalculation in the step of calculating elevation thus there is a change in the answer\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " difference in elevation of two points in (m) 40.234\n",
- "there is again a miscalculation in the step of calculating elevation thus there is a change in the answer\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 2.20,Page 303"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "#initialisation of variable\n",
- "# part 1\n",
- "delp =1.48/1000.0;\n",
- "H =5000.0;\n",
- "h =500.0;\n",
- "b =90.0/1000.0; #mean principal base\n",
- "\n",
- "#calculation\n",
- "dh =(H-h) **2* delp /((H-h)* delp +b*H);\n",
- "\n",
- "#result\n",
- "print \" difference in height between two points in(m) \",round(dh,3)\n",
- "\n",
- "# part 2\n",
- "#variable decleration\n",
- "delp =15.5/1000.0;\n",
- "\n",
- "#calculation\n",
- "dh =(H-h) **2* delp /((H-h)* delp +b*H);\n",
- "\n",
- "#result\n",
- "print \" difference in height between two points in(m) \",round(dh,3)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " difference in height between two points in(m) 65.629\n",
- " difference in height between two points in(m) 603.896\n"
- ]
- }
- ],
- "prompt_number": 14
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [],
- "language": "python",
- "metadata": {},
- "outputs": []
- }
- ],
- "metadata": {}
- }
- ]
-} \ No newline at end of file
diff --git a/Surveying_Volume_3/README.txt b/Surveying_Volume_3/README.txt
deleted file mode 100755
index 2c27e6c8..00000000
--- a/Surveying_Volume_3/README.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-Contributed By: Tarun Kumar Das
-Course: btech
-College/Institute/Organization: College of Engineering
-Department/Designation: Industrial Engineering
-Book Title: Surveying Volume 3
-Author: A K Arora
-Publisher: Lakshmi Publications, Chennai
-Year of publication: 2011
-Isbn: 9788189401276
-Edition: 1 \ No newline at end of file
diff --git a/Surveying_Volume_3/screenshots/chapter1.png b/Surveying_Volume_3/screenshots/chapter1.png
deleted file mode 100755
index 14135a76..00000000
--- a/Surveying_Volume_3/screenshots/chapter1.png
+++ /dev/null
Binary files differ
diff --git a/Surveying_Volume_3/screenshots/chapter4.png b/Surveying_Volume_3/screenshots/chapter4.png
deleted file mode 100755
index ad0a4bc9..00000000
--- a/Surveying_Volume_3/screenshots/chapter4.png
+++ /dev/null
Binary files differ
diff --git a/Surveying_Volume_3/screenshots/chapter5.png b/Surveying_Volume_3/screenshots/chapter5.png
deleted file mode 100755
index bd0c856e..00000000
--- a/Surveying_Volume_3/screenshots/chapter5.png
+++ /dev/null
Binary files differ
diff --git a/Surveying_Volume_3/screenshots/solved_example.png.PNG b/Surveying_Volume_3/screenshots/solved_example.png.PNG
deleted file mode 100755
index 830e56f0..00000000
--- a/Surveying_Volume_3/screenshots/solved_example.png.PNG
+++ /dev/null
Binary files differ
diff --git a/Surveying_Volume_3/screenshots/solved_example_2.png.PNG b/Surveying_Volume_3/screenshots/solved_example_2.png.PNG
deleted file mode 100755
index dbcd4f71..00000000
--- a/Surveying_Volume_3/screenshots/solved_example_2.png.PNG
+++ /dev/null
Binary files differ
diff --git a/Surveying_Volume_3/screenshots/solved_example_3.png.PNG b/Surveying_Volume_3/screenshots/solved_example_3.png.PNG
deleted file mode 100755
index 0622b196..00000000
--- a/Surveying_Volume_3/screenshots/solved_example_3.png.PNG
+++ /dev/null
Binary files differ