Thank you.

I will give complete data and problem statement :

I am attaching a figure related to my problem. : Problem_final2.jpg .

In the Figure Triangles ASB and ASC are above the sphere, Triangle AOB is towards inside the sphere, with O(0,0,0) the center of sphere.

So triangles ASB and AOB are in different planes with AB common .

triangles ASC and AOC are in different planes with AC common.

triangles ASC and ASB are in diffrent planes with line AS in common.

Lines SA, SB and SC are tangents to the sphere. so SA,SB,SC make 90 degrees with OA,OB, OC respectively.

1) In triangle AOB I have :

vertex O = (0,0,0)

side OA = 6378.14kms

side OB = 6378.14kms

I don't have any angles in triangles AOB

2) In triangle AOC

vertex O = (0,0,0)

side OA = 6378.14kms

side OC = 6378.14kms

I don't have any angles in triangles AOC

3) In Triangle ASB I have :

dcs of SA=[-0.839790306911 -0.518228990267 -0.161836195347]

dcs of SB=[-0.862922555238 -0.488357439399 0.129891013321]

4) In Triangle ASC

dcs of SA=[-0.839790306911 -0.518228990267 -0.161836195347]

dcs of SC=[-0.898863966995 -0.433861497526 0.061707126937]

Therefore:

5) dcs of AB = dcs of SA- dcs of SB (vector addition theorem)

dcs of AC = dcs of SA- dcs of SC (vector addition theorem)

Note: AB and AC have to be normalized AB = AB/norm(AB) and AC= AC/norm(AC)

where norm(vec) = sqrt( vecx^2 +vecy^2 +vecz^2)

6) So I will get all angles of triangle ASB as below : (output will be in radians, convert to degrees by multiplying R.H.S with 180/pi)

angle ASB = acos(dot(SA,SB))

angle SAB = acos(dot(SA,AB))

angle SBA = acos(dot(SB,AB))

7) Similarly angles of triangle ASC

angle ASC = acos(dot(SA,SC))

angle SAC = acos(dot(SA,AC))

angle SCA = acos(dot(SC,AC))

8) Triangle ASB and AOB are in different planes, with a common side AB.

and Angle SAO =90 degrees . Angle SBO = 90 degrees.

9) Triangle ASC and AOC are in different planes, with a common side AC.

and Angle SAO =90 degrees . Angle SCO = 90 degrees.

10) I thought I can find :

Angle BAO = angle SAO - angle SAB = 90 - angle SAB. - (1)

Angle CAO = angle SAO - angle SAC = 90 - angle SAC . - (2)

Are (1) and (2) valid or not? I think I cannot subtract two angles in different planes.

11) To find Direction cosines of OA(l,m,n) , Using Dot Product of two vectors I can write 3 eqns as below:

[FONT="]l*l1 + m*m1 + n*n1 = 0 ( because RHS=cos(SAO) which is cos(90) =0. [/FONT]) -(3)

[FONT="]l*l2 + m*m2 +n*n2 = cos([/FONT][FONT="][/FONT][FONT="]BAO) -(4)[/FONT]

[FONT="]l*l3 + m*m3 +n*n3 = cos([/FONT][FONT="][/FONT][FONT="]CAO) -(5)[/FONT]

where Direction cosines of SA (l1,m1,n1)

where Direction cosines of AB (l2,m2,n2)

where Direction cosines of AC (l3,m3,n3)

12) Three eqns , three unknowns I can find direction ratios of OA.My aim is to find the coordinates of vertex A.

If I get direction cosines OA (l,m,n) , Then coordinates of A is (l*R, m*R,n*R) where R is length of OA which is 6378.14kms.

**But since angles BAO and CAO are not valid because (1) and (2) not valid.. So (4) and (5) also not valid. So I am not getting proper output. **

**Note : for cross verification:**

If I get coordinates of A, I can get coordinates of S. for Simulation purpose I have S coordinates as below:

Coordinates of S=[35244.13549313 23114.23482794 524.26711972]

Let Coordinates of A be (x1,y1,z1). If A is valid, it should satisfy below eqns:

dcs of SA(2)*S(1)-dcs of SA(1)*S(2) = dcs of SA (2)*x1-dcs of SA (1)*y1 ---(6)

dcs of SA(3)*S(2)-dcs of SA(2)*S(3) = dcs of SA (3)*y1-dcs of SA (2)*z1 ---(7)

dcs of SA(3)*S(1)-dcs of SA(1)*S(3) = dcs of SA (3)*x1-dcs of SA (1)*z1 ---(8)

** in (6) (7) (8) L.HS need not be exactly same as R.H.S , If approximately equal also I am happy, my method is right**

But my A which I found using steps 1 to 12 is not satisfying eqns (6),(7),(8). Its completely off. Please help.

So how can I find Directions cosines of OA or coordinates of point A. is there any other method?

Thanks.

Note: Above equations(6),(7),(8) follows from the fact that

(x-x1)/l1 = (y-y1)/m1 = (z-z1)/n1

where coordinates of S (x,y,z)

coordinates of A(x1,y1,z1)

direction cosines of SA (l1,m1,n1)

Note : S is used only for cross verification ie, simulation purpose. In reality position of S is not known.

(Worried)