#Finding azimuth of a,b,c
# Initialization of Variable
from math import pi
from math import atan
f =120.80 # focal length
a = -35.52 # elevation of A
b =8.48 # elevation of B
c =48.26 # elevation of C
#calculation
alphaa = atan (a/f);
alphab = atan (b/f);
alphac = atan (c/f);
phi =(354+30/60) *pi /180; # azimuth o f camera
phia =phi - alphaa -360* pi /180; # azimuth o f a
phib = phia + alphab; # azimuth o f b
phic = phia + alphac ; # azimuth o f c
#result
print " azimuth of a in ( degrees ) ",round(phia /pi *180,2)
print " azimuth of b in ( degrees ) ",round(phib /pi *180,2)
print " azimuth of c in ( degrees ) ",round(phic /pi *180,2)
#Finding distance AP and AQ and reduced elevation of A
#initialisation of variable
from math import pi
from math import atan,sin,sqrt
f =150.0; # focal length of camera
ap =20.2 # elevation of a from p
aa1 =16.4; # distace to the right
aq =35.2 # elevation of a from q
PQ =100.0; # distace of PQ
RL =126.845; # r educed level of instrument
#calculation
alphap = atan (ap/f);
alphaq = atan (aq/f);
P=pi /3- alphap ; # angle P
Q =40* pi /180 - alphaq ; # angle Q
A=pi -P-Q; # angle A;
AP=PQ* sin (Q)/sin(A);
AQ=PQ* sin (P)/sin(A);
Pa1 = sqrt (ap **2+ f **2) ;
AA1 = aa1 *AP/ Pa1 ;
RLa =RL+AA1; # reduced level of A
#result
print " distance of AP (m) ",round(AP,2);
print "distance of AQ (m) ",round(AQ,2);
print " reduced level of A in (M) ",round(RLa,2)
#finding focal length
#initialisation of variable
from math import pi,tan,sqrt,sin
theta =(44+30/60) *pi /180; # angle b/w two points
x1 =68.24; #distance of 1st point
x2 =58.48; #distance of 2nd point
#calculation
f=( x1+x2)/ tan ( theta ) /2+ sqrt (( x1+x2) **2/4/( tan ( theta ))
**2+ x1*x2);
#result
print " focal length of lens in (mm) ",round(f,2);
#finding representative fraction
#initialisation of variable
from math import pi,tan,sqrt,sin
# part 1
H =1200.0;#altitude
h =80.0; #elevation of hill
f =15.0/100.0;
#calculation
R80 =f/(H-h);
print " representative fraction of hill is ( time s) ",round(R80,5);
# part 2
#initialisation of variable
h =300.0; #elevation of hill
#calculation
R300 =f/(H-h);
#result
print " representative fraction of hill is ( time s) ",round(R300,5) ;
#finding height above sea level
#initialisation of variable
from math import pi,tan,sqrt,sin
R =1.0/8000.0;
h =1500.0;
f =20.0/100.0;
#calculation
H=h+f/R;
#result
print " height above sea level in (m) ",round(H,3);
#finding height above sea level
#initialisation of variable
from math import pi,tan,sqrt,sin
h =500.0; #elevation of point
f =20.0/100.0; # focal length
v =8.65/100.0; # vertical distance of photograph
ho =2000.0; # horizontal distance of photograph
R=v/ho; # representative fraction
h1 =800;
#calculation
H=h+f/R;
S=(H-h1)/f /100; # scale of photograph
print " height above sea level in (m) ",round(H,2);
print " 1cm in photograph represents centimetres ",round(S,3)
#finding height above sea level
#initialisation of variable
from math import pi,tan,sqrt,sin
m =1.0/50000.0; #map scale
pd =10.16; # photo distance
md =2.54; #map distance
f =16.0/100.0;
h =200;
#calculation
R=pd/md*m; # representative fraction
H=h+f/R;
#result
print " height above sea level in (m) ",round(H,3)
#finding distance between A and B
#initialisation of variable
from math import pi,tan,sqrt,sin
f =20 # f o c a l l e n g t h
xa =2.65; # x coordinate of a
xb = -1.92; # x coordinate of b
ya =1.36; # x coordinate of a
yb =3.65; # y coordinate of b
H =2500.0;
ha =500.0; # elevation of a
hb =300.0; # elevation of b
#calculation
Xa =(H-ha)/f*xa;
Xb =(H-hb)/f*xb;
Ya =(H-ha)/f*ya;
Yb =(H-hb)/f*yb;
AB= sqrt ((Xa -Xb) **2+( Ya -Yb)**2);
#result
print " distance between A & B in (m) ",round(AB,3)
#finding flying distance between A and B
#initialisation of variable
from math import pi,tan,sqrt,sin
f =20.0 # focal length
xa =2.65; # x coordinate of a
xb = -1.92; # x coordinate of b
ya =1.36; # y coordinate of a
yb =3.65; # y coordinate of b
ha =500.0; # elevation of a
hb =300.0; # elevation of b
ABg =545.0;
ab =5.112;
#calculation
hab =ha /2+ hb /2;
Happ =hab+ ABg *f/ab
Xa =( Happ -ha)/f*xa;
Xb =( Happ -hb)/f*xb;
Ya =( Happ -ha)/f*ya;
Yb =( Happ -hb)/f*yb;
AB= sqrt ((Xa -Xb) **2+( Ya -Yb)**2);
Hact =ABg/AB *( Happ - hab )+ hab ;
#result
print " actual flying height of A & B in (m) ",round(Hact,3);
#finding relief displacement
#initialisation of variable
from math import pi,tan,sqrt,sin
f =20.0/100.0;
Sd =1.0/10000.0;
h =250.0; # elevation
r =6.44;
#calculation
H=f/Sd;
d=r*h/H;
#result
print "relief displacement of the point in ( cm) ",round(d,3)
#finding relief distance
#initialisation of variable
from math import pi,tan,sqrt,sin
h =50.0; # elevation
H =2500.0 -1250.0;
r =6.35;
#calculation
d=r*h/H;
#result
print "releif displacement of the point in ( cm) ",round(d,3)
#finding height of tower
#initialisation of variable
from math import pi,tan,sqrt,sin
f =20.0/100.0; # focal length
l =250; #length of line
lp =8.5/100.0; #length of line in photograph
#calculation
H=l*f/lp; # height of camera above datum
r =6.46; # distace of image of top o f the towe r
d =0.46; # releif displacement
h=d*H/r;
#result
print " height of tower above its base in (m) ",round(h,2)
#finding no. of photographs
#initialisation of variable
from math import pi,tan,sqrt,sin
l =20/100; # length of photograph
w =20/100; # breadth of photograph
Pl =0.6; # longitudinal lap
Pw =0.3; # side lap
s =100*20;
#calculation
L=(1 - Pl)*s;
W=(1 - Pw)*s;
Ar=L*W /1000/1000;
N =100/ Ar;
A= round (N);
#result
print "no . o f photographs to be taken ",A+1;
#finding no. of photographs
#initialisation of variable
from math import pi,tan,sqrt,sin
Pl =0.6; # longitudinal lap
Pw =0.3; # side lap
L1 =10000.0;
s =100.0*20.0;
#calculation
L2=L1;
N1=L1 /((1 - Pl)*s) +1;
A1= round (N1);
if N1 -A1 <0:
N1=A1;
else :
N1=A1+1;
N2=L2 /((1 - Pw)*s) +1;
A2= round (N2);
if N2 -A2 <0:
N2=A2
else :
N2=A2+1;
N=N1*N2;
#result
print "no . of photographs to be taken ",N;
#finding no. of photographs
#initialisation of variable
from math import pi,tan,sqrt,sin
Pl =0.6; # longitudinal lap
Pw =0.3; # side lap
L1 =12500.0;
s =100.0*20.0;
L2 =8000.0;
#calculation
N1=L1 /((1 - Pl)*s) +1;
A1= round (N1);
if N1 -A1 <0:
N1=A1;
else :
N1=A1+1;
N2=L2 /((1 - Pw)*s) +1;
A2= round (N2);
if N2 -A2 <0:
N2=A2
else :
N2=A2+1;
N=N1*N2;
#result
print "no . of photographs to be taken ",N;
#finding no. of photographs,height of datum
#initialisation of variable
#part1
from math import pi,tan,sqrt,sin
f =30.0/100.0; # focal length
h =400.0; #elevation of datum
r =12000.0; # ratio
s =120.0*20.0;
L2 =24000.0;
L1 =30000.0;
Pl =0.6; # longitudinal lap
Pw =0.3; # side lap
#calculation
H=h+r*f;
#result
print " height above datum in (m) ",round(H,2);
# part 2
#calculation
W=(1 - Pw)*s;
#result
print " ground width covered in each photograph (m) ",round(W,2);
# part 3
N2=L2 /((1 - Pw)*s) +1;
A2= round (N2);
if N2 -A2 <0:
N2=A2
else :
N2=A2+1;
#result
print "no . of flights required ",N2;
#part 4-9
#calculation
Asf =L2 /(N2 -1) ; # actual spacing between flights
Sfl = Asf /600; # spacing of flight lines
gd =(1 - Pl)*s; # ground distance
Ei=gd /55.5; # exposure interval
Ei= round (Ei);
Ags =55.56* Ei;# adgusted ground distance
N1=L1/ Ags +1;
A1= round (N1);
if N1 -A1 <0:
N1=A1;
else :
N1=A1+1;
N=N1*N2;
#result
print "actual spacing in m",Asf
print "spacing of flight lines in cm",round(Sfl,2)
print "exposure interval in s",Ei
print "adjusted ground distance in m",round(Ags)
print "no . of photographs to be taken per flight line",N1
print "no . of photographs to be taken ",N;
#finding error in height
#initialisation of variable
from math import pi,tan,sqrt,sin
f =150.0/1000.0; # focal length
r =20000.0; #ratio
Pl =0.6; # longitudinal lap
l =23.0/100.0; # l e n g t h
w =23.0/100.0; # width
#calculation
B=(1 - Pl)*l*r; # base length
H=f*r;
h =0;
dh =(H-h) **2/ B/f *0.1/1000;
#result
print " error in height in (m) ",round(dh,3)
#finding parallax height of the chimney
#initialisation of variable
from math import pi,tan,sqrt,sin
H =600.0;
f =150.0/1000.0;
b =6.375/100.0;
h1 =0.0;
h2 =120.0; # height of chimney
#calculation
s=H/f;
B=s*b; # datum elevation
p1=B*f *1000/(H-h1);
p2=B*f *1000/(H-h2);
delp =p2 -p1;
delh =H* delp /1000/( b+ delp /1000) ;
#result
print " parallax height of the chimney in (m)",round(delh,3)
#finding difference in elevation
#initialisation of variable
from math import pi,tan,sqrt,sin
B =200.0;
f =120.0;
p2 =52.52; # parallax for top pole
p1 =48.27; # parallax for bottom pole
#calculation
delh =(p2 -p1)/p2/p1*B*f;
#result
print " difference in elevation of two points in (m) ",round(delh,3)
print "there is again a miscalculation in the step of calculating elevation thus there is a change in the answer"
#finding difference in elevation
#initialisation of variable
# part 1
delp =1.48/1000.0;
H =5000.0;
h =500.0;
b =90.0/1000.0; #mean principal base
#calculation
dh =(H-h) **2* delp /((H-h)* delp +b*H);
#result
print " difference in height between two points in(m) ",round(dh,3)
# part 2
#variable decleration
delp =15.5/1000.0;
#calculation
dh =(H-h) **2* delp /((H-h)* delp +b*H);
#result
print " difference in height between two points in(m) ",round(dh,3)