Skip to content

Latest commit

 

History

History
401 lines (333 loc) · 16 KB

classical.md

File metadata and controls

401 lines (333 loc) · 16 KB

<< 返回

经典算例

这里演示水准,角度,方向,距离观测的平差,以及包含已知约束的平差。算例均出自于武汉大学《误差理论与测量平差基础(第三版本)》结果均与教科书进行过对比。

水准网平差演示,武汉大学,误差理论与测量平差基础(第三版) 114页 例7-1

import measurefit as mfit

points = [
    ('A', 0, 0, 237.483, True),
    ('B', 0, 0, 0, False),
    ('C', 0, 0, 0, False),
    ('D', 0, 0, 0, False)
]

# 高差,路线距离(负数,km为单位),或观测精度
measures = [
    ('lev', 'A', 'B', 5.835, -3.500),
    ('lev', 'B', 'C', 3.782, -2.700),
    ('lev', 'A', 'C', 9.640, -4.000),
    ('lev', 'D', 'C', 7.384, -3.000),
    ('lev', 'A', 'D', 2.270, -2.500)
]

pts, info, sta = mfit.solve(points, measures, db=1, dk=1, da=1)
print(mfit.report(pts, info, sta))

点位信息及精度

name x y h type dxx dxy dyy dhh
A 0.0000 0.0000 237.4830 True nan nan nan nan
B 0.0000 0.0000 243.3299 False nan nan nan 2.0615
C 0.0000 0.0000 247.1210 False nan nan nan 1.6860
D 0.0000 0.0000 239.7457 False nan nan nan 1.7120

水准观测及精度

measure from to mea(m) value(m) dl(mm)
level A B 5.8350 5.8469 2.0615
level A C 9.6400 9.6380 1.6860
level A D 2.2700 2.2627 1.7120
level B C 3.7820 3.7912 1.8439
level D C 7.3840 7.3753 1.8653

后验单位中误差

后验单位中误差: 7.7030

测向网平差演示,武汉大学,误差理论于测量平差基础(第三版) 120页 例7-3

import measurefit as mfit

points = [
    ('A', 8986.68, 5705.03, 0, True),
    ('B', 13737.37, 10501.92, 0, True),
    ('C', 6642.27, 14711.75, 0, True),
    ('D', 10122.12, 10312.47, 0, False)
]

measures = [
    ('station', 'D', None),
    ('dir', 'D', 'C', 0, None),
    ('dir', 'D', 'A', 127.48412, None),
    ('dir', 'D', 'B', 234.39243, None),
    
    ('station', 'C', None),
    ('dir', 'C', 'A', 0, None),
    ('dir', 'C', 'D', 23.45162, None),
    
    ('station', 'A', None),
    ('dir', 'A', 'B', 0, None),
    ('dir', 'A', 'D', 30.52440, None),
    ('dir', 'A', 'C', 59.18490, None),
    
    ('station', 'B', None),
    ('dir', 'B', 'D', 0, None),
    ('dir', 'B', 'A', 42.16391, None)
]

pts, info, sta = mfit.solve(points, mfit.dms2rs(measures), db=1, dk=1, da=1)
print(mfit.report(pts, info, sta))

点位信息及精度

name x y h type dxx dxy dyy dhh
A 8986.6800 5705.0300 0.0000 True nan nan nan nan
B 13737.3700 10501.9200 0.0000 True nan nan nan nan
C 6642.2700 14711.7500 0.0000 True nan nan nan nan
D 10122.1560 10312.4296 0.0000 False 238.5131 3.4412 177.6662 nan

方向观测及精度

measure from to mea(°) value(°) dl(″)
direction A B 0.0000 45.2772 0.3823
direction A C 59.3136 104.5901 0.3823
direction A D 30.8789 76.1556 0.5294
direction B A 42.2775 225.2772 0.6440
direction B D 0.0000 183.0004 0.6440
direction C A 0.0000 284.5901 0.5738
direction C D 23.7545 308.3442 0.5738
direction D A 127.8114 256.1556 0.7460
direction D B 234.6567 3.0004 0.7677
direction D C 0.0000 128.3442 0.7565

后验单位中误差

后验单位中误差: 1.6146

测角网平差演示,武汉大学,误差理论于测量平差基础(第三版) 123页 例7-4

