Distance between two origins

3 ビュー (過去 30 日間)
alessiadele
alessiadele 2019 年 2 月 1 日
コメント済み: madhan ravi 2019 年 2 月 2 日
Hi!
I hope I can explain clearly my situation.
Basically, I know the position of a point with respect two different references; so, say 'tc' and 'tb' the two vectors:
tc=[xc,yc,zc,1]' and tb=[xb,yb,zb,1]'.
There is a 1 at the end of each vector because of the relationship between the two points:
tc=Tbc*tb
Where Tbc is the transformation matrix 4x4 that allow me to pass from tb to tc; in particular:
Tbc=[Rbc, obc;
0, 0, 0, 1];
Where Rbc is the rotation matrix between the two known vectors, and obc is the distance between the origins of the two reference systems.
Now, I really don't know how to calculate the distance between the two origins; I've tried with some triangle's theorem, namely I've evaluated the angle between the two vectors and then I've calculated obc like it was the third side of the triangle, using the cosine's theorem, but the result is a vector with too high values, maybe because I can't use this rule for a 3d vector.
I really don't have other ideas.
Can you please suggest me something?
  4 件のコメント
KSSV
KSSV 2019 年 2 月 1 日
There are lot many distances possible...depending ont he formula ....do you have any idea what distance it could be?
alessiadele
alessiadele 2019 年 2 月 2 日
編集済み: alessiadele 2019 年 2 月 2 日
Okay, here's my situation:
I hope the image will be shown properly!
I know p0 and p1, and I have an algorithm that allows me to evaluate the Rotation Matrix. But to complete the program, I need to calculate o10 vector. Consider that p0 and p1 are 3x1 vector (in other words, I have three coordinates for each vector), I think that I can't use the triangle theorem i the 3d space.
I could calculate the difference between O0 and O1, but actually I don't know wich parameters I could use, or wich value or coordinate I could subtract..
Sorry if something is not clear, but I have some difficulties to explain some concept in english!
Thank you!

サインインしてコメントする。

採用された回答

alessiadele
alessiadele 2019 年 2 月 2 日
Okay, done! I'm writing here the solution, so it could be helpful if someone will have my same problem!
Basically, I've inverted a linear relationship between the vector, that is:
p0=o10+R*p1
Now, if you know p0 and p1, you can calculate R and then:
o10=p0-R*p1
It's been really easy, but I didn't know this equation.
I hope it can help someone else! :D
  1 件のコメント
madhan ravi
madhan ravi 2019 年 2 月 2 日
Please accept thhis answer so it is offically an answer to the question.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by