公路通用复化辛普森公式匝道点位坐标计算4800源程序
------------------杭浦高速临平互通---------------------
本文利用的是计算公路匝道点位坐标的复化辛普森通用公式数学模型,集直线、圆曲线、回旋线通用,占字符内存较小,计算精度不限的程序
一、运行变量名称说明:
V=1、2分别进入坐标计算、桩号反算
K1、K2-------曲线起点、终点里程
F0-----------曲线起点方位角
R1、 R2------曲线起点、终点半径 (ρ左-右+,0为直线)
X0、Y0-------曲线起点、终点坐标
M------------求和累积次数n的2倍(偶数),精度迭代次数
K------------曲线待求点里程
BP-----------求点左右偏距(左-右+)
ANG-------- -求点的右斜交角
X、Y---------曲线求得坐标
FW-----------待求点的即时切线方位角
XF、YF-------为需求桩号的点坐标
DL、K+O、LP分别为桩号误差、求得桩号、左右偏距(左-右+)
当曲线的设计半径较小时,为保证点位计算精度,M(即程序中n的2倍)的取值可适当的大些。M为偶数,直线时M=2即可,经计算M=16即可满足半径为60的小半径曲线精度。
二、曲线计算程序名: Prog "CURVE"
Defm 4
V"V=1 2"
Lbl 0:{KLW}
Lbl 4
Q"OPT:M0AB1C2D3E4FH5G6I7J8CR9"=0=>Prog "M"△
Q=1=>Prog "AB"△
Q=2=>Prog "C"△
Q=3=>Prog "D"△
Q=4=>Prog "E"△
Q=5=>Prog "FH"△
Q=6=>Prog "G"△
Q=7=>Prog "I"△
Q=8=>Prog "J"△
Q=9=>Prog "CR"△
A"K1"B"K2"C"F0"D"R1"E"R2"F"X0"G"Y0"
D≠0=>I=1/D:≠=>I=D△E≠0=>J=1/E:≠=>J=E△
AbsD+AbsE=0=>M=2:≠=>M=16△
V=2=>L=0:W=90△KL"BP"W"ANG"
N=0:Z[1]=0:Z[2]=0:Z[3]=0:Z[4]=0 进入坐标迭代计算
Lbl2
N=N+1:H=2(K-A)/M:R=NH/2+A:R=C+180/π*(I+(J-I)/2(B-A)*(R-A))*(R-A)
Int(N/2)=N/2=>Z[1]=Z[1]+cosR:Z[2]=Z[2]+sinR:≠=>Z[3]=Z[3]+cosR:Z[4]=Z[4]+ sinR△
N=M=>Goto3:≠=>Goto 2
Lbl3
X=F+H/6*(cosC+4Z[3]+2Z[1]-cosR)+Lcos(R+W)
Y=G+H/6*(sinC+4Z[4]+2Z[2]-sinR)+Lsin(R+W)
V=2=>Goto 6△
X"X="◢
Y"Y="◢
R"FW"=R-360Intg(R/360◢
Goto 0
Lbl 6 进入桩号求算
Pol(T"XF"-X,U"YF"-Y
O=Icos(J-R
AbsO≤1e-4=>O"DL"◢K=K+O◢
O"LP"=Isin(J-R◢
{TU}
Goto 6:≠=>K=K+O:L=0:Goto 4
三、数据文件:
线元要素数据文件每行为一个线元段,逐句执行赋值,直至不满足、运行完成。
主线"M":
K>=5865=>A=5865:B=586.526:C=101`49`58`:D=0:E=0:F=3361488.152:G=449202.642
K>B=>A=B:B=6235.526:C=101`49`58`:D=0:E=-3250:F=3361488.044:G=449203.157
K>B=>A=B:B=7674.84:C=98`34`16.9`:D=-3250:E=-3250:F=3361419.068:G=449566.617
K>B=>A=B:B=8044.84:C=73`11`49.3`:D=-3250:E=0:F=3361521.529:G=450990.516
K>B=>A=B:B=8273.243:C=69`56`7.9`:D=0:E=0:F=3361641.834:G=451340.355
"8+273=8+100 S=1 2":{S}
S=2=>A=8100:B=9610:C=C:D=0:E=0:F=3361720.194:G=451554.895
注:主线中S=1、2为断链1、2段(如K8+273.243=K8+100)
匝"AB"
K≥0:A= 0:B=716.396:C=85`46`15`:D=800:E=800:F=3361721.181:G=450482.643
K>B=>A=B:B=776.396:C=137`4`44`:D=0:E=-60:F=3361468.151:G=451127.474
K>B=>A=B:B=842.929:C=108`25`51.6`:D=E:E=-60:F=3361431.988:G=451174.516
K>B=>A=B:B=902.929:C=44`53`50`:D=E:E=0:F=3361446.56:G=451235.989
K>B=>A=B:B=947.929:C=16`14`58`:D=E:E=180:F=3361499.992:G=451261.793
K>B=>A=B:B=1047.145:C=23`24`41.1`:D=E:E=180:F=3361542.602:G=451276.164
K>B=>A=B:B=1141.034:C=54`59`34.26`:D=E:E=0:F=3361618.517:G=451338.083
匝"C"
K≥842.929:A= 842.929:B=932.843:C=44`53`50`:D=-60:E=-60:F=3361446.56:G=451235.989
K>B=>A=B:B=1067.843:C=319`02`08.44`:D=E:E=0:F=3361528.246:G=451238.793
K>B=>A=B:B=1204.663:C=254`34`40`:D=E:E=0:F=3361541.195:G=451111.894
匝"D"
K≥0:A= 0:B=46.596:C=115`7`37`:D=791.747:E=60:F=3361640.231:G=450877.857
K>B=>A=B:B=101.697:C=139`3`39.2`:D=E:E=60:F=3361614.603:G=450916.347
K>B=>A=B:B=234.195:C=191`40`42.5`:D=E:E=3237.41:F=3361563.143:G=450929.781
匝"E"
K≥0:A= 0:B=53.571:C=115`30`28`:D=0:E=-420:F=3361652.781:G=450889.678
K>B=>A=B:B=303.928:C=111`51`13.6`:D=E:E=-420:F=3361630.748:G=450938.498
K>B=>A=B:B=385.416:C=77`42`1.6`:D=E:E=0:F=3361610.206:G=451184.308
K>B=>A=B:B=516.85:C=72`8`31.93`:D=E:E=0:F=3361632.665:G=451262.605
匝"FH"
K≥0:A= 0:B=687.778:C=265`46`15`:D=0:E=0:F=3361721.183:G=450482.658
K>B=>A=B:B=747.778:C=265`46`15`:D=E:E=-60:F=3361670.463:G=449796.752
K>B=>A=B:B=956.691:C=237`7`22.6`:D=E:E=-60:F=3361656.351:G=449739.118
K>B=>A=B:B=1038.357:C=37`37`32.61`:D=E:E=0:F=3361569.331:G=449819.209
K>B=>A=B:B=1242.528:C=358`37`59`:D=E:E=0:F=3361647.7:G=449835.267
匝"G"
K≥838.838:A= 838.838:B=898.838:C=150`10`2`:D=-60:E=0:F=3361576.113:G=449719.64
K>B=>A=B:B=949.463:C=121`31`9.6`:D=E:E=160:F=3361537.147:G=449764.388
K>B=>A=B:B=1033.468:C=130`35`1.34`:D=E:E=160:F=3361508.476:G=449806.043
K>B=>A=B:B=1121.958:C=160`39`56.8`:D=E:E=986.28538:F=3361439.935:G=449852.931
匝"I"
K≥0:A= 0:B=66.176:C=265`46`15`:D=0:E=85:F=3361694.914:G=450016.224
K>B=>A=B:B=105.294:C=288`4`27`:D=E:E=85:F=3361698.579:G=449950.594
K>B=>A=B:B=157.408:C=314`26`32.5`:D=E:E=400:F=3361718.698:G=449917.45
K>B=>A=B:B=256.758:C=335`44`20`:D=E:E=400:F=3361762.343:G=449889.539
K>B=>A=B:B=337.758:C=349`58`11`:D=E:E=0:F=3361857.034:G=449860.326
匝"J"
K≥0:A= 0:B=66.176:C=265`46`15`:D=0:E=-85:F=3361678.559:G=450017.433
K>B=>A=B:B=104.77:C=243`28`2.8`:D=E:E=-85:F=3361665.281:G=449953.056
K>B=>A=B:B=161.779:C=217`27`9`:D=E:E=-350:F=3361640.922:G=449923.549
K>B=>A=B:B=215.557:C=193`34`20.8`:D=E:E=-350:F=3361588.865:G=449901.365
K>B=>A=B:B=279.843:C=184`46`8`:D=E:E=0:F=3361535.825:G=449892.803
K>B=>A=B:B=387.002:C=179`30`25`:D=E:E=0:F=3361471.579:G=449891.389
匝"CR"
K≥3080:A= 3080:B= 3666.041:C=175`46`15`:D=0:E=0:F=3362052.282:G=449829.361
K>B=>A=B:B= 3786.041:C=175`46`15`:D=E:E=900:F=3361467.83675:G=449872.57911
K>B=>A=B:B=3920:C=179`35`25.95`:D=E:E=900:F=3361348.02009:G=449878.76613
其他说明:数字前的乘号不能省。如A5、π6不当,应改为A*5、π*6或5A、6π。
括号前的乘号可省,三角函数前的乘号可省。如H(A+B)、LcosR正确
以下形式为连续除法:1/AB=1/A/B,1/5(B+C)=1/5/(B+C),1/A^2=1/A/A。
句末尾的括号可省。如Pol(T"XF"-X,U"YF"-Y。
=>前不用冒号
≠=>前有冒号
△前后不用冒号,且可不换行。
李甲生 lijs0483@163.com