import measurefit as mfit
points = [
    ('A', 8986.68, 5705.03, 0, True),
    ('B', 13737.37, 10501.92, 0, True),
    ('C', 6642.27, 14711.75, 0, True),
    ('D', 10122.12, 10312.47, 0, False)
]

measures = [
    ('ang', 'A', 'D', 'B', 106.50422, None),
    ('ang', 'D', 'A', 'B', 30.52440, None),
    ('ang', 'D', 'B', 'A', 42.16391, None),
    ('ang', 'D', 'A', 'C', 28.26050, None),
    ('ang', 'A', 'D', 'C', 127.48412, None),
    ('ang', 'D', 'C', 'A', 23.45162, None)
]

pts, info, sta = mfit.solve(points, mfit.dms2rs(measures), db=1, dk=1, da=1)
print(mfit.report(pts, info, sta))

点位信息及精度

name x y h type dxx dxy dyy dhh
A 8986.6800 5705.0300 0.0000 True nan nan nan nan
B 13737.3700 10501.9200 0.0000 True nan nan nan nan
C 6642.2700 14711.7500 0.0000 True nan nan nan nan
D 10122.1589 10312.4454 0.0000 False 93.0931 27.4084 123.5760 nan

角度观测及精度

measure from_to mea(°) value(°) dl(″)
angle A-D-B 1.8648 106.8446 0.5831
angle A-D-C 2.2307 127.8113 0.5373
angle D-A-B 0.5389 30.8783 0.1551
angle D-A-C 0.4963 28.4345 0.1551
angle D-B-A 0.7379 42.2771 0.3916
angle D-C-A 0.4146 23.7542 0.1778

后验单位中误差

后验单位中误差: 1.6930

测角网平差演示,武汉大学,误差理论于测量平差基础(第三版)

import measurefit as mfit

points = [
    ('A', 9684.28, 43836.82, 0, True),
    ('B', 10649.55, 31996.50, 0, True),
    ('C', 19063.66, 37818.86, 0, True),
    ('D', 17814.63, 49923.19, 0, True),
    ('P1', 13188.61, 37334.97, 0, False),
    ('P2', 15578.61, 44391.03, 0, False),
]

measures = [
    ('ang', 'A', 'P1', 'B', 126.14241, None),
    ('ang', 'P1', 'A', 'B', 23.39469, None),
    ('ang', 'P1', 'B', 'A', 30.05467, None),
    ('ang', 'A', 'P2', 'D', 117.22462, None),
    ('ang', 'P2', 'A', 'D', 31.26500, None),
    ('ang', 'P2', 'D', 'A', 31.10226, None),
    ('ang', 'P2', 'C', 'D', 22.02430, None),
    ('ang', 'C', 'P2', 'D', 130.03142, None),
    ('ang', 'P2', 'D', 'C', 27.53593, None),
    ('ang', 'P1', 'P2', 'A', 65.55008, None),
    ('ang', 'P1', 'A', 'P2', 67.02494, None),
    ('ang', 'P2', 'P1', 'A', 47.02114, None),
    ('ang', 'C', 'P2', 'P1', 46.38564, None),
    ('ang', 'C', 'P1', 'P2', 66.34547, None),
    ('ang', 'P1', 'C', 'P2', 66.46082, None),
    ('ang', 'P1', 'C', 'B', 29.58355, None),
    ('ang', 'C', 'P1', 'B', 120.08311, None),
    ('ang', 'C', 'B', 'P1', 29.52554, None)
]

pts, info, sta = mfit.solve(points, mfit.dms2rs(measures), da=1)
print(mfit.report(pts, info, sta))

点位信息及精度

name x y h type dxx dxy dyy dhh
A 9684.2800 43836.8200 0.0000 True nan nan nan nan
B 10649.5500 31996.5000 0.0000 True nan nan nan nan
C 19063.6600 37818.8600 0.0000 True nan nan nan nan
D 17814.6300 49923.1900 0.0000 True nan nan nan nan
P1 13188.6006 37335.2031 0.0000 False 120.2059 42.7434 161.4464 nan
P2 15578.4893 44390.9762 0.0000 False 116.7897 40.6625 169.3044 nan

角度观测及精度

