Chapter 1: Introduction

Problem1, pg 25

In [24]:
l=20;                #chain length
e=0.03;              #error
l1=l+e;              #L'
ml=327;              #measured length
truel=(l1/l)*(ml)    #true length
print ("true length=",truel)
true length= 327.4905

Problem2, pg 25

In [25]:
l1=20;                  #chain 1 length
e=0.05;                 #error
l11=l1+e;               
ml1=1200;               #measured lenght
tl=(l11/l1)*ml1;        #true lenght of line

l2=30;                  #chain 2 length
ml2=1195;               #measured length

l21=(tl/ml2)*l2;        
ae=l21-l2;              #amount of error
print('amount of error=',ae)
amount of error= 0.20083682008368697

Problem3, pg 25

In [26]:
l1=20
e=(0.06/2)                      #consider mean elongation
l11=l1+e;
ml=900;
tl=(l11/l1)*ml;
print('true length1=',tl)
l2=20;
e2=(0.06+0.14)/2;
l21=20+e2;
ml2=1575-ml;

tl2=(l21/l2)*ml2;
print('true length 2=',tl2)
td=tl+tl2;
print('true distance=',td)
true length1= 901.35
true length 2= 678.3750000000001
true distance= 1579.7250000000001

Problem4, pg26

In [27]:
s=100;
dsm=3500;
adsm=dsm/s;

print('distance between stations on  map=',adsm,'centimeters')

actuals=50;
td=adsm*actuals;

print('true distance on ground =',td,'meters')
distance between stations on  map= 35.0 centimeters
true distance on ground = 1750.0 meters

Problem 5, pg 26

In [28]:
present=19.5
actual=20;
cm1=actual/present;
cm12=(actual*actual)/(present*present);
pm=125.5;
apm=pm*cm12;
print('actual area present=',apm,'square cm');

cm=40;
cm2=cm*cm;

area=cm2*apm;
scale=(20.05*20.05)/(20*20);
ta=scale*area;
print('true area=',ta,'square meters');
actual area present= 132.01840894148586 square cm
true area= 212286.9217619987 square meters

Problem 6, pg 27

In [29]:
from __future__ import division

L=30;
t0=20;
p0=10;
pm=15;
tm=32;
a=0.03;
al=11/(1000000);
E=2.1*(1000000);
w=0.693;
ml=780;
n=1;
print(' for n=1')
ct=al*L*(tm-t0);
print('the temperature correction is',ct,'meters');

cp=(pm-p0)*L/(a*E);
print('the pull corretion is ',cp,' meters');

cs=-L*w*w/(24*pm*pm*n*n);
print('the sag correction is  ',cs,'meters');

e=ct+cp+cs;
print('the total correction is ',e,'meters');

l1=L+e;

truelength=(l1/L)*ml;
print('the true length  is ',truelength);

n=2;

print(' for n=2')
ct=al*L*(tm-t0);
print('the temperature correction is',ct,'meters');

cp=(pm-p0)*L/(a*E);
print('the pull corretion is ',cp,' meters');

cs=-L*w*w/(24*pm*pm*n*n);
print('the sag correction is  ',cs,'meters');

e=ct+cp+cs;
print('the total correction is ',e,'meters');

l1=L+e;

truelength=(l1/L)*ml;
print('the true length  is ',truelength);
 for n=1
the temperature correction is 0.00396 meters
the pull corretion is  0.002380952380952381  meters
the sag correction is   -0.0026680499999999995 meters
the total correction is  0.0036729023809523816 meters
the true length  is  780.0954954619046
 for n=2
the temperature correction is 0.00396 meters
the pull corretion is  0.002380952380952381  meters
the sag correction is   -0.0006670124999999999 meters
the total correction is  0.005673939880952382 meters
the true length  is  780.1475224369049

Problem 7, pg 28

In [30]:
from __future__ import division

L=20;
t0=20;
p0=15;
p=10;
tm=30;
a=0.02;
al=11/(1000000);
E=2.1*(1000000);
w=0.4;

n=1;
ct=al*L*(tm-t0);
print('the temperature correction is',ct,'meters');

cp=(p-p0)*L/(a*E);
print('the pull corretion is ',cp,' meters');

cs=-L*w*w/(24*p*p*n*n);
print('the sag correction is  ',cs,'meters');

