zusammenfügen2
This commit is contained in:
@@ -110,6 +110,11 @@ class FunktionalesModell:
|
||||
zw = sp.symbols(f"{beobachtungenID}_ZW_{beobachtungsgruppeID}_{standpunkt}_{zielpunkt}")
|
||||
s = sp.symbols(f"{beobachtungenID}_SD_{beobachtungsgruppeID}_{standpunkt}_{zielpunkt}")
|
||||
|
||||
azimut_berechnet = sp.symbols(f"azimut_berechnet_{beobachtungsgruppeID}_{standpunkt}_{zielpunkt}")
|
||||
zw_berechnet = sp.symbols(f"zw_berechnet_{beobachtungsgruppeID}_{standpunkt}_{zielpunkt}")
|
||||
s_berechnet = sp.symbols(f"strecke_berechnet_{beobachtungsgruppeID}_{standpunkt}_{zielpunkt}")
|
||||
|
||||
|
||||
if beobachtungsart == "tachymeter_distanz":
|
||||
beobachtungsgleichung = sp.sqrt((X_zp - X_sp) ** 2 + (Y_zp - Y_sp) ** 2 + (Z_zp - Z_sp) ** 2)
|
||||
liste_beobachtungsgleichungen_distanz.append(beobachtungsgleichung)
|
||||
@@ -120,133 +125,64 @@ class FunktionalesModell:
|
||||
|
||||
elif beobachtungsart == "tachymeter_richtung":
|
||||
|
||||
# Richtung nach Otepka: r = a12 + O
|
||||
|
||||
# dB und dL werden bewusst weggelassen
|
||||
|
||||
dX = X_zp - X_sp
|
||||
|
||||
dY = Y_zp - Y_sp
|
||||
|
||||
dZ = Z_zp - Z_sp
|
||||
|
||||
# Lokales System: x_loc = Nord, y_loc = Ost
|
||||
|
||||
x_loc = (-sp.sin(B_sp) * sp.cos(L_sp)) * dX + (-sp.sin(B_sp) * sp.sin(L_sp)) * dY + (sp.cos(B_sp)) * dZ
|
||||
|
||||
y_loc = (-sp.sin(L_sp)) * dX + (sp.cos(L_sp)) * dY
|
||||
|
||||
# Otepka-Nenner: s12 * sin(zw12) = sqrt(x_loc^2 + y_loc^2)
|
||||
|
||||
s_horiz = sp.sqrt(x_loc ** 2 + y_loc ** 2)
|
||||
|
||||
# sin(t12), cos(t12) im Horizontsystem (t12 = Azimut, rechtsdrehend, Bezug Nord)
|
||||
|
||||
sin_t = y_loc / s_horiz
|
||||
|
||||
cos_t = x_loc / s_horiz
|
||||
|
||||
# Partielle Ableitungen nach Otepka (15) ohne dB und dL
|
||||
|
||||
d_r_dX_zp = (sp.sin(B_sp) * sp.cos(L_sp) * sin_t - sp.sin(L_sp) * cos_t) / s_horiz
|
||||
|
||||
d_r_dY_zp = (sp.sin(B_sp) * sp.sin(L_sp) * sin_t + sp.cos(L_sp) * cos_t) / s_horiz
|
||||
|
||||
d_r_dZ_zp = (-sp.cos(B_sp) * sin_t) / s_horiz
|
||||
|
||||
# Standpunkt-Ableitungen (SP) = negatives Vorzeichen
|
||||
|
||||
d_r_dX_sp, d_r_dY_sp, d_r_dZ_sp = -d_r_dX_zp, -d_r_dY_zp, -d_r_dZ_zp
|
||||
|
||||
# Orientierung: r = a + O => ∂r/∂O = -1
|
||||
|
||||
# for beobachtungenID, beobachtungsgruppeID, standpunkt, zielpunkt in liste_id_standpunkt_zielpunkt:
|
||||
d_r_dX_zp = (
|
||||
(sp.sin(B_sp) * sp.cos(L_sp) * sp.sin(azimut_berechnet) - sp.sin(L_sp) * sp.cos(azimut_berechnet)) / (
|
||||
s_berechnet * sp.sin(zw_berechnet)))
|
||||
d_r_dX_sp = - d_r_dX_zp
|
||||
d_r_dY_zp = (
|
||||
(sp.sin(B_sp) * sp.sin(L_sp) * sp.sin(azimut_berechnet) + sp.cos(L_sp) * sp.cos(azimut_berechnet)) / (
|
||||
s_berechnet * sp.sin(zw_berechnet)))
|
||||
d_r_dY_sp = - d_r_dY_zp
|
||||
d_r_dZ_zp = ((-sp.cos(B_sp) * sp.sin(azimut_berechnet) / (s_berechnet * sp.sin(zw_berechnet))))
|
||||
d_r_dZ_sp = - d_r_dZ_zp
|
||||
d_r_dO_sp = -1
|
||||
|
||||
zeile_A_Matrix = []
|
||||
|
||||
for punkt in liste_punktnummern:
|
||||
|
||||
if punkt == standpunkt:
|
||||
|
||||
zeile_A_Matrix.extend([d_r_dX_sp, d_r_dY_sp, d_r_dZ_sp])
|
||||
|
||||
elif punkt == zielpunkt:
|
||||
|
||||
zeile_A_Matrix.extend([d_r_dX_zp, d_r_dY_zp, d_r_dZ_zp])
|
||||
|
||||
else:
|
||||
|
||||
zeile_A_Matrix.extend([0, 0, 0])
|
||||
|
||||
for orientierung in liste_orientierungsunbekannte:
|
||||
zeile_A_Matrix.append(d_r_dO_sp if orientierung == beobachtungsgruppeID else 0)
|
||||
if orientierung == beobachtungsgruppeID:
|
||||
zeile_A_Matrix.append(d_r_dO_sp)
|
||||
else:
|
||||
zeile_A_Matrix.append(0)
|
||||
|
||||
liste_A_richtung_zeilen.append(zeile_A_Matrix)
|
||||
|
||||
liste_zeilenbeschriftungen_richtung.append(
|
||||
|
||||
f"{beobachtungenID}_R_{beobachtungsgruppeID}_{standpunkt}_{zielpunkt}"
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
elif beobachtungsart == "tachymeter_zenitwinkel":
|
||||
|
||||
# Zenitwinkel nach Otepka (16), dB und dL bewusst weggelassen
|
||||
|
||||
dX = X_zp - X_sp
|
||||
|
||||
dY = Y_zp - Y_sp
|
||||
|
||||
dZ = Z_zp - Z_sp
|
||||
|
||||
s_geom = sp.sqrt(dX ** 2 + dY ** 2 + dZ ** 2)
|
||||
|
||||
z_loc = (sp.cos(B_sp) * sp.cos(L_sp)) * dX + (sp.cos(B_sp) * sp.sin(L_sp)) * dY + (sp.sin(B_sp)) * dZ
|
||||
|
||||
cos_zw = z_loc / s_geom
|
||||
|
||||
sin_zw = sp.sqrt(1 - cos_zw ** 2)
|
||||
|
||||
denom = (s_geom ** 2) * sin_zw
|
||||
|
||||
d_zw_dX_zp = (dX * cos_zw - s_geom * sp.cos(B_sp) * sp.cos(L_sp)) / denom
|
||||
|
||||
d_zw_dY_zp = (dY * cos_zw - s_geom * sp.cos(B_sp) * sp.sin(L_sp)) / denom
|
||||
|
||||
d_zw_dZ_zp = (dZ * cos_zw - s_geom * sp.sin(B_sp)) / denom
|
||||
|
||||
d_zw_dX_sp, d_zw_dY_sp, d_zw_dZ_sp = -d_zw_dX_zp, -d_zw_dY_zp, -d_zw_dZ_zp
|
||||
d_r_dX_zp = ((X_zp - X_sp) * sp.cos(zw_berechnet) - s_berechnet * sp.cos(B_sp) * sp.cos(L_sp)) / (s_berechnet ** 2 * sp.sin(zw_berechnet))
|
||||
d_r_dX_sp = - d_r_dX_zp
|
||||
d_r_dY_zp = ((Y_zp - Y_sp) * sp.cos(zw_berechnet) - s_berechnet * sp.cos(B_sp) * sp.sin(L_sp)) / (s_berechnet ** 2 * sp.sin(zw_berechnet))
|
||||
d_r_dY_sp = - d_r_dY_zp
|
||||
d_r_dZ_zp = ((Z_zp - Z_sp) * sp.cos(zw_berechnet) - s_berechnet * sp.sin(B_sp)) / (s_berechnet ** 2 * sp.sin(zw_berechnet))
|
||||
d_r_dZ_sp = - d_r_dZ_zp
|
||||
|
||||
zeile_A_Matrix = []
|
||||
|
||||
for punkt in liste_punktnummern:
|
||||
|
||||
if punkt == standpunkt:
|
||||
|
||||
zeile_A_Matrix.extend([d_zw_dX_sp, d_zw_dY_sp, d_zw_dZ_sp])
|
||||
|
||||
zeile_A_Matrix.extend([d_r_dX_sp, d_r_dY_sp, d_r_dZ_sp])
|
||||
elif punkt == zielpunkt:
|
||||
|
||||
zeile_A_Matrix.extend([d_zw_dX_zp, d_zw_dY_zp, d_zw_dZ_zp])
|
||||
|
||||
zeile_A_Matrix.extend([d_r_dX_zp, d_r_dY_zp, d_r_dZ_zp])
|
||||
else:
|
||||
|
||||
zeile_A_Matrix.extend([0, 0, 0])
|
||||
|
||||
# Zenitwinkel hat keine Orientierungsunbekannte
|
||||
|
||||
for orientierung in liste_orientierungsunbekannte:
|
||||
zeile_A_Matrix.append(0)
|
||||
|
||||
liste_A_zenitwinkel_zeilen.append(zeile_A_Matrix)
|
||||
|
||||
liste_zeilenbeschriftungen_zenitwinkel.append(
|
||||
|
||||
liste_zeilenbeschriftungen_richtung.append(
|
||||
f"{beobachtungenID}_ZW_{beobachtungsgruppeID}_{standpunkt}_{zielpunkt}"
|
||||
|
||||
)
|
||||
|
||||
if liste_beobachtungen_rohdaten_gnssbasislinien != []:
|
||||
@@ -466,7 +402,7 @@ class FunktionalesModell:
|
||||
elif beobachtungsart == "R":
|
||||
|
||||
#O_sp = sp.Symbol(f"O_{beobachtungsgruppeID}")
|
||||
r_sp_zp = sp.Symbol(f"richtung_berechnet_{standpunkt}_{zielpunkt}")
|
||||
r_sp_zp = sp.Symbol(f"richtung_berechnet_{beobachtungsgruppeID}_{standpunkt}_{zielpunkt}")
|
||||
|
||||
# Lokales System: x_loc = Nord, y_loc = Ost
|
||||
#x_loc = (-sp.sin(B_sp) * sp.cos(L_sp)) * dX + (-sp.sin(B_sp) * sp.sin(L_sp)) * dY + (sp.cos(B_sp)) * dZ
|
||||
@@ -492,7 +428,7 @@ class FunktionalesModell:
|
||||
|
||||
#zw = sp.acos(z_loc / s_geom)
|
||||
|
||||
zw_sp_zp = sp.Symbol(f"zw_berechnet_{standpunkt}_{zielpunkt}")
|
||||
zw_sp_zp = sp.Symbol(f"zw_berechnet_{beobachtungsgruppeID}_{standpunkt}_{zielpunkt}")
|
||||
|
||||
liste_beobachtungsgleichungen.append(zw_sp_zp)
|
||||
|
||||
@@ -653,27 +589,33 @@ class FunktionalesModell:
|
||||
# O_sym = sp.symbols(f"O_{beobachtungsgruppeID}")
|
||||
# substitutionen[O_sym] = float(orientierung)
|
||||
|
||||
for standpunkt, zielpunkt, azimut, richtung, zenitwinkel in liste_azimut_richtungen:
|
||||
richtung_sym = sp.symbols(f"richtung_berechnet_{standpunkt}_{zielpunkt}")
|
||||
for beobachtungsgruppeID, standpunkt, zielpunkt, azimut, richtung, zenitwinkel, schraegstrecke in liste_azimut_richtungen:
|
||||
richtung_sym = sp.symbols(f"richtung_berechnet_{beobachtungsgruppeID}_{standpunkt}_{zielpunkt}")
|
||||
substitutionen[richtung_sym] = float(richtung)
|
||||
|
||||
zenitwinkel_sym = sp.symbols(f"zw_berechnet_{standpunkt}_{zielpunkt}")
|
||||
azimut_sym = sp.symbols(f"azimut_berechnet_{beobachtungsgruppeID}_{standpunkt}_{zielpunkt}")
|
||||
substitutionen[azimut_sym] = float(azimut)
|
||||
|
||||
zenitwinkel_sym = sp.symbols(f"zw_berechnet_{beobachtungsgruppeID}_{standpunkt}_{zielpunkt}")
|
||||
substitutionen[zenitwinkel_sym] = float(zenitwinkel)
|
||||
|
||||
schraegstrecke_sym = sp.symbols(f"strecke_berechnet_{beobachtungsgruppeID}_{standpunkt}_{zielpunkt}")
|
||||
substitutionen[schraegstrecke_sym] = float(schraegstrecke)
|
||||
|
||||
|
||||
#for standpunkt, zielpunkt, beobachtungenID, beobachtungsgruppeID, tachymeter_richtung, tachymeter_zenitwinkel, tachymeter_distanz in liste_beobachtungen_tachymeter:
|
||||
#alpha = sp.symbols(f"{beobachtungenID}_R_{beobachtungsgruppeID}_{standpunkt}_{zielpunkt}")
|
||||
#zw = sp.symbols(f"{beobachtungenID}_ZW_{beobachtungsgruppeID}_{standpunkt}_{zielpunkt}")
|
||||
#s = sp.symbols(f"{beobachtungenID}_SD_{beobachtungsgruppeID}_{standpunkt}_{zielpunkt}")
|
||||
|
||||
#if tachymeter_richtung is None and tachymeter_zenitwinkel is None and tachymeter_distanz is None:
|
||||
# continue
|
||||
for standpunkt, zielpunkt, beobachtungenID, beobachtungsgruppeID, tachymeter_richtung, tachymeter_zenitwinkel, tachymeter_distanz in liste_beobachtungen_tachymeter:
|
||||
alpha = sp.symbols(f"{beobachtungenID}_R_{beobachtungsgruppeID}_{standpunkt}_{zielpunkt}")
|
||||
zw = sp.symbols(f"{beobachtungenID}_ZW_{beobachtungsgruppeID}_{standpunkt}_{zielpunkt}")
|
||||
s = sp.symbols(f"{beobachtungenID}_SD_{beobachtungsgruppeID}_{standpunkt}_{zielpunkt}")
|
||||
|
||||
#substitutionen[alpha] = float(tachymeter_richtung)
|
||||
#substitutionen[zw] = float(tachymeter_zenitwinkel)
|
||||
#substitutionen[s] = float(tachymeter_distanz)
|
||||
#substitutionen[sp.Symbol(f"O{beobachtungsgruppeID}")] = 0.0
|
||||
if tachymeter_richtung is None and tachymeter_zenitwinkel is None and tachymeter_distanz is None:
|
||||
continue
|
||||
|
||||
substitutionen[alpha] = float(tachymeter_richtung)
|
||||
substitutionen[zw] = float(tachymeter_zenitwinkel)
|
||||
substitutionen[s] = float(tachymeter_distanz)
|
||||
substitutionen[sp.Symbol(f"O{beobachtungsgruppeID}")] = 0.0
|
||||
|
||||
for beobachtungenID, punktnummer_sp, punktnummer_zp, gnss_bx, gnss_by, gnss_bz, gnss_s0, gnss_cxx, gnss_cxy, gnss_cxz, gnss_cyy, gnss_cyz, gnss_czz in liste_beobachtungen_gnssbasislinien:
|
||||
beobachtungenID = str(beobachtungenID).strip()
|
||||
|
||||
Reference in New Issue
Block a user