summaryrefslogtreecommitdiff
path: root/Surveying_Volume_3_by_A_K_Arora
diff options
context:
space:
mode:
authorPrashant S2020-04-14 10:25:32 +0530
committerGitHub2020-04-14 10:25:32 +0530
commit06b09e7d29d252fb2f5a056eeb8bd1264ff6a333 (patch)
tree2b1df110e24ff0174830d7f825f43ff1c134d1af /Surveying_Volume_3_by_A_K_Arora
parentabb52650288b08a680335531742a7126ad0fb846 (diff)
parent476705d693c7122d34f9b049fa79b935405c9b49 (diff)
downloadall-scilab-tbc-books-ipynb-master.tar.gz
all-scilab-tbc-books-ipynb-master.tar.bz2
all-scilab-tbc-books-ipynb-master.zip
Merge pull request #1 from prashantsinalkar/masterHEADmaster
Initial commit
Diffstat (limited to 'Surveying_Volume_3_by_A_K_Arora')
-rw-r--r--Surveying_Volume_3_by_A_K_Arora/1-Electronic_Distance_Measurement.ipynb134
-rw-r--r--Surveying_Volume_3_by_A_K_Arora/3-Trilateration.ipynb218
-rw-r--r--Surveying_Volume_3_by_A_K_Arora/4-Principles_of_Field_Astronomy.ipynb1847
-rw-r--r--Surveying_Volume_3_by_A_K_Arora/5-Uses_Of_Field_Astronomy_in_surveying.ipynb801
-rw-r--r--Surveying_Volume_3_by_A_K_Arora/6-Photogrammetry.ipynb1035
5 files changed, 4035 insertions, 0 deletions
diff --git a/Surveying_Volume_3_by_A_K_Arora/1-Electronic_Distance_Measurement.ipynb b/Surveying_Volume_3_by_A_K_Arora/1-Electronic_Distance_Measurement.ipynb
new file mode 100644
index 0000000..768dedd
--- /dev/null
+++ b/Surveying_Volume_3_by_A_K_Arora/1-Electronic_Distance_Measurement.ipynb
@@ -0,0 +1,134 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1: Electronic Distance Measurement"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.1: 1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"T=273+25.0;//temperature in K\n",
+"p=752.0;//pressure mm Hg\n",
+"No=294.0e-6;\n",
+"ns=1.000284;\n",
+"D1=1438.254;//recorded distance in m\n",
+"h=263.42-243.25;//height difference in m\n",
+"R=6370e3;//radius of earth in m\n",
+"//calculation\n",
+"n=1+No*(273/T)*(p/760);\n",
+"D=D1*ns/n;\n",
+"cg=-h**2/2/D;\n",
+"Hm=263.42/2+243.25/2;\n",
+"D=D+cg;\n",
+"ch=-D*Hm/R\n",
+"EL=D+ch;\n",
+"disp(EL,'equivalent length in m')\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.2: 2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"T=273+18.8;//temperature in K\n",
+"p=713;//pressure mm of Hg\n",
+"e=3;//vapour pressure mm of Hg\n",
+"c=299792.5e3;//speed of light in km/s\n",
+"f=11e6;//frequency in Hz\n",
+"//calculation\n",
+"n=1+(103.49/T*(p-e)+86.26/T*(1+5748.0/T)*e)/1e6;\n",
+"V=c/n;\n",
+"l=V/f;\n",
+"disp(l,'wavelenght of light in m')\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.3: 3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"T=273.0+30.0;//temperature in K\n",
+"l=0.85;//wavelength in m\n",
+"p=752.4;//pressure mm of Hg\n",
+"c=299792.5e3;//speed of light in km/s\n",
+"f=24e6;//frequency in Hz\n",
+"//calculation\n",
+"no=1+(287.604+4.8864/l**2+0.068/l**4)/1e6;\n",
+"ns=1+(no-1)*273/T*p/760;\n",
+"V=c/ns;\n",
+"l=V/f;\n",
+"disp(l,'wavelength of light in m')\n",
+"clear()"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Surveying_Volume_3_by_A_K_Arora/3-Trilateration.ipynb b/Surveying_Volume_3_by_A_K_Arora/3-Trilateration.ipynb
new file mode 100644
index 0000000..9067129
--- /dev/null
+++ b/Surveying_Volume_3_by_A_K_Arora/3-Trilateration.ipynb
@@ -0,0 +1,218 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 3: Trilateration"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.1: 4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"AB=25145.32;//distance in m\n",
+"R=6370.0e3;//radius of earth in m\n",
+"ha=325.14;//elevation in m\n",
+"//calculation\n",
+"theta=AB*cos(3+9.0/60+40.0/3600)/R;\n",
+"AB_dash=AB/sin(%pi/2+theta/2)*sin(%pi/2-theta/2-(3+9.0/60+40.0/3600)*%pi/180);\n",
+"CD=AB_dash-AB_dash*ha/R;\n",
+"S=CD+CD**3/24.0/R**2;\n",
+"disp(S,'sea level length in m')\n",
+"clear()\n",
+"disp('answer varies slightly due to round off error')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.2: 5.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"AB=31325.14//slope distance in m\n",
+"R=6370.0e3;//radius of earth\n",
+"ha=1582.15;//elevation in m\n",
+"h=4251.32-ha//in m\n",
+"//calculation\n",
+"AB_dash=AB-h**2/2/AB;\n",
+"theta=2*asin(AB_dash/2/R);\n",
+"AB_dash=AB-(h*sin(theta/2)+h**2/AB/2)\n",
+"CD=AB_dash-AB_dash*ha/R;\n",
+"S=CD+CD**3/24.0/R**2;\n",
+"disp(S,'sea level length in m')\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.3: 6.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"//alpha=A and beta=B and those are angles\n",
+"AB=1525.456;//distance in m\n",
+"BC=2176.945;//distance in m\n",
+"CD=1697.435;//distance in m\n",
+"AD=2401.435;//distance in m\n",
+"AC=3073.845;//distance in m\n",
+"BD=2483.115;//distance in m\n",
+"//calculation\n",
+"A1=acos((CD**2+AC**2-AD**2)/(2*CD*AC));\n",
+"A1=A1*180/%pi;\n",
+"A2=acos((AD**2+BD**2-AB**2)/(2*AD*BD));\n",
+"A2=A2*180/%pi;\n",
+"A3=acos((AB**2+AC**2-BC**2)/(2*AB*AC));\n",
+"A3=A3*180/%pi;\n",
+"A4=acos((BC**2+BD**2-CD**2)/(2*BC*BD));\n",
+"A4=A4*180/%pi;\n",
+"B1=acos((CD**2+BD**2-BC**2)/(2*CD*BD));\n",
+"B1=B1*180/%pi;\n",
+"B2=acos((AD**2+AC**2-CD**2)/(2*AD*AC));\n",
+"B2=B2*180/%pi;\n",
+"B3=acos((AB**2+BD**2-AD**2)/(2*AB*BD));\n",
+"B3=B3*180/%pi;\n",
+"B4=acos((AC**2+BC**2-AB**2)/(2*AC*BC));\n",
+"B4=B4*180/%pi;\n",
+"e1=360-A1-A2-A3-A4-B1-B2-B3-B4;//error\n",
+"e2=A1+B1-A3-B3;//error\n",
+"e3=A2+B2-A4-B4;//error\n",
+"//angle update\n",
+"A1=A1+e1/8-e2/4;\n",
+"A3=A3+e1/8+e2/4;\n",
+"B1=B1+e1/8-e2/4;\n",
+"B3=B3+e1/8+e2/4;\n",
+"A2=A2+e1/8-e3/4;\n",
+"B2=B2+e1/8-e3/4;\n",
+"A4=A4+e1/8+e3/4;\n",
+"B4=B4+e1/8+e3/4;\n",
+"//updating sides\n",
+"AD=1525.456*sin(B3*%pi/180)/sin(A2*%pi/180);\n",
+"disp('equation for B2 is wrong')\n",
+"disp(AD,'corrected length of AD in m')\n",
+"BD=1525.456*sin(A3*%pi/180+B2*%pi/180)/sin(A2*%pi/180);\n",
+"disp(BD,'corrected length of BD in m')\n",
+"AC=1525.456*sin(A4*%pi/180+B3*%pi/180)/sin(B4*%pi/180);\n",
+"disp(AC,'corrected length of AC in m')\n",
+"BC=1525.456*sin(A3*%pi/180)/sin(B4*%pi/180);\n",
+"disp(BC,'corrected length of BC in m')\n",
+"CD=BC*sin(A4*%pi/180)/sin(B1*%pi/180)\n",
+"disp(CD,'corrected length of CD in m')\n",
+"disp('answers differ slightly due to value of pi');\n",
+"//equation for B2 is wrong\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.4: 7.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"//angles found by cosine law\n",
+"//alpha=A and beta=B and those are angles\n",
+"A1=45.801596;//distance in m\n",
+"A2=40.605250;//distance in m\n",
+"A3=50.143258;//distance in m\n",
+"A4=43.077646;//distance in m\n",
+"B1=48.779868;//distance in m\n",
+"B2=44.141587;//distance in m\n",
+"B3=49.733152;//distance in m\n",
+"B4=37.737035;//distance in m\n",
+"//calculation\n",
+"e1=360-A1-A2-A3-A4-B1-B2-B3-B4;//error\n",
+"//angle update\n",
+"A1=A1+e1/8;\n",
+"A3=A3+e1/8;\n",
+"B1=B1+e1/8;\n",
+"B3=B3+e1/8;\n",
+"A2=A2+e1/8;\n",
+"B2=B2+e1/8;\n",
+"A4=A4+e1/8;\n",
+"B4=B4+e1/8;\n",
+"E2=(log(sin(A1*%pi/180))*log(sin(A2*%pi/180))*log(sin(A3*%pi/180))*log(sin(A4*%pi/180))-log(sin(B1*%pi/180))*log(sin(B2*%pi/180))*log(sin(B3*%pi/180))*log(sin(B4*%pi/180)))/log(10000);\n",
+"c3=E2/17.1;\n",
+"c4=E2/17.0;\n",
+"A1=A1-c3;\n",
+"disp(A1,'corrected angle A1 in degrees')\n",
+"B1=B1+c3;\n",
+"disp(B1,'corrected angle B1 in degrees')\n",
+"clear()"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Surveying_Volume_3_by_A_K_Arora/4-Principles_of_Field_Astronomy.ipynb b/Surveying_Volume_3_by_A_K_Arora/4-Principles_of_Field_Astronomy.ipynb
new file mode 100644
index 0000000..8870ee0
--- /dev/null
+++ b/Surveying_Volume_3_by_A_K_Arora/4-Principles_of_Field_Astronomy.ipynb
@@ -0,0 +1,1847 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4: Principles of Field Astronomy"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.10: 17.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc();\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100;\n",
+" if sd==60.0 then\n",
+" sd=0;\n",
+" m=m+1;\n",
+" end\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"//part1\n",
+"delta=38+15.0/60;//declination of star M1 in degrees in North\n",
+"theta=25+10.0/60;//latitude in degrees in North\n",
+"//calculation\n",
+"z=delta-theta;\n",
+"alpha=90-z;\n",
+"z=degtodms(z);\n",
+"alpha=degtodms(alpha);\n",
+"disp(z,'zenith distance in deg min sec');\n",
+"disp(alpha,'altitude in deg min sec');\n",
+"//part2\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100;\n",
+" if sd==60.0 then\n",
+" sd=0;\n",
+" m=m+1;\n",
+" end\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"delta=22+40.0/60;//declination of star M2 in degrees in North\n",
+"theta=25+10.0/60;//latitude in degrees in North\n",
+"//calculation\n",
+"z=-delta+theta;\n",
+"alpha=90-z;\n",
+"z=degtodms(z);\n",
+"alpha=degtodms(alpha);\n",
+"disp(z,'zenith distance in deg min sec');\n",
+"disp(alpha,'altitude in deg min sec');\n",
+"//part3\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" if sd==60.0 then\n",
+" sd=0;\n",
+" m=m+1;\n",
+" end\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"delta=70+20.0/60;//declination of star M3 in degrees in North\n",
+"theta=25+10.0/60;//latitude in degrees in North\n",
+"//calculation\n",
+"z=delta-theta;\n",
+"z=degtodms(z);\n",
+"disp(z,'zenith distance in deg min sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.11: 18.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" if sd==60 then\n",
+" m=m+1\n",
+" sd=0\n",
+" end\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"theta=42+50.0/60;//latitudde in degrees\n",
+"delta=83+40.0/60;//declination in degrees\n",
+"//calculation\n",
+"z=180-delta-theta;\n",
+"alpha=90-z;\n",
+"z=degtodms(z);\n",
+"alpha=degtodms(alpha);\n",
+"disp(z,'zenith distance in deg min sec');\n",
+"disp(alpha,'altitude in deg min sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.12: 19.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"//part1\n",
+"M=82+30/60;//standard meridian in degrees\n",
+"L1=110;//longitutde in degrees east\n",
+"ST=18+35.0/60+10.0/3600//standard time in hr\n",
+"//calculation\n",
+"LMT=ST+(L1-M)/15.0;\n",
+"LMT=degtodms(LMT);\n",
+"disp(LMT,'LMT in hr min sec');\n",
+"//part2\n",
+"L2=30;//longitutde in degrees west\n",
+"ST=18+35.0/60+10.0/3600//standard time in hr\n",
+"//calculation\n",
+"LMT=ST-(M+L2)/15.0;\n",
+"LMT=degtodms(LMT);\n",
+"disp(LMT,'LMT in hr min sec');\n",
+"//part3\n",
+"L3=30;//longitutde in degrees east\n",
+"ST=18+35.0/60+10.0/3600//standard time in hr\n",
+"//calculation\n",
+"LMT=ST-(M-L3)/15.0;\n",
+"LMT=degtodms(LMT);\n",
+"disp(LMT,'LMT in hr min sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.13: 20.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"//part1\n",
+"LMT=8+30.0/60+15.0/3600;//in hr\n",
+"Long=45+30.0/60;//longitude in degrees\n",
+"//calculation\n",
+"GMT=LMT+Long/15.0;\n",
+"GMT=degtodms(GMT);\n",
+"disp(GMT,'GMT in hr min sec (AM)');\n",
+"//part2\n",
+"LMT=6+40.0/60+10.0/3600;//in hr\n",
+"Long=55+30.0/60;//longitude in degrees\n",
+"//calculation\n",
+"GMT=LMT-Long/15.0;\n",
+"GMT=degtodms(GMT);\n",
+"disp(GMT,'GMT in hr min sec (PM)');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.14: 21.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"//part1\n",
+"GMT=20+30.0/60+15.0/3600;//GMT in hrs\n",
+"Long=82+30.0/60;//longitude in degrees east\n",
+"//calculation\n",
+"LMT=GMT+Long/15.0-24;\n",
+"LMT=degtodms(LMT);\n",
+"disp(LMT,'LMT in hr min sec (next day)');\n",
+"//part2\n",
+"GMT=20+30.0/60+15.0/3600;//GMT in hrs\n",
+"Long=120.0;//longitude in degrees west\n",
+"//calculation\n",
+"LMT=GMT-Long/15.0;\n",
+"LMT=degtodms(LMT);\n",
+"disp(LMT,'LMT in hr min sec (same day)');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.15: 22.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"//part1\n",
+"RA=6+15.0/60+20.0/3600;//RA in hr\n",
+"HA=8+10.0/60+30.0/3600;//hour angle in hr\n",
+"//calculation\n",
+"LST=RA+HA;\n",
+"LST=degtodms(LST);\n",
+"disp(LST,'LST in hr min sec');\n",
+"//part2\n",
+"RA=8+40.0/60+15.0/3600;//RA in hr\n",
+"HA=3+50.0/60+20.0/3600;//hour angle in hr\n",
+"//calculation\n",
+"LST=RA-HA;\n",
+"LST=degtodms(LST);\n",
+"disp(LST,'LST in hr min sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.16: 23.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"//part1\n",
+"LHA=6+30.0/60+10.0/3600;//local hour angle in hr\n",
+"//calculation\n",
+"LAT=LHA+12;\n",
+"LAT=degtodms(LAT);\n",
+"disp(LAT,'LAT in hr min sec');\n",
+"//part2\n",
+"LHA=18+40.0/60+20.0/3600;//local hour angle in hr\n",
+"//calculation\n",
+"LAT=LHA+12-24;\n",
+"LAT=degtodms(LAT);\n",
+"disp(LAT,'LAT in hr min sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.17: 24.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"Long=60.0;//longitude in derees east\n",
+"LHA=5+30.0/60+20.0/3600;//local hour angle in hr\n",
+"//calculation\n",
+"LMT=LHA+12;\n",
+"GMT=LMT-Long/15;\n",
+"GMT=degtodms(GMT);\n",
+"LMT=degtodms(LMT);\n",
+"disp(LMT,'LMT in hr min sec');\n",
+"disp(GMT,'GMT in hr min sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.18: 25.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"//parta\n",
+"GMT=0;//GMT in hr\n",
+"ET=10.0/60+1.8/3600;//ET in hrs\n",
+"//calculaion\n",
+"GAT=GMT+ET;\n",
+"GAT=degtodms(GAT);\n",
+"disp(GAT,'GAT in hr min sec');\n",
+"//partb\n",
+"GMT=0;//GMT in hr\n",
+"ET=-13.0/60-28.5/3600;//ET in hrs\n",
+"//calculaion\n",
+"GAT=GMT+ET+24;\n",
+"GAT=degtodms(GAT);\n",
+"disp(GAT,'GAT in hr min sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.1: 8.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"theta=25+14.0/60;//latitude in degrees in North\n",
+"L1=29+15/60;//longitude in degrees in West\n",
+"L2=45+25/60;//longitude in degrees in West\n",
+"R=6370.0;//radius in km\n",
+"//calculation\n",
+"AB=cos(theta*%pi/180)*(L2-L1);//arc length in km\n",
+"dis=2*%pi*R*AB/360.0;//distance in km\n",
+"disp(dis,'distance of AB in m')\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.19: 26.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"ET1=-3.0/60-51.4/3600//ET at april 2 in hr\n",
+"ET2=-3.0/60-33.5/3600//ET at april 3 in hr\n",
+"//calculation\n",
+"dET=(ET2-ET1)*18.0/24//change in ET\n",
+"ET=ET1+dET;\n",
+"ET=degtodms(ET);\n",
+"disp(ET,'ET (-ve) in hr min s');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.20: 27.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"LAT=15+12.0/60+40.0/3600;//latitude in degrees\n",
+"Long=20+3.0/60;//longitude in degrees\n",
+"GMN=5.0/60+10.65/3600;//GMN in hr\n",
+"//calculation\n",
+"GAT=LAT+Long/15.0;\n",
+"e1=(GAT-12)*0.22/3600+GMN;\n",
+"LAT=GAT+e1-Long/15.0;\n",
+"LAT=degtodms(LAT);\n",
+"disp(LAT,'LAT in hr min sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.21: 28.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"Long=56+35.0/60;//Longitude in degrees\n",
+"LMT=7+15.0/60+25.0/3600;//LMT in hr\n",
+"GMN=3.0/60+54.0/3600;//GMT in hr\n",
+"//calculation\n",
+"GMT=LMT-Long/15.0;\n",
+"e1=GMN+(12-GMN)*0.25/3600;\n",
+"LAT=GMT+Long/15.0+e1;\n",
+"LAT=degtodms(LAT);\n",
+"disp(LAT,'LAT in hr min sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.22: 29.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"ST=7+15.0/60+30.0/3600;//sideral time in hr\n",
+"R=9.8296;//retardation in s\n",
+"//calculation\n",
+"tr=R/3600*ST;\n",
+"ST=ST-tr;\n",
+"ST=degtodms(ST);\n",
+"disp(ST,'solar mean time in hr min sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.23: 30.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"ST=7+45.0/60+50.0/3600;//solar time in hr\n",
+"R=9.8565;//retardation in s\n",
+"//calculation\n",
+"tr=R/3600*ST;\n",
+"ST=ST+tr;\n",
+"ST=degtodms(ST);\n",
+"disp(ST,'solar mean time in hr min sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.24: 31.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"//part1\n",
+"Long=140+35.0/60+20.0/3600;//longitude in degrees in West\n",
+"GST=13+15.0/60+30.0/3600;//GST in hr\n",
+"//calculation\n",
+"LST=GST+9.8565/3600*Long/15.0;\n",
+"LST=degtodms(LST);\n",
+"disp(LST,'LST in hr min sec');\n",
+"//part2\n",
+"Long=160+45.0/60+30.0/3600;//longitude in degrees in East\n",
+"GST=13+15.0/60+30.0/3600;//GST in hr\n",
+"//calculation\n",
+"LST=GST-9.8565/3600*Long/15.0;\n",
+"LST=degtodms(LST);\n",
+"disp(LST,'LST in hr min sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.25: 32.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"Long=75.0;//longitude in degrees in West\n",
+"GST=15+55.0/60+13.0/3600;//GST in hr\n",
+"LMT=11.0;//LMT in hr\n",
+"//calculation\n",
+"LST=GST+Long/15.0*9.8565/3600+LMT+9.8565/3600*LMT;\n",
+"LST=LST-24;\n",
+"LST=degtodms(LST);\n",
+"disp(LST,'LST of next day in deg min sec');\n",
+"disp('there is slight change in the answer due to round off error in the question');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.26: 33.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"Long=75.0;//longitude in degrees\n",
+"GST=5+25.0/60+15.0/3600;//GST in hr\n",
+"LMT=5.0+40.0/60;//LMT in hr\n",
+"//calculation\n",
+"LST=GST-Long/15.0*9.8565/3600+LMT+9.8565/3600*(LMT);\n",
+"LST=degtodms(LST);\n",
+"disp(LST,'LST of next day in deg min sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.27: 34.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"Long=75.0;//longitude in degrees\n",
+"GST=11+45.0/60+10.0/3600;//GSt in hr\n",
+"LST=26+35.0/60+42.0/3600;//LST in hr\n",
+"//calculation\n",
+"LMM=GST+Long/15*9.8565/3600;\n",
+"LMT=LST-LMM-(LST-LMM)*9.8296/3600;\n",
+"LMT=degtodms(LMT-12)\n",
+"disp(LMT,'LMT in hr min sec (PM)');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.28: 35.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"Long=90.0;//longitude in degrees\n",
+"GST=9+15.0/60+14.0/3600;//GST in hr\n",
+"LST=31+35.0/60+12.0/3600;//LST in hr\n",
+"//calculation\n",
+"LMM=GST-Long/15*9.8565/3600;\n",
+"LMT=LST-LMM-(LST-LMM)*9.8296/3600;\n",
+"LMT=degtodms(LMT-12)\n",
+"disp(LMT,'LMT in hr min sec (PM)');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.29: 36.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"//part1\n",
+"Long=150.0;//longitude in degrees\n",
+"GST=12+25.0/60+15.0/3600;//GST in hr\n",
+"LST=30+15.0/60+10.0/3600;//LST in hr\n",
+"LMN=18+15.0/60+10.0/3600;//LMN in hr\n",
+"//calculation\n",
+"LMM=GST+Long/15*9.8565/3600;\n",
+"LMT=LMN-LMM-(LMN-LMM)*9.8296/3600;\n",
+"LMT=degtodms(LMT)\n",
+"disp(LMT,'LMT in hr min sec (PM)');\n",
+"//part2\n",
+"LMM=GST+Long/15*9.8565/3600;\n",
+"LMT=LST-LMM-(LST-LMM)*9.8296/3600;\n",
+"LMT=degtodms(LMT-12)\n",
+"disp(LMT,'LMT in hr min sec (AM)');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.2: 9.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"LongA=52+24.0/60;//longtitude in degrees\n",
+"LongB=55+30.0/60;//longtitude in degrees\n",
+"latA=18+10.0/60;//latitude in degrees\n",
+"latB=15.0;//latitude in degrees\n",
+"R=6370.0;//radius of earth\n",
+"pi=3.14;\n",
+"//calculation\n",
+"P=LongB-LongA;\n",
+"PA=90-latA;\n",
+"PB=90-latB;\n",
+"AB=acos(cos(PB*%pi/180)*cos(PA*%pi/180)+sin(PB*%pi/180)*sin(PA*%pi/180)*cos(P*%pi/180));\n",
+"dis=AB*R;\n",
+"//solving for A\n",
+"a=[0.5,0.5;0.5,-0.5];\n",
+"b=[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];\n",
+"x=linsolve(a,-b);\n",
+"x=degtodms(x(1));\n",
+"disp(round(dis*100)/100,'distance of AB in Km');\n",
+"disp(x,'direction of B to A in deg min sec towards east is:');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.30: 37.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"theta=35+15.0/60+20.0/3600;//theta in degrees\n",
+"delta=88+15.0/60+45.0/3600;//delta in degrees\n",
+"RA=1+45.0/60+15.0/3600;//R.A. in degrees \n",
+"//calculation\n",
+"H=acos(tan(theta*%pi/180)/tan(delta*%pi/180));\n",
+"H=H*180/%pi/15;\n",
+"LST=RA+H;\n",
+"LST=degtodms(LST);\n",
+"disp(LST,'LST in hr min sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.3: 10.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"b=40.0;//distance in degrees\n",
+"p=6.0;//disatnce in degrees\n",
+"//calculation\n",
+"a=%pi/2-asin(cos(b*%pi/180)*cos(p*%pi/180));\n",
+"Bc=a*180/%pi-b;\n",
+"BC=Bc*1.853*60;\n",
+"B=asin(sin(b*%pi/180)/sin(a))\n",
+"B=degtodms(B*180/%pi);\n",
+"disp(round(BC*100)/100,'distance BC in km');\n",
+"disp(B,'angle of B deg min sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.31: 38.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"RA=22+25.0/60+10.0/3600;//R.A. in hr\n",
+"ST=14+45.0/60//sidereal time in hr\n",
+"Long=90.0;//longitude in degrees\n",
+"GMT=27+15.0/60;//GMT in hr\n",
+"LMN=15+21.0/60+15.0/3600;//LST of LMN in hr\n",
+"//calculation\n",
+"MT=12+24-GMT+Long/15//mean time interval\n",
+"acc=9.8565/3600*MT;\n",
+"HA=LMN-acc-MT;\n",
+"LST=HA+24-RA;\n",
+"LST=degtodms(LST);\n",
+"disp(LST,'LST in hr min sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.32: 39.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"//part1\n",
+"Long=60;//longitude in degrees\n",
+"GMT=11+15.0/60+20.0/3600;//GMT in hr\n",
+"//calculation\n",
+"LMT=GMT-Long/15*9.8296/3600;\n",
+"LMT=degtodms(LMT);\n",
+"disp(LMT,'LMT in hr min sec ');\n",
+"//part2\n",
+"Long=45;//Longitude in degrees\n",
+"GMT=11+15.0/60+20.0/3600;//GMT in hr\n",
+"//calculation\n",
+"LMT=GMT+Long/15*9.8296/3600;\n",
+"LMT=degtodms(LMT);\n",
+"disp(LMT,'LMT in hr min sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.33: 40.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"Long=75;//Longitude in degrees\n",
+"GMT=6+18.0/60+20.0/3600;//GMT in hr\n",
+"LST=10+25.0/60+15.0/3600;//LST in hr\n",
+"//calculation\n",
+"LMT=GMT+Long/15*9.8296/3600;\n",
+"LST=LST-9.8296/3600*LST;\n",
+"LMT=LMT+LST;\n",
+"LMT=degtodms(LMT);\n",
+"disp(LMT,'LMT in hr min sec ');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.34: 41.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"//Part A\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"GST=7+35.0/60+40.0/3600;//GSt in hr\n",
+"//calculation\n",
+"GMT=24-GST-(24-GST)*9.8296/3600;\n",
+"GMT=degtodms(GMT);\n",
+"disp(GMT,'GMT in hr min sec');\n",
+"//Part B\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"//part1\n",
+"Long=120.0;//longitude in degrees\n",
+"GMT=12+3.0/60+24.6/3600;//GMT in hr\n",
+"//calculation\n",
+"LMT=GMT-17.8/24*Long/15.0/3600;\n",
+"LMT=degtodms(LMT);\n",
+"disp(LMT,'LMT of LAN in hr min sec');\n",
+"//part2\n",
+"Long=45;//Longitude in degrees\n",
+"GMT=12+3.0/60+24.6/3600;//GMT in hr\n",
+"//calculation\n",
+"LMT=GMT+17.8/24*Long/15.0/3600;\n",
+"LMT=degtodms(LMT);\n",
+"disp(LMT,'LMT of LAN in hr min sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.35: 42.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"//one of the 2 solution\n",
+"f0=5+1.9/60;//declination in degrees\n",
+"n=0.25;//constant\n",
+"del0=0;//del''0\n",
+"del1=-0.1;//del''1\n",
+"d2=23.0//del1/2\n",
+"//calculation\n",
+"fn=f0+n*d2/60+n*(n-1)/2*(del1+del0)/60;\n",
+"fn=degtodms(fn)\n",
+"disp(fn,'sun declination in deg min sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.36: 43.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"alt=23+40.0/60;//altitude of star in degrees\n",
+"azi=145.0;//azimuth of star in degrees\n",
+"lat=50.0;//latitude in degrees\n",
+"//calculation\n",
+"delta=%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));\n",
+"H=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))\n",
+"H=degtodms(360-H*180/%pi);\n",
+"delta=degtodms(delta*180/%pi);\n",
+"disp('there is a calculation mistake in calculating H in the book');\n",
+"disp(delta,'declination in deg min sec');\n",
+"disp(H,'hour angle in deg min sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.37: 44.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"alt=25+30.0/60;//altitude in degrees\n",
+"azi=45.0;//azimuth in degrees\n",
+"lat=42.0;//latitude in degrees\n",
+"//calculation\n",
+"delta=%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));\n",
+"H=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))\n",
+"H=degtodms(H*180/%pi);\n",
+"delta=degtodms(delta*180/%pi);\n",
+"disp(delta,'declination in deg min sec');\n",
+"disp(H,'hour angle in deg min sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.38: 45.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"delta=21.0*%pi/180+25.0/60*%pi/180;//delta in degrees\n",
+"lat=25+40.0/60;//latitude in degrees\n",
+"//calculation\n",
+"H=acos((0-cos(%pi/2-lat*%pi/180)*cos(%pi/2-delta))/sin(%pi/2-lat*%pi/180)*sin(%pi/2-delta));\n",
+"A=acos(cos(%pi/2-delta)/sin(%pi/2-lat*%pi/180));\n",
+"H=degtodms(360-H*180/%pi);\n",
+"A=degtodms(A*180/%pi);\n",
+"disp(H,'hour angle in deg min sec');\n",
+"disp(A,'azimuth in deg min sec');\n",
+"disp('the answer differs slightly due to round off error');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.39: 46.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"//calculation\n",
+"A=[1,1;1,-1];//matrix\n",
+"b=[90;0];//matrix\n",
+"x=linsolve(A,-b);\n",
+"disp(x(1),'latitude in degrees')\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.40: 47.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"theta=53+20.0/60;//theta in degrees\n",
+"delta=53+20.0/60;//delta in degrees\n",
+"//calculation\n",
+"alpha=theta+delta-90;\n",
+"alpha=degtodms(alpha);\n",
+"disp(alpha,'altitude in deg min sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.4: 11.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"coal=90.0-28.0-24.0/60;//coaltitude in degrees\n",
+"cola=90.0-48.0-30.0/60;//colatitude in degrees\n",
+"//calculation\n",
+"delta=%pi/2-acos((cos(coal*%pi/180)*cos(cola*%pi/180)+sin(coal*%pi/180)*sin(cola*%pi/180)*cos(50*%pi/180)));\n",
+"H=acos(cos(coal*%pi/180)/(sin(cola*%pi/180)*cos(delta))-tan(delta)/tan(cola*%pi/180));\n",
+"Ho=degtodms(H*180/%pi);\n",
+"delta=degtodms(delta*180/%pi)\n",
+"disp(Ho,'H in deg min sec');\n",
+"disp(delta,'declination in deg mi sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.41: 48.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"GMT=18+30.0/60;//GMT in hr\n",
+"ET=1.0/60+25.4/3600-0.67*6.5/3600;//ET in hr\n",
+"//calculation\n",
+"GAT=GMT+ET;\n",
+"GAT=degtodms(GAT)\n",
+"disp(GAT,'GAT in hr min sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.42: 49.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"Long=30.0;//longitude in degrees\n",
+"GAT=13+15.0/60+10.0/3600;//GAT in hr\n",
+"ET=6.0/60+15.35/3600+0.3/3600*1.25278;//ET in hr\n",
+"//calculation\n",
+"LMT=GAT+ET-Long/15.0;\n",
+"LMT=degtodms(LMT);\n",
+"disp(LMT,'LMT in hr min sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.43: 50.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"Long=45.0;//longitude in degrees\n",
+"E=11+55.0/60+5.0/3600-1.5/6*17.0/3/3600;//E in hr\n",
+"//calculation\n",
+"GMT=14+40.0/60+Long/15.0;\n",
+"GHA=GMT+E;\n",
+"LHA=GHA-24-Long/15;\n",
+"LHA=degtodms(LHA);\n",
+"disp(LHA,'LHA of the sun in hr min sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.44: 51.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"E=11+55.0/60+24.0/3600+0.5/3600*(2+40.0/60+21.2/3600);//E in hr\n",
+"GHA=8+35.0/60+45.2/3600;//GHA in hr\n",
+"//calculation\n",
+"GMT=GHA+24-E;\n",
+"GMT=degtodms(GMT);\n",
+"disp(GMT,'GMT in hr min sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.5: 12.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"delta=22+45.0/60;//declination in degrees\n",
+"theta=55.0;//latitude in degrees\n",
+"H=45+15.0/60;//hour angle in degrees\n",
+"//calculation\n",
+"alpha=asin((cos(H*%pi/180)+tan(theta*%pi/180)*tan(delta*%pi/180))*cos(theta*%pi/180)*cos(delta*%pi/180));\n",
+"alpha=alpha*180/%pi;\n",
+"A=acos(sin(delta*%pi/180)/(cos(theta*%pi/180)*cos(alpha*%pi/180))-tan(alpha*%pi/180)*tan(theta*%pi/180));\n",
+"A=degtodms(360-A*180/%pi);\n",
+"disp(A,'azimuth in deg mi sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.6: 13.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"coal=42.0;//coalatitude in degrees\n",
+"code=100+40.0/60//co-declination in degrees\n",
+"//calculation\n",
+"alpha=%pi/2-acos((cos(coal*%pi/180)*cos(code*%pi/180)+sin(coal*%pi/180)*sin(code*%pi/180)*cos(35*%pi/180)));\n",
+"A=acos((cos(code*%pi/180)-cos(coal*%pi/180)*cos(%pi/2-alpha))/(sin(coal*%pi/180)*sin(%pi/2-alpha)));\n",
+"A=degtodms(A*180/%pi);\n",
+"alpha=degtodms(alpha*180/%pi);\n",
+"disp(A,'azimuth in deg min sec towards east is:');\n",
+"disp(alpha,'alpha in deg min sec');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.7: 14.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"theta=33.0+42.0/60.0+34.0/3600.0;//latitude in degrees\n",
+"delta=81.0+55.0/60.0+14.0/3600.0;//declination in degrees\n",
+"//calculation\n",
+"H1=acos(tan(theta*%pi/180)/tan(delta*%pi/180));\n",
+"H1=degtodms(360-H1*180/%pi);\n",
+"alpha=asin(sin(theta*%pi/180)/sin(delta*%pi/180));\n",
+"alpha=degtodms(alpha*180/%pi);\n",
+"A=asin(cos(delta*%pi/180)/cos(theta*%pi/180));\n",
+"A=degtodms(A*180/%pi);\n",
+"disp(A,'azimuth in deg min sec');\n",
+"disp(alpha,'alpha in deg min sec');\n",
+"disp(H1,'hour angle in deg min sec');\n",
+"disp('the answer of azimuth differs slightly due to roundoff error and slight mistake in the book')\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.8: 15.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"alpha=0.0;//degrees\n",
+"theta=25+45.0/60;//latitude in degrees\n",
+"//calculation\n",
+"delta=asin(sin(alpha)/sin(theta*%pi/180));\n",
+"disp(delta,'declination in degrees')\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.9: 16.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"cola=90.0-49.0//colatitude in degrees\n",
+"code=90.0+19.0//codeclination in degrees\n",
+"//calculation\n",
+"A1=acos((cos(code*%pi/180)-cos(cola*%pi/180)*cos(%pi/2))/sin(cola*%pi/180)/sin(%pi/2));\n",
+"A1=degtodms(360-A1*180/%pi);\n",
+"H=acos((0-cos(cola*%pi/180)*cos(code*%pi/180))/sin(cola*%pi/180)*sin(code*%pi/180));\n",
+"H=degtodms(H*180/%pi);\n",
+"disp(A1,'azimuth in deg min sec');\n",
+"disp(H,'hour angle in deg min sec');\n",
+"disp('the hour angle differs slightly due to round off error')\n",
+"clear()"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Surveying_Volume_3_by_A_K_Arora/5-Uses_Of_Field_Astronomy_in_surveying.ipynb b/Surveying_Volume_3_by_A_K_Arora/5-Uses_Of_Field_Astronomy_in_surveying.ipynb
new file mode 100644
index 0000000..01362d7
--- /dev/null
+++ b/Surveying_Volume_3_by_A_K_Arora/5-Uses_Of_Field_Astronomy_in_surveying.ipynb
@@ -0,0 +1,801 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5: Uses Of Field Astronomy in surveying"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.10: 61.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=(round(sd*100)/100)\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"Long=75.0//longitude in degrees\n",
+"GST=11+40.0/60+32.4/3600;//GST in degrees\n",
+"RA=12+25.0/60+18.35/3600;//RA in degrees\n",
+"GMT=15+45.0/60+25.3/3600;//GMT in degrees\n",
+"delta=22+6.0/60+32.5/3600;//angle in degrees\n",
+"//calculation\n",
+"e1=Long/15*9.8565/3600;\n",
+"LSTofLMM=GST-e1;\n",
+"LMT=GMT+Long/15;\n",
+"SIT=LMT+LMT*9.8565/3600//sidereal time interval\n",
+"LHA=SIT+LSTofLMM;\n",
+"H=RA+24-LHA;\n",
+"H=H*15;\n",
+"B=atan(tan(delta*%pi/180)*tan(H*%pi/180));\n",
+"B=B*180/%pi;\n",
+"A=atan(tan(H*%pi/180)*cos(B*%pi/180)/sin((B-32-15.0/60)*%pi/180))\n",
+"A=A*180/%pi;\n",
+"TB=360+A-135-15.0/60-20.0/3600;\n",
+"TB=degtodms(TB);\n",
+"disp(TB,'true bearing TB in degree,minites,seconds respectively');\n",
+"disp('there is slight difference in the answers due to rounding off error in the book');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.11: 62.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=(round(sd*100)/100)\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"z=51+47.0/60+18.0/3600//zenith distance\n",
+"p=88+57.0/60+57.0/3600//polar distance\n",
+"c=61+27.0/60+55.0/3600//co-latitude\n",
+"//calculation\n",
+"s=(z+p+c)/2;\n",
+"A=2*atan(sqrt(sin((s-z)*%pi/180)/sin(s*%pi/180)*sin((s-c)*%pi/180)/sin((s-p)*%pi/180)));\n",
+"A=A*180/%pi;\n",
+"TB=360-A-165-18.0/60-20.0/3600;\n",
+"TB=degtodms(TB);\n",
+"disp(TB,'true bearing TB in degree,minites,seconds respectively');\n",
+"disp('answer varies slightly due to round off error')\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.12: 63.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=(round(sd*100)/100)\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"z2=90-40-13.0/60-15.0/3600;//zenith angle in degrees\n",
+"del2=12+15.0/60+30.0/3600//declination of star in degrees\n",
+"//calculation\n",
+"theta=z2+del2;\n",
+"theta=degtodms(theta);\n",
+"disp(theta,'altitude in degree,minites,seconds respectively');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.13: 64.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100;\n",
+" if sd==60.0 then\n",
+" sd=0;\n",
+" m=m+1;\n",
+" end\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"alpha1=30+45.0/60+25.0/3600;//angle in degrees\n",
+"alpha2=40+48.0/60+30.0/3600;//angle in degrees\n",
+"//calculation\n",
+"e1=-58/3600/tan(alpha1*%pi/180)// error 1\n",
+"e2=-58/3600/tan(alpha2*%pi/180)// error 2\n",
+"theta=(alpha1+alpha2+e1+e2)/2;\n",
+"theta=degtodms(theta)\n",
+"disp(theta,'latitude in degree,minites,seconds respectively');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.14: 65.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=(round(sd*100)/100)\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"ZP=37+29.0/60+40.0/3600//colatitde in degrees\n",
+"ZM=56+24.0/60+50.0/3600//coaltitude in degrees\n",
+"PM=67+54.0/60+24.0/3600//codeclination in degrees\n",
+"//calculation\n",
+"A1=acos((cos(PM*%pi/180)-cos(ZP*%pi/180)*cos(ZM*%pi/180))/(sin(ZP*%pi/180)*sin(ZM*%pi/180)));\n",
+"A1=A1*180/%pi;\n",
+"A=360-A1;\n",
+"A=degtodms(A);\n",
+"disp(A,'azimuth of sun in degree,minites,seconds respectively');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.1: 52.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"l1=11.5;//position\n",
+"l2=13.5;//position\n",
+"r1=8.5;//position\n",
+"r2=6.5;//position\n",
+"alpha=3+15.0/60+28.0/3600;//angle in hr\n",
+"OB=121+45.0/60+18.0/3600;//angle in hr\n",
+"OA=43+25.0/60+20.51/3600;//angle in hr\n",
+"//calculation\n",
+"gamma=(l1+l2)/4-(r1+r2)/4;\n",
+"e=gamma*tan(alpha*%pi/180)/3600//correction\n",
+"CH=OB-OA-e;\n",
+"CH=degtodms(CH);\n",
+"disp(CH, 'corrected horizontal angle in deg,min,sec respectively');\n",
+"clear()\n",
+"disp('answer varies slightly due to round off error')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.15: 66.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=(round(sd*100)/100)\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"theta=54+30.0/60//latitude in degrees\n",
+"delta=62+12.0/60+21.0/3600//declination in degrees\n",
+"//calculation\n",
+"alpha=asin(sin(theta*%pi/180)/sin(delta*%pi/180));\n",
+"A1=acos(tan(theta*%pi/180)/tan(alpha));\n",
+"A1=A1*180/%pi;\n",
+"TB=360-A1-65-18.0/60-42.0/3600;\n",
+"TB=degtodms(TB);\n",
+"alpha=degtodms(alpha*180/%pi);\n",
+"H=acos(tan(theta*%pi/180)/tan(delta*%pi/180));\n",
+"H=degtodms(H*180/%pi);\n",
+"disp(TB,'true bearing in degree,minites,seconds respectively');\n",
+"disp(alpha,'altitude in degree,minites,seconds respectively');\n",
+"disp(H,'hour angle in degree,minites,seconds respectively');\n",
+"disp('the answer for hour angle in the textbook is wrong');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.16: 67.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100;\n",
+" if sd==60.0 then\n",
+" sd=0;\n",
+" m=m+1;\n",
+" end\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"alpha=44+12.0/60+30.0/3600;//angle in degrees\n",
+"d=15.0/60+45.86/3600//diameter correction\n",
+"Long=7+20.0/60+15.0/3600//longitude in degrees\n",
+"//calculation\n",
+"alpha=alpha+d-58/3600/tan(alpha)+8.8/3600*cos(alpha);\n",
+"GAT=Long/15;\n",
+"e2=6.82/3600*GAT;\n",
+"delta=22+18.0/60+12.8/3600+e2;\n",
+"theta=delta+90-alpha;\n",
+"theta=degtodms(theta);\n",
+"disp(theta,'altitude in degree,minites,seconds respectively');\n",
+"disp('answer varies slightly due to round off error');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.17: 68.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=(round(sd*100)/100)\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"GMT=16+22.0/60+55.0/3600;\n",
+"ET=3.0/60+43.0/3600;\n",
+"c=90-42-20.0/60;\n",
+"p=90-18-45.0/60-50.0/60;\n",
+"z=90-43-38.0/60;\n",
+"//calculation\n",
+"H=acos(cos(z*%pi/180)/sin(c*%pi/180)/sin(p*%pi/180)-1/tan(c*%pi/180)*1/tan(p*%pi/180));\n",
+"H=H*180/%pi;\n",
+"LAT=12-H/15;\n",
+"LMT=LAT-ET;\n",
+"Long=GMT-LMT;\n",
+"Long=Long*15;\n",
+"Long=degtodms(Long);\n",
+"disp(Long,'Longitude in degree,minites,seconds respectively in west');\n",
+"disp('the answer varies slightly due to round off error');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.18: 69.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=(round(sd*100)/100)\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"alpha=21+35.0/60+30.0/3600//mean observed altitude\n",
+"C=(4.5+5.5-3.5-2.5)/4*15.0/3600;\n",
+"c=44+30.0/60//colatitude in degrees\n",
+"z=68+26.0/60+34.0/3600//coaltitude in degrees\n",
+"p=94+4.0/60+15.0/3600//codeclination in degrees\n",
+"s=(c+p+z)/2;\n",
+"//calculation\n",
+"cr=-58/3600/tan(alpha)//correction refraction\n",
+"cp=8.8/3600*cos(alpha)//correction parallax\n",
+"alpha=alpha+C+cr+cp// corrected altitude\n",
+"A=2*atan(sqrt(sin((s-z)*%pi/180)/sin(s*%pi/180)*sin((s-c)*%pi/180)/sin((s-p)*%pi/180)));\n",
+"A=A*180/%pi;\n",
+"Mh=(121+45.0/60+20.0/3600+122+47.0/60)/2//mean horizontal angle\n",
+"AZ=360-Mh-A;\n",
+"AZ=degtodms(AZ);\n",
+"disp(AZ,'Azimuth from north(clockwise) in degree,minites,seconds respectively');\n",
+"disp('the answer varies slightly due to round off error')\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.2: 53.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"alpha=30+32.0/60+18.0/3600//latitude in hr\n",
+"d=16.0/60+2.85/3600//semi-diameter of sun in hr\n",
+"//calculation\n",
+"C1=-58.0/3600/tan(alpha*%pi/180); \n",
+"C2=8.8/3600*cos(alpha*%pi/180); \n",
+"C3=d; \n",
+"CL=alpha+C1+C2+C3;\n",
+"CL=degtodms(CL);\n",
+"disp(CL,'corrected latutude in deg,min,sec respectively');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.3: 54.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"alpha=40+52.0/60+10.0/3600//latitude in hr\n",
+"//calculation\n",
+"C1=-58.0/3600/tan(alpha*%pi/180);\n",
+"CL=alpha+C1;\n",
+"CL=degtodms(CL);\n",
+"disp(CL,'corrected latutude in deg,min,sec respectively');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.4: 55.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"LMT=21+23.0/60+05.0/3600//local chronometer time\n",
+"Long=65.0+19.0/60//longitude in hr\n",
+"GST=13+15.0/60+20.0/3600;//GST in hr\n",
+"RA=9+32.0/60+15.0/3600;//RA in hr\n",
+"Long2=82.0+30.0/60//longitude of India\n",
+"//calculation\n",
+"e1=Long/15*9.8565/3600//error\n",
+"SIT=RA+24-GST+e1//sidereal time interval after LMM\n",
+"e2=SIT*9.8296/3600//error\n",
+"MI=SIT-e2//mean interval after LMM\n",
+"LMT=LMT-(Long2-Long)/15.0;\n",
+"CE=MI-LMT;\n",
+"CE=degtodms(CE);\n",
+"disp(CE,'chronometer error in hours,min,sec respectively (fast)');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.5: 56.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"MST=12+32.0/60+15.0/3600//mean sidereal time in hr\n",
+"RA=15+45.0/60+10.0/3600;//RA in hr\n",
+"theta=55+14.0/60+20.0/3600//latitude\n",
+"delta=15+24.0/60+30.0/3600//declination\n",
+"alpha=35+44.0/60+10.0/3600//zenith distance\n",
+"//calculation\n",
+"c=90-theta;\n",
+"p=90-delta;\n",
+"z=90-alpha;\n",
+"H=acos(cos(z*%pi/180)/sin(c*%pi/180)/sin(p*%pi/180)-1/(tan(p*%pi/180)*tan(c*%pi/180)))\n",
+"H=H/15*180/%pi;\n",
+"LST=RA-H;\n",
+"CE=MST-LST;\n",
+"CE=degtodms(CE);\n",
+"disp(CE,'chronometer error in hours,min,sec respectively (fast)');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.6: 57.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"LMTe=6+34.0/60+18.0/3600// LMT east\n",
+"LMTw=8+58.0/60+2.0/3600// LMT west\n",
+"RA=16+11.0/60+25.0/3600;//RA in hr\n",
+"Long=125+33.0/60;//Longitude\n",
+"GST=8+25.0/60+14.0/3600;//GST in hr\n",
+"//calculation\n",
+"e1=Long/15*9.8565/3600//error\n",
+"SIT=RA-GST+e1//sidereal time interval after LMM\n",
+"e2=SIT*9.8296/3600;\n",
+"MI=SIT-e2//mean time interval after LMM\n",
+"LMTav=(LMTe+LMTw)/2//mean LMT\n",
+"CE=LMTav-MI;\n",
+"CE=degtodms(CE);\n",
+"disp(CE,'chronometer error in slower side in hours,min,sec respectively (slow)');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.7: 58.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=(round(sd*100)/100)\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"LMM=15+9.0/60+5.21/3600// mean LMT\n",
+"GMT=10+9.0/60+3.76/3600;//GMT in hr\n",
+"Long=75.0//longitude\n",
+"alpha=42+30.0/60+42.0/3600;//angle in degrees\n",
+"theta=34+48.0/60+12.0/3600;//angle in degrees\n",
+"delta=15+36.0/60+48.0/3600;//angle in degrees\n",
+"//calculation\n",
+"H=acos(sin(alpha*%pi/180)/cos(theta*%pi/180)/cos(delta*%pi/180)-(tan(delta*%pi/180)*tan(theta*%pi/180)))\n",
+"H=H/15*180/%pi;\n",
+"GAT=12+H-Long/15;\n",
+"LMT=GAT+Long/15-5.0/60-40.0/3600;\n",
+"CE=LMM-LMT;\n",
+"CE=degtodms(CE);\n",
+"disp(CE,'chronometer error in slower side in hours,min,sec respectively (fast)');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.8: 59.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=(round(sd*100)/100)\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"del1=75+14.0/60+20.0/3600;//declination in degrees\n",
+"del2=70+12.0/60+30.0/3600;//declination in degrees\n",
+"d=del1-del2;//difference in degrees\n",
+"//calculation\n",
+"k=cos(del1*%pi/180)/cos(del2*%pi/180);\n",
+"A2=%pi/2-atan((cos(d*%pi/180)-k)/sin(d*%pi/180));\n",
+"A2=A2*180/%pi;\n",
+"A2=120+15.0/60+10.0/3600-A2;\n",
+"CR=360-A2;\n",
+"A2=degtodms(A2);\n",
+"CR=degtodms(CR);\n",
+"disp(A2,'azimuth of angle R in degree,minites,seconds respectively');\n",
+"disp(CR,'true bearing of CR in degree,minites,seconds respectively');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.9: 60.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=(round(sd*100)/100)\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"a=26.0/60+51.0/3600;//angle in degrees\n",
+"p=56.0/60+5.1/3600//polar distance\n",
+"//calculation\n",
+"H=acos(a/p);\n",
+"A=p*sin(H)/cos(30.75694*%pi/180);\n",
+"CR=25+35.0/60+40.0/3600-A;\n",
+"CR=degtodms(CR);\n",
+"disp(CR,'azimuth of angle CR in degree,minites,seconds respectively');\n",
+"disp('answer varies slightly due to round off error')\n",
+"clear()"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Surveying_Volume_3_by_A_K_Arora/6-Photogrammetry.ipynb b/Surveying_Volume_3_by_A_K_Arora/6-Photogrammetry.ipynb
new file mode 100644
index 0000000..f21d11a
--- /dev/null
+++ b/Surveying_Volume_3_by_A_K_Arora/6-Photogrammetry.ipynb
@@ -0,0 +1,1035 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6: Photogrammetry"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.10: 79.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"S=1.0/10000;//scale\n",
+"A=500.0;//area in sq. km\n",
+"pw=0.3;//side overlap\n",
+"l=0.23;//length in mm\n",
+"w=0.23;//width in mm\n",
+"//calculation\n",
+"a=(1-0.6)*(1-pw)*l*w/S**2/1000/1000;\n",
+"N=A/a;\n",
+"disp(round(N),'no. of photographs taken')\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.11: 80.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"L=25.0e3;//length in m\n",
+"k=0.23e4;//l/s=w/s;\n",
+"pl=0.6;//longitudinal lap\n",
+"pw=0.3;//side lap\n",
+"W=20.0e3;//width in m\n",
+"//calculation\n",
+"N=((L/((1-pl)*k)+1))*((W/((1-pw)*k)+1)+1);\n",
+"disp(N,'no. of photographs taken');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.12: 81.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"//Part A page 310\n",
+"f=0.1524;//focal length\n",
+"S=1.0/10000;//scale\n",
+"pw=0.3;//side lap\n",
+"w=0.23;//format width\n",
+"pl=0.6;\n",
+"l=0.23;\n",
+"//calculation\n",
+"W=(1-pw)/S*w;\n",
+"H=f/S+300;\n",
+"disp(H,'height over datum in m');\n",
+"N2=30/W+1;\n",
+"N2=round(N2)\n",
+"disp(N2-1,'no. of flight strips');\n",
+"L=(1-pl)*1/S*l/1000;\n",
+"disp(L,'length of each photograph cover in km');\n",
+"T=3600*L/240.0;\n",
+"disp(round(T),'exposure time in s');\n",
+"Ad=T*240e3/60.0/60.0;//adjusted ground distance\n",
+"N1=40.0e3/Ad+1;\n",
+"N1=round(N1)\n",
+"N=N1*N2;\n",
+"disp(N,'no. of photographs taken');\n",
+"//Part b page 317\n",
+"t=3.0/180*%pi;\n",
+"ya=82.25;\n",
+"xa=-62.45;\n",
+"s=220;\n",
+"f=152.4;//focal length\n",
+"H=2500.0e3;\n",
+"h=500.0e3;\n",
+"//calculation\n",
+"theta=s-180;\n",
+"ya_dash=xa*sin(theta*%pi/180)+ya*cos(theta*%pi/180)+f*tan(t)\n",
+"S=(f/cos(t)-ya_dash*sin(t))/(H-h);\n",
+"disp(round(1/S),'scale of photograph in 1 in')\n",
+"disp('answer varies slightly due to round off error')\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.13: 82.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"t=3*%pi/180;//tilt\n",
+"xa=-62.45;//x coordinate of a\n",
+"xb=78.25;//x coorbinate of b\n",
+"f=152.4;//focal length in mm\n",
+"H=2500.0;//actual height in m\n",
+"hb=800;//height B in m\n",
+"ha=500.0;//height A in m\n",
+"ya=82.25;//y coordinate of a\n",
+"yb=-41.15;//y coordinate of b\n",
+"s=220.0;\n",
+"//calculation\n",
+"theta=s-180;\n",
+"ya1=xa*sin(theta*%pi/180)+ya*cos(theta*%pi/180)+f*tan(t);//ya'\n",
+"xa1=xa*cos(theta*%pi/180)-ya*sin(theta*%pi/180);//xa'\n",
+"xb1=xb*cos(theta*%pi/180)-yb*sin(theta*%pi/180);//xb'\n",
+"yb1=xb*sin(theta*%pi/180)+yb*cos(theta*%pi/180)+f*tan(t);//yb'\n",
+"Xa=xa1*(H-ha)/(f/cos(t)-ya1*sin(t));\n",
+"Xb=xb1*(H-hb)/(f/cos(t)-yb1*sin(t));\n",
+"Ya=ya1*cos(t)*(H-ha)/(f/cos(t)-ya1*sin(t));\n",
+"Yb=yb1*cos(t)*(H-hb)/(f/cos(t)-yb1*sin(t));\n",
+"AB=sqrt((Xb-Xa)**2+(Yb-Ya)**2);\n",
+"disp(AB,'distance of AB in m')\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.14: 83.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"ri=95.0;//radial distance in mm\n",
+"f=152.4;//focal length in mm\n",
+"t=3*%pi/180;//tilt\n",
+"l=50*%pi/180;//angle\n",
+"//calculation\n",
+"dt=ri**2*sin(t)*cos(l)**2/(f-ri*sin(t)*cos(l));\n",
+"disp(round(dt*100)/100,'tilt displacement of the image in mm')\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.15: 84.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"d=230.0;//square side in mm\n",
+"f=152.4//focal length in mm\n",
+"pl=0.6;//end lap\n",
+"//calculation\n",
+"k=(1-pl)*d/f;\n",
+"V=k/0.15;\n",
+"disp(V,'vertical exaggeration is')\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.16: 85.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"xa=51.23;//x coordinate of a\n",
+"xb=91.48;//x coordinate of b\n",
+"ya=48.33;//y coordinate of a\n",
+"yb=-51.63;//y coordinate of b\n",
+"f=152.4;//focal length in mm\n",
+"B=425.0;//actual height in mm\n",
+"hb=842.86//height B in mm\n",
+"ha=820.97;//height A in mm\n",
+"r1=10.42;//in mm\n",
+"r2=9.67;//in mm\n",
+"b1=89.12;//base in mm\n",
+"b=89.43;//base in mm\n",
+"ra=11.62;//parallax in mm\n",
+"rb=14.53;//parallax in mm\n",
+"//calculation\n",
+"C=0.5*((b1-r1)+(b-r2))\n",
+"pa=C+ra;\n",
+"pb=C+rb;\n",
+"Xa=B*xa/pa;\n",
+"Xb=xb*B/pb;\n",
+"Ya=ya*B/pa;\n",
+"Yb=yb*B/pb;\n",
+"AB=sqrt((Xb-Xa)**2+(Yb-Ya)**2);\n",
+"disp(AB,'distance of AB in m')\n",
+"disp('the answer does not match with textbook due to round off error')\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.1: 70.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"Da=184.32;//distance in mm\n",
+"Db=95.84;//distance in mm\n",
+"Ax=-115.0;//x coordinate of A\n",
+"By=-115.0;//y coordinate of B\n",
+"//calculation\n",
+"phi=atan(Ax/By);\n",
+"AB=sqrt(Ax**2+By**2);\n",
+"theta=acos((Da**2+AB**2-Db**2)/2/Da/AB);\n",
+"alpha=phi-theta;\n",
+"xc=Da*cos(alpha)-115.0;\n",
+"disp(xc,'the coordiantes in mm x is');\n",
+"yc=-Da*sin(alpha);\n",
+"disp(yc,'the coordiantes in mm y is');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.17: 86.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"C=79.0;//in mm\n",
+"ra=11.42;//elevarion in image in mm\n",
+"rb=15.65;//elevarion in image in mm\n",
+"hb=651;//height of B in mm\n",
+"H=1500;//height in m\n",
+"//calculation\n",
+"delp=ra-rb;//pa=ra+c and pb=rb+c so ra-rb=pa-pb\n",
+"pa=ra+C;\n",
+"ha=hb+delp/pa*(H-hb);\n",
+"disp(ha,'height of A in m')\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.18: 77.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"B=741.0;//airbase in m\n",
+"f=152.4;//focal length in mm\n",
+"pa=94.32;//in mm\n",
+"ha=325;//elevation in mm\n",
+"//calculation\n",
+"H=ha+B*f/pa;\n",
+"disp(H,'height in m')\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.19: 88.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"H=1632.0;//above MSL in m\n",
+"f=152.4;//focal length in mm\n",
+"pa=82.75;//in mm\n",
+"ha=283;//elevation in m\n",
+"//calculation\n",
+"B=pa/f*(H-ha);\n",
+"disp(B,'width of air base in m')\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.20: 89.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"alpha=50.0;//angle in degrees\n",
+"beta=46.0;//angle in degrees\n",
+"f=300.0;//focal length in mm\n",
+"xa=24.0;//x coordinate of a\n",
+"xb=30.0;//x coordinate of b\n",
+"//calculation\n",
+"dela=xa/f;\n",
+"delb=xb/f;\n",
+"A=alpha+dela*180/%pi;//angle A\n",
+"B=beta-delb*180/%pi;//angle B\n",
+"D=180-A-B;\n",
+"AD=1300.0*sin(B*%pi/180)/sin(D*%pi/180);\n",
+"disp(round(AD),'distance of AD in m');\n",
+"Y=6/(sqrt(xa**2+f**2))*AD;\n",
+"RD=60.12+Y;\n",
+"disp(RD,'RL of D in m');\n",
+"disp('the answer varies slightly due to round off error');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.21: 90.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"f=152.4;//focal length in mm\n",
+"L=120;//length in m\n",
+"x1=40.0;//distance in mm\n",
+"x2=-90.0;//distance in mm\n",
+"//calculation\n",
+"X=f*L/(x1-x2);\n",
+"disp(X,'the coordinates of D in m is X=')\n",
+"Y=L*x1/(x1-x2);\n",
+"disp(Y,'the coordinates of D in m is Y=')\n",
+"h=X*(30-20)/f;\n",
+"disp(h,'elevation of D in m')\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.22: 91.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"function[dms]=degtodms(deg)\n",
+" d = int(deg)\n",
+" md = abs(deg - d) * 60\n",
+" m = int(md)\n",
+" sd = (md - m) * 60\n",
+" sd=round(sd*100)/100;\n",
+" if sd==60.0 then\n",
+" sd=0;\n",
+" m=m+1;\n",
+" end\n",
+" dms=[d m sd]\n",
+"endfunction\n",
+"f=150.4;//focal length in mm\n",
+"xc=-32.43;//coordinate in mm\n",
+"xd=9.52;//coordinate in mm\n",
+"//calculation\n",
+"thc=atan(xc/f);\n",
+"thd=atan(xd/f);\n",
+"th=thd-thc;\n",
+"th=th*180/%pi;\n",
+"Az=325+15.0/60+th;\n",
+"Az=degtodms(Az);\n",
+"disp(Az,'Azimuth of D in deg,min,sec respectively')\n",
+"disp('the answer differs slightly due to round off error')\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.23: 92.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"BC=66.0;//distance in m\n",
+"AC=81.6;//distance in m\n",
+"xb=3.0;//x coordinate of b\n",
+"ya=1.25;//y coordinate of a\n",
+"xa=3.3;//x coordinate of a\n",
+"theta=23+43.0/60;//angle in degrees\n",
+"//calculation\n",
+"f=(xa+xb)/2/tan(theta*%pi/180)+sqrt((xa+xb)**2/4/(tan(theta*%pi/180))**2+xa*xb);\n",
+"disp(round(f),'focal length in cm');\n",
+"aa=atan(ya/sqrt(xa**2+f**2));\n",
+"Va=AC*tan(aa);\n",
+"ab=atan(-1.87/sqrt(xa**2+f**2));\n",
+"Vb=-BC*tan(ab);\n",
+"disp(round((Vb+Va)*100)/100,'horizontal distance in m');\n",
+"disp('the answer varies slightly due to round off error');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.24: 93.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"Eab=300.0;//average elevation\n",
+"f=152.4;//focal length in mm\n",
+"xa=28.4;//x coordinate of a\n",
+"xb=-22.5;//x coordinate of b\n",
+"ya=24.5;//y coordinate of a\n",
+"yb=38.4;//y coordinate of b\n",
+"Ha=2322.0;//distance in m\n",
+"ha=400.0;//elevation of a in m\n",
+"hb=200.0;//elevation of b in m\n",
+"ab=61.05;//distance in mm\n",
+"AB=810;//ground length in m\n",
+"//calculation\n",
+"Ha=300+AB/ab*f;\n",
+"Xa=round((Ha-ha)*100/f*xa)/100;\n",
+"Xb=round((Ha-ha)*100/f*xb)/100;\n",
+"Ya=round((Ha-hb)*100/f*ya)/100;\n",
+"Yb=round((Ha-hb)*100/f*yb)/100;\n",
+"AB=sqrt((Xa-Xb)**2+(Ya-Yb)**2);\n",
+"disp(round(AB*100)/100,'length AB in m');\n",
+"H=300+810/AB*(Ha-Eab);\n",
+"Xa=(H-ha)/f*xa;\n",
+"Xb=(H-ha)/f*xb;\n",
+"Ya=(H-hb)/f*ya;\n",
+"Yb=(H-hb)/f*yb;\n",
+"AB1=sqrt((Xa-Xb)**2+(Ya-Yb)**2);\n",
+"disp(AB1,'corrected length AB in m');\n",
+"disp(round(H*1000)/1000,'flying height in m');\n",
+"//Xb is calculated wrong in the book that resulted in the error-\n",
+"clear()\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.25: 94.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"AB=300.0;//length in m\n",
+"ab=102.4;//distance in mm\n",
+"f=152.4;//focal length in mm\n",
+"hab=320.0;//average elevation in m\n",
+"d=7.8;//dispalcement in mm\n",
+"r=75.4;//distance in mm\n",
+"//calculation\n",
+"H=hab+AB/ab*f;\n",
+"h=d*H/r;\n",
+"disp(h,'height difference in m')\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.26: 95.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"f=152.4;//focal length in mm\n",
+"b=74.25;//distance in mm\n",
+"ht=100.0;//height in m\n",
+"H=700.0;//flying height\n",
+"//calculation\n",
+"B=b*H/f;\n",
+"pb=f*B/H;\n",
+"pt=f*B/(H-ht);\n",
+"delp=pt-pb;\n",
+"disp(round(delp*100)/100,'error due to parallax in mm')\n",
+"ht=delp/pt*(H);\n",
+"disp(ht,'height of chimney in m')\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.2: 71.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"f=0.152;//focal length in m\n",
+"H=1800;//elevation of topmost point in m\n",
+"h=300;//elevation of ground in m\n",
+"//calculation\n",
+"S=f/(H-h);\n",
+"disp(round(1/S),'scale of photograph in 1 in')\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.27: 96.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"B=180.0;//height in m\n",
+"f=120.0;//focal length in mm\n",
+"pa=54.32//parallax in mm\n",
+"pb=46.35;//parallax in m\n",
+"//calculation\n",
+"delH=B*f/pa/pb*(pa-pb);\n",
+"disp(delH,'height difference in m')\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.28: 97.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"L1=30000.0;//length in m\n",
+"pl=0.6;//overlap\n",
+"k=12000.0*0.2;//=l/S and w/S\n",
+"pw=0.3;//side lap\n",
+"W1=24000;//width in m\n",
+"//calculation\n",
+"N=round(((L1/((1-pl)*k)+1)+1))*round(((W1/((1-pw)*k)+1)+1));\n",
+"disp(N,'no. of photographs taken');\n",
+"Nf=N/33-1;//flight strips\n",
+"disp(Nf,'no. of flight strips');\n",
+"gd=(1-pl)*k;//grounf distance\n",
+"disp(gd,'ground distance in m');\n",
+"I=gd/(200e3)*60.0*60.0;//exposure interval\n",
+"disp(round(I),'exposure interval in s');\n",
+"ad=round(I)/60.0/60*200e3;//actual distance\n",
+"disp(ad,'actual distance in m');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.3: 72.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"f=0.150 //focal length in m\n",
+"h1=1500.0;//elevation A in m\n",
+"h2=1200.0;//elevation B in m\n",
+"h3=1000.0;//elevation C in m\n",
+"H=3000.0;//height in m\n",
+"//calculstion\n",
+"hav=1.0/3*(h1+h2+h3);\n",
+"S1=f/(H-h1);\n",
+"disp(1/S1,'scale of point 1 in 1 in');\n",
+"S2=f/(H-h2);\n",
+"disp(1/S2,'scale of point 2 in 1 in');\n",
+"S3=f/(H-h3);\n",
+"disp(round(1/S3),'scale of point 3 in 1 in');\n",
+"Sav=f/(H-hav);\n",
+"disp(round(1/Sav),'average scale in 1 in');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.4: 73.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"ab=188.0;//distance in m\n",
+"AB=120;//distance in m\n",
+"Sm=1.0/20000;\n",
+"//calculation\n",
+"S=ab/AB*Sm;\n",
+"disp(1/S,'scale of photograph in 1 in');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.5: 74.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"xa=45.35;\n",
+"xb=-40.16;\n",
+"f=152.4;//focal length\n",
+"H=1500.0;//actual height\n",
+"ha=200.0;//height A\n",
+"hb=150.0;//height B\n",
+"ya=38.41;\n",
+"yb=-45.65;\n",
+"//calculation\n",
+"Xa=xa*(H-ha)/f;\n",
+"Ya=ya*(H-hb)/f;\n",
+"Xb=xb*(H-ha)/f;\n",
+"Yb=yb*(H-hb)/f;\n",
+"AB=sqrt((Xb-Xa)**2+(Yb-Ya)**2);\n",
+"disp(AB,'distance of AB in m');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.6: 75.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"d=62.4;//displacement in mm\n",
+"H=250.0;//height of datum m\n",
+"r=115.4;//image distance in mm\n",
+"//calculation\n",
+"h=H*d/r;\n",
+"disp(h,'height of chimney in m')\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.7: 76.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"ra=88.25;//image distance of A in mm\n",
+"rb=81.23;//image distance of B in mm\n",
+"rc=68.14;//image distance of C in mm\n",
+"H=2000.0;// in m\n",
+"ha=255;//distance in m\n",
+"hb=200;//distance in m\n",
+"hc=145;//distance in m\n",
+"f=0.1524;//focal length in m\n",
+"//calculation\n",
+"aa=ra*ha/H;\n",
+"disp(aa,'relief distance of A in mm');\n",
+"bb=rb*hb/H;\n",
+"disp(bb,'relief distance of B in mm');\n",
+"cc=rc*hc/H;\n",
+"disp(cc,'relief distance of C in mm');\n",
+"S=f/H;\n",
+"disp(1/S,'scale of photograph in 1 in');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.8: 77.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"f=0.1524;//focal length in m\n",
+"S=0.08251/1000;//scale\n",
+"//calculation\n",
+"H=f/S;\n",
+"disp(H,'flying height in m');\n",
+"clear()"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.9: 78.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc; funcprot(0);\n",
+"// Initialization of Variable\n",
+"AB=610;// ground length in m\n",
+"Xa=18.35;//in mm\n",
+"Xb=106.41;//in mm\n",
+"Ya=-62.41;//in mm\n",
+"Yb=-21.43;//in mm\n",
+"Ha=435;//elevation in m\n",
+"Hb=452;//elevation in m\n",
+"f=0.1524*1000;//focal length in m\n",
+"//calculation\n",
+"//solving the quadratic polynomial in H\n",
+"//a=(Xb(H-Hb)-Xa(H-Ha))/f\n",
+"//b=(Yb(H-Hb)-Ya(H-Ha))/f\n",
+"//AB=sqrt(a^2+b^2)\n",
+"//0=0.4064-365.929H-289685.07\n",
+"//H=poly([-289685.926 -365.929 0.4064],'x','coeff')\n",
+"//h=roots(H)\n",
+"//disp(h(1),'height required in m')\n",
+"function [f]=equation(x)\n",
+" f=610^2-((Xb/f*(x-Hb)-Xa/f*(x-Ha))^2+(Yb/f*(x-Hb)-Ya/f*(x-Ha))^2)\n",
+"endfunction\n",
+"//initial guess\n",
+"x=1407;\n",
+"//deff('y=f(x)','y=f');\n",
+"y=fsolve(x,equation);\n",
+"disp(round(y),'height required in m')\n",
+"clear()"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}