新版程序把線元法和交點法已經(jīng)集成在一個模塊中了,用戶只需修改JD程序和ZA程序中的數(shù)據(jù)部分即可,其余不需作任何的改動。 2.因為每條路高程計算不盡相同,且比較復雜,現(xiàn)在可利用PC機EXCEL計算好打印成表格帶到工地上使用,所以本版程序未對線路高程序進行專門的編程計算,而是利用統(tǒng)計計算模式中來輸入樁號(第一列X)及左、右高程(第二、三列Y,F(xiàn)req),這種輸入數(shù)據(jù)的方式最為直觀,易發(fā)現(xiàn)錯誤,也易修改,輸入完畢后運行S程序對數(shù)據(jù)按樁號進行排序,在程序中通過調(diào)用GG程序來進行內(nèi)插計算,SG=-1得左標高,SG=1得右標高(若SG輸入0,則可進行一般的線性內(nèi)插計算)。 3.在JD程序和XY程序中,先將一個計算單元的數(shù)據(jù)置入矩陣F中(1行8列或1行9列),這樣程序可讀性極好。 4.相比原CASIO4850程序操作習慣,作了一點小小的改動,測站坐標存在Z[10],N中,X坐標原存在M中容易被誤操作修改,而設計標高存在M中,這樣易于修改,因為CASIO5800沒有IN,OUT功能,很不方便。
4.程序利用Z[2]變量值來判斷是采用交點法還是線元法模型計算,Z[2]=0為線元法,否則為交點法。
一、PQX程序:計算中邊樁坐標及近似的樁號反算,在運行模式直接調(diào)用。
① Z[10]→S:”XO”?S:S→Z[10]:”YO”?N:Prog “AU”
② Lbl 2:?L:Prog “Z”:Prog “E”:1n→O:90→S
③ Lbl 4:”JJ”?S:”YC”?O:SO=0 =>Goto 2‘原來lbl 后沒有標號4的。
④ O=-1 =>Goto 6
⑤ “X,Y”:R+OCos(Z+S)→X▲U+OSin(Z+S)→Y▲Prog “D”:Goto 4
⑥ Lbl 6:Z[7]→X:Z[8]→Y:”XF”?X:”YF”?Y:XY=0 =>Goto 4
⑦ X→Z[7]:Y→Z[8]:Pol(X-R,Y-U+1p):Z+S-J→J:”YC,DL,L”:ICos(J)→O▲ISin(J)→I▲L+I▲Goto 6
二、P程序:在程序中提供一個自由運算的模式。
①Lbl 1:”TMP”?I:If I≠0:Then “RST”:I▲Goto 1:IfEnd
二、LYC程序:進行樁號反算及邊坡放樣,在運行模式直接調(diào)用。
①Prog “AU”
②Lbl 1:Z[7]→X: Z[8]→Y: Z[6]→S: ”XF”?X :X→Z[7]:”YF”?Y:Y→Z[8]: ”ZF”?S: S→Z[6]
③Lbl 2:Prog “Z”:Y=U =>Y+1p→Y
④Pol(X-R,Y-U):J-Z→J:Isin(J)→O:Icos(J)→I
⑤If Abs(I)≤0.1:Then Prog “E”:”L,YC”:L+I→L▲O▲Goto 3:IfEnd
⑥If Z[9]≠0:Then Pol(Z[9]-SO,I):πJZ[9]÷180→I:IfEnd
⑦”DL”:I▲L+I→L:Goto 2
⑧Lbl 3: Z[6]→S:If S=0:Then Goto 1:IfEnd
⑧ M→Z
⑨ Lbl 4:”SG”?Z:Z→M:If Abs(Z)=1: Then Prog “GG”:Y→Z:If X=1:Then X→Z:IfEnd:Z→M:IfEnd
⑾If Z=0:Then Z[11]→C:Z[12]→D: Z[13]→E: Z[14]→F:”LA”?C:C→Z[11]: ”HA”?D:D→Z[12]: ”LB”?E:E→Z[13]: ”HB”?F:F→Z[14]:D+(E-C)-1(F-D)(L-C)→Z:Z→M:IfEnd
⑿Lbl 5:”SG”:Z:”TW”:Z-S→C▲:Z[3]→P: Z[4]→Q: :Z[5]→T:”YC0”?P:P→Z[3]: :”HC0”?Q:Q→Z[4] :”M”?T:T→Z[5]:O÷Abs(O)→I:”BL”:I(P+TC(C+Q)÷Abs(C))→U▲”DB”:IU-IO→J▲
Ans→I:Prog “P”:Goto 1
四、I程序:通過手工方式輸要素
①Z[2]=0 =>Goto 2
②Z[1]→R:Z[2]→U:”JL”?K:”JX”?G:”JY”?H:”JA”?V:”JJ”?W:”R”?A:”LS”?B:”L1”?R:”L2”?U:R→Z[1]:U→Z[2]:ReTurn
③Lbl 2:”L0”?K:”X0”?G:”Y0”?H:”A0”?V”:”L1”?F:”L-0 Z=-1 Y=1”?W:W=0 =>ReTurn
④”R0”?A:”R1”?B
五、D程序:根據(jù)測站點的坐標及放樣點的坐標計算水平距離及方位角
①Y=N =>Y+1n→Y
②Pol(X-Z[10],Y-N):J<0 =>J+360→J
③”A,D”:J→DMS▲I▲
六、E程序:樁號出界判斷
①Z[2]=0 =>Goto 2
②If L>Z[2]: Then “>L2”:L▲IfEnd
③If L<Z[1]: Then “<L1”:L▲IfEnd
④Goto 3
⑤Lbl 2:If L<K:Then “<L0”:L-K▲IfEnd
⑥If L>F:Then “>L1”:L-F▲IfEnd
⑦Lbl 3
七、GG程序:用統(tǒng)計數(shù)據(jù)中樁號,左右高程數(shù)據(jù)進行內(nèi)插計算。
①FreqOff : n→C:FreqOn:If L<minX: Then “L<minX”:1→I:Goto 8:IfEnd
②If L>maxX: Then “L>maxX”:C-1→I:Goto 8:IfEnd
③For 1→I To C-1
④If L≤List X: Then Break:IfEnd:Next
⑤Lbl 8 : (L-List X)÷(List X- List X)→J : List Y+J(List Y-List Y)→X : List Freq +J(List Freq -List Freq )→Y
八、S程序:對統(tǒng)計數(shù)據(jù)列表中數(shù)據(jù)按樁號進行排序。
①FreqOff : n→C:FreqOn“WAIT…n=”:Locate 10,1,C
②If C<2 Then Return:IfEnd
③For 1→D To C: D→I:
④For D+1→E To C:
⑤If List X[E]<List X:Then E→I:IfEnd:Next
⑥If I≠D: Then List X[D]→F:List X→List X[D]:F→List X: List Y[D]→F:List Y→List Y[D]:F→List Y: List Freq[D]→F:List Freq→List Freq [D]:F→List Freq :IfEnd:Next
⑦Locate 1,2,”minX:”Locate 6,2,minX
⑧Locate 1,3,”minX:”Locate 6,3,maxX
九、X程序:計算緩和曲線坐標增量xx,yy
①AB→U:U÷O→Z[9]:0.5O2÷U→R:O-0.1OR2→I:6-1OR(2-7-1R2)→J:Rr→R
十、JS程序:內(nèi)插計算的接口程序,在運行模式直接調(diào)用。
①Prog “S”
②Lbl 1:”L=”?L:L=0 =>Return
③Prog “GG”:”X,Y”:X▲Y▲Goto 1
十一、GZW程序:構造物坐標放樣計算,在運行模式直接調(diào)用。
①Z[10]→S:”XO”?S:S→Z[10]:”YO”?N:0→T
②Lbl 1;”X0”?R:”Y0”?U:”A0”?Z:IF Z=-1 :Then “A0,DD”:J→Z▲I▲IfEnd
③If Z=0:Then R→X:U→Y:Prog “D”:Goto 1:IfEnd
'在④后增加一句,解決了程序再次運行時,交角的初值被置為測站點的X坐標的BUG.
④O-Z→S:”J0”?S:Z+S→O:”0-XX,YY→X,Y”:”1-X,Y→XX,YY”?T:If T≠0: Then Goto 3:IfEnd
⑤Lbl 2:”XX”?P:”YY”?Q:If PQ=0:Then Goto 1:IfEnd
⑥”X,Y”:R+Pcos(Z)+Qcos(O)→X▲U+Psin(Z)+Qsin(O)→Y▲Prog “D”:Goto 2
⑦Lbl 3:”XF”?X:”YF”?Y:If XY=0: Then Goto 1:IfEnd
⑧”XX,YY”:((X-R)sin(O)-(Y-U)cos(O))÷sin(S)→P▲((Y-U)cos(Z)-(X-R)sin(Z))÷sin(S)→Q▲
⑨Goto 3
十二、Y程序:線元法計算匝道坐標
①L-K→C:If L>F:Then F-K→C:IfEnd
②If W=0 or C<0:Then G+Ccos(V)→R:H+Csin(V)→U:0→Z[9]:Goto 8:IfEnd
③W÷Abs(W)→W:If A=B:Then 0→B:IfEnd
④If B=0:Then (A-1C)r→C:Asin(C)→I:A(1-cos(C))→J:A→Z[9]:Goto 7:IfEnd
⑤A-B→S:B(F-K)÷Abs(S)→R:AR→U:S÷Abs(S)→S:0.5R2÷U→D:R+SC→T:
⑥0.5T2÷U→E:U÷T→Z[9]:T(1-0.1E2+E22÷216-E^(6)÷9360)-R(1-0.1D2+D22÷216-D^(6)÷9360)→I:
⑦3-1(TE(1-E2÷14+E22÷440-E^(6) ÷25200)-RD(1-D2÷14+D22÷440-D^(6)
÷25200))→J:Pol(1n+Abs(I),Abs(J):Rec(I,Abs(J-Dr):Abs(E-D)r→C
⑧Lbl 7:G+Icos(V)-WJsin(V)→R:H+Isin(V)+WJcos(V) →U:V+WC→Z
⑨Lbl 8:If L>F:Then R+Rec(L-F,Z) →R:U+J→U:0→Z[9]:IfEnd
十三、Z程序:交點法計算中樁坐標
①If Z[2]=0:Then Prog “Y”:Return:IfEnd
②B2÷A÷24→P:0.1B(5-P÷A) →Q:Q+(A+P)tan(0.5Abs(W)) →T:K-T→C:C+B→D:D+πAAbs(W) ÷180→F:F-B→E
③W÷Abs(W)→S:0→Z[9]:If L≤C:Then L-K→O:V→Z:Goto 2:IfEnd
④If L≥F:Then L-F+T→O:V+W→Z:Goto 2:IfEnd
⑤If L≥E:Then F-L→O:Prog ”X”:V+W→O:O-SR→Z:G+(T-I)cos(O)-SJsin(O)→R:H+(T-I)sin(O)+Sjcos(O) →U:Goto 3:IfEnd
⑥If L>D:Then ((L-D+0.5B)÷A)r→O:Q+Asin(O)→I:P+A(1-cos(O)) →J:A→Z[9]:V+SO→Z:Goto 4:IfEnd
⑦L-C→O:Prog “X”:V+SR→Z
⑧Lbl 4:G+(I-T)cos(V)-Sjsin(V)→R:H+(I-T)sin(V)+Sjcos(V)→U:Goto 3
⑨Lbl 2:G+Ocos(Z)→R:H+Osin(Z)→U
⑩Lbl 3
十四、AU程序: 注:L0-輸測段樁號近似值,”AU”子程序根據(jù)樁號近似值自動調(diào)用曲線要素(包括線元法和交點法要素),Z[2]=0則調(diào)用線元法數(shù)據(jù),否則為交點法數(shù)據(jù)
(L0=0-默認為原曲線要素 L0=-1-手工輸入曲線要素)
①Cls:” L0= 0-Conti.”:” L0=-1-Input”:If Z[2]=0:Then Locate 13,2,”(XY)”:Else Locate 13,2,”(JD)”:IfEnd
②Z[2]→S:”0-XY E.-JD”?S:S→Z[2]:”L0”?L:If L=0:Then ReTurn:IfEnd
③If L=-1:Then Prog “I”:ReTurn:IfEnd
④If Z[2]=0:Then Prog “ZA”:Else Prog “JD”:IfEnd
⑤Mat F[1,1]→K: Mat F[1,2]→G: Mat F[1,3]→H: Mat F[1,4]→V: Mat F[1,5]→W: Mat F[1,6]→A: Mat F[1,7]→B: If Z[2]=0:Then Mat F[1,8]→F:Else Mat F[1,8]→Z[11]: Mat F[1,9]→Z[12]:IfEnd
十五、JD程序:交點法矩陣每一行數(shù)據(jù)依次為交點樁號,交點X坐標,交點Y坐標,起始邊方位角,偏角,圓曲線半徑,緩和曲線長度,計算單元起點,計算單元終點
①If L<24900: Then “L<minX”:L▲Stop:IfEnd
②If L>30801.27: Then “L>maxX”:L▲Stop:IfEnd
③IF L≤26227.359:Then [[25676.236, 142225.377,504270.949,6°24°59.6°,-70°50°10.6°,770,300.007,24900,26227.359]]→Mat F:Return:IfEnd
④IF L≤27318.276:Then [[27026.458, 142873.016,502918.028,295°34°49.°,-15°31°18.5°,1500,180.003,26227.359,27318.276]]→Mat F: Return:IfEnd
⑤IF L≤28522.182:Then [[28148.818, 143069.516,501810.234,280°03°30.5°,41°45°02.1°,780,206.532,27318.276,28522.182]]→Mat F: Return:IfEnd
⑥IF L≤29246.112:Then [[28895.742, 143666,501341,321°48°32.6°,-22°33°08.8°,1250,215.74,28538.355,29246.112]]→Mat F: Return:IfEnd
⑦IF L≤30801.27:Then [[30431.525, 144420,499995,299°15°23.8°,49°29°52.7°,720,160.598,29246.112,30801.27]]→Mat F: Return:IfEnd
十六、ZA程序
注2:線元法矩陣每一行數(shù)據(jù)依次為起點樁號,起點X坐標,起點Y坐標,起點方位角,左右轉標志,起點曲率半徑,終點曲率半徑,終點樁號
①If L<0: Then “L<minX”:L▲Stop:IfEnd
②If L>1479.85: Then “L>maxX”:L▲Stop:IfEnd
③If L>1000: Then Goto 2:IfEnd
④If L>553.49: Then “L>maxX”:L▲Stop:IfEnd
⑤IF L≤82.699:Then [[0,142872.513,502902.111,290°03°00°,-1,1509.5,1509.5,82.699]]→Mat F:Return:IfEnd
⑥IF L≤111.519:Then [[82.699,142898.724,502823.687,286°54°40°,-1,1509.5,1T,111.519]]→Mat F:Return:IfEnd
⑦IF L≤155.022:Then [[111.519,142906.932,502796.061,286°21°51°,-1,1T,1000,155.022]]→Mat F:Return:IfEnd
⑧IF L≤269.54:Then [[155.022,142918.885,502754.233,285°07°04°,-1,1000,1000,269.54]]→Mat F:Return:IfEnd
⑨IF L≤359.475:Then [[269.54,142942.363,502642.211,278°33°23°,-1,1000,1T,359.475]]→Mat F:Return:IfEnd
⑩IF L≤434.421:Then [[359.475,142953.072,502552.924,275°58°48°,1,1T,1200,434.421]]→Mat F:Return:IfEnd
⑾IF L≤463.597:Then [[434.421,142961.655,502478.474,277°46°09°,1,1200,1200,463.597]]→Mat F:Return:IfEnd
⑿IF L≤501.14:Then [[463.597,142965.95,502449.617,279°09°44°,1,1200,1T,501.14]]→Mat F:Return:IfEnd
⒀IF L≤553.488:Then [[501.14,142972.314,502412.618,280°03°31°,0,1T,1T,553.488]]→Mat F:Return:IfEnd
⒁Lbl 2:IF L≤1169.959:Then [[1000,142957.323,502388.342,102°55°07°,0,1T,1T,1169.959]]→Mat F:Return:IfEnd
⒂IF L≤1215.026:Then [[1169.959,142919.325,502554,102°55°07°,-1,1T,1500,1215.026]]→Mat F:Return:IfEnd
⒃IF L≤1261.836:Then [[1215.026,142909.471,502597.975,102°03°28°,-1,1500,1500,1261.836]]→Mat F:Return:IfEnd
⒄IF L≤1283.436:Then [[1261.836,142900.408,502643.898,100°16°11°,-1,1500,1T,1283.436]]→Mat F:Return:IfEnd
⒅IF L≤1307.44:Then [[1283.436,142896.66,502665.17,99°51°26°,-1,1T,700,1307.44]]→Mat F:Return:IfEnd
⒆IF L≤1346.219:Then [[1307.44,142892.686,502688.842,98°52°30°,-1,700,700,1346.219]]→Mat F:Return:IfEnd
⒇IF L≤1363.61:Then [[1346.219,142887.767,502727.303,95°42°03°,-1,700,1T,1363.61]]→Mat F:Return:IfEnd
(21)IF L≤1387.958:Then [[1363.61,142886.183,502744.622,94°59°20°,1,1T,500,1387.958]]→Mat F:Return:IfEnd
(22)IF L≤1451.374:Then [[1387.958,142883.869,502768.858,96°23°02°,1,500,500,1451.374]]→Mat F:Return:IfEnd
(23)IF L≤1477.462:Then [[1451.374,142872.845,502831.266,103°39°03°,1,500,1490.5,1477.462]]→Mat F:Return:IfEnd
(24)IF L≤1479.848:Then [[1477.462,142866.175,502856.486,105°38°50°,1,1490.5,1490.5,1479.848]]→Mat F:R