AJO_Ejercicio3_nolineal

hace 203 días por etlopez

xA,yA = 729432.109,4321085.148 xB,yB = 726704.726,4317455.021 xC,yC = 728429.349,4313441.445 alfa=167.9926 beta=91.2328 gamma=33.3021 
       
var('x,y') F(x,y) = (200/pi*atan2(x-xA,y-yA),200/pi*atan2(x-xB,y-yB),200/pi*atan2(x-xC,y-yC)) point((xA,yA),figsize=5)+point((xB,yB))+point((xC,yC)) 
       
#Según esto, podríamos por ejemplo tomar como punto inicial como (730000,4318000) x0,y0=730000,4318000 
       
F(x0,y0).n() 
       
(188.411302122325, 89.5658993150761, 21.1237781149909)
(188.411302122325, 89.5658993150761, 21.1237781149909)
L = vector([alfa, beta, gamma]).column() P = matrix([[4,0,0],[0,1,0],[0,0,3]]); P 
       
[4 0 0]
[0 1 0]
[0 0 3]
[4 0 0]
[0 1 0]
[0 0 3]
DeltaL=L-F(x0,y0).column(); V0=DeltaL.n() 
       
sumaV0 = transpose(V0)*P*V0 sumaV0 = sumaV0[0,0] sumaV0 
       
2115.40671513897
2115.40671513897
J0 = jacobian(F,(x,y))(x0,y0) DeltaL0 = V0 N=transpose(J0)*P*J0 T=transpose(J0)*P*DeltaL0 DeltaX0 = N^(-1)*T DeltaX0 = DeltaX0.n() DeltaX0 
       
[1007.18077490210]
[80.5503351861178]
[1007.18077490210]
[80.5503351861178]
x1=x0+DeltaX0[0,0] y1=y0+DeltaX0[1,0] print 'Punto (x1,y1):', (x1,y1) 
       
Punto (x1,y1): (731007.180774902, 4.31808055033519e6)
Punto (x1,y1): (731007.180774902, 4.31808055033519e6)
V1 = (L - F(x1,y1).column()).n() sumaV1 = transpose(V1)*P*V1 sumaV1 = sumaV1[0,0] sumaV0; sumaV1 
       
2115.40671513897
9.70368641922552
2115.40671513897
9.70368641922552
J1 = jacobian(F,(x,y))(x1,y1) DeltaL1 = V1 DeltaX1 = (transpose(J1)*P*J1)^(-1) * (transpose(J1)*P*DeltaL1) DeltaX1 = DeltaX1.n() DeltaX1 
       
[ 85.9484320477900]
[-17.9365142916564]
[ 85.9484320477900]
[-17.9365142916564]
x2=x1+DeltaX1[0,0] y2=y1+DeltaX1[1,0] print 'Punto (x2,y2):', (x2,y2) 
       
Punto (x2,y2): (731093.129206950, 4.31806261382089e6)
Punto (x2,y2): (731093.129206950, 4.31806261382089e6)
V2 = (L - F(x2,y2).column()).n() sumaV2 = transpose(V2)*P*V2 sumaV2 = sumaV2[0,0] sumaV0; sumaV1; sumaV2 
       
2115.40671513897
9.70368641922552
0.00180233295940027
2115.40671513897
9.70368641922552
0.00180233295940027
J2 = jacobian(F,(x,y))(x2,y2) DeltaL2 = V2 DeltaX2 = (transpose(J2)*P*J2)^(-1) * (transpose(J2)*P*DeltaL2) DeltaX2 = DeltaX2.n() DeltaX2 
       
[ 1.04675900234890]
[0.227923891093073]
[ 1.04675900234890]
[0.227923891093073]
x3=x2+DeltaX2[0,0] y3=y2+DeltaX2[1,0] print 'Punto (x3,y3):', (x3,y3) 
       
Punto (x3,y3): (731094.175965952, 4.31806284174479e6)
Punto (x3,y3): (731094.175965952, 4.31806284174479e6)
V3 = (L - F(x3,y3).column()).n() sumaV3 = transpose(V3)*P*V3 sumaV3 = sumaV3[0,0] sumaV0; sumaV1; sumaV2; sumaV3 
       
2115.40671513897
9.70368641922552
0.00180233295940027
0.0000942974303163611
2115.40671513897
9.70368641922552
0.00180233295940027
0.0000942974303163611
J3 = jacobian(F,(x,y))(x3,y3) DeltaL3 = V3 DeltaX3 = (transpose(J3)*P*J3)^(-1) * (transpose(J3)*P*DeltaL3) DeltaX3 = DeltaX3.n() DeltaX3 
       
[ 0.000134699194595297]
[-0.000100023235685507]
[ 0.000134699194595297]
[-0.000100023235685507]
#ya tenemos precisión de mm 
       
x4=x3+DeltaX3[0,0] y4=y3+DeltaX3[1,0] print 'Punto (x4,y4):', (x4,y4) 
       
Punto (x4,y4): (731094.176100651, 4.31806284164476e6)
Punto (x4,y4): (731094.176100651, 4.31806284164476e6)
redund = 1 vdr = sumaV3/redund QX=(transpose(J3)*P*J3)^(-1) SigmaX = vdr*QX SigmaX.n() 
       
[ 0.0812379279919900 -0.0470707756370596]
[-0.0470707756370596   0.178021347555533]
[ 0.0812379279919900 -0.0470707756370596]
[-0.0470707756370596   0.178021347555533]
def elipse(centro,matriz,prob,color="blue"): c = sqrt(r.qchisq(prob,1))._sage_() e = map(sqrt,matriz.eigenvalues()) smax = max(e).n() smin = min(e).n() try: alfa = arctan(matriz[0,1]/(smax^2-matriz[0,0])) except ZeroDivisionError: alfa = 0 return ellipse(centro, c*smax, c*smin, pi/2-alfa, color=color) punto4 = (x4,y4) point(punto4,figsize=8)+elipse(punto4,SigmaX,0.95)