EXCEL快速计算任何难度的道路中线、边线坐标.doc

上传人:豆**** 文档编号:17412920 上传时间:2022-05-23 格式:DOC 页数:7 大小:135.50KB
返回 下载 相关 举报
EXCEL快速计算任何难度的道路中线、边线坐标.doc_第1页
第1页 / 共7页
EXCEL快速计算任何难度的道路中线、边线坐标.doc_第2页
第2页 / 共7页
点击查看更多>>
资源描述

《EXCEL快速计算任何难度的道路中线、边线坐标.doc》由会员分享,可在线阅读,更多相关《EXCEL快速计算任何难度的道路中线、边线坐标.doc(7页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、【精品文档】如有侵权,请联系网站删除,仅供学习与交流EXCEL快速计算任何难度的道路中线、边线坐标.精品文档.EXCEL快速计算任何难度的道路中线、边线坐标主程序 Public i As Integer Public pi As Double Sub TP() Dim ii As Integer Dim k(1000) As Double Dim xzq, yzq, kq, xzh, yzh, kzh, xjd, yjd, kjd, khy, kyh As Double 直线区域 pi = 3.14159265358979 xzq = 71862.642 yzq = 63474.651 kq

2、= 0 因为直线连接终点为ZH点,与圆曲线起点为同一点,所以在直线区域不定义ZH点参数 直线区域 曲线区域 xzh = 71858.3267 yzh = 63375.2684 kzh = 99.4763 xhz = 71909.3687 yhz = 63283.8076 曲线区域定义内容有:ZH(坐标、里程)、HZ(坐标、里程)、JD(坐标、里程) khz = 212.3392 R(半径)、LS(缓和曲线长度)、HY(里程)、YH(里程) xjd = 71855.658 yjd = 63313.806 kjd = 160.9966 ls = 30 r = 75 khy = 129.4763 k

3、yh = 182.3385 曲线区域i = 2 从第二格开始读取数据所以定义I=2 ii = 1 桩号从第一个开始启用,所以定义II=2Do k(ii) = Workbooks(单交点平曲线.xls).Worksheets(sheet1).Cells(i, 1) 定义桩号等于读取数据 If Workbooks(单交点平曲线.xls).Worksheets(sheet1).Cells(i, 1) = Then Exit Do 当没有数据读取时退出循环 If k(ii) kq Then 若计算点超过计算起点给予提示并退出程序 MsgBox (猪啊!你的输入的桩号居然超过计算起点桩号) Exit S

4、ub ElseIf k(ii) = kzh Then 若计算点在ZH点前,则进入直线程序 Call zx(xzq, yzq, kq, xzh, yzh, kzh, k(ii) ElseIf kzh k(ii) And k(ii) = khy Then 若计算点在ZH和HY之间则调入前段缓和曲线程序 Call qhhqx(xzh, yzh, kzh, xhz, yhz, khz, xjd, yjd, kjd, ls, r, k(ii) ElseIf khy k(ii) And k(ii) = kyh Then 若计算点在HY和YH之间则调入圆曲线程序 Call yqx(xzh, yzh, kzh

5、, xhz, yhz, khz, xjd, yjd, kjd, ls, r, k(ii) ElseIf kyh k(ii) And k(ii) 0 Then 当右角pj-pi 0时为左偏否则为右偏 n = -1 Else: n = 1 End If End Function方位角模块 Function fwj(ByVal x1 As Double, ByVal x2 As Double, ByVal y1 As Double, ByVal y2 As Double) As Double 计算增量 x0 = x1 - x2 y0 = y1 - y2 由增量判断方位角所在象限,不同象限取不同的值

6、If x0 = 0 And y0 0 Then fwj = pi / 2 当在大地坐标中偏量在X轴上的值时 ElseIf x0 = 0 And y0 0 Then fwj = 3 * pi / 2 当在大地坐标中偏量在负X轴上的值时 ElseIf x0 0 And y0 0 Then fwj = Atn(y0 / x0) + 2 * pi 当在大地坐标中偏量在第四象限上的值时 Else fwj = Atn(y0 / x0) 当在大地坐标中偏量在第一象限上的值时 End If End Function度分秒模块 Function dfm(ByVal ao As Double) As Varian

7、t ao = ao * 180 / pi 将弧度转化为度 jd = Int(ao) 计算度 jf = Int(ao * 60 - jd * 60) 计算分 jmx = (ao - jd - jf / 60) * 3600 计算秒 jm = Left(jmx, 8) 因为拆分出来的秒数经常占到十多位,所以只取秒数的前八位 dfm = jd & & jf & & jm & 连接度分秒 End Function边桩公式(此公式在电子表格中直接输入): =B2+J2*COS(D2+RADIANS(L2)+PI() =C2+J2*SIN(D2+RADIANS(L2)+PI() =B2+K2*COS(D2

8、+RADIANS(M2) =C2+K2*SIN(D2+RADIANS(M2) =B3+J3*COS(D3+RADIANS(L3)+PI() =C3+J3*SIN(D3+RADIANS(L3)+PI() =B3+K3*COS(D3+RADIANS(M3) =C3+K3*SIN(D3+RADIANS(M3) =B4+J4*COS(D4+RADIANS(L4)+PI() =C4+J4*SIN(D4+RADIANS(L4)+PI() =B4+K4*COS(D4+RADIANS(M4) =C4+K4*SIN(D4+RADIANS(M4) =B5+J5*COS(D5+RADIANS(L5)+PI() =C

9、5+J5*SIN(D5+RADIANS(L5)+PI() =B5+K5*COS(D5+RADIANS(M5) =C5+K5*SIN(D5+RADIANS(M5) =B6+J6*COS(D6+RADIANS(L6)+PI() =C6+J6*SIN(D6+RADIANS(L6)+PI() =B6+K6*COS(D6+RADIANS(M6) =C6+K6*SIN(D6+RADIANS(M6) =B7+J7*COS(D7+RADIANS(L7)+PI() =C7+J7*SIN(D7+RADIANS(L7)+PI() =B7+K7*COS(D7+RADIANS(M7) =C7+K7*SIN(D7+RAD

10、IANS(M7) =B8+J8*COS(D8+RADIANS(L8)+PI() =C8+J8*SIN(D8+RADIANS(L8)+PI() =B8+K8*COS(D8+RADIANS(M8) =C8+K8*SIN(D8+RADIANS(M8) =B9+J9*COS(D9+RADIANS(L9)+PI() =C9+J9*SIN(D9+RADIANS(L9)+PI() =B9+K9*COS(D9+RADIANS(M9) =C9+K9*SIN(D9+RADIANS(M9) =B10+J10*COS(D10+RADIANS(L10)+PI() =C10+J10*SIN(D10+RADIANS(L10

11、)+PI() =B10+K10*COS(D10+RADIANS(M10) =C10+K10*SIN(D10+RADIANS(M10) =B11+J11*COS(D11+RADIANS(L11)+PI() =C11+J11*SIN(D11+RADIANS(L11)+PI() =B11+K11*COS(D11+RADIANS(M11) =C11+K11*SIN(D11+RADIANS(M11) =B12+J12*COS(D12+RADIANS(L12)+PI() =C12+J12*SIN(D12+RADIANS(L12)+PI() =B12+K12*COS(D12+RADIANS(M12) =C1

12、2+K12*SIN(D12+RADIANS(M12) =B13+J13*COS(D13+RADIANS(L13)+PI() =C13+J13*SIN(D13+RADIANS(L13)+PI() =B13+K13*COS(D13+RADIANS(M13) =C13+K13*SIN(D13+RADIANS(M13) =B14+J14*COS(D14+RADIANS(L14)+PI() =C14+J14*SIN(D14+RADIANS(L14)+PI() =B14+K14*COS(D14+RADIANS(M14) =C14+K14*SIN(D14+RADIANS(M14) =B15+J15*COS(

13、D15+RADIANS(L15)+PI() =C15+J15*SIN(D15+RADIANS(L15)+PI() =B15+K15*COS(D15+RADIANS(M15) =C15+K15*SIN(D15+RADIANS(M15) =B16+J16*COS(D16+RADIANS(L16)+PI() =C16+J16*SIN(D16+RADIANS(L16)+PI() =B16+K16*COS(D16+RADIANS(M16) =C16+K16*SIN(D16+RADIANS(M16) =B17+J17*COS(D17+RADIANS(L17)+PI() =C17+J17*SIN(D17+R

14、ADIANS(L17)+PI() =B17+K17*COS(D17+RADIANS(M17) =C17+K17*SIN(D17+RADIANS(M17) =B18+J18*COS(D18+RADIANS(L18)+PI() =C18+J18*SIN(D18+RADIANS(L18)+PI() =B18+K18*COS(D18+RADIANS(M18) =C18+K18*SIN(D18+RADIANS(M18) =B19+J19*COS(D19+RADIANS(L19)+PI() =C19+J19*SIN(D19+RADIANS(L19)+PI() =B19+K19*COS(D19+RADIAN

15、S(M19) =C19+K19*SIN(D19+RADIANS(M19) =B20+J20*COS(D20+RADIANS(L20)+PI() =C20+J20*SIN(D20+RADIANS(L20)+PI() =B20+K20*COS(D20+RADIANS(M20) =C20+K20*SIN(D20+RADIANS(M20) =B21+J21*COS(D21+RADIANS(L21)+PI() =C21+J21*SIN(D21+RADIANS(L21)+PI() =B21+K21*COS(D21+RADIANS(M21) =C21+K21*SIN(D21+RADIANS(M21) =B2

16、2+J22*COS(D22+RADIANS(L22)+PI() =C22+J22*SIN(D22+RADIANS(L22)+PI() =B22+K22*COS(D22+RADIANS(M22) =C22+K22*SIN(D22+RADIANS(M22) =B23+J23*COS(D23+RADIANS(L23)+PI() =C23+J23*SIN(D23+RADIANS(L23)+PI() =B23+K23*COS(D23+RADIANS(M23) =C23+K23*SIN(D23+RADIANS(M23) 呵呵,这个就是传说已久的EXCEL自动计算曲线坐标给大家研究研究欢迎在此基础上开发增加新模块

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育专区 > 小学资料

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