摄影测量立体相对的前方交会VB程序代码

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Private Sub Command1_Click()

Dim zx1 As Single, zy1 As Single, zx2 As Single, zy2 As Single, zx3 As Single, zy3 As Single, zx4 As Single, zy4 As Single, zx5 As Single, zy5 As Single, zx6 As Single, zy6 As Single

Dim yx1 As Single, yy1 As Single, yx2 As Single, yy2 As Single, yx3 As Single, yy3 As Single, yx4 As Single, yy4 As Single, yx5 As Single, yy5 As Single, yx6 As Single, yy6 As Single

Dim f As Single

Dim jd11 As Single, jd12 As Single, jd13 As Single, jd21 As Single, jd22 As Single, jd23 As Single, jd1 As Single, jd2 As Single

Dim a1(1 To 3, 1 To 3) As Single

Dim a2(1 To 3, 1 To 3) As Single

Dim fz1(1 To 6, 1 To 3) As Single

Dim fz2(1 To 6, 1 To 3) As Single

Dim aa(1 To 6, 1 To 5) As Single

Dim p As String

Dim bx(1 To 6, 1 To 1) As Single

Dim n1(1 To 6, 1 To 1) As Single, n2(1 To 6, 1 To 1) As Single

Dim aat(1 To 5, 1 To 6) As Single

Dim aataa() As Double

ReDim aataa(1 To 5, 1 To 5)

Dim l(1 To 6, 1 To 1) As Single

Dim aatl(1 To 5, 1 To 1) As Single

Dim atal(1 To 5, 1 To 1) As Single

Dim jd11z As Single, jd12z As Single, jd13z As Single, jd21z As Single, jd22z As Single, jd23z As Single

Dim jd1z As Single, jd2z As Single

zx1 = Val(Text1(0).Text): zy1 = Val(Text1(1).Text): yx1 = Val(Text1(2).Text): yy1 = Val(Text1(3).Text)

zx2 = Val(Text1(4).Text): zy2 = Val(Text1(5).Text): yx2 = Val(Text1(6).Text): yy2 = Val(Text1(7).Text)

zx3 = Val(Text1(8).Text): zy3 = Val(Text1(9).Text): yx3 = Val(Text1(10).Text): yy3 = Val(Text1(11).Text)

zx4 = Val(Text1(12).Text): zy4 = Val(Text1(13).Text): yx4 = Val(Text1(14).Text): yy4 = Val(Text1(15).Text)

zx5 = Val(Text1(16).Text): zy5 = Val(Text1(17).Text): yx5 = Val(Text1(18).Text): yy5 = Val(Text1(19).Text)

zx6 = Val(Text1(20).Text): zy6 = Val(Text1(21).Text): yx6 = Val(Text1(22).Text): yy6 = Val(Text1(23).Text)

jd11 = Val(Text2(0).Text): jd12 = Val(Text2(1).Text): jd13 = Val(Text2(2).Text)

jd21 = Val(Text2(3).Text): jd22 = Val(Text2(4).Text): jd23 = Val(Text2(5).Text)

jd1 = Val(Text2(6).Text): jd2 = Val(Text2(7).Text)

f = Val(Text3.Text)

Do While jd11z < 0.3 * 0.00001 And jd12z < 0.3 * 0.00001 And jd13z < 0.3 * 0.00001 And jd21z < 0.3 * 0.00001 And jd22z < 0.3 * 0.00001 And jd23z < 0.3 * 0.00001 And jd1z < 0.3 * 0.00001 And jd2z < 0.3 * 0.00001

jd11z = jd11z + jd11: jd12z = jd12z + jd12: jd13z = jd13z + jd13

jd21z = jd21z + jd21: jd22z = jd22z + jd22: jd23z = jd23z + jd23

jd1z = jd1z + jd1: jd2z = jd2z + jd2

jd11 = jd11z: jd12 = jd12z: jd13 = jd13z: jd21 = jd21z: jd22 = jd22z: jd23 = jd23z: jd1 = jd1z: jd2 = jd2z

For i = 1 To 3

For j = 1 To 3

a1(1, 1) = Cos(jd11) * Cos(jd13) - Sin(jd11) * Sin(jd12) * Sin(jd13): a1(1, 2) = -Cos(jd11) * Sin(jd13) - Sin(jd11) * Sin(jd12) * Cos(jd13): a1(1, 3) = -Sin(jd11) * Cos(jd12)

a1(2, 1) = Cos(jd12) * Sin(jd13): a1(2, 2) = Cos(jd12) * Cos(jd13): a1(2, 3) = -Sin(jd12)

a1(3, 1) = Sin(jd11) * Cos(jd13) + Cos(jd11) * Sin(jd12) * Sin(jd13): a1(3, 2) = -Sin(jd11) * Sin(jd13) + Cos(jd11) * Sin(jd12) * Cos(jd13): a1(3, 3) = Cos(jd11) * Cos(jd12)

Next

Next

For i = 1 To 3

p = ""

For j = 1 To 3

a2(1, 1) = Cos(jd21) * Cn(jd22) * Sin(jd23): a2(1, 2) = -Cos(jd21) * Sin(jd23) - Sin(jd21) * Sin(jd22) * Cos(jd2

= Cos(jd22) * Cos(jd23): a2(2, 3) = -Sin(jd22)

a2(os(jd21) * Sin(jd22) * Cos(jd23): a2(3, 3) = Cos(jd21) * Cos(jd22)

Next

Next

For i = 1 To 6

For j = 1 To 3

fz1(1, 1) = a1(1, 1) * zx1 + a1(1, 2) * zy1 + a1(1, 3) * -f: fz1(1, 2) = a1(2, 1) * zx1 + a1(2, 2) * zy1 + a1(2, 3) * -f: fz1(1, 3) = a1(3, 1) * zx1 + a1(3, 2) * zy1 + a1(3, 3) * -f

fz1(2, 1) = a1(1, 1) * zx2 + a1(1, 2) * zy2 + a1(1, 3) * -f: fz1(2, 2) = a1(2, 1) * zx2 + a1(2, 2) * zy2 + a1(2, 3) * -f: fz1(2, 3) = a1(3, 1) * zx2 + a1(3, 2) * zy2 + a1(3, 3) * -f

fz1(3, 1) = a1(1, 1) * zx3 +3 + a1(1, 3) * -f: fz1(3, 2) = a1(2, 1) * zx3 + a1(2, 2) * zy3 + a1(2, 3) * -f: fz1(3, 3) =

a1(1, 3) * -f: fz1(4, 2) = a1(2, 1) * zx4 + a1(2, 2) * zy4 + a1(2, 3) * -f: fz1(4, 3) = a1(3, 1) * zx4 + a1(3, 2) * zy4 + a1(3, 3) * -f

fz1(5, 1) = a1(1, 1) * zx5 + a1(1, 2) * zy5 + a1(1, 3) * -f: fz1(5, 2) = a1(2, 1) * zx5 +

相关文档
最新文档