Koordinatenumrechnung (Geodäsie/Vermessung)

Gast @, Friday, 26.11.2010, 12:14 (vor 5113 Tagen) @ MichaeL

Was mich jetzt aber glücklich macht: ich habe eine Exceltabelle gefunden

.. und Du willst uns an Deinem Glück nicht teilhaben lassen? Schade. Der nächste, der zu diesem Thema Hilfe benötigt, fängt also wieder von vorn an.

wer wird denn so ungeduldig mit den Hufen scharren :heuldoch: hexen kann ich nicht

Ich habe das Ganze in eine VB6-Funktion gepackt, und was soll ich sagen: es läuft wie gewünscht!!! Leider weiß ich nicht mehr, wo ich die Exceldatei gefunden hatte, denn eigentlich ist der Rechenweg ja nicht von mir, und da hätte ich den Urheber der Exceldatei ganz gerne genannt, er hat sich schließlich einen Haufen Arbeit gemacht.

Function WGS84toGK4(Laenge, Breite, Hoehe)      'Eingang: EPSG4326 (WGS84) ===> Ausgabe: EPSG31468 (Gauß-Krüger 4) {Format X@Y}
   Const Pi = 3.14159265358979
   Dim Exc2F3, Exc2F4, Exc2F5, Exc2B3, Exc2B4, Exc2B5, Exc2B7, Exc2B10, Exc2B11, Exc2B12
   Dim Exc3E2, Exc3E3, Exc3E4, Exc3E5, Exc3E6, Exc3E7, Exc3E8, Exc3F2, Exc3F3, Exc3F4, Exc3F5, Exc3F6, Exc3F7, Exc3F8
   'Dim Exc3A8, Exc3A9, Exc3A10, Exc3B8, Exc3B9, Exc3B10, Exc3C8, Exc3C9, Exc3C10
   Dim Exc3A13, Exc3A14, Exc3A15, Exc3A23, Exc3A24, Exc3A25
   Dim Exc5E3, Exc5E4, Exc5E5, Exc5B7, Exc5B8, Exc5B9, Exc5B10, Exc5B14, Exc5B15
   Dim Exc6E7, Exc6B7, Exc6B8, Exc6B9, Exc6B11, Exc6B13, Exc6B15, Exc6B17, Exc6B18, Exc6B21, Exc6B23, Exc6B24, Exc6B27
   Dim alpha, beta, gamma, delta, epsilon, eta
 
   Exc2F3 = 6378137
   Exc2F4 = 6356752.314
   Exc2F5 = (Exc2F3 ^ 2 - Exc2F4 ^ 2) / Exc2F3 ^ 2
 
   Exc2B7 = Exc2F3 / Sqr(1 - Exc2F5 * Sin(Breite / 180 * Pi) ^ 2)
 
   Exc2B10 = (Exc2B7 + Hoehe) * Cos(Breite / 180 * Pi) * Cos(Laenge / 180 * Pi)
   Exc2B11 = (Exc2B7 + Hoehe) * Cos(Breite / 180 * Pi) * Sin(Laenge / 180 * Pi)
   Exc2B12 = (Exc2B7 * Exc2F4 ^ 2 / Exc2F3 ^ 2 + Hoehe) * Sin(Breite / 180 * Pi)
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Exc3E2 = -584.8
   Exc3E3 = -67
   Exc3E4 = -400.3
   Exc3E5 = 0.105
   Exc3E6 = 0.013
   Exc3E7 = -2.378
   Exc3E8 = -10.29
   Exc3F5 = Exc3E5 * Pi / 180 / 3600
   Exc3F6 = Exc3E6 * Pi / 180 / 3600
   Exc3F7 = Exc3E7 * Pi / 180 / 3600
   Exc3F8 = Exc3E8 * 10 ^ -6 + 1
 
   'Exc3F2 =  /    1      Exc3F7  -Exc3F6 \     / Exc3E2 \
   'Exc3F3 = | -Exc3F7     1      Exc3F5   | * |  Exc3E3  | * Exc3F8
   'Exc3F4 =  \ Exc3F6   -Exc3F5     1    /     \ Exc3E4 /
   Exc3F2 = (Exc3E2 + Exc3F7 * Exc3E3 + (-Exc3F6) * Exc3E4) * Exc3F8
   Exc3F3 = ((-Exc3F7) * Exc3E2 + Exc3E3 + Exc3F5 * Exc3E4) * Exc3F8
   Exc3F4 = (Exc3F6 * Exc3E2 + (-Exc3F5) * Exc3E3 + Exc3E4) * Exc3F8
 
   'Exc3A13 =  /    1      Exc3F7  -Exc3F6 \     / Exc2B10 \
   'Exc3A14 = | -Exc3F7     1      Exc3F5   | * |  Exc2B11  |
   'Exc3A15 =  \ Exc3F6   -Exc3F5     1    /     \ Exc2B12 /
   Exc3A13 = (Exc2B10 + Exc3F7 * Exc2B11 + (-Exc3F6) * Exc2B12)
   Exc3A14 = ((-Exc3F7) * Exc2B10 + Exc2B11 + Exc3F5 * Exc2B12)
   Exc3A15 = (Exc3F6 * Exc2B10 + (-Exc3F5) * Exc2B11 + Exc2B12)
 
   Exc3A23 = Exc3A13 * Exc3F8 + Exc3F2
   Exc3A24 = Exc3A14 * Exc3F8 + Exc3F3
   Exc3A25 = Exc3A15 * Exc3F8 + Exc3F4
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Exc5E3 = 6377397.155
   Exc5E4 = 6356078.962
   Exc5E5 = (Exc5E3 ^ 2 - Exc5E4 ^ 2) / Exc5E3 ^ 2
 
   Exc5B7 = Sqr(Exc3A23 ^ 2 + Exc3A24 ^ 2)
   Exc5B8 = Atn(Exc3A25 * Exc5E3 / (Exc5B7 * Exc5E4))
   Exc5B9 = Atn((Exc3A25 + Exc5E5 * Exc5E3 ^ 2 / Exc5E4 * Sin(Exc5B8) ^ 3) / (Exc5B7 - Exc5E5 * Exc5E3 * Cos(Exc5B8) ^ 3))
   Exc5B10 = Atn(Exc3A24 / Exc3A23)
 
   Exc5B14 = Exc5B9 * 180 / Pi
   Exc5B15 = Exc5B10 * 180 / Pi
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Exc6E7 = (Exc5E3 - Exc5E4) / (Exc5E3 + Exc5E4)
   alpha = (Exc5E3 + Exc5E4) / 2 * (1 + 1 / 4 * Exc6E7 ^ 2 + 1 / 64 * Exc6E7 ^ 4)
   beta = -3 / 2 * Exc6E7 + 9 / 16 * Exc6E7 ^ 3 - 3 / 32 * Exc6E7 ^ 5
   gamma = 15 / 16 * Exc6E7 ^ 2 - 15 / 32 * Exc6E7 ^ 4
   delta = -35 / 48 * Exc6E7 ^ 3 + 105 / 256 * Exc6E7 ^ 5
   epsilon = 315 / 512 * Exc6E7 ^ 4
 
   If Abs(Exc5B15 - 6) < 1.5 Then
         Exc6B7 = 6
      ElseIf Abs(Exc5B15 - 9) < 1.5 Then
         Exc6B7 = 9
      ElseIf Abs(Exc5B15 - 12) < 1.5 Then
         Exc6B7 = 12
      Else
         Exc6B7 = 15
   End If
   Exc6B8 = (Exc5B15 - Exc6B7) * Pi / 180
   Exc6B9 = Exc5B14 / 180 * Pi
   Exc6B11 = Exc5E3 / Sqr(1 - Exc5E5 * Sin(Exc6B9) ^ 2)
   eta = Sqr(Exc5E3 ^ 2 / Exc5E4 ^ 2 * Exc5E5 * Cos(Exc6B9) ^ 2)
   Exc6B13 = Tan(Exc6B9)
   Exc6B15 = alpha * (Exc6B9 + beta * Sin(2 * Exc6B9) + gamma * Sin(4 * Exc6B9) + delta * Sin(6 * Exc6B9) + epsilon * Sin(8 * Exc6B9))
 
   Exc6B17 = Exc6B13 / 2 * Exc6B11 * Cos(Exc6B9) ^ 2 * Exc6B8 ^ 2
   Exc6B18 = Exc6B13 / 24 * Exc6B11 * Cos(Exc6B9) ^ 4 * (5 - Exc6B13 ^ 2 + 9 * eta ^ 2 + 4 * eta ^ 4) * Exc6B8 ^ 4
   Exc6B21 = Exc6B15 + Exc6B17 + Exc6B18
 
   Exc6B23 = Exc6B11 * Cos(Exc6B9) * Exc6B8
   Exc6B24 = Exc6B11 / 6 * Cos(Exc6B9) ^ 3 * (1 - Exc6B13 ^ 2 + eta ^ 2) * Exc6B8 ^ 3
   Exc6B27 = Exc6B23 + Exc6B24 + 500000 + Exc6B7 / 3 * 1000000
 
   WGS84toGK4 = Str(Exc6B27) + "@" + Str(Exc6B21)
End Function
 

ein schönes WE wünscht der Gast


gesamter Thread:

 RSS-Feed dieser Diskussion