A swamp interferes with the direct measurement of a surveyline AB. Hence, an auxiliary point C is established and the distance AC is measured with an accuracy of 1 part in 1000. Then the angles BAC and ABC are found to be 45 and 30 degrees respectively, with a possible error of 2 minutes in each.
Find approximately the greatest possible percentage error in the computed length of AB.
Say the actual length of AC is 1000.
The triangle ABC has degrees of 45-30-105 (±)
If you drop a perpendicular from C to AB, calling it D, AD=CD=500√2 (±).
AC = 1000, angle A = 45, angle B = 30 plus or minus the errors.
And DB is 500√6 (±) so AB = 500(√2+√6) (±) About 1931.85165
Here were my steps.
1. AD = 1000*cos(A)
2. CD = 1000*sin(A)
3. DB = CD/tan(B)
4. AB = AD + DB
So AB = 1000*cos(A) + 1000*sin(A)/tan(B)
Consider the extreme values of each of the 3 measured quantities:
length AC = 999 or 1001
AngleA = 45 ± 1/30
AngleB = 30 ± 1/30
For 3 variables each having 2 extremes, there are 8 cases.
Note that the estimates for AD and CD are not independent. Whichever direction the error of angle A was, if AD is overestimated, CD is underestimated. So some of the errors in AD and CD may partially cancel out.
Program Output:
Theoretically correct length 1931.8516525781365
Calculation Error in parts per thousand
1931.2631932614086 -0.3046089568744192
1927.977369462088 -2.005476513104955
1931.866804850572 0.007843393365749515
1928.577155595664 -1.6950043643892652
1935.1295860407108 1.696783217386165
1931.8371840155655 -0.007489479097255586
1935.7344060614842 2.009861097857046
1932.4381709221816 0.30360423548172344
The error in parts per thousand calculates to 2.0076674220398862
So the maximum error is about 2 parts per thousand (about 0.2%)
------------
import math
pi = math.pi
ACs = [999, 1001]
anglesA = [45-1/30, 45+1/30]
anglesB = [30-1/30, 30+1/30]
calculations = []
errors = []
for ac in ACs:
for anglA in anglesA:
for anglB in anglesB:
ab = ac*math.cos(anglA*pi/180) + ac*math.sin(anglA*pi/180)/math.tan(anglB*pi/180)
calculations.append(ab)
perfectAB = 500*(2**.5 + 6**.5)
for calc in calculations:
errors.append(1000 * (calc - perfectAB)/perfectAB)
print('Theoretically correct length', perfectAB, '\n')
print(' Calculation Error in parts per thousand')
for i in range(8):
print(calculations[i], errors[i])
errorRange = (max(calculations) - min(calculations))
meanCalcs = sum(calculations)/8
errorppt = 1000*(errorRange/2)/meanCalcs
print('The error in parts per thousand calculates to', errorppt)
|
Posted by Larry
on 2023-10-13 13:58:45 |