measure from_to mea(°) value(°) dl(″)
angle A-P1-B 2.2033 126.2402 0.3704
angle A-P2-D 2.0487 117.3797 0.3931
angle C-B-P1 0.5215 29.8823 0.1152
angle C-P1-B 2.0969 120.1416 0.3969
angle C-P1-P2 1.1621 66.5819 0.2666
angle C-P2-D 2.2699 130.0544 0.3736
angle C-P2-P1 0.8142 46.6488 0.1685
angle P1-A-B 0.4130 23.6636 0.1288
angle P1-A-P2 1.1702 67.0467 0.2584
angle P1-B-A 0.5253 30.0961 0.1152
angle P1-C-B 0.5232 29.9761 0.1888
angle P1-C-P2 1.1653 66.7693 0.2493
angle P1-P2-A 1.1505 65.9171 0.2613
angle P2-A-D 0.5489 31.4475 0.1958
angle P2-C-D 0.3848 22.0454 0.1245
angle P2-D-A 0.5441 31.1728 0.1146
angle P2-D-C 0.4869 27.9002 0.1146
angle P2-P1-A 0.8209 47.0363 0.1644

后验单位中误差

后验单位中误差: 1.2665

测边网平差演示,武汉大学,误差理论于测量平差基础(第三版) 145页 例7-10

import measurefit as mfit

points = [
    ('A', 53743.136, 61003.826, 0, True),
    ('B', 47943.002, 66225.854, 0, True),
    ('C', 40049.229, 53782.790, 0, True),
    ('D', 36924.728, 61027.086, 0, True),
    ('P1', 48580.270, 60500.505, 0, False),
    ('P2', 48681.390, 55018.279, 0, False),
    ('P3', 43767.223, 57968.593, 0, False),
    ('P4', 40843.219, 64867.875, 0, False)
]

measures = [
    ('dist', 'P1', 'B', 5760.706, None),
    ('dist', 'P1', 'A', 5187.342, None),
    ('dist', 'P2', 'A', 7838.880, None),
    ('dist', 'P2', 'P1', 5483.158, None),
    ('dist', 'P2', 'P3', 5731.788, None),
    ('dist', 'P2', 'C', 8720.162, None),
    ('dist', 'P3', 'C', 5598.570, None),
    ('dist', 'P3', 'D', 7494.881, None),
    ('dist', 'P3', 'P4', 7493.323, None),
    ('dist', 'P3', 'P1', 5438.382, None),
    ('dist', 'P4', 'D', 5487.073, None),
    ('dist', 'P4', 'P1', 8884.587, None),
    ('dist', 'P4', 'B', 7228.367, None)
]

pts, info, sta = mfit.solve(points, measures, maxiter=3, accu=0.1, db=3, dk=1, lw=1)
print(mfit.report(pts, info, sta))

点位信息及精度

name x y h type dxx dxy dyy dhh
A 53743.1360 61003.8260 0.0000 True nan nan nan nan
B 47943.0020 66225.8540 0.0000 True nan nan nan nan
C 40049.2290 53782.7900 0.0000 True nan nan nan nan
D 36924.7280 61027.0860 0.0000 True nan nan nan nan
P1 48580.2685 60500.5003 0.0000 False 42.1275 -5.7979 51.1801 nan
P2 48681.3821 55018.2889 0.0000 False 67.3397 -11.6272 73.7130 nan
P3 43767.1887 57968.6083 0.0000 False 44.0277 -12.2886 71.5573 nan
P4 40843.3210 64867.9799 0.0000 False 53.5526 -21.8815 90.5609 nan

边长观测及精度

measure from to mea(m) value(m) dl(mm)
distance P1 A 5187.3420 5187.3440 41.0929
distance P1 B 5760.7060 5760.7104 52.3442
distance P2 A 7838.8800 7838.8780 59.5899
distance P2 C 8720.1620 8720.1218 64.2061
distance P2 P1 5483.1580 5483.1438 54.2900
distance P2 P3 5731.7880 5731.8131 57.6101
distance P3 C 5598.5700 5598.5980 47.2136
distance P3 D 7494.8810 7494.9018 57.7684
distance P3 P1 5438.3820 5438.4018 45.8722
distance P3 P4 7493.3230 7493.3524 78.4971
distance P4 B 7228.3670 7228.3672 46.7839
distance P4 D 5487.0730 5487.0609 49.8091
distance P4 P1 8884.5870 8884.5503 79.3001

后验单位中误差

后验单位中误差: 3.5393