e=ct+cp+cs;
print('the total correction is ',e,'meters');

hd=L+e;

print('the horizontal distance  is ',hd);
the temperature correction is 0.0021999999999999997 meters
the pull corretion is  -0.002380952380952381  meters
the sag correction is   -0.0013333333333333335 meters
the total correction is  -0.001514285714285715 meters
the horizontal distance  is  19.998485714285714

Problem 8, pg 29

In [31]:
from __future__ import division

L=30;
t0=20;
p0=5;
tm=25;
a=0.02;
al=11/(1000000);
E=2.1*(1000000);
float(E);
float(al);
w1=22;
w=0.66;
n=1;

p=5;
print('for p=5 case');

ct=al*L*(tm-t0);
float(ct);
print('the temperature correction is',ct,'meters');

cp=(p-p0)*L/(a*E);
print('the pull corretion is ',cp,' meters');

cs=-L*w*w/(24*p*p*n*n);
print('the sag correction is  ',cs,'meters');

e=ct+cp+cs;
print('the total correction is ',e,'meters');

hd=L+e;

print('the horizontal distance  is ',hd);

p=11;
print('for p=11 case');

ct=al*L*(tm-t0);
print('the temperature correction is',ct,'meters');

cp=(p-p0)*L/(a*E);
print('the pull corretion is ',cp,' meters');

cs=-L*w*w/(24*p*p*n*n);
print('the sag correction is  ',cs,'meters');

e=ct+cp+cs;
print('the total correction is ',e,'meters');

hd=L+e;

print('the horizontal distance  is ',hd);
for p=5 case
the temperature correction is 0.00165 meters
the pull corretion is  0.0  meters
the sag correction is   -0.02178 meters
the total correction is  -0.020130000000000002 meters
the horizontal distance  is  29.97987
for p=11 case
the temperature correction is 0.00165 meters
the pull corretion is  0.004285714285714286  meters
the sag correction is   -0.0045000000000000005 meters
the total correction is  0.001435714285714285 meters
the horizontal distance  is  30.001435714285716

Problem 9, pg 30

In [32]:
from __future__ import division

L=20;
t0=20;
p0=5;
pm=16;
tm=32;
a=0.03;
al=11/(1000000);
E=2.1*(1000000);
w=0.6;
ml=680;
n=1;


ct=al*L*(tm-t0);
print('the temperature correction is',ct,'meters');

cp=(pm-p0)*L/(a*E);
print('the pull corretion is ',cp,' meters');

cs=-L*w*w/(24*pm*pm*n*n);
print('the sag correction is  ',cs,'meters');

e=ct+cp+cs;
print('the total correction is ',e,'meters');

l1=L+e;

truelength=(l1/L)*ml;
print('the true length  is ',truelength);
the temperature correction is 0.00264 meters
the pull corretion is  0.003492063492063492  meters
the sag correction is   -0.001171875 meters
the total correction is  0.004960188492063492 meters
the true length  is  680.1686464087301

Problem 10, pg 31

In [33]:
L=28;
t0=20;
p0=10;
pm=5;
tm=40;
a=0.02;
al=11/(1000000);
E=2.1*(1000000);
w1=470;
ml=680;
n=1;

w=(470*28)/30;
w=w/1000;

ct=al*L*(tm-t0);
print('the temperature correction is',ct,'meters');

cp=(pm-p0)*L/(a*E);
print('the pull corretion is ',cp,' meters');

cs=-L*w*w/(24*pm*pm*n*n);
print('the sag correction is  ',cs,'meters');

e=ct+cp+cs;
print('the total correction is ',e,'meters');

l1=L+e;

dis=(l1/L)*ml;
print('the correctt distance  is ',dis);
the temperature correction is 0.0061600000000000005 meters
the pull corretion is  -0.0033333333333333335  meters
the sag correction is   -0.008979994074074075 meters
the total correction is  -0.006153327407407408 meters
the correctt distance  is  679.8505620486773

Problem 11, pg32

In [34]:
#ch-1, problems on obstacles in chaining, page-32,pb-1

from __future__ import division

import math;

print('from fig p.1.1')
DE=87;
print(DE);
EF=float(87/(math.cos(50*(math.pi/180))))

DF=87*(math.tan(50*(math.pi/180)))

EG=87/(math.cos(65*(math.pi/180)))


print(' the value of EF is ',EF,'meters');

