summaryrefslogtreecommitdiff
path: root/Surveying_Volume_3/Chapter_1_.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Surveying_Volume_3/Chapter_1_.ipynb')
-rwxr-xr-xSurveying_Volume_3/Chapter_1_.ipynb3834
1 files changed, 0 insertions, 3834 deletions
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