带有距离,方向约束的测角网平差演示,武汉大学,误差理论于测量平差基础(第三版) 176页 例8-2

import measurefit as mfit

points = [
    ('A', 2794005.704, 19433831.155, 0, True),
    ('B', 2802234.190, 19437826.220, 0, True),
    ('C', 2804773.909, 19432985.959, 0, False),
    ('D', 2805958.639, 19426570.796, 0, False),
    ('E', 2799571.971, 19430754.937, 0, False),
    ('F', 2798372.250, 19423925.543, 0, False),
    ('G', 2793886.720, 19428172.793, 0, False)
]

measures = [
    ('ang', 'B', 'A', 'E', 54.492957, None),
    ('ang', 'E', 'B', 'A', 43.281822, None),
    ('ang', 'B', 'E', 'A', 81.421162, None),
    ('ang', 'E', 'B', 'C', 48.190060, None),
    ('ang', 'B', 'C', 'E', 85.313721, None),
    ('ang', 'C', 'E', 'B', 46.092035, None),
    ('ang', 'D', 'C', 'E', 77.145904, None),
    ('ang', 'C', 'D', 'E', 46.182193, None),
    ('ang', 'C', 'E', 'D', 56.263883, None),
    ('ang', 'E', 'D', 'F', 52.271149, None),
    ('ang', 'D', 'F', 'E', 60.484761, None),
    ('ang', 'D', 'E', 'F', 66.435930, None),
    ('ang', 'E', 'F', 'G', 56.313621, None),
    ('ang', 'F', 'G', 'E', 67.514911, None),
    ('ang', 'G', 'E', 'F', 55.363570, None),
    ('ang', 'E', 'G', 'A', 64.220649, None),
    ('ang', 'G', 'A', 'E', 62.163629, None),
    ('ang', 'A', 'E', 'G', 53.211420, None),
    # sta 给0代表约束,求解器会使用拉格朗日乘数进行约束求解
    ('dir', 'B', 'E', 249.221017, 0),
    ('dist', 'D', 'C', 6523.643, 0)
]

pts, info, sta = mfit.solve(points, mfit.dms2rs(measures), maxiter=3, accu=0.1, db=3, dk=1, lw=1)
print(mfit.report(pts, info, sta))

点位信息及精度

name x y h type dxx dxy dyy dhh
A 2794005.7040 19433831.1550 0.0000 True nan nan nan nan
B 2802234.1900 19437826.2200 0.0000 True nan nan nan nan
C 2804773.9090 19432985.9625 0.0000 False 228.7628 -35.5405 803.2532 nan
D 2805958.6406 19426570.7985 0.0000 False 865.9464 614.1075 1021.4715 nan
E 2799571.9725 19430754.9399 0.0000 False 42.2697 112.2752 298.2211 nan
F 2798372.2518 19423925.5449 0.0000 False 1084.6409 126.6167 995.1667 nan
G 2793886.7210 19428172.7942 0.0000 False 553.7872 47.2277 504.4942 nan

角度观测及精度

measure from_to mea(°) value(°) dl(″)
angle A-E-G 0.9312 53.3541 0.5447
angle B-A-E 0.9569 54.8247 0.3507
angle B-C-E 1.4927 85.5273 0.5777
angle B-E-A 1.4260 81.7031 0.3507
angle C-D-E 0.8082 46.3064 0.3116
angle C-E-B 0.8056 46.1558 0.5150
angle C-E-D 0.9851 56.4440 0.2767
angle D-C-E 1.3483 77.2496 0.5787
angle D-E-F 1.1647 66.7332 0.5503
angle D-F-E 1.0614 60.8136 0.4285
angle E-B-A 0.7587 43.4722 0.0000
angle E-B-C 0.8433 48.3168 0.4607
angle E-D-F 0.9155 52.4531 0.4459
angle E-F-G 0.9866 56.5265 0.5113
angle E-G-A 1.1234 64.3686 0.5473
angle F-G-E 1.1844 67.8638 0.5044
angle G-A-E 1.0869 62.2773 0.4951
angle G-E-F 0.9706 55.6098 0.5506

方向观测及精度

measure from to mea(°) value(°) dl(″)
direction B E 249.3695 249.3695 0.0000

边长观测及精度

measure from to mea(m) value(m) dl(mm)
distance D C 6523.6430 6523.6430 0.0000

后验单位中误差

后验单位中误差: 1.2033