• Support PF! Buy your school textbooks, materials and every day products Here!

Transformations Between Coordinate Systems

  • Thread starter Shpoon
  • Start date
  • #1
3
0

Homework Statement


The velocity of a ball in an x-y coordinate system is (10, -5) where distance is measured in metres. A second coordinate system, p-q, uses units of feet (1 ft = 0.3048 m). The p-axis is oriented at alpha = 15 degrees relative to the x-axis. The origin of the p-q system is located at (10m, 2m) in the x-y system. What is the velocity vector of the ball in the p-q coordinate system?

Homework Equations


Basic math, rotation matrix. I'm still not 100% on why, but the way we are taught, the rotation matrix is [cos sin; -sin, cos] for a CCW rotation.


The Attempt at a Solution



[p;q]=3.28ft/m*([cos15 sin15; -sin15 cos15] [10; -5]+[10;2])

I *think* I'm correct on the +[10;2] rather than a negative since from the x-y frame, it moves in the postive direction.

However, I can't seem to get the answer of "(27.5, -24.3) ft/s" even when I mess around with varying negatives and stuff.

There's a followup question which involves going back the other way, which I would have done as:

[x;y]=0.3048([cos(-15) sin(-15); -sin(-15) cos(-15)][p;q]-[10;2])

But seeing as the first one isn't giving the correct answer I doubt that this will work either....
 

Answers and Replies

  • #2
tiny-tim
Science Advisor
Homework Helper
25,832
249
Welcome to PF!

Hi Shpoon! Welcome to PF! :wink:
… The origin of the p-q system is located at (10m, 2m) in the x-y system. What is the velocity vector of the ball in the p-q coordinate system?

[p;q]=3.28ft/m*([cos15 sin15; -sin15 cos15] [10; -5]+[10;2])

I *think* I'm correct on the +[10;2] rather than a negative since from the x-y frame, it moves in the postive direction.

There's a followup question which involves going back the other way, which I would have done as:

[x;y]=0.3048([cos(-15) sin(-15); -sin(-15) cos(-15)][p;q]-[10;2])
erm :redface:

how can the position of the origin affect a velocity vector? :smile:
 
  • #3
3
0
*facepalm*

Story of my life here misreading a question and spending a LONG, FRUSTRATED time on it.

Thanks, remove the position shift and there we go.

I wish there was a delete button right now ;)

Edit: Actually, I'll make use of this then:

For the next question it's a conversion from a p/q position to x/y position (no velocities). Given p,q = 1,3

Turns out my equation "[x;y]=0.3048([cos(-15) sin(-15); -sin(-15) cos(-15)][p;q]-[10;2])" is wrong as it should be +[10;2] at the end there. Why exactly is this? I can't seem to wrap my head around it...

From the original, I see it as (0,0) in the p,q frame is at (10,2) in the x,y so any coord given in p,q should have 10,2 subtracted to get x,y and vice versa, but apparently it's the opposite? Why?
 
Last edited:
  • #4
tiny-tim
Science Advisor
Homework Helper
25,832
249
Turns out my equation "[x;y]=0.3048([cos(-15) sin(-15); -sin(-15) cos(-15)][p;q]-[10;2])" is wrong as it should be +[10;2] at the end there. Why exactly is this? I can't seem to wrap my head around it...

From the original, I see it as (0,0) in the p,q frame is at (10,2) in the x,y so any coord given in p,q should have 10,2 subtracted to get x,y and vice versa, but apparently it's the opposite? Why?
hmm :redface:

without adding anything, (0,0) in the p,q frame would go to (0,0) in the x,y frame.

But you want it to go to (10,2) in the x,y frame …

so you have to add (10,2) :smile:

are you getting enough sleep? :zzz:
 
  • #5
3
0
hmm :redface:

without adding anything, (0,0) in the p,q frame would go to (0,0) in the x,y frame.

But you want it to go to (10,2) in the x,y frame …

so you have to add (10,2) :smile:

are you getting enough sleep? :zzz:
Not at all, I'm busy cramming ;)

Bear with me please, I'm still not getting this.

Without adding anything, (0,0) in the pq frame would be (10,2) in the x,y, NOT (0,0), no? The p,q frame is already shifted +10,+2. (correct me here if I'm wrong, this is in disagreement with what you wrote above)..

So if you want to change back to the x,y frame, one would subtract 10,2.

At least that's what my logic is seeing. This is just one of these things that is really bothering me, sorry.

Attached is a crude drawing of the shift (w/o rotations and such). Assuming there's a point p on the x,y at (0,0), and p' on the p,q at p,q's (0,0), I would think that since p' is situated at (10,2) on the x,y, to change a point between p,q to x,y, after doing the scaling and rotations (and thus, your units are back to x,y units), one would subtract 10,2 to return.

I'm really failing to see why you would add another 10,2 to return to 0,0 in the xy

http://img28.imageshack.us/img28/9523/shift.jpg [Broken]

Edit: Ahh, after talking it over with some friends I realize that I have just been conceptually thinking about it wrong...Thinking about it soley within one coord system helped. Something clicked, thanks for being patient ;)
 
Last edited by a moderator:

Related Threads for: Transformations Between Coordinate Systems

  • Last Post
Replies
5
Views
2K
  • Last Post
Replies
3
Views
918
  • Last Post
Replies
5
Views
2K
Replies
3
Views
2K
Replies
2
Views
2K
Replies
3
Views
3K
  • Last Post
Replies
6
Views
916
  • Last Post
Replies
20
Views
1K
Top