from __future__ import division
import math
retiftoi=100
fplusd=0.15
s1=2.450-1.150
thetha1=5+(20/60)
v1=(100*1300*math.sin(10+(40/60))/2)+(0.15*math.sin(5+(20/60)));
s2=1.5
thetha2=8+(12/60)
V2=21.197
d2=147.097
RL=750.500+1.8+12.045
RLD=RL+V2-1.5
print "RL of instrument axis=",RL,"m"
print "RL of D=", RLD,"m"
print "Distance of CD=147.097m"
from __future__ import division
import math
v1=7.534
v2=16.871
v3=15.326
RLatp=255.750+v1+1.825
RLofA=265.109+v2-1.6
RLatB=280.380+v3+2.315
RLofB=298.021-1.450
D3=118.009
print "RL of axis when isnt. at P=", RLatp
print "RL of A=", RLofA
print "RL at B=", RLatB
print "RL of B=", RLofB
print "Distance between A and B=", D3
from __future__ import division
import math
v1=10.494
d1=108.989
V2=24.807
d2=176.514
v3=25.652
d3=145.477
RL=450.500+1.455+v1
RLofA=462.449-1.345
RLofB=462.449+24.807-1.655
RLatB=487.151
RLofC=RLofB+v3-2.250+1.53
print v1
print "RL of axis when isnt. at A=", RL
print "RL of A=", RLofA
print "RL at B=", RLatB
print "RL of B=", RLofB
print "RL of C", RLofC
from __future__ import division
import math
c=100;
h=1.55;
rlo=150;
ra1=1.155;ra2=1.755;ra3=2.355;
rb1=1.250;rb2=2;rb3=2.750;
t1=30.5;t2=75.5;
a1=4.5;a2=10.25;
print('in 1st observation')
v1=c*(ra3-ra1)*(math.sin(9*(math.pi/180)));
v1=v1/2;
d1=c*(ra3-ra1)*(math.cos(a1*(math.pi/180)))*(math.cos(a1*(math.pi/180)));
print('v1,d1=',v1,d1);
print('in 2nd observation');
v2=c*(rb3-rb1)*(math.sin(20.5*(math.pi/180)));
v2=v2/2;
d2=c*(rb3-rb1)*(math.cos(a2*(math.pi/180)))*(math.cos(a2*(math.pi/180)));
print('v2,d2=',v2,d2);
rl=rlo+h;
rla=rl+v1-ra2;
rlb=rl+v2-rb2;
print('RL of A=',rla);
print('RL of B=',rlb);
t=t2-t1;
AB=math.sqrt((d1*d1+d2*d2)-2*(d1*d2*(math.cos(t*(math.pi/180)))));
print('difference of level AB=',AB,'meters');
dab=rlb-rla;
gab=AB/dab;
print('gradient of AB is 1 in',gab);
from __future__ import division
import math
h=1.5;
a1=10;a2=12;
c=100;
ra1=1.150;ra2=2.050;ra3=2.950;
rb1=0.855;rb2=1.605;rb3=2.355;
rlp=450.5;
v1=c*(ra3-ra1)*(math.sin(a1*(math.pi/180)));
v2=c*(rb3-rb1)*(math.sin(a2*(math.pi/180)));
h1=ra2*(math.cos(a1*(math.pi/180)));
h2=rb2*(math.cos(a2*(math.pi/180)));
print('v1,v2=',v1,v2);
print('h1,h2=',h1,h2);
rlai=rlp+h;
rla=rlai-v1-h1;
rlb=rlai-v2-h2;
print('RL of A=',rla);
print('RL of B=',rlb);
d1=c*(ra3-ra1)*(math.cos(a1*(math.pi/180)))-ra2*(math.sin(a1*(math.pi/180)));
d2=c*(rb3-rb1)*(math.cos(a2*(math.pi/180)))-rb2*(math.sin(a2*(math.pi/180)));
dab=d1+d2;
print('distance between A an B is',dab);
gpa=d1/(rlp-rla);
gpb=d2/(rlp-rlb);
print('gradient of PA is 1 in ',gpa);
print('gradient of PB is 1 in ',gpb);
from __future__ import division
import math
c=100;
ra1=1.25;ra2=1.75;ra3=2.25;
rb1=0.95;rb2=1.75;rb3=2.55;
rc1=1.55;rc2=2.15;rc3=2.75;
a1=10;a2=5;a3=8;
ab=c*(ra3-ra1)*(math.cos(a1*(math.pi/180)))*(math.cos(a1*(math.pi/180)));
bc=c*(rb3-rb1)*(math.cos(a2*(math.pi/180)))*(math.cos(a2*(math.pi/180)));
cd=c*(rc3-rc1)*(math.cos(a3*(math.pi/180)))*(math.cos(a3*(math.pi/180)));
print(ab,bc,cd);
lab=ab*(math.cos(30.5*(math.pi/180)));
lbc=-bc*(math.cos(40*(math.pi/180)));
lcd=-cd*(math.cos(45*(math.pi/180)));
print('latitudes of AB,BC,CD=',lab,lbc,lcd);
dab=ab*(math.sin(30.5*(math.pi/180)));
dbc=bc*(math.sin(40*(math.pi/180)));
dcd=-cd*(math.sin(45*(math.pi/180)));
print('depatures of AB,BC,CD ',dab,dbc,dcd);
lc=-(lab+lbc+lcd);
ls=-(dab+dbc+dcd);
print(lc,ls)
k=-ls/lc;
t=math.atan(k);
t=t*(180/(math.pi));
print('Bearing of DA=',t);
DA=math.sqrt(lc*lc+ls*ls);
print('length DA=',DA);
from __future__ import division
import math
h1=1.48;h2=1.42;c=100;
ra1=0.77;ra2=1.60;ra3=2.43;
rb1=0.86;rb2=1.84;rb3=2.82;
a1=12.166;a2=10.5;
la=112.82;da=106.4;
lb=198.5;db=292.6;
ac=c*(ra3-ra1)*(math.cos(a1*(math.pi/180)))*(math.cos(a1*(math.pi/180)));
bd=c*(rb3-rb1)*(math.cos(a2*(math.pi/180)))*(math.cos(a2*(math.pi/180)));
print('Distance AC=',ac);
print('Distance BD=',bd);
lac=-ac*(math.cos(53.5*(math.pi/180)));
tlc=la+lac;
print('total latitude of C=',tlc);
dac=ac*(math.sin(53.5*(math.pi/180)));
da=-da;
tdc=da+dac;
print('total depature of C=',tdc);
lbd=-bd*(math.cos(4.75*(math.pi/180)));
tld=lb+lbd;
print('total latitude of D=',tld);
db=-db;
ddb=-bd*(math.sin(4.75*(math.pi/180)));
tdd=-(db+ddb);
print(ddb)
print('total depature of D=',tdd);
dx=tdc+tdd;
cx=tlc-tld;
CD=math.sqrt(dx*dx+cx*cx);
print('length CD=',CD,'meters');
from __future__ import division
import math
c=600
fplusd=0.5
s=3
n=6.860
distance= (c*s/n)+ fplusd
print "distance =",distance
from __future__ import division
import math
d=65.340
x=4.5
y= math.tan(x)
v=5.142
RLofA=255.500+v-0.950
print v
print "RL of A=", RLofA
from __future__ import division
import math
s1=2
h1=0.655
v1=6.578
RL=v1+h1+510.5
v2=1.085
d2=12.396
h2=1.25
RLofB=RL-v2-h2
d=37.31+12.396
print "distance between B and BM=",d
print "RL of B=", RLofB
from __future__ import division
import math
d=124.45
c=1000
s=2
fplusd=0.3
thetha=(5+(6/30))
n=1980/d
print "n=",n