29 lines
1.0 KiB
Python
29 lines
1.0 KiB
Python
from Stochastisches_Modell import StochastischesModell
|
|
|
|
def ausgleichung(A, dl, stoch_modell: StochastischesModell, P):
|
|
|
|
Q_ll, P = stoch_modell.berechne_Qll_P() #Kofaktormatrix und P-Matrix
|
|
N = A.T * P * A #Normalgleichungsmatrix N
|
|
Q_xx = N.inv() #Kofaktormatrix der Unbekannten Qxx
|
|
n = A.T * P * dl #Absolutgliedvektor n
|
|
|
|
dx = N.LUsolve(n) #Zuschlagsvektor dx
|
|
|
|
v = dl - A * dx #Residuenvektor v
|
|
|
|
Q_ll_dach = A * Q_xx * A.T
|
|
Q_vv = stoch_modell.berechne_Qvv(A, P, Q_xx) #Kofaktormatrix der Verbesserungen Qvv
|
|
R = stoch_modell.berechne_R(Q_vv, P) #Redundanzmatrix R
|
|
r = stoch_modell.berechne_r(R) #Redundanzanteile als Vektor r
|
|
|
|
return {
|
|
"dx": dx,
|
|
"v": v,
|
|
"P": P,
|
|
"N": N,
|
|
"Q_xx": Q_xx,
|
|
"Q_ll_dach": Q_ll_dach,
|
|
"Q_vv": Q_vv,
|
|
"R": R,
|
|
"r": r,
|
|
} |