print(' the value of DF is ',DF,'meters');

print(' the value of EG is ',EG,'meters');         
from fig p.1.1
87
 the value of EF is  135.34797293685585 meters
 the value of DF is  103.68256255569626 meters
 the value of EG is  205.85953773426738 meters

Problem 12, pg 33

In [35]:
#ch-1 page-33, pb-2
import math


x=(380.0285/2.5754);

PA=x;
AQ=367-x;
al=180-(36.45+86.55);
bt=86.35-40-35;

TA=AQ*math.tan(46*(math.pi/180));

print('width of river is ',TA,'meters');
width of river is  227.23577649516116 meters

Problem 13, pg 34

In [36]:
# cha-1 page-34 pb-3

from __future__ import division

import math

x=(849.224)/2.6196



PA=x;
AQ=517-x;
al=78-33.67;
bt=180-(43.333+78);

TA=AQ*math.tan(58.66*(math.pi/180));

print('width of river is ',TA,'meters');
width of river is  316.63370603933663 meters

Problem 14, pg35

In [37]:
# cha-1 page-34,35  pb-4

from __future__ import division

import math

al=288.5-(48.5+180);
bt=90-48.5;
BAC=360-41.5;

AC=40*(math.tan(60*(math.pi/180)));

A=207.8;

C=A+AC;

print('chainage of C is',C,'meters');
       
chainage of C is 277.08203230275507 meters

Problem 15, pg36

In [38]:
import math
BB=287.25;
MC=62.25;
al=(BB-180)-MC;
BM=75;
BC=BM*(math.tan(45*(math.pi/180)))

print('width of the river is ',BC,'meters')
width of the river is  74.99999999999999 meters

Problem 16, pg 36

In [39]:
#CH-1 PAGE-36  PB-6;

from __future__ import division
import math


AC=250;
AD=300;
DB=150;
BC=100;
DC=DB+BC;

cosal=(AD*AD+DC*DC-(AC*AC))/(2*AD*DC);

AB=math.sqrt((AD*AD+DB*DB)-2*(AD*DB*cosal));

print('AB=',AB);
AB= 241.8677324489565

Problem 17, pg37

In [40]:
# ch-1 page-36,37   pb-7

from __future__ import division


import math

BE=50;
AB=25;
AEC=157.5-67.5;

al=math.atan2(BE,AB);
al=al*(180/math.pi);

print('al',al)

bt=90-al;
print('bt=',bt);
k=(math.tan(bt*math.pi/180))

print('k=',k)
BC=BE/k;
C=275.5+BC;
print('chinage of c is',C,'meters')
al 63.43494882292201
bt= 26.56505117707799
k= 0.5
chinage of c is 375.5 meters

Problem 18, pg38

In [41]:
#ch-1  page -37,38  pb-1

from __future__ import division

import math


a=17.5;
b=19.3;
c=17.8;
d=13.6;
e=12.9;

da=2.35;
db=4.20;
dc=2.95;
dd=1.65;
de=3.25;

AB=math.sqrt((a*a)-(da*da));
BC=math.sqrt((b*b)-(db*db));
CD=math.sqrt((c*c)-(dc*dc));
DE=math.sqrt((d*d)-(dd*dd));
EF=math.sqrt((e*e)-(de*de));

total=AB+BC+CD+DE+EF;
print('measured length is ',total,'meters');

e=0.025;
l=20;
l1=l-e;
ml=total;

tl=(l1/l)*ml;

print('true length is ',tl,'meters');
measured length is  79.71623152917896 meters
true length is  79.61658623976749 meters

Problem 19, pg 38

In [42]:
#ch-1  page -38  pb-2

from __future__ import division

import math

ab=550;
AB=ab*(math.cos(15*(math.pi/180)));

l=20;
e=0.05;
l1=l+e;
ml=AB;
print('measured length is ',ml,'meters');

tl=(l1/l)*ml;

print('true length is ',tl,'meters');
measured length is  531.2592044589876 meters
true length is  532.587352470135 meters

Problem 20, pg39

In [43]:
#ch-1  page -38,39  pb-3

from __future__ import division

import math

ab=280;

AB1=ab*(math.cos(10*(math.pi/180)));

print('horizontal distance 1 is ',AB1,'meters');

cosal=(10/(math.sqrt(101)));

AB2=ab*cosal;

print('horizontal distance 2 is ',AB2,'meters');

bb=8;
AB3=math.sqrt(ab*ab-(bb*bb));

print('horizontal distance 3 is ',AB3,'meters');
horizontal distance 1 is  275.74617084341827 meters
horizontal distance 2 is  278.61041325879694 meters
horizontal distance 3 is  279.8856909525744 meters

Problem 21, pg40

In [44]:
#ch-1  page -39,40  pb-4

from __future__ import division

import math

a=28.7;
b=23.4;
c=20.9;
d=29.6;

ag=5;
bg=7;
cg=10;
dg=12;

AB=a*(math.cos(ag*(math.pi/180)));

BC=b*(math.cos(bg*(math.pi/180)));

CD=c*(math.cos(cg*(math.pi/180)));

DE=d*(math.cos(dg*(math.pi/180)));

total=AB+BC+CD+DE;

ml=total;

print('measured length is ',ml,'meters');

l=30;
e=0.025;
l1=l-e;

tl=(l1/l)*ml;

print('true horizontal distance is ',tl,'meters');
measured length is  101.35201880331583 meters
true horizontal distance is  101.26755878764641 meters

Problem 22, pg 40

In [45]:
#ch-1  page -40  pb-1

from __future__ import division

import math


a=23;
b=16.5;
c=12;


t1=math.acos((a*a+b*b-(c*c))/(2*a*b));
t1=t1*(180/math.pi);

print('theta1=',t1);

t2=math.acos((c*c+b*b-(a*a))/(2*c*b));
t2=t2*(180/math.pi);
dg=int(t2)
mi=t2-int(t2)
mi=(mi*60);
print('theta2=',dg,'degrees',mi,'minutes');
theta1= 30.009552668941378
theta2= 106 degrees 32.534711618974654 minutes

Problem 23, pg 41

In [46]:
#ch-1  page -40,41  pb-2

from __future__ import division

import math


a=257;
b=156;
c=103;


t1=math.acos((a*a+b*b-(c*c))/(2*a*b));
t1=t1*(180/math.pi);

dg1=int(t1)
mi1=t1-int(t1)
mi1=(mi1*60);
print('theta1=',dg1,'degrees',mi1,'minutes');


t2=math.acos((c*c+b*b-(a*a))/(2*c*b));
t2=t2*(180/math.pi);
dg=int(t2)
mi=t2-int(t2)
mi=(mi*60);
print('theta2=',dg,'degrees',mi,'minutes');
theta1= 5 degrees 46.94403663966165 minutes
theta2= 165 degrees 26.421472313304548 minutes

Problem 24, pg 42

In [47]:
#CH-1 PAGE-42  PB-1;

from __future__ import division
import math


sc=100;
a=2.5;
m=6;

RF=(a/sc);

print('RF is ',RF);

length=RF*m*sc;

print('length of scale is ',length,'meters');
RF is  0.025
length of scale is  15.000000000000002 meters

Problem 25, pg 42

In [48]:
#CH-1 PAGE-42,43  PB-2;

from __future__ import division
import math


sc=100;
area=93750;
l=6.0;
b=6.25;

cm2=(area)/(l*b);

cm=math.sqrt(cm2);
RF=1/(sc*cm);

print('RF=',RF);

leng=14;
leng=leng*cm;

print('length of final scale is ',leng);
RF= 0.0002
length of final scale is  700.0

Problem 26, pg 43

In [49]:
#CH-1 PAGE-43  PB-3;

from __future__ import division
import math

l=1.2;
al=30;
al=al/100;
sc=1000;


RF=(al)/(sc*l);
print('RF=',RF);


cm1=(1/RF)/(100);

lsc=15;
cm15=lsc*cm1;

print('length of scale is ',cm15,'meters');
RF= 0.00025
length of scale is  600.0 meters

Problem 27, pg44

In [50]:
#CH-1 PAGE-44  PB-4;

from __future__ import division
import math


sc=100;
hect=10000;
area=0.45*hect;

cm1=(area)/5;
cm=math.sqrt(cm1);

print('1cm=',cm);
RF=1/(cm);
print('RF=',RF);


maxl=400;

los=(RF*maxl);

print('length of scale is',los,'CENTIMETERS');
1cm= 30.0
RF= 0.03333333333333333
length of scale is 13.333333333333334 CENTIMETERS