曲线计算配套验算软件开发的一种思路
2017-03-02郭有宝
郭有宝
(包头铁道职业技术学院铁道工程系,内蒙古 包头 014060)
曲线计算配套验算软件开发的一种思路
郭有宝
(包头铁道职业技术学院铁道工程系,内蒙古 包头 014060)
道路中边桩坐标计算比较复杂,因此在教学实践过程中有诸多不便。本程序抛弃了复杂的坐标平移转换公式,利用普通函数计算器计算模式和简单便捷的VB语言,在日常教学运用过程中,便于学生理解和掌握。
曲线计算;软件开发;验算
1 圆曲线编程方法
(1)计算圆曲线曲线要素代码如下:
dblT = dblR * Tan(dblA / 2)
dblL = dblR * dblA
dblE = dblR * (1 / Cos(dblA) - 1)
dblD = 2 * dblT - dblL
(2)计算圆曲线主点里程,代码如下:
dblZY = dblJD - dblT
dblYZ = dblZY + dblL
dblQZ = dblYZ - dblL / 2
(3)计算圆曲线主点坐标,代码如下:
ZYX = JDX + dblT * Cos(aAB + PI)
ZYY = JDY + dblT * Sin(aAB + PI)
YZX = JDX + dblT * Cos(aDC)
YZY = JDY + dblT * Sin(aDC)
在计算中要考虑左偏还是右偏
If txtA.Text > 0 Then ′曲线右偏
QZX = JDX + dblE * Cos(aAB + PI / 2 + dblA / 2)
QZY = JDY + dblE * Sin(aAB + PI / 2 + dblA / 2)
Else ′左偏
QZX = JDX + dblE * Cos(aAB - PI / 2 - dblA / 2)
QZY = JDY + dblE * Sin(aAB - PI / 2 - dblA / 2)
End If
(4)计算指定桩里程的坐标,代码如下:
If AK < dblZY Then ′判断A点里程在起点到直圆点之间
AX = ZYX + (dblZY - AK) * Cos(aAB + PI)
AY = ZYY + (dblZY - AK) * Sin(aAB + PI)
ElseIf AK > dblZY And AK < dblYZ Then ′判断A点里程在圆曲线上
If txtA.Text > 0 Then
RX = JDX + (dblE + dblR) * Cos(aAB + PI / 2 + dblA / 2)
RY = JDY + (dblE + dblR) * Sin(aAB + PI / 2 + dblA / 2)
YJJ = (AK - dblQZ) / dblR
AX = RX + dblR * Cos(aAB - PI / 2 + dblA / 2 + YJJ)
AY = RY + dblR * Sin(aAB - PI / 2 + dblA / 2 + YJJ)
Else
RX = JDX + (dblE + dblR) * Cos(aAB - PI / 2 - dblA / 2)
RY = JDY + (dblE + dblR) * Sin(aAB - PI / 2 - dblA / 2)
YJJ = (AK - dblQZ) / dblR
AX = RX + dblR * Cos(aAB + PI / 2 - dblA / 2 - YJJ)
AY = RY + dblR * Sin(aAB + PI / 2 - dblA / 2 - YJJ)
End If
Else ′判断A点里程在圆直点到终点之间
AX = YZX + (AK - dblYZ) * Cos(aDC)
AY = YZY + (AK - dblYZ) * Sin(aDC)
End If
计算另一个指定点的路程代码相近,在此不作介绍。
2 缓和曲线计算核心代码
计算缓加圆曲线常数并输出,代码如下
ls = txtL0.Text
bet0 = ls / (2 * dblR)
txtB = HuToDo(bet0)
p = ls * ls / (24 * dblR)
m = ls / 2 - ls^3/ (240 * dblR * dblR)
计算缓加圆曲线要素并输出,代码如下:
Th = (dblR + p) * Tan(dblA / 2) + m
ly = dblR * (dblA - 2 * bet0)
Lh = ly + 2 * ls
Eh = (dblR + p) / Cos(dblA / 2) - dblR
Dh = 2 * Th - Lh
计算缓加圆曲线主点里程,代码如下:
dblZH = dblJD - Th
dblHY = dblZH + ls
dblYH = dblHY + ly
dblHZ = dblYH + ls
dblQZ = dblHZ - Lh / 2
计算缓加圆曲线主点坐标,代码如下:
ZYX = JDX + Th * Cos(aAB + PI)
ZYY = JDY + Th * Sin(aAB + PI)
YZX = JDX + Th * Cos(aDC)
YZY = JDY + Th * Sin(aDC)
If txtA.Text > 0 Then
QZX = JDX + Eh * Cos(aAB + PI / 2 + dblA / 2)
QZY = JDY + Eh * Sin(aAB + PI / 2 + dblA / 2)
RX = JDX + (Eh + dblR) * Cos(aAB + PI / 2 + dblA / 2)
RY = JDY + (Eh + dblR) * Sin(aAB + PI / 2 + dblA / 2)
YJJ = ly / (2 * dblR)
YHX = RX + dblR * Cos(aAB - PI / 2 + dblA / 2 + YJJ)
YHY = RY + dblR * Sin(aAB - PI / 2 + dblA / 2 + YJJ)
HYX = RX + dblR * Cos(aAB - PI / 2 + dblA / 2 - YJJ)
HYY = RY + dblR * Sin(aAB - PI / 2 + dblA / 2 - YJJ)
Else
QZX = JDX + Eh * Cos(aAB - PI / 2 - dblA / 2)
QZY = JDY + Eh * Sin(aAB - PI / 2 - dblA / 2)
RX = JDX + (Eh + dblR) * Cos(aAB - PI / 2 - dblA / 2)
RY = JDY + (Eh + dblR) * Sin(aAB - PI / 2 - dblA / 2)
YJJ = ly / (2 * dblR)
YHX = RX + dblR * Cos(aAB + PI / 2 - dblA / 2 - YJJ)
YHY = RY + dblR * Sin(aAB + PI / 2 - dblA / 2 - YJJ)
HYX = RX + dblR * Cos(aAB + PI / 2 - dblA / 2 + YJJ)
HYY = RY + dblR * Sin(aAB + PI / 2 - dblA / 2 + YJJ)
End If
计算缓加圆曲线指定中桩坐标,代码如下:
If AK < dblZH Then ′判断A点里程在起点到直缓点之间
AX = ZHX + (dblZH - AK) * Cos(aAB + PI)
AY = ZHY + (dblZH - AK) * Sin(aAB + PI)
ElseIf AK > dblZH And AK < dblHY Then ′判断A点里程在第一缓和曲线上
If txtA.Text > 0 Then
L = (AK - dblZH) - (AK - dblZH) ^ 5 / (90 * dblR * dblR * ls * ls)
A = (AK - dblZH) * (AK - dblZH) / (6 * dblR * ls)
AX = ZHX + L * Cos(aAB + A)
AY = ZHY + L * Sin(aAB + A)
Else
L = (AK - dblZH) - (AK - dblZH) ^ 5 / (90 * dblR * dblR * ls * ls)
A = (AK - dblZH) * (AK - dblZH) / (6 * dblR * ls)
AX = ZHX + L * Cos(aAB - A)
AY = ZHY + L * Sin(aAB - A)
End If
ElseIf AK > dblHY And AK < dblYH Then ′判断A点里程在圆曲线上
If txtA.Text > 0 Then
RX = JDX + (Eh + dblR) * Cos(aAB + PI / 2 + dblA / 2)
RY = JDY + (Eh + dblR) * Sin(aAB + PI / 2 + dblA / 2)
YJ = (AK - dblQZ) / dblR
AX = RX + dblR * Cos(aAB - PI / 2 + dblA / 2 + YJ)
AY = RY + dblR * Sin(aAB - PI / 2 + dblA / 2 + YJ)
Else
RX = JDX + (Eh + dblR) * Cos(aAB - PI / 2 - dblA / 2)
RY = JDY + (Eh + dblR) * Sin(aAB - PI / 2 - dblA / 2)
YJ = (AK - dblQZ) / dblR
AX = RX + dblR * Cos(aAB + PI / 2 - dblA / 2 - YJ)
AY = RY + dblR * Sin(aAB + PI / 2 - dblA / 2 - YJ)
End If
ElseIf AK > dblYH And AK < dblHZ Then ′判断A点里程在第二缓和曲线上
If txtA.Text > 0 Then
L = (dblHZ - AK) - (dblHZ - AK) ^ 5 / (90 * dblR * dblR * ls * ls)
A = (dblHZ - AK) * (dblHZ - AK) / (6 * dblR * ls)
AX = HZX + L * Cos(aDC + PI - A)
AY = HZY + L * Sin(aDC + PI - A)
Else
L = (dblHZ - AK) - (dblHZ - AK) ^ 5 / (90 * dblR * dblR * ls * ls)
A = (dblHZ - AK) * (dblHZ - AK) / (6 * dblR * ls)
AX = HZX + L * Cos(aDC + PI + A)
AY = HZY + L * Sin(aDC + PI + A)
End If
Else '判断A点里程在圆直点到终点之间
AX = HZX + (AK - dblHZ) * Cos(aDC)
AY = HZY + (AK - dblHZ) * Sin(aDC) End If
计算里程B的坐标与计算里程A的坐标相似,在这里不做特殊说明。
[1] 佟彪.VB语言与测量程序设计[M].北京:中国电力出版社.
[2] 王浩.多种缓和曲线线型通用计算模型的编程实现,地下交通工程与工程安全——第五届中国国际隧道工程研讨会文集[Z].国际会议.
[3] 王中伟.卡西欧fx-5800P计算机道路施工放样程序从入门到精通[M].广州:华南理工大学出版社.
2016-04-26
郭有宝(1984-),男,黑龙江人,助教,主要从事测绘工程及高职测量教学工作研究。
U412
C
1008-3383(2017)02-0073-03