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)
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)
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)
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')
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');
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);
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);
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);
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);
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);
#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');
#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');
# 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');
# 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');
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')
#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);
# 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')
#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');
#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');
#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');
#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');
#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');
#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');
#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');
#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);
#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');
#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');