資源描述:
《5800-中邊樁坐標(biāo)計(jì)算程序》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在工程資料-天天文庫(kù)。
1、曲線正反算(全線5800)Lbl0:5-*Dimz:Cls:“1-ZX2-YX”?L:Cls:L->Z[l]:“l(fā).KD—XYS”2.XY->KD”?T:T二1二〉GOTO1:T=2=>G0T02:Lbl1:“K二”?K:K=O=>GOTO0(注:當(dāng)K輸入0時(shí),程序會(huì)由LbT0開(kāi)始重新運(yùn)行):“DP二”?T:“ANG二”?F:Z[l]=l=>Prog“ZXP”:Z[l]二2二〉Prog“YXP”:Prog“STM2”:“XI二”:X/“YI二”:Y/Goto1LB12:“XI二”?X:X二0二〉Goto0:(注:當(dāng)X輸入0時(shí),程序會(huì)由Lbl0開(kāi)始重新運(yùn)行)“YI二”?Y:X->0:Y->
2、U:A+Abs((Y-D)cos(E+F-180)-(X-C)sin(E+F-180))->K:Lbl3:Z[l]=l=>Prog“ZXP”:Z[l]=2=>Prog“YXP”:0->I:90->F:PrognSIM2”:(U~Y)cos(S+F-180)-(0~X)sin(S+F-180)->Z:IfAbs(Z)<0.00001:ThenZ[l]二1二〉Prog”ZXP”:Z[l]=2=>ProgwYXP”:0->I:90->F:ProgwSIM2”:(U-Y)一sin(S+F)->Z:ElseK+Z->K:Goto3:IfEnd:Lbl5:”K二”:K/“DP二”:Z/GOTO2ST
3、M2(子程序)(V-R)4-Abs(B-A)->P:Abs(K~A)->Q:PXQ->H:E+(H+2R)XQX904-n-S:E+(II一4+2R)XQX454-(2n)-M:E+(3IIF4+2R)XQX135一(2n)->N:E+(HF2+2R)XQX454-nJ:C+QF12X(cos(E)+4(cos(M)+cos(N))+2cos(J)+cos(S))+Icos(S+F)->X:D+QF12X(sin(E)+4(sin(M)+sin(N))+2sin(J)+sin(S))+Isin(S+F)-*Y:returnZXP或(YXP)數(shù)據(jù)庫(kù)(分左右線,按照程序模式寫(xiě);整體式路基按左
4、線參數(shù))數(shù)據(jù)庫(kù)示例60.684->A:1911.448->B:IfK^B:Then3448024.704^C:499348.258->D:275°17’&5"?EgR:0->V;G0T0l:IfEndB->A:2086.448->B:IFKIfKWB:Then3448195.2->C:497505.374->D:275°17,8.5"->E:0->R:-14-700->V;Goto1:TfEndLbl1:IfK<60.684OrK>7500:ThenCis:Locate5,2,”KPERROR”AStop:Ifend:Return說(shuō)明:1.ZX,2.YX?1左線2右線1.KD=>XY,2
5、.XY=>KD1正算2反算K=?待求點(diǎn)里程樁號(hào)DP二?邊樁距離ANG=?-般取90XI二計(jì)算所得X坐標(biāo)YI二計(jì)算所得X坐標(biāo)進(jìn)行反算時(shí)輸入坐標(biāo)以后,一直按EXE鍵,不輸入數(shù)據(jù)注:OX坐標(biāo),D二Y坐標(biāo),E二計(jì)算點(diǎn)的切線方位角R二起點(diǎn)半徑倒數(shù),若從ZH開(kāi)始R=0,左轉(zhuǎn)為負(fù)、右轉(zhuǎn)為正、直線0V-終點(diǎn)半徑倒數(shù),若從HZ結(jié)束V=0,左轉(zhuǎn)為負(fù)、右轉(zhuǎn)為正、直線0A二起點(diǎn)樁號(hào)B二終點(diǎn)樁號(hào)TYQXJS(主程序名)LbI0:4—Dimz:Cls:“I.SZtXY”:”2.XYtSZ”?tN:C1s:”XO”?U:”YO”?V:nSOH?O:nFOn?G:”LS”?H:”RO”?P:”RN“?R:?Q:1-P-
6、>C:(P-R)一(2HPR)->D:180-ti->E:N=2=>Goto2:Lbll:Cls:?S:S=0=>Goto0(注:當(dāng)S輸入0時(shí),程序會(huì)由Lbl0開(kāi)始重新運(yùn)行):?Z:Abs(S-O)->W:ProgMSUB1n:Cls:,,XS=,,:XA”YS=”:Y,nFS=n:F-90ADMS,Gotol:LbI2:Cls:?X:X=0=>Goto0(注噹X輸入0時(shí),程序由會(huì)LblO開(kāi)始重新運(yùn)行)?Y:X—I:YtJ:Prog“SUB2”:O+WTS:Cls:“S=”:S,”Z=“:Z/Goto2注:紅色部可以不要,亦可以要,它的作用是將S或輸入0時(shí),程序會(huì)重新由頭開(kāi)始運(yùn)行,(即是
7、可以計(jì)算下段線元)SUBI(子程序名)0.1739274226—A:0.3260725774->B:0.0694318442->K:0.330009482^L::G+QEKW(C+KWD)->Z[1]:G+QELW(C+LWD)->Z[2]:G+QEFW(C+FWD)->Z[3]:G+QEMW(C+MWD)->Z[4]:Axcos(Z[1])tX:X+Bcos(Z[2])tX:X+Bcos(Z[3])—X:X+Acos(Z[